aptechka 0.55.0 → 0.56.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ "use strict";var C=i=>{throw TypeError(i)};var S=(i,h,t)=>h.has(i)||C("Cannot "+t);var e=(i,h,t)=>(S(i,h,"read from private field"),t?t.call(i):h.get(i)),u=(i,h,t)=>h.has(i)?C("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(i):h.set(i,t),r=(i,h,t,a)=>(S(i,h,"write to private field"),a?a.call(i,t):h.set(i,t),t),M=(i,h,t)=>(S(i,h,"access private method"),t);const y=require("./Store-GokLe_g-.cjs"),N=require("./math-GDWEqu7y.cjs"),z=require("./number-0243DApo.cjs"),q=require("./polyfills-Df4r-ETT.cjs");require("./index-Cqw2NKev.cjs");const I=require("./ticker/index.cjs"),O=require("./order/index.cjs");var d,f,b,m,A,s,l,c,n,g,x,P,F;class R extends y.Store{constructor(t,a){super(t||0,a);u(this,x);u(this,d);u(this,f,O.TICK_ORDER.ANIMATION);u(this,b);u(this,m,new y.Store(!1));u(this,A,0);u(this,s,0);u(this,l,-1/0);u(this,c,1/0);u(this,n,0);u(this,g,null);u(this,F,t=>{this.handleAnimationFrame(t)});r(this,s,this.current)}get direction(){return e(this,A)}get target(){return e(this,s)}get min(){return e(this,l)}set min(t){r(this,l,t),this.set(e(this,s),{equalize:!0})}get max(){return e(this,c)}set max(t){r(this,c,t),this.set(e(this,s),{equalize:!0})}get from(){return e(this,n)}get isRunning(){return e(this,m)}get delta(){return Math.abs(e(this,s)-e(this,n))}get deltaProgress(){return this.delta?z.preciseNumber(Math.abs(this.current-e(this,n))/this.delta,6):0}get distance(){return Math.abs(e(this,c)-e(this,l))}get distanceProgress(){return this.distance?z.preciseNumber(Math.abs(this.current-e(this,l))/this.distance,6):0}set(t,a){(e(this,s)!==t||a!=null&&a.restart)&&(r(this,g,t),this.updateOptions(a),r(this,g,null),e(this,s)!==this.current&&this.start())}shift(t,a){this.set(e(this,s)+t,a)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,m).current||(e(this,m).current=!0,I.ticker.subscribe(e(this,F),{maxFPS:e(this,d),order:e(this,f),culling:e(this,b)}))}unlistenAnimationFrame(){e(this,m).current&&(e(this,m).current=!1,I.ticker.unsubscribe(e(this,F)))}updateOptions(t){r(this,d,q.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,d))),r(this,f,q.nullishCoalescing(t==null?void 0:t.order,e(this,f))),r(this,b,q.nullishCoalescing(t==null?void 0:t.culling,e(this,b))),r(this,l,q.nullishCoalescing(t==null?void 0:t.min,e(this,l))),r(this,c,q.nullishCoalescing(t==null?void 0:t.max,e(this,c))),M(this,x,P).call(this,typeof e(this,g)=="number"?e(this,g):e(this,s)),t!=null&&t.equalize&&!(t!=null&&t.restart)&&(this.unlistenAnimationFrame(),this.current=r(this,n,e(this,s))),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=r(this,n,this.initial),t!=null&&t.equalize&&(this.current=r(this,n,e(this,s)))),typeof(t==null?void 0:t.current)=="number"&&r(this,n,this.current=t.current)}start(){this.listenAnimationFrame()}}d=new WeakMap,f=new WeakMap,b=new WeakMap,m=new WeakMap,A=new WeakMap,s=new WeakMap,l=new WeakMap,c=new WeakMap,n=new WeakMap,g=new WeakMap,x=new WeakSet,P=function(t){r(this,A,Math.sign(t-e(this,s))),r(this,s,N.clamp(t,e(this,l),e(this,c))),r(this,n,this.current)},F=new WeakMap;exports.Animation=R;
@@ -0,0 +1,107 @@
1
+ var q = (r) => {
2
+ throw TypeError(r);
3
+ };
4
+ var S = (r, h, t) => h.has(r) || q("Cannot " + t);
5
+ var e = (r, h, t) => (S(r, h, "read from private field"), t ? t.call(r) : h.get(r)), a = (r, h, t) => h.has(r) ? q("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(r) : h.set(r, t), i = (r, h, t, u) => (S(r, h, "write to private field"), u ? u.call(r, t) : h.set(r, t), t), z = (r, h, t) => (S(r, h, "access private method"), t);
6
+ import { S as I } from "./Store-swP_0ymB.js";
7
+ import { c as R } from "./math-BOBiC4TN.js";
8
+ import { p as P } from "./number-DwCxt_Ck.js";
9
+ import { n as A } from "./polyfills-DJrTJQky.js";
10
+ import "./index-euf5anj6.js";
11
+ import { ticker as y } from "./ticker/index.js";
12
+ import { TICK_ORDER as N } from "./order/index.js";
13
+ var g, d, b, l, F, s, n, c, m, f, M, O, x;
14
+ class V extends I {
15
+ constructor(t, u) {
16
+ super(t || 0, u);
17
+ a(this, M);
18
+ a(this, g);
19
+ a(this, d, N.ANIMATION);
20
+ a(this, b);
21
+ a(this, l, new I(!1));
22
+ a(this, F, 0);
23
+ a(this, s, 0);
24
+ a(this, n, -1 / 0);
25
+ a(this, c, 1 / 0);
26
+ a(this, m, 0);
27
+ a(this, f, null);
28
+ a(this, x, (t) => {
29
+ this.handleAnimationFrame(t);
30
+ });
31
+ i(this, s, this.current);
32
+ }
33
+ get direction() {
34
+ return e(this, F);
35
+ }
36
+ get target() {
37
+ return e(this, s);
38
+ }
39
+ get min() {
40
+ return e(this, n);
41
+ }
42
+ set min(t) {
43
+ i(this, n, t), this.set(e(this, s), {
44
+ equalize: !0
45
+ });
46
+ }
47
+ get max() {
48
+ return e(this, c);
49
+ }
50
+ set max(t) {
51
+ i(this, c, t), this.set(e(this, s), {
52
+ equalize: !0
53
+ });
54
+ }
55
+ get from() {
56
+ return e(this, m);
57
+ }
58
+ get isRunning() {
59
+ return e(this, l);
60
+ }
61
+ get delta() {
62
+ return Math.abs(e(this, s) - e(this, m));
63
+ }
64
+ get deltaProgress() {
65
+ return this.delta ? P(Math.abs(this.current - e(this, m)) / this.delta, 6) : 0;
66
+ }
67
+ get distance() {
68
+ return Math.abs(e(this, c) - e(this, n));
69
+ }
70
+ get distanceProgress() {
71
+ return this.distance ? P(Math.abs(this.current - e(this, n)) / this.distance, 6) : 0;
72
+ }
73
+ set(t, u) {
74
+ (e(this, s) !== t || u != null && u.restart) && (i(this, f, t), this.updateOptions(u), i(this, f, null), e(this, s) !== this.current && this.start());
75
+ }
76
+ shift(t, u) {
77
+ this.set(e(this, s) + t, u);
78
+ }
79
+ reset() {
80
+ super.reset(), this.set(this.initial, { equalize: !0 });
81
+ }
82
+ close() {
83
+ super.close(), this.reset(), this.unlistenAnimationFrame();
84
+ }
85
+ listenAnimationFrame() {
86
+ e(this, l).current || (e(this, l).current = !0, y.subscribe(e(this, x), {
87
+ maxFPS: e(this, g),
88
+ order: e(this, d),
89
+ culling: e(this, b)
90
+ }));
91
+ }
92
+ unlistenAnimationFrame() {
93
+ e(this, l).current && (e(this, l).current = !1, y.unsubscribe(e(this, x)));
94
+ }
95
+ updateOptions(t) {
96
+ i(this, g, A(t == null ? void 0 : t.maxFPS, e(this, g))), i(this, d, A(t == null ? void 0 : t.order, e(this, d))), i(this, b, A(t == null ? void 0 : t.culling, e(this, b))), i(this, n, A(t == null ? void 0 : t.min, e(this, n))), i(this, c, A(t == null ? void 0 : t.max, e(this, c))), z(this, M, O).call(this, typeof e(this, f) == "number" ? e(this, f) : e(this, s)), t != null && t.equalize && !(t != null && t.restart) && (this.unlistenAnimationFrame(), this.current = i(this, m, e(this, s))), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = i(this, m, this.initial), t != null && t.equalize && (this.current = i(this, m, e(this, s)))), typeof (t == null ? void 0 : t.current) == "number" && i(this, m, this.current = t.current);
97
+ }
98
+ start() {
99
+ this.listenAnimationFrame();
100
+ }
101
+ }
102
+ g = new WeakMap(), d = new WeakMap(), b = new WeakMap(), l = new WeakMap(), F = new WeakMap(), s = new WeakMap(), n = new WeakMap(), c = new WeakMap(), m = new WeakMap(), f = new WeakMap(), M = new WeakSet(), O = function(t) {
103
+ i(this, F, Math.sign(t - e(this, s))), i(this, s, R(t, e(this, n), e(this, c))), i(this, m, this.current);
104
+ }, x = new WeakMap();
105
+ export {
106
+ V as A
107
+ };
@@ -1 +1 @@
1
- "use strict";var y=Object.defineProperty,C=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))v.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))w.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>C(t,O(e));var q=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),n=(t,e,s,r)=>(q(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const B=require("./math-GDWEqu7y.cjs"),b=require("./number-0243DApo.cjs"),m=require("./polyfills-Df4r-ETT.cjs");require("./index-Cqw2NKev.cjs");const D=require("./Animation-rTojHgyz.cjs");var i,h;class N extends D.Animation{constructor(s,r){super(s,r);c(this,i);c(this,h);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(p(f({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(s){this.damping=m.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=m.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=m.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){b.preciseNumber(this.current,6)===b.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,A=Math.abs(r-this.target);n(this,h,A/s.timeBetweenFrames);const u=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const F=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;n(this,i,a(this,i)+F/this.mass*u),this.current+=a(this,i)*u}else this.current=B.damp(this.current,this.target,this.damping,u)}}i=new WeakMap,h=new WeakMap;exports.Damped=N;
1
+ "use strict";var y=Object.defineProperty,C=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))v.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))w.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>C(t,O(e));var q=(t,e,s)=>e.has(t)||g("Cannot "+s);var a=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>e.has(t)?g("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),n=(t,e,s,r)=>(q(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s);const B=require("./math-GDWEqu7y.cjs"),b=require("./number-0243DApo.cjs"),m=require("./polyfills-Df4r-ETT.cjs");require("./index-Cqw2NKev.cjs");const D=require("./Animation-C9-asVsm.cjs");var i,h;class N extends D.Animation{constructor(s,r){super(s,r);c(this,i);c(this,h);this.damping=20,this.stiffness=0,this.mass=0,n(this,i,0),n(this,h,0),this.updateOptions(p(f({},r),{equalize:!0}))}get velocity(){return a(this,i)}get speed(){return a(this,h)}updateOptions(s){this.damping=m.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=m.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=m.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){b.preciseNumber(this.current,6)===b.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const r=this.current,A=Math.abs(r-this.target);n(this,h,A/s.timeBetweenFrames);const u=s.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const F=(this.target-this.current)*this.stiffness-a(this,i)*this.damping;n(this,i,a(this,i)+F/this.mass*u),this.current+=a(this,i)*u}else this.current=B.damp(this.current,this.target,this.damping,u)}}i=new WeakMap,h=new WeakMap;exports.Damped=N;
@@ -19,7 +19,7 @@ import { d as D } from "./math-BOBiC4TN.js";
19
19
  import { p as F } from "./number-DwCxt_Ck.js";
20
20
  import { n as u } from "./polyfills-DJrTJQky.js";
21
21
  import "./index-euf5anj6.js";
22
- import { A as q } from "./Animation-eO5_LIJl.js";
22
+ import { A as q } from "./Animation-CTAZOqP0.js";
23
23
  var i, h;
24
24
  class E extends q {
25
25
  constructor(t, r) {
@@ -1 +1 @@
1
- "use strict";var F=Object.defineProperty,b=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var d=i=>{throw TypeError(i)};var h=(i,r,e)=>r in i?F(i,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[r]=e,g=(i,r)=>{for(var e in r||(r={}))O.call(r,e)&&h(i,e,r[e]);if(m)for(var e of m(r))w.call(r,e)&&h(i,e,r[e]);return i},f=(i,r)=>b(i,y(r));var q=(i,r,e)=>r.has(i)||d("Cannot "+e);var s=(i,r,e)=>(q(i,r,"read from private field"),e?e.call(i):r.get(i)),c=(i,r,e)=>r.has(i)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),l=(i,r,e,a)=>(q(i,r,"write to private field"),a?a.call(i,e):r.set(i,e),e);const u=require("./easings-GegIwET5.cjs"),S=require("./math-GDWEqu7y.cjs"),T=require("./number-0243DApo.cjs"),x=require("./polyfills-Df4r-ETT.cjs");require("./index-Cqw2NKev.cjs");const z=require("./Animation-rTojHgyz.cjs");var n,t;class C extends z.Animation{constructor(e,a){super(e||0,a);c(this,n,u.linear);c(this,t,1e3);this.updateOptions(f(g({},a),{equalize:!0}))}updateOptions(e){super.updateOptions(e),l(this,n,typeof(e==null?void 0:e.easing)=="function"?e.easing:typeof(e==null?void 0:e.easing)=="string"&&u.easings[e.easing]||u.linear),l(this,t,(e==null?void 0:e.duration)===!1?0:x.nullishCoalescing(e==null?void 0:e.duration,s(this,t)))}handleAnimationFrame(e){const a=e.timeElapsedSinceSubscription/1e3/(s(this,t)/1e3)||0,A=s(this,n).call(this,S.clamp(a,0,1));this.current=T.preciseNumber(this.from+(this.target-this.from)*A,6),a>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,t=new WeakMap;exports.Tweened=C;
1
+ "use strict";var F=Object.defineProperty,b=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var m=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;var d=i=>{throw TypeError(i)};var h=(i,r,e)=>r in i?F(i,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[r]=e,g=(i,r)=>{for(var e in r||(r={}))O.call(r,e)&&h(i,e,r[e]);if(m)for(var e of m(r))w.call(r,e)&&h(i,e,r[e]);return i},f=(i,r)=>b(i,y(r));var q=(i,r,e)=>r.has(i)||d("Cannot "+e);var s=(i,r,e)=>(q(i,r,"read from private field"),e?e.call(i):r.get(i)),c=(i,r,e)=>r.has(i)?d("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,e),l=(i,r,e,a)=>(q(i,r,"write to private field"),a?a.call(i,e):r.set(i,e),e);const u=require("./easings-GegIwET5.cjs"),S=require("./math-GDWEqu7y.cjs"),T=require("./number-0243DApo.cjs"),x=require("./polyfills-Df4r-ETT.cjs");require("./index-Cqw2NKev.cjs");const z=require("./Animation-C9-asVsm.cjs");var n,t;class C extends z.Animation{constructor(e,a){super(e||0,a);c(this,n,u.linear);c(this,t,1e3);this.updateOptions(f(g({},a),{equalize:!0}))}updateOptions(e){super.updateOptions(e),l(this,n,typeof(e==null?void 0:e.easing)=="function"?e.easing:typeof(e==null?void 0:e.easing)=="string"&&u.easings[e.easing]||u.linear),l(this,t,(e==null?void 0:e.duration)===!1?0:x.nullishCoalescing(e==null?void 0:e.duration,s(this,t)))}handleAnimationFrame(e){const a=e.timeElapsedSinceSubscription/1e3/(s(this,t)/1e3)||0,A=s(this,n).call(this,S.clamp(a,0,1));this.current=T.preciseNumber(this.from+(this.target-this.from)*A,6),a>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,t=new WeakMap;exports.Tweened=C;
@@ -20,7 +20,7 @@ import { c as q } from "./math-BOBiC4TN.js";
20
20
  import { p as w } from "./number-DwCxt_Ck.js";
21
21
  import { n as z } from "./polyfills-DJrTJQky.js";
22
22
  import "./index-euf5anj6.js";
23
- import { A as C } from "./Animation-eO5_LIJl.js";
23
+ import { A as C } from "./Animation-CTAZOqP0.js";
24
24
  var s, t;
25
25
  class G extends C {
26
26
  constructor(e, i) {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-rTojHgyz.cjs"),n=require("../Damped-DgAIjXp3.cjs"),i=require("../Tweened-DpJDlbj9.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-C9-asVsm.cjs"),n=require("../Damped-DNo8YuPM.cjs"),i=require("../Tweened-DWZ-V8tv.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
@@ -1,6 +1,6 @@
1
- import { A as r } from "../Animation-eO5_LIJl.js";
2
- import { D as m } from "../Damped-GyAS-U-z.js";
3
- import { T as t } from "../Tweened-BSC-evuL.js";
1
+ import { A as r } from "../Animation-CTAZOqP0.js";
2
+ import { D as m } from "../Damped-gai147Ov.js";
3
+ import { T as t } from "../Tweened-xhRceYz9.js";
4
4
  export {
5
5
  r as Animation,
6
6
  m as Damped,
@@ -1 +1 @@
1
- "use strict";var p=r=>{throw TypeError(r)};var V=(r,n,e)=>n.has(r)||p("Cannot "+e);var t=(r,n,e)=>(V(r,n,"read from private field"),e?e.call(r):n.get(r)),s=(r,n,e)=>n.has(r)?p("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,e),i=(r,n,e,h)=>(V(r,n,"write to private field"),h?h.call(r,e):n.set(r,e),e),C=(r,n,e)=>(V(r,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("../notifier/index.cjs"),w=require("../index-Cqw2NKev.cjs"),Z=require("../dom-JBOkFLTh.cjs"),T=require("../ticker/index.cjs");require("../Store-GokLe_g-.cjs");const te=require("../easings-GegIwET5.cjs"),ie=require("../Tweened-DpJDlbj9.cjs"),se=require("../gestures-C7gbKx11.cjs"),he=require("../number-0243DApo.cjs"),re=require("../order/index.cjs");var j;class O{constructor(){s(this,j,new ee.Notifier)}get changeEvent(){return t(this,j)}}j=new WeakMap;var g,c,u,W;class ne extends O{constructor(e){super();s(this,g,null);s(this,c,null);s(this,u,"offsetHeight");s(this,W,e=>{const h=e.shiftKey?-1:1;let a;e.code==="Space"?a=h*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?a=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?a=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?a=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?a=1*t(this,c)[t(this,u)]:e.code==="Home"?a=0:e.code==="End"&&(a=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),a&&(e.stopPropagation(),this.changeEvent.notify("keyboard",a,e))});w.isBrowser&&(i(this,g,e!=null&&e.element&&Z.getElement(e.element)||window),i(this,c,t(this,g)instanceof HTMLElement?t(this,g):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){w.isBrowser&&t(this,g).addEventListener("keydown",t(this,W))}disconnect(){w.isBrowser&&t(this,g).removeEventListener("keydown",t(this,W))}}g=new WeakMap,c=new WeakMap,u=new WeakMap,W=new WeakMap;var y,M,X,Y,d,B,m,b,U,G,A,K,D;class ae extends O{constructor(e){super();s(this,b);s(this,y);s(this,M);s(this,X);s(this,Y);s(this,d);s(this,B);s(this,m);s(this,A);s(this,K);s(this,D);this.direction=1,i(this,d,new ie.Tweened(0,{easing:te.easeInQuad})),i(this,m,!1),i(this,A,h=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",h.timeBetweenFrames*t(this,y)*this.direction*(1-t(this,d).current),h)}),i(this,K,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,y))*this.direction*(1-t(this,d).current),null)}),i(this,D,()=>{t(this,M)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,y,(e==null?void 0:e.speed)||1),i(this,M,(e==null?void 0:e.interval)||!1),i(this,X,e)}set interval(e){i(this,M,e),t(this,m)&&C(this,b,U).call(this)}set speed(e){i(this,y,e),t(this,m)&&C(this,b,U).call(this)}connect(){t(this,m)||(i(this,m,!0),C(this,b,U).call(this))}disconnect(){t(this,m)&&(i(this,m,!1),C(this,b,G).call(this))}pauseAndContinue(e,h){t(this,m)&&e&&(clearTimeout(t(this,B)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:h}),i(this,B,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:h})},e)))}}y=new WeakMap,M=new WeakMap,X=new WeakMap,Y=new WeakMap,d=new WeakMap,B=new WeakMap,m=new WeakMap,b=new WeakSet,U=function(){C(this,b,G).call(this),t(this,M)?i(this,Y,setInterval(t(this,K),Math.abs(t(this,y)))):T.ticker.subscribe(t(this,A),t(this,X)),document.addEventListener("visibilitychange",t(this,D))},G=function(){clearInterval(t(this,Y)),T.ticker.unsubscribe(t(this,A)),clearTimeout(t(this,B)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,D))},A=new WeakMap,K=new WeakMap,D=new WeakMap;var I,k,H,N;class le extends O{constructor(e){super();s(this,I,null);s(this,k);s(this,H);s(this,N,e=>{let h=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*1||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*1))if(e.preventDefault(),h=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const a=Date.now();if(a-t(this,H)>40&&(h=100*Math.sign(h)),i(this,H,a),Math.abs(h)<100||t(this,k))return;this.changeEvent.notify("wheel",h,e),i(this,k,setTimeout(()=>{i(this,k,void 0)},80))}else this.changeEvent.notify("wheel",h,e)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,H,Date.now()),w.isBrowser&&i(this,I,e!=null&&e.element&&Z.getElement(e.element)||window)}connect(){w.isBrowser&&t(this,I).addEventListener("wheel",t(this,N),{passive:!1})}disconnect(){w.isBrowser&&(t(this,I).removeEventListener("wheel",t(this,N)),clearTimeout(t(this,k)))}}I=new WeakMap,k=new WeakMap,H=new WeakMap,N=new WeakMap;var v,P,o,l,q,E,z,S,x;const L=class L extends O{constructor(e){super();s(this,P);s(this,o);s(this,l);s(this,q);s(this,E);s(this,z);s(this,S);s(this,x);this.inertion=1,i(this,P,null),i(this,o,null),i(this,l,0),i(this,q,[]),i(this,E,0),i(this,z,h=>{Math.abs(t(this,E))>2&&h.preventDefault()}),i(this,S,h=>{if(i(this,E,0),i(this,l,0),h.button!==0||h.composedPath().find(f=>f instanceof HTMLElement&&f.hasAttribute("drag-dead-zone")))return;this.swipe||T.ticker.unsubscribe(t(this,x));let a=h,Q=!1;document.documentElement.classList.add("grabbing");let _=0,$=0,R=0,F=0;se.setupDrag(f=>{t(L,v)&&t(L,v)!==t(this,o)||(_=a.x-f.x,$=a.y-f.y,R=f.x-h.x,F=f.y-h.y,this.axis==="x"?(i(this,E,R),i(this,l,_)):(i(this,E,F),i(this,l,$)),a=f,Q=this.axis==="x"&&Math.abs(R)>Math.abs(F)||this.axis==="y"&&Math.abs(F)>Math.abs(R),Q&&(document.documentElement.classList.add("dragging"),i(L,v,t(this,o)),this.changeEvent.notify("drag",t(this,l),f)))},f=>{i(L,v,null),Q&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),T.ticker.subscribe(t(this,x),{order:re.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l),f)),document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging")})}),i(this,x,()=>{Math.floor(Math.abs(t(this,l)))||T.ticker.unsubscribe(t(this,x)),i(this,l,t(this,l)*.95),i(this,l,he.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l),null)}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,w.isBrowser&&(i(this,o,e!=null&&e.element&&Z.getElement(e.element)||document.documentElement),i(this,P,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,q,[...t(this,P).querySelectorAll("a")]),t(this,q).forEach(e=>{e.addEventListener("click",t(this,z))}),t(this,o).addEventListener("pointerdown",t(this,S)))}disconnect(){w.isBrowser&&(t(this,q).forEach(e=>{e.removeEventListener("click",t(this,z))}),t(this,o).removeEventListener("pointerdown",t(this,S)),T.ticker.unsubscribe(t(this,x)))}};v=new WeakMap,P=new WeakMap,o=new WeakMap,l=new WeakMap,q=new WeakMap,E=new WeakMap,z=new WeakMap,S=new WeakMap,x=new WeakMap,s(L,v,null);let J=L;exports.AutoplayControls=ae;exports.Controls=O;exports.DragControls=J;exports.KeyboardControls=ne;exports.WheelControls=le;
1
+ "use strict";var p=r=>{throw TypeError(r)};var V=(r,n,e)=>n.has(r)||p("Cannot "+e);var t=(r,n,e)=>(V(r,n,"read from private field"),e?e.call(r):n.get(r)),s=(r,n,e)=>n.has(r)?p("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,e),i=(r,n,e,h)=>(V(r,n,"write to private field"),h?h.call(r,e):n.set(r,e),e),C=(r,n,e)=>(V(r,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ee=require("../notifier/index.cjs"),w=require("../index-Cqw2NKev.cjs"),Z=require("../dom-JBOkFLTh.cjs"),T=require("../ticker/index.cjs");require("../Store-GokLe_g-.cjs");const te=require("../easings-GegIwET5.cjs"),ie=require("../Tweened-DWZ-V8tv.cjs"),se=require("../gestures-C7gbKx11.cjs"),he=require("../number-0243DApo.cjs"),re=require("../order/index.cjs");var j;class O{constructor(){s(this,j,new ee.Notifier)}get changeEvent(){return t(this,j)}}j=new WeakMap;var g,c,u,W;class ne extends O{constructor(e){super();s(this,g,null);s(this,c,null);s(this,u,"offsetHeight");s(this,W,e=>{const h=e.shiftKey?-1:1;let a;e.code==="Space"?a=h*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?a=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?a=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?a=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?a=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?a=1*t(this,c)[t(this,u)]:e.code==="Home"?a=0:e.code==="End"&&(a=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),a&&(e.stopPropagation(),this.changeEvent.notify("keyboard",a,e))});w.isBrowser&&(i(this,g,e!=null&&e.element&&Z.getElement(e.element)||window),i(this,c,t(this,g)instanceof HTMLElement?t(this,g):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){w.isBrowser&&t(this,g).addEventListener("keydown",t(this,W))}disconnect(){w.isBrowser&&t(this,g).removeEventListener("keydown",t(this,W))}}g=new WeakMap,c=new WeakMap,u=new WeakMap,W=new WeakMap;var y,M,X,Y,d,B,m,b,U,G,A,K,D;class ae extends O{constructor(e){super();s(this,b);s(this,y);s(this,M);s(this,X);s(this,Y);s(this,d);s(this,B);s(this,m);s(this,A);s(this,K);s(this,D);this.direction=1,i(this,d,new ie.Tweened(0,{easing:te.easeInQuad})),i(this,m,!1),i(this,A,h=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",h.timeBetweenFrames*t(this,y)*this.direction*(1-t(this,d).current),h)}),i(this,K,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,y))*this.direction*(1-t(this,d).current),null)}),i(this,D,()=>{t(this,M)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,y,(e==null?void 0:e.speed)||1),i(this,M,(e==null?void 0:e.interval)||!1),i(this,X,e)}set interval(e){i(this,M,e),t(this,m)&&C(this,b,U).call(this)}set speed(e){i(this,y,e),t(this,m)&&C(this,b,U).call(this)}connect(){t(this,m)||(i(this,m,!0),C(this,b,U).call(this))}disconnect(){t(this,m)&&(i(this,m,!1),C(this,b,G).call(this))}pauseAndContinue(e,h){t(this,m)&&e&&(clearTimeout(t(this,B)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:h}),i(this,B,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:h})},e)))}}y=new WeakMap,M=new WeakMap,X=new WeakMap,Y=new WeakMap,d=new WeakMap,B=new WeakMap,m=new WeakMap,b=new WeakSet,U=function(){C(this,b,G).call(this),t(this,M)?i(this,Y,setInterval(t(this,K),Math.abs(t(this,y)))):T.ticker.subscribe(t(this,A),t(this,X)),document.addEventListener("visibilitychange",t(this,D))},G=function(){clearInterval(t(this,Y)),T.ticker.unsubscribe(t(this,A)),clearTimeout(t(this,B)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,D))},A=new WeakMap,K=new WeakMap,D=new WeakMap;var I,k,H,N;class le extends O{constructor(e){super();s(this,I,null);s(this,k);s(this,H);s(this,N,e=>{let h=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*1||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*1))if(e.preventDefault(),h=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),this.debounce){const a=Date.now();if(a-t(this,H)>40&&(h=100*Math.sign(h)),i(this,H,a),Math.abs(h)<100||t(this,k))return;this.changeEvent.notify("wheel",h,e),i(this,k,setTimeout(()=>{i(this,k,void 0)},80))}else this.changeEvent.notify("wheel",h,e)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,H,Date.now()),w.isBrowser&&i(this,I,e!=null&&e.element&&Z.getElement(e.element)||window)}connect(){w.isBrowser&&t(this,I).addEventListener("wheel",t(this,N),{passive:!1})}disconnect(){w.isBrowser&&(t(this,I).removeEventListener("wheel",t(this,N)),clearTimeout(t(this,k)))}}I=new WeakMap,k=new WeakMap,H=new WeakMap,N=new WeakMap;var v,P,o,l,q,E,z,S,x;const L=class L extends O{constructor(e){super();s(this,P);s(this,o);s(this,l);s(this,q);s(this,E);s(this,z);s(this,S);s(this,x);this.inertion=1,i(this,P,null),i(this,o,null),i(this,l,0),i(this,q,[]),i(this,E,0),i(this,z,h=>{Math.abs(t(this,E))>2&&h.preventDefault()}),i(this,S,h=>{if(i(this,E,0),i(this,l,0),h.button!==0||h.composedPath().find(f=>f instanceof HTMLElement&&f.hasAttribute("drag-dead-zone")))return;this.swipe||T.ticker.unsubscribe(t(this,x));let a=h,Q=!1;document.documentElement.classList.add("grabbing");let _=0,$=0,R=0,F=0;se.setupDrag(f=>{t(L,v)&&t(L,v)!==t(this,o)||(_=a.x-f.x,$=a.y-f.y,R=f.x-h.x,F=f.y-h.y,this.axis==="x"?(i(this,E,R),i(this,l,_)):(i(this,E,F),i(this,l,$)),a=f,Q=this.axis==="x"&&Math.abs(R)>Math.abs(F)||this.axis==="y"&&Math.abs(F)>Math.abs(R),Q&&(document.documentElement.classList.add("dragging"),i(L,v,t(this,o)),this.changeEvent.notify("drag",t(this,l),f)))},f=>{i(L,v,null),Q&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),T.ticker.subscribe(t(this,x),{order:re.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l),f)),document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging")})}),i(this,x,()=>{Math.floor(Math.abs(t(this,l)))||T.ticker.unsubscribe(t(this,x)),i(this,l,t(this,l)*.95),i(this,l,he.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l),null)}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,w.isBrowser&&(i(this,o,e!=null&&e.element&&Z.getElement(e.element)||document.documentElement),i(this,P,(e==null?void 0:e.rootElement)||t(this,o)))}connect(){w.isBrowser&&(i(this,q,[...t(this,P).querySelectorAll("a")]),t(this,q).forEach(e=>{e.addEventListener("click",t(this,z))}),t(this,o).addEventListener("pointerdown",t(this,S)))}disconnect(){w.isBrowser&&(t(this,q).forEach(e=>{e.removeEventListener("click",t(this,z))}),t(this,o).removeEventListener("pointerdown",t(this,S)),T.ticker.unsubscribe(t(this,x)))}};v=new WeakMap,P=new WeakMap,o=new WeakMap,l=new WeakMap,q=new WeakMap,E=new WeakMap,z=new WeakMap,S=new WeakMap,x=new WeakMap,s(L,v,null);let J=L;exports.AutoplayControls=ae;exports.Controls=O;exports.DragControls=J;exports.KeyboardControls=ne;exports.WheelControls=le;
@@ -9,7 +9,7 @@ import { g as J } from "../dom-CVWzyXPH.js";
9
9
  import { ticker as A } from "../ticker/index.js";
10
10
  import "../Store-swP_0ymB.js";
11
11
  import { b as te } from "../easings-Bni3YAAW.js";
12
- import { T as ie } from "../Tweened-BSC-evuL.js";
12
+ import { T as ie } from "../Tweened-xhRceYz9.js";
13
13
  import { s as se } from "../gestures-CcXV6fCp.js";
14
14
  import { p as he } from "../number-DwCxt_Ck.js";
15
15
  import { TICK_ORDER as ae } from "../order/index.js";
@@ -1 +1 @@
1
- "use strict";var J=Object.defineProperty;var B=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var j=i=>{throw TypeError(i)};var H=(i,s,t)=>s in i?J(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,O=(i,s)=>{for(var t in s||(s={}))K.call(s,t)&&H(i,t,s[t]);if(B)for(var t of B(s))N.call(s,t)&&H(i,t,s[t]);return i};var R=(i,s,t)=>s.has(i)||j("Cannot "+t);var e=(i,s,t)=>(R(i,s,"read from private field"),t?t.call(i):s.get(i)),r=(i,s,t)=>s.has(i)?j("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,u)=>(R(i,s,"write to private field"),u?u.call(i,t):s.set(i,t),t),D=(i,s,t)=>(R(i,s,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-GokLe_g-.cjs");const _=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),W=require("../math-GDWEqu7y.cjs"),U=require("../index-Cqw2NKev.cjs");require("../ticker/index.cjs");const M=require("../Damped-DgAIjXp3.cjs"),A=require("../element-resizer/index.cjs"),F=require("../window-resizer/index.cjs"),S=require("../css-property/index.cjs");var o,a,l,d,m,p,b,x,k,f,w,C,y,q,T;class G{constructor(s){r(this,q);r(this,o);r(this,a);r(this,l);r(this,d);r(this,m);r(this,p);r(this,b,0);r(this,x,0);r(this,k,!1);r(this,f,s=>{const t=D(this,q,T).call(this,s);e(this,a).set(t.x,{equalize:!0}),e(this,l).set(t.y,{equalize:!0}),e(this,d).set(1)});r(this,w,s=>{e(this,d).set(0)});r(this,C,s=>{const t=D(this,q,T).call(this,s);e(this,a).set(t.x),e(this,l).set(t.y)});r(this,y,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,u=0,h=0;e(this,m)?e(this,p)?(s=-1,t=1,u=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,u=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,p)?(s=0,t=1,u=0,h=1):(s=0,t=e(this,b),u=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=u,e(this,l).max=h});c(this,o,Q.getElement(s.element)),c(this,a,new M.Damped(0,s.damped)),c(this,l,new M.Damped(0,s.damped)),c(this,d,new M.Damped(0,O({min:0,max:1},s.damped))),c(this,m,s.cartesian||!1),c(this,p,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,d)}get cartesian(){return e(this,m)}set cartesian(s){c(this,m,s),e(this,y).call(this)}get normalize(){return e(this,p)}set normalize(s){c(this,p,s),e(this,y).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),A.elementResizer.subscribe(e(this,o),e(this,y)),F.windowResizer.subscribe(e(this,y))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),A.elementResizer.unsubscribe(e(this,y)),F.windowResizer.unsubscribe(e(this,y)),e(this,a).reset(),e(this,l).reset(),e(this,d).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,m=new WeakMap,p=new WeakMap,b=new WeakMap,x=new WeakMap,k=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,y=new WeakMap,q=new WeakSet,T=function(s){const t=_.getPointerPosition(s,e(this,o).getBoundingClientRect()),u={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,m)){const z=_.screenToCartesian(h,u);h.x=z.x,h.y=z.y}if(e(this,p)){const z=_.normalize(h,u);e(this,m)?(h.x=W.clamp(z.x*2,-1,1),h.y=W.clamp(z.y*2,-1,1)):(h.x=z.x,h.y=z.y)}return h};var n,g,v,P,E,L;class I extends HTMLElement{constructor(){super();r(this,n);r(this,g,new S.CSSProperty(this,"--damping",20));r(this,v,new S.CSSProperty(this,"--mass",0));r(this,P,new S.CSSProperty(this,"--stiffness",0));r(this,E,new S.CSSProperty(this,"--cartesian",!1));r(this,L,new S.CSSProperty(this,"--normalize",!1));c(this,n,new G({element:this})),e(this,g).subscribe(t=>{e(this,n).x.damping=t.current,e(this,n).y.damping=t.current,e(this,n).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,n).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,n).normalize=t.current}),e(this,v).subscribe(t=>{e(this,n).x.mass=t.current,e(this,n).y.mass=t.current,e(this,n).z.mass=t.current}),e(this,P).subscribe(t=>{e(this,n).x.stiffness=t.current,e(this,n).y.stiffness=t.current,e(this,n).z.stiffness=t.current}),e(this,n).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,n).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,n).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,n)}connectedCallback(){e(this,n).connect(),e(this,g).observe(),e(this,v).observe(),e(this,P).observe()}disconnectedCallback(){e(this,n).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,P).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}n=new WeakMap,g=new WeakMap,v=new WeakMap,P=new WeakMap,E=new WeakMap,L=new WeakMap;U.isBrowser&&!customElements.get("e-pointer")&&customElements.define("e-pointer",I);exports.Pointer=G;exports.PointerElement=I;
1
+ "use strict";var J=Object.defineProperty;var B=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var j=i=>{throw TypeError(i)};var H=(i,s,t)=>s in i?J(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,O=(i,s)=>{for(var t in s||(s={}))K.call(s,t)&&H(i,t,s[t]);if(B)for(var t of B(s))N.call(s,t)&&H(i,t,s[t]);return i};var R=(i,s,t)=>s.has(i)||j("Cannot "+t);var e=(i,s,t)=>(R(i,s,"read from private field"),t?t.call(i):s.get(i)),r=(i,s,t)=>s.has(i)?j("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,u)=>(R(i,s,"write to private field"),u?u.call(i,t):s.set(i,t),t),D=(i,s,t)=>(R(i,s,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-GokLe_g-.cjs");const _=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),W=require("../math-GDWEqu7y.cjs"),U=require("../index-Cqw2NKev.cjs");require("../ticker/index.cjs");const M=require("../Damped-DNo8YuPM.cjs"),A=require("../element-resizer/index.cjs"),F=require("../window-resizer/index.cjs"),S=require("../css-property/index.cjs");var o,a,l,d,m,p,b,x,k,f,w,C,y,q,T;class G{constructor(s){r(this,q);r(this,o);r(this,a);r(this,l);r(this,d);r(this,m);r(this,p);r(this,b,0);r(this,x,0);r(this,k,!1);r(this,f,s=>{const t=D(this,q,T).call(this,s);e(this,a).set(t.x,{equalize:!0}),e(this,l).set(t.y,{equalize:!0}),e(this,d).set(1)});r(this,w,s=>{e(this,d).set(0)});r(this,C,s=>{const t=D(this,q,T).call(this,s);e(this,a).set(t.x),e(this,l).set(t.y)});r(this,y,()=>{c(this,b,this.element.clientWidth),c(this,x,this.element.clientHeight);let s=0,t=0,u=0,h=0;e(this,m)?e(this,p)?(s=-1,t=1,u=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,u=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,p)?(s=0,t=1,u=0,h=1):(s=0,t=e(this,b),u=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=u,e(this,l).max=h});c(this,o,Q.getElement(s.element)),c(this,a,new M.Damped(0,s.damped)),c(this,l,new M.Damped(0,s.damped)),c(this,d,new M.Damped(0,O({min:0,max:1},s.damped))),c(this,m,s.cartesian||!1),c(this,p,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,d)}get cartesian(){return e(this,m)}set cartesian(s){c(this,m,s),e(this,y).call(this)}get normalize(){return e(this,p)}set normalize(s){c(this,p,s),e(this,y).call(this)}connect(){e(this,o).addEventListener("pointerenter",e(this,f)),e(this,o).addEventListener("pointerleave",e(this,w)),e(this,o).addEventListener("pointermove",e(this,C)),A.elementResizer.subscribe(e(this,o),e(this,y)),F.windowResizer.subscribe(e(this,y))}disconnect(){e(this,o).removeEventListener("pointerenter",e(this,f)),e(this,o).removeEventListener("pointerleave",e(this,w)),e(this,o).removeEventListener("pointermove",e(this,C)),A.elementResizer.unsubscribe(e(this,y)),F.windowResizer.unsubscribe(e(this,y)),e(this,a).reset(),e(this,l).reset(),e(this,d).reset()}}o=new WeakMap,a=new WeakMap,l=new WeakMap,d=new WeakMap,m=new WeakMap,p=new WeakMap,b=new WeakMap,x=new WeakMap,k=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,y=new WeakMap,q=new WeakSet,T=function(s){const t=_.getPointerPosition(s,e(this,o).getBoundingClientRect()),u={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,m)){const z=_.screenToCartesian(h,u);h.x=z.x,h.y=z.y}if(e(this,p)){const z=_.normalize(h,u);e(this,m)?(h.x=W.clamp(z.x*2,-1,1),h.y=W.clamp(z.y*2,-1,1)):(h.x=z.x,h.y=z.y)}return h};var n,g,v,P,E,L;class I extends HTMLElement{constructor(){super();r(this,n);r(this,g,new S.CSSProperty(this,"--damping",20));r(this,v,new S.CSSProperty(this,"--mass",0));r(this,P,new S.CSSProperty(this,"--stiffness",0));r(this,E,new S.CSSProperty(this,"--cartesian",!1));r(this,L,new S.CSSProperty(this,"--normalize",!1));c(this,n,new G({element:this})),e(this,g).subscribe(t=>{e(this,n).x.damping=t.current,e(this,n).y.damping=t.current,e(this,n).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,n).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,n).normalize=t.current}),e(this,v).subscribe(t=>{e(this,n).x.mass=t.current,e(this,n).y.mass=t.current,e(this,n).z.mass=t.current}),e(this,P).subscribe(t=>{e(this,n).x.stiffness=t.current,e(this,n).y.stiffness=t.current,e(this,n).z.stiffness=t.current}),e(this,n).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,n).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,n).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,n)}connectedCallback(){e(this,n).connect(),e(this,g).observe(),e(this,v).observe(),e(this,P).observe()}disconnectedCallback(){e(this,n).disconnect(),e(this,g).unobserve(),e(this,v).unobserve(),e(this,P).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}n=new WeakMap,g=new WeakMap,v=new WeakMap,P=new WeakMap,E=new WeakMap,L=new WeakMap;U.isBrowser&&!customElements.get("e-pointer")&&customElements.define("e-pointer",I);exports.Pointer=G;exports.PointerElement=I;
@@ -20,7 +20,7 @@ import { g as U } from "../dom-CVWzyXPH.js";
20
20
  import { c as A } from "../math-BOBiC4TN.js";
21
21
  import { i as V } from "../index-euf5anj6.js";
22
22
  import "../ticker/index.js";
23
- import { D as B } from "../Damped-GyAS-U-z.js";
23
+ import { D as B } from "../Damped-gai147Ov.js";
24
24
  import { elementResizer as F } from "../element-resizer/index.js";
25
25
  import { windowResizer as G } from "../window-resizer/index.js";
26
26
  import { CSSProperty as P } from "../css-property/index.js";
@@ -1 +1 @@
1
- "use strict";var Z=c=>{throw TypeError(c)};var J=(c,r,t)=>r.has(c)||Z("Cannot "+t);var e=(c,r,t)=>(J(c,r,"read from private field"),t?t.call(c):r.get(c)),i=(c,r,t)=>r.has(c)?Z("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(c):r.set(c,t),n=(c,r,t,s)=>(J(c,r,"write to private field"),s?s.call(c,t):r.set(c,t),t),m=(c,r,t)=>(J(c,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const se=require("../element-linked-store/index.cjs"),b=require("../css-property/index.cjs"),X=require("../index-Cqw2NKev.cjs"),U=require("../events-KVanG9sR.cjs"),ie=require("../function-MthRj-GJ.cjs"),re=require("../style-At6aDoqG.cjs"),I=require("../url-D1CgmwZ_.cjs"),N=require("../window-resizer/index.cjs");var a,v,D,F;class oe{constructor(){i(this,a,new Map);i(this,v,[]);i(this,D,r=>{var s;const t=[...e(this,v)].reverse().find(o=>o.clickOutside.current);if(t){const o=r.composedPath();if(o.find(Y=>Y instanceof HTMLElement&&Y.hasAttribute("data-popover-content")))return;const l=o[0],q=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),te=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!q||te)&&t.close()}});i(this,F,r=>{if(r.code==="Escape"){const t=[...e(this,v)].reverse().find(s=>s.escape.current);t&&t.close()}});addEventListener("click",e(this,D)),addEventListener("keydown",e(this,F))}get groups(){return e(this,a)}get stack(){return e(this,v)}add(r,t){if(t.closeRest.current)e(this,a).forEach(o=>{o.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let o=e(this,a).get(r);o==null||o.forEach(l=>{l.close()})}let s=e(this,a).get(r);s!=null&&s.length||(s=[],e(this,a).set(r,s)),e(this,v).push(t),s.push(t)}remove(r,t){if(n(this,v,e(this,v).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,a).forEach(o=>{o.forEach(l=>s.push(l))}),e(this,a).clear(),s.forEach(o=>o.close())}else if(t.closeRestInGroup.current){const s=e(this,a).get(r);e(this,a).delete(r),s==null||s.forEach(o=>{o.close()})}else{let s=e(this,a).get(r);s&&(s=s.filter(o=>o!==t),e(this,a).set(r,s))}}}a=new WeakMap,v=new WeakMap,D=new WeakMap,F=new WeakMap;var d,$,T,f,y,P,k,g,C,A,L,R,u,S,_,j,x,M,H,O;const E=class E extends HTMLElement{constructor(){super();i(this,S);i(this,d);i(this,$);i(this,T);i(this,f);i(this,y);i(this,P);i(this,k);i(this,g);i(this,C);i(this,A);i(this,L);i(this,R);i(this,u);i(this,x);i(this,M);i(this,H);i(this,O);this.urlValue="",n(this,d,!1),n(this,f,new b.CSSProperty(this,"--history",!1)),n(this,y,new b.CSSProperty(this,"--restore",!1)),n(this,P,new b.CSSProperty(this,"--close-rest",!1)),n(this,k,new b.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new b.CSSProperty(this,"--group","")),n(this,C,new b.CSSProperty(this,"--click-outside",!1)),n(this,A,new b.CSSProperty(this,"--escape",!1)),n(this,L,!1),n(this,u,new se.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1})),n(this,x,()=>{n(this,L,!1),e(this,d)&&e(this,f).current&&!location.search.includes(this.id)?this.close():!e(this,d)&&e(this,f).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,L,!0)}),n(this,M,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,H).call(this)}),n(this,H,ie.debounce(()=>{e(this,O).call(this)},10)),n(this,O,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,u).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),o=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!o)}})}get history(){return e(this,f)}get restore(){return e(this,y)}get closeRest(){return e(this,P)}get closeRestInGroup(){return e(this,k)}get group(){return e(this,g)}get clickOutside(){return e(this,C)}get escape(){return e(this,A)}get opened(){return e(this,d)}get lastTrigger(){return e(this,R)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,d)&&I.updateSearchParameter(this.id,t)}open(t){if(e(this,d))return;n(this,R,t==null?void 0:t.trigger),clearTimeout(e(this,$)),e(this,u).set("closing",!1),e(this,u).set("triggered",!0),U.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,R)}}),e(this,f).current&&e(this,L)&&history.pushState(history.state,"",e(this,S,_)),n(this,d,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,O).call(this),e(this,u).set("opened",!0),U.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,R)}}),n(this,T,void 0)};t!=null&&t.skipTransition?s():n(this,T,setTimeout(s,10))}close(){e(this,d)&&(clearTimeout(e(this,T)),E.stack.remove(e(this,g).current,this),n(this,d,!1),m(this,S,j).call(this),e(this,u).set("opened",!1),e(this,u).set("closing",!0),U.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,$,setTimeout(()=>{e(this,u).set("triggered",!1),e(this,u).set("closing",!1),U.dispatchEvent(this,"popoverClosed",{custom:!0})},re.getElementTransitionDurationMS(this)+10)))}connectedCallback(){e(this,f).observe(),e(this,y).observe(),e(this,P).observe(),e(this,k).observe(),e(this,g).observe(),e(this,C).observe(),e(this,A).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,x)),setTimeout(()=>{e(this,y).current?(this.urlValue=I.parseSearchParameters(location.search)[this.id],e(this,x).call(this)):(m(this,S,j).call(this),n(this,L,!0))},0),N.windowResizer.subscribe(e(this,M))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),N.windowResizer.unsubscribe(e(this,M)),e(this,u).close(),e(this,f).close(),e(this,y).close(),e(this,P).close(),e(this,k).close(),e(this,g).close(),e(this,C).close(),e(this,A).close(),this.removeAttribute("role"),clearTimeout(e(this,$)),clearTimeout(e(this,T)),removeEventListener("popstate",e(this,x)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),m(this,S,j).call(this)}};d=new WeakMap,$=new WeakMap,T=new WeakMap,f=new WeakMap,y=new WeakMap,P=new WeakMap,k=new WeakMap,g=new WeakMap,C=new WeakMap,A=new WeakMap,L=new WeakMap,R=new WeakMap,u=new WeakMap,S=new WeakSet,_=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},j=function(){if(e(this,f).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},x=new WeakMap,M=new WeakMap,H=new WeakMap,O=new WeakMap,E.stack=new oe;let V=E;X.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",V);var h,p,w,K,z,W,B,G,Q;class ee extends HTMLElement{constructor(){super();i(this,w);i(this,h);i(this,p,new b.CSSProperty(this,"--type","open"));i(this,z,()=>{e(this,p).current!=="close"&&this.classList.add("triggered")});i(this,W,()=>{e(this,p).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});i(this,B,()=>{e(this,p).current!=="close"&&this.classList.remove("opened")});i(this,G,()=>{e(this,p).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});X.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,p).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,p)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(m(this,w,K).call(this),t){let o=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)o=l;else{const q=this.getRootNode();q instanceof ShadowRoot?o=q.host.closest("[data-popover]"):q instanceof HTMLElement&&(o=q.closest("[data-popover]"))}}else t==="sibling"?o=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]"):(!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),o=document.querySelector(t)||this.getRootNode().querySelector(t));o instanceof HTMLElement?(n(this,h,o),e(this,h).addEventListener("popoverTriggered",e(this,z)),e(this,h).addEventListener("popoverOpened",e(this,W)),e(this,h).addEventListener("popoverClosing",e(this,B)),e(this,h).addEventListener("popoverClosed",e(this,G))):console.warn(this,`target ${t} not found`)}m(this,w,Q).call(this,e(this,p).current)}connectedCallback(){e(this,p).subscribe(s=>{m(this,w,Q).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,p).observe()}disconnectedCallback(){e(this,p).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),m(this,w,K).call(this)}}h=new WeakMap,p=new WeakMap,w=new WeakSet,K=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,z)),e(this,h).removeEventListener("popoverOpened",e(this,W)),e(this,h).removeEventListener("popoverClosing",e(this,B)),e(this,h).removeEventListener("popoverClosed",e(this,G)))},z=new WeakMap,W=new WeakMap,B=new WeakMap,G=new WeakMap,Q=function(t){e(this,h)instanceof V&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};X.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ee);exports.PopoverButtonElement=ee;exports.PopoverElement=V;
1
+ "use strict";var N=c=>{throw TypeError(c)};var K=(c,r,t)=>r.has(c)||N("Cannot "+t);var e=(c,r,t)=>(K(c,r,"read from private field"),t?t.call(c):r.get(c)),i=(c,r,t)=>r.has(c)?N("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(c):r.set(c,t),n=(c,r,t,s)=>(K(c,r,"write to private field"),s?s.call(c,t):r.set(c,t),t),m=(c,r,t)=>(K(c,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const oe=require("../element-linked-store/index.cjs"),b=require("../css-property/index.cjs"),Y=require("../index-Cqw2NKev.cjs"),j=require("../events-KVanG9sR.cjs"),ne=require("../function-MthRj-GJ.cjs"),_=require("../style-At6aDoqG.cjs"),ee=require("../url-D1CgmwZ_.cjs"),te=require("../window-resizer/index.cjs");var u,v,F,J;class he{constructor(){i(this,u,new Map);i(this,v,[]);i(this,F,r=>{var s;const t=[...e(this,v)].reverse().find(o=>o.clickOutside.current);if(t){const o=r.composedPath();if(o.find(Z=>Z instanceof HTMLElement&&Z.hasAttribute("data-popover-content")))return;const l=o[0],q=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),re=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!q||re)&&t.close()}});i(this,J,r=>{if(r.code==="Escape"){const t=[...e(this,v)].reverse().find(s=>s.escape.current);t&&t.close()}});addEventListener("click",e(this,F)),addEventListener("keydown",e(this,J))}get groups(){return e(this,u)}get stack(){return e(this,v)}add(r,t){if(t.closeRest.current)e(this,u).forEach(o=>{o.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let o=e(this,u).get(r);o==null||o.forEach(l=>{l.close()})}let s=e(this,u).get(r);s!=null&&s.length||(s=[],e(this,u).set(r,s)),e(this,v).push(t),s.push(t)}remove(r,t){if(n(this,v,e(this,v).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(o=>{o.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(o=>o.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(r);e(this,u).delete(r),s==null||s.forEach(o=>{o.close()})}else{let s=e(this,u).get(r);s&&(s=s.filter(o=>o!==t),e(this,u).set(r,s))}}}u=new WeakMap,v=new WeakMap,F=new WeakMap,J=new WeakMap;var d,$,M,w,O,f,y,P,k,g,C,A,L,R,a,T,se,I,x,V,W,H;const E=class E extends HTMLElement{constructor(){super();i(this,T);i(this,d);i(this,$);i(this,M);i(this,w);i(this,O);i(this,f);i(this,y);i(this,P);i(this,k);i(this,g);i(this,C);i(this,A);i(this,L);i(this,R);i(this,a);i(this,x);i(this,V);i(this,W);i(this,H);this.urlValue="",n(this,d,!1),n(this,f,new b.CSSProperty(this,"--history",!1)),n(this,y,new b.CSSProperty(this,"--restore",!1)),n(this,P,new b.CSSProperty(this,"--close-rest",!1)),n(this,k,new b.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new b.CSSProperty(this,"--group","")),n(this,C,new b.CSSProperty(this,"--click-outside",!1)),n(this,A,new b.CSSProperty(this,"--escape",!1)),n(this,L,!1),n(this,a,new oe.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,x,()=>{n(this,L,!1),e(this,d)&&e(this,f).current&&!location.search.includes(this.id)?this.close():!e(this,d)&&e(this,f).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,L,!0)}),n(this,V,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,W).call(this)}),n(this,W,ne.debounce(()=>{e(this,H).call(this)},10)),n(this,H,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),o=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!o)}})}get history(){return e(this,f)}get restore(){return e(this,y)}get closeRest(){return e(this,P)}get closeRestInGroup(){return e(this,k)}get group(){return e(this,g)}get clickOutside(){return e(this,C)}get escape(){return e(this,A)}get opened(){return e(this,d)}get lastTrigger(){return e(this,R)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,d)&&ee.updateSearchParameter(this.id,t)}open(t){if(e(this,d))return;n(this,R,t==null?void 0:t.trigger),clearTimeout(e(this,$)),clearTimeout(e(this,M)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),j.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,R)}}),e(this,f).current&&e(this,L)&&history.pushState(history.state,"",e(this,T,se)),n(this,d,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,H).call(this),e(this,a).set("opened",!0),j.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,R)}}),n(this,w,void 0),n(this,O,setTimeout(()=>{e(this,a).set("transitionend",!0)},_.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,w,setTimeout(s,10))}close(){e(this,d)&&(clearTimeout(e(this,w)),clearTimeout(e(this,O)),E.stack.remove(e(this,g).current,this),n(this,d,!1),m(this,T,I).call(this),e(this,a).set("transitionend",!1),n(this,$,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),j.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,M,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),j.dispatchEvent(this,"popoverClosed",{custom:!0})},_.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,f).observe(),e(this,y).observe(),e(this,P).observe(),e(this,k).observe(),e(this,g).observe(),e(this,C).observe(),e(this,A).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,x)),setTimeout(()=>{e(this,y).current?(this.urlValue=ee.parseSearchParameters(location.search)[this.id],e(this,x).call(this)):(m(this,T,I).call(this),n(this,L,!0))},0),te.windowResizer.subscribe(e(this,V))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),te.windowResizer.unsubscribe(e(this,V)),e(this,a).close(),e(this,f).close(),e(this,y).close(),e(this,P).close(),e(this,k).close(),e(this,g).close(),e(this,C).close(),e(this,A).close(),this.removeAttribute("role"),clearTimeout(e(this,$)),clearTimeout(e(this,M)),clearTimeout(e(this,w)),clearTimeout(e(this,O)),removeEventListener("popstate",e(this,x)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),m(this,T,I).call(this)}};d=new WeakMap,$=new WeakMap,M=new WeakMap,w=new WeakMap,O=new WeakMap,f=new WeakMap,y=new WeakMap,P=new WeakMap,k=new WeakMap,g=new WeakMap,C=new WeakMap,A=new WeakMap,L=new WeakMap,R=new WeakMap,a=new WeakMap,T=new WeakSet,se=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,f).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},x=new WeakMap,V=new WeakMap,W=new WeakMap,H=new WeakMap,E.stack=new he;let z=E;Y.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,p,S,Q,B,G,D,U,X;class ie extends HTMLElement{constructor(){super();i(this,S);i(this,h);i(this,p,new b.CSSProperty(this,"--type","open"));i(this,B,()=>{e(this,p).current!=="close"&&this.classList.add("triggered")});i(this,G,()=>{e(this,p).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});i(this,D,()=>{e(this,p).current!=="close"&&this.classList.remove("opened")});i(this,U,()=>{e(this,p).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});Y.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,p).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,p)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(m(this,S,Q).call(this),t){let o=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)o=l;else{const q=this.getRootNode();q instanceof ShadowRoot?o=q.host.closest("[data-popover]"):q instanceof HTMLElement&&(o=q.closest("[data-popover]"))}}else t==="sibling"?o=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]"):(!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),o=document.querySelector(t)||this.getRootNode().querySelector(t));o instanceof HTMLElement?(n(this,h,o),e(this,h).addEventListener("popoverTriggered",e(this,B)),e(this,h).addEventListener("popoverOpened",e(this,G)),e(this,h).addEventListener("popoverClosing",e(this,D)),e(this,h).addEventListener("popoverClosed",e(this,U))):console.warn(this,`target ${t} not found`)}m(this,S,X).call(this,e(this,p).current)}connectedCallback(){e(this,p).subscribe(s=>{m(this,S,X).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,p).observe()}disconnectedCallback(){e(this,p).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),m(this,S,Q).call(this)}}h=new WeakMap,p=new WeakMap,S=new WeakSet,Q=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,B)),e(this,h).removeEventListener("popoverOpened",e(this,G)),e(this,h).removeEventListener("popoverClosing",e(this,D)),e(this,h).removeEventListener("popoverClosed",e(this,U)))},B=new WeakMap,G=new WeakMap,D=new WeakMap,U=new WeakMap,X=function(t){e(this,h)instanceof z&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};Y.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ie);exports.PopoverButtonElement=ie;exports.PopoverElement=z;
@@ -1,119 +1,122 @@
1
- var Z = (c) => {
1
+ var N = (c) => {
2
2
  throw TypeError(c);
3
3
  };
4
- var J = (c, r, t) => r.has(c) || Z("Cannot " + t);
5
- var e = (c, r, t) => (J(c, r, "read from private field"), t ? t.call(c) : r.get(c)), i = (c, r, t) => r.has(c) ? Z("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(c) : r.set(c, t), h = (c, r, t, s) => (J(c, r, "write to private field"), s ? s.call(c, t) : r.set(c, t), t), m = (c, r, t) => (J(c, r, "access private method"), t);
6
- import { ElementLinkedStore as ee } from "../element-linked-store/index.js";
4
+ var K = (c, r, t) => r.has(c) || N("Cannot " + t);
5
+ var e = (c, r, t) => (K(c, r, "read from private field"), t ? t.call(c) : r.get(c)), i = (c, r, t) => r.has(c) ? N("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(c) : r.set(c, t), h = (c, r, t, s) => (K(c, r, "write to private field"), s ? s.call(c, t) : r.set(c, t), t), v = (c, r, t) => (K(c, r, "access private method"), t);
6
+ import { ElementLinkedStore as ie } from "../element-linked-store/index.js";
7
7
  import { CSSProperty as b } from "../css-property/index.js";
8
- import { i as X } from "../index-euf5anj6.js";
9
- import { d as B } from "../events-CsVF98U6.js";
10
- import { d as te } from "../function-C10DGppn.js";
11
- import { g as se } from "../style-j2TwriJ_.js";
12
- import { u as ie, p as re } from "../url-B6BNcw6_.js";
13
- import { windowResizer as I } from "../window-resizer/index.js";
14
- var l, v, j, F;
15
- class oe {
8
+ import { i as Y } from "../index-euf5anj6.js";
9
+ import { d as D } from "../events-CsVF98U6.js";
10
+ import { d as re } from "../function-C10DGppn.js";
11
+ import { g as _ } from "../style-j2TwriJ_.js";
12
+ import { u as oe, p as he } from "../url-B6BNcw6_.js";
13
+ import { windowResizer as ee } from "../window-resizer/index.js";
14
+ var u, m, F, J;
15
+ class ne {
16
16
  constructor() {
17
- i(this, l, /* @__PURE__ */ new Map());
18
- i(this, v, []);
19
- i(this, j, (r) => {
17
+ i(this, u, /* @__PURE__ */ new Map());
18
+ i(this, m, []);
19
+ i(this, F, (r) => {
20
20
  var s;
21
- const t = [...e(this, v)].reverse().find((o) => o.clickOutside.current);
21
+ const t = [...e(this, m)].reverse().find((o) => o.clickOutside.current);
22
22
  if (t) {
23
23
  const o = r.composedPath();
24
24
  if (o.find(
25
- (Y) => Y instanceof HTMLElement && Y.hasAttribute("data-popover-content")
25
+ (Z) => Z instanceof HTMLElement && Z.hasAttribute("data-popover-content")
26
26
  ))
27
27
  return;
28
- const a = o[0], $ = a instanceof Node && (t.contains(a) || ((s = t.shadowRoot) == null ? void 0 : s.contains(a))), _ = a instanceof HTMLElement && a.hasAttribute("data-outside");
29
- (!$ || _) && t.close();
28
+ const a = o[0], $ = a instanceof Node && (t.contains(a) || ((s = t.shadowRoot) == null ? void 0 : s.contains(a))), se = a instanceof HTMLElement && a.hasAttribute("data-outside");
29
+ (!$ || se) && t.close();
30
30
  }
31
31
  });
32
- i(this, F, (r) => {
32
+ i(this, J, (r) => {
33
33
  if (r.code === "Escape") {
34
- const t = [...e(this, v)].reverse().find((s) => s.escape.current);
34
+ const t = [...e(this, m)].reverse().find((s) => s.escape.current);
35
35
  t && t.close();
36
36
  }
37
37
  });
38
- addEventListener("click", e(this, j)), addEventListener("keydown", e(this, F));
38
+ addEventListener("click", e(this, F)), addEventListener("keydown", e(this, J));
39
39
  }
40
40
  get groups() {
41
- return e(this, l);
41
+ return e(this, u);
42
42
  }
43
43
  get stack() {
44
- return e(this, v);
44
+ return e(this, m);
45
45
  }
46
46
  add(r, t) {
47
47
  if (t.closeRest.current)
48
- e(this, l).forEach((o) => {
48
+ e(this, u).forEach((o) => {
49
49
  o.forEach((a) => {
50
50
  a.close();
51
51
  });
52
52
  });
53
53
  else if (t.closeRestInGroup.current) {
54
- let o = e(this, l).get(r);
54
+ let o = e(this, u).get(r);
55
55
  o == null || o.forEach((a) => {
56
56
  a.close();
57
57
  });
58
58
  }
59
- let s = e(this, l).get(r);
60
- s != null && s.length || (s = [], e(this, l).set(r, s)), e(this, v).push(t), s.push(t);
59
+ let s = e(this, u).get(r);
60
+ s != null && s.length || (s = [], e(this, u).set(r, s)), e(this, m).push(t), s.push(t);
61
61
  }
62
62
  remove(r, t) {
63
- if (h(this, v, e(this, v).filter((s) => s !== t)), t.closeRest.current) {
63
+ if (h(this, m, e(this, m).filter((s) => s !== t)), t.closeRest.current) {
64
64
  let s = [];
65
- e(this, l).forEach((o) => {
65
+ e(this, u).forEach((o) => {
66
66
  o.forEach((a) => s.push(a));
67
- }), e(this, l).clear(), s.forEach((o) => o.close());
67
+ }), e(this, u).clear(), s.forEach((o) => o.close());
68
68
  } else if (t.closeRestInGroup.current) {
69
- const s = e(this, l).get(r);
70
- e(this, l).delete(r), s == null || s.forEach((o) => {
69
+ const s = e(this, u).get(r);
70
+ e(this, u).delete(r), s == null || s.forEach((o) => {
71
71
  o.close();
72
72
  });
73
73
  } else {
74
- let s = e(this, l).get(r);
75
- s && (s = s.filter((o) => o !== t), e(this, l).set(r, s));
74
+ let s = e(this, u).get(r);
75
+ s && (s = s.filter((o) => o !== t), e(this, u).set(r, s));
76
76
  }
77
77
  }
78
78
  }
79
- l = new WeakMap(), v = new WeakMap(), j = new WeakMap(), F = new WeakMap();
80
- var d, V, w, f, L, A, P, g, S, R, y, C, u, T, N, U, x, M, H, O;
79
+ u = new WeakMap(), m = new WeakMap(), F = new WeakMap(), J = new WeakMap();
80
+ var d, V, M, w, O, f, L, A, P, g, S, C, T, R, l, y, te, I, x, H, G, W;
81
81
  const E = class E extends HTMLElement {
82
82
  constructor() {
83
83
  super();
84
- i(this, T);
84
+ i(this, y);
85
85
  i(this, d);
86
86
  i(this, V);
87
+ i(this, M);
87
88
  i(this, w);
89
+ i(this, O);
88
90
  i(this, f);
89
91
  i(this, L);
90
92
  i(this, A);
91
93
  i(this, P);
92
94
  i(this, g);
93
95
  i(this, S);
94
- i(this, R);
95
- i(this, y);
96
96
  i(this, C);
97
- i(this, u);
97
+ i(this, T);
98
+ i(this, R);
99
+ i(this, l);
98
100
  i(this, x);
99
- i(this, M);
100
101
  i(this, H);
101
- i(this, O);
102
+ i(this, G);
103
+ i(this, W);
102
104
  this.urlValue = "", h(this, d, !1), h(this, f, new b(this, "--history", !1)), h(this, L, new b(this, "--restore", !1)), h(this, A, new b(this, "--close-rest", !1)), h(this, P, new b(
103
105
  this,
104
106
  "--close-rest-in-group",
105
107
  !1
106
- )), h(this, g, new b(this, "--group", "")), h(this, S, new b(this, "--click-outside", !1)), h(this, R, new b(this, "--escape", !1)), h(this, y, !1), h(this, u, new ee(this, {
108
+ )), h(this, g, new b(this, "--group", "")), h(this, S, new b(this, "--click-outside", !1)), h(this, C, new b(this, "--escape", !1)), h(this, T, !1), h(this, l, new ie(this, {
107
109
  opened: !1,
108
110
  closing: !1,
109
- triggered: !1
111
+ triggered: !1,
112
+ transitionend: !1
110
113
  })), h(this, x, () => {
111
- h(this, y, !1), e(this, d) && e(this, f).current && !location.search.includes(this.id) ? this.close() : !e(this, d) && e(this, f).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, y, !0);
112
- }), h(this, M, () => {
113
- this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, H).call(this);
114
- }), h(this, H, te(() => {
115
- e(this, O).call(this);
116
- }, 10)), h(this, O, () => {
114
+ h(this, T, !1), e(this, d) && e(this, f).current && !location.search.includes(this.id) ? this.close() : !e(this, d) && e(this, f).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), h(this, T, !0);
115
+ }), h(this, H, () => {
116
+ this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, G).call(this);
117
+ }), h(this, G, re(() => {
118
+ e(this, W).call(this);
119
+ }, 10)), h(this, W, () => {
117
120
  this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
118
121
  }), e(this, g).subscribe((t) => {
119
122
  t.previous && (E.stack.remove(t.previous, this), t.current || (document.documentElement.classList.remove(
@@ -121,7 +124,7 @@ const E = class E extends HTMLElement {
121
124
  ), document.documentElement.classList.remove(
122
125
  `${this.group.previous}-opened`
123
126
  )));
124
- }), e(this, u).subscribe((t) => {
127
+ }), e(this, l).subscribe((t) => {
125
128
  if (this.group.current) {
126
129
  document.documentElement.classList.toggle(
127
130
  `${this.group.current}-closing`,
@@ -154,87 +157,91 @@ const E = class E extends HTMLElement {
154
157
  return e(this, S);
155
158
  }
156
159
  get escape() {
157
- return e(this, R);
160
+ return e(this, C);
158
161
  }
159
162
  get opened() {
160
163
  return e(this, d);
161
164
  }
162
165
  get lastTrigger() {
163
- return e(this, C);
166
+ return e(this, R);
164
167
  }
165
168
  get idWithValue() {
166
169
  return `${this.id}${this.urlValue ? "=" + this.urlValue : ""}`;
167
170
  }
168
171
  updateUrlValue(t) {
169
- this.urlValue = (t == null ? void 0 : t.toString()) || "", e(this, d) && ie(this.id, t);
172
+ this.urlValue = (t == null ? void 0 : t.toString()) || "", e(this, d) && oe(this.id, t);
170
173
  }
171
174
  open(t) {
172
175
  if (e(this, d))
173
176
  return;
174
- h(this, C, t == null ? void 0 : t.trigger), clearTimeout(e(this, V)), e(this, u).set("closing", !1), e(this, u).set("triggered", !0), B(this, "popoverTriggered", {
177
+ h(this, R, t == null ? void 0 : t.trigger), clearTimeout(e(this, V)), clearTimeout(e(this, M)), e(this, l).set("closing", !1), e(this, l).set("triggered", !0), D(this, "popoverTriggered", {
175
178
  custom: !0,
176
179
  detail: {
177
- trigger: e(this, C)
180
+ trigger: e(this, R)
178
181
  }
179
- }), e(this, f).current && e(this, y) && history.pushState(history.state, "", e(this, T, N)), h(this, d, !0);
182
+ }), e(this, f).current && e(this, T) && history.pushState(history.state, "", e(this, y, te)), h(this, d, !0);
180
183
  const s = () => {
181
- E.stack.add(e(this, g).current, this), e(this, O).call(this), e(this, u).set("opened", !0), B(this, "popoverOpened", {
184
+ E.stack.add(e(this, g).current, this), e(this, W).call(this), e(this, l).set("opened", !0), D(this, "popoverOpened", {
182
185
  custom: !0,
183
186
  detail: {
184
- trigger: e(this, C)
187
+ trigger: e(this, R)
185
188
  }
186
- }), h(this, w, void 0);
189
+ }), h(this, w, void 0), h(this, O, setTimeout(() => {
190
+ e(this, l).set("transitionend", !0);
191
+ }, _(this) + 10));
187
192
  };
188
193
  t != null && t.skipTransition ? s() : h(this, w, setTimeout(s, 10));
189
194
  }
190
195
  close() {
191
- e(this, d) && (clearTimeout(e(this, w)), E.stack.remove(e(this, g).current, this), h(this, d, !1), m(this, T, U).call(this), e(this, u).set("opened", !1), e(this, u).set("closing", !0), B(this, "popoverClosing", {
192
- custom: !0
193
- }), h(this, V, setTimeout(() => {
194
- e(this, u).set("triggered", !1), e(this, u).set("closing", !1), B(this, "popoverClosed", {
196
+ e(this, d) && (clearTimeout(e(this, w)), clearTimeout(e(this, O)), E.stack.remove(e(this, g).current, this), h(this, d, !1), v(this, y, I).call(this), e(this, l).set("transitionend", !1), h(this, V, setTimeout(() => {
197
+ e(this, l).set("opened", !1), e(this, l).set("closing", !0), D(this, "popoverClosing", {
195
198
  custom: !0
196
- });
197
- }, se(this) + 10)));
199
+ }), h(this, M, setTimeout(() => {
200
+ e(this, l).set("triggered", !1), e(this, l).set("closing", !1), D(this, "popoverClosed", {
201
+ custom: !0
202
+ });
203
+ }, _(this) + 10));
204
+ }, 10)));
198
205
  }
199
206
  connectedCallback() {
200
- e(this, f).observe(), e(this, L).observe(), e(this, A).observe(), e(this, P).observe(), e(this, g).observe(), e(this, S).observe(), e(this, R).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", e(this, x)), setTimeout(() => {
201
- e(this, L).current ? (this.urlValue = re(location.search)[this.id], e(this, x).call(this)) : (m(this, T, U).call(this), h(this, y, !0));
202
- }, 0), I.subscribe(e(this, M));
207
+ e(this, f).observe(), e(this, L).observe(), e(this, A).observe(), e(this, P).observe(), e(this, g).observe(), e(this, S).observe(), e(this, C).observe(), this.setAttribute("role", "dialog"), addEventListener("popstate", e(this, x)), setTimeout(() => {
208
+ e(this, L).current ? (this.urlValue = he(location.search)[this.id], e(this, x).call(this)) : (v(this, y, I).call(this), h(this, T, !0));
209
+ }, 0), ee.subscribe(e(this, H));
203
210
  }
204
211
  disconnectedCallback() {
205
- E.stack.remove(e(this, g).current, this), I.unsubscribe(e(this, M)), e(this, u).close(), e(this, f).close(), e(this, L).close(), e(this, A).close(), e(this, P).close(), e(this, g).close(), e(this, S).close(), e(this, R).close(), this.removeAttribute("role"), clearTimeout(e(this, V)), clearTimeout(e(this, w)), removeEventListener("popstate", e(this, x)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), m(this, T, U).call(this);
212
+ E.stack.remove(e(this, g).current, this), ee.unsubscribe(e(this, H)), e(this, l).close(), e(this, f).close(), e(this, L).close(), e(this, A).close(), e(this, P).close(), e(this, g).close(), e(this, S).close(), e(this, C).close(), this.removeAttribute("role"), clearTimeout(e(this, V)), clearTimeout(e(this, M)), clearTimeout(e(this, w)), clearTimeout(e(this, O)), removeEventListener("popstate", e(this, x)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), v(this, y, I).call(this);
206
213
  }
207
214
  };
208
- d = new WeakMap(), V = new WeakMap(), w = new WeakMap(), f = new WeakMap(), L = new WeakMap(), A = new WeakMap(), P = new WeakMap(), g = new WeakMap(), S = new WeakMap(), R = new WeakMap(), y = new WeakMap(), C = new WeakMap(), u = new WeakMap(), T = new WeakSet(), N = function() {
215
+ d = new WeakMap(), V = new WeakMap(), M = new WeakMap(), w = new WeakMap(), O = new WeakMap(), f = new WeakMap(), L = new WeakMap(), A = new WeakMap(), P = new WeakMap(), g = new WeakMap(), S = new WeakMap(), C = new WeakMap(), T = new WeakMap(), R = new WeakMap(), l = new WeakMap(), y = new WeakSet(), te = function() {
209
216
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.idWithValue}`;
210
- }, U = function() {
217
+ }, I = function() {
211
218
  if (e(this, f).current) {
212
219
  const t = new URL(location.href);
213
220
  t.searchParams.delete(this.id), history.replaceState(history.state, "", t.href);
214
221
  }
215
- }, x = new WeakMap(), M = new WeakMap(), H = new WeakMap(), O = new WeakMap(), E.stack = new oe();
216
- let D = E;
217
- X && !customElements.get("e-popover") && customElements.define("e-popover", D);
218
- var n, p, k, K, W, G, z, q, Q;
219
- class he extends HTMLElement {
222
+ }, x = new WeakMap(), H = new WeakMap(), G = new WeakMap(), W = new WeakMap(), E.stack = new ne();
223
+ let j = E;
224
+ Y && !customElements.get("e-popover") && customElements.define("e-popover", j);
225
+ var n, p, k, Q, z, q, B, U, X;
226
+ class ce extends HTMLElement {
220
227
  constructor() {
221
228
  super();
222
229
  i(this, k);
223
230
  i(this, n);
224
231
  i(this, p, new b(this, "--type", "open"));
225
- i(this, W, () => {
232
+ i(this, z, () => {
226
233
  e(this, p).current !== "close" && this.classList.add("triggered");
227
234
  });
228
- i(this, G, () => {
235
+ i(this, q, () => {
229
236
  e(this, p).current !== "close" && (this.classList.add("opened"), this.setAttribute("aria-expanded", "true"));
230
237
  });
231
- i(this, z, () => {
238
+ i(this, B, () => {
232
239
  e(this, p).current !== "close" && this.classList.remove("opened");
233
240
  });
234
- i(this, q, () => {
241
+ i(this, U, () => {
235
242
  e(this, p).current !== "close" && (this.classList.remove("triggered"), this.setAttribute("aria-expanded", "false"));
236
243
  });
237
- X && (this.addEventListener("click", () => {
244
+ Y && (this.addEventListener("click", () => {
238
245
  if (e(this, n)) {
239
246
  const t = e(this, p).current;
240
247
  t === "open" || t === "toggle" && !e(this, n).opened ? e(this, n).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, n).opened) && e(this, n).close();
@@ -251,7 +258,7 @@ class he extends HTMLElement {
251
258
  }
252
259
  changePopover(t) {
253
260
  var s;
254
- if (m(this, k, K).call(this), t) {
261
+ if (v(this, k, Q).call(this), t) {
255
262
  let o = null;
256
263
  if (t === "parent") {
257
264
  const a = this.closest("[data-popover]");
@@ -264,53 +271,53 @@ class he extends HTMLElement {
264
271
  } else t === "sibling" ? o = (s = this.parentElement) == null ? void 0 : s.querySelector("[data-popover]") : (!t.startsWith(".") && !t.startsWith("[") && (t = `#${t}`), o = document.querySelector(t) || this.getRootNode().querySelector(t));
265
272
  o instanceof HTMLElement ? (h(this, n, o), e(this, n).addEventListener(
266
273
  "popoverTriggered",
267
- e(this, W)
274
+ e(this, z)
268
275
  ), e(this, n).addEventListener(
269
276
  "popoverOpened",
270
- e(this, G)
277
+ e(this, q)
271
278
  ), e(this, n).addEventListener(
272
279
  "popoverClosing",
273
- e(this, z)
280
+ e(this, B)
274
281
  ), e(this, n).addEventListener(
275
282
  "popoverClosed",
276
- e(this, q)
283
+ e(this, U)
277
284
  )) : console.warn(this, `target ${t} not found`);
278
285
  }
279
- m(this, k, Q).call(this, e(this, p).current);
286
+ v(this, k, X).call(this, e(this, p).current);
280
287
  }
281
288
  connectedCallback() {
282
289
  e(this, p).subscribe((s) => {
283
- m(this, k, Q).call(this, s.current);
290
+ v(this, k, X).call(this, s.current);
284
291
  }), this.hasAttribute("tabindex") || (this.tabIndex = 0);
285
292
  const t = this.getAttribute("target");
286
293
  t && this.changePopover(t), this.isConnected && e(this, p).observe();
287
294
  }
288
295
  disconnectedCallback() {
289
- e(this, p).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), m(this, k, K).call(this);
296
+ e(this, p).unobserve(), this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls"), v(this, k, Q).call(this);
290
297
  }
291
298
  }
292
- n = new WeakMap(), p = new WeakMap(), k = new WeakSet(), K = function() {
299
+ n = new WeakMap(), p = new WeakMap(), k = new WeakSet(), Q = function() {
293
300
  e(this, n) && (e(this, n).removeEventListener(
294
301
  "popoverTriggered",
295
- e(this, W)
302
+ e(this, z)
296
303
  ), e(this, n).removeEventListener(
297
304
  "popoverOpened",
298
- e(this, G)
305
+ e(this, q)
299
306
  ), e(this, n).removeEventListener(
300
307
  "popoverClosing",
301
- e(this, z)
308
+ e(this, B)
302
309
  ), e(this, n).removeEventListener(
303
310
  "popoverClosed",
304
- e(this, q)
311
+ e(this, U)
305
312
  ));
306
- }, W = new WeakMap(), G = new WeakMap(), z = new WeakMap(), q = new WeakMap(), Q = function(t) {
307
- e(this, n) instanceof D && (t !== "close" ? (this.setAttribute("aria-haspopup", "true"), this.setAttribute(
313
+ }, z = new WeakMap(), q = new WeakMap(), B = new WeakMap(), U = new WeakMap(), X = function(t) {
314
+ e(this, n) instanceof j && (t !== "close" ? (this.setAttribute("aria-haspopup", "true"), this.setAttribute(
308
315
  "aria-expanded",
309
316
  e(this, n).opened ? "true" : "false"
310
317
  ), this.setAttribute("aria-controls", e(this, n).id || "")) : (this.removeAttribute("aria-haspopup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
311
318
  };
312
- X && !customElements.get("e-popover-button") && customElements.define("e-popover-button", he);
319
+ Y && !customElements.get("e-popover-button") && customElements.define("e-popover-button", ce);
313
320
  export {
314
- he as PopoverButtonElement,
315
- D as PopoverElement
321
+ ce as PopoverButtonElement,
322
+ j as PopoverElement
316
323
  };
@@ -1 +1 @@
1
- "use strict";var ts=Object.defineProperty;var Oe=Object.getOwnPropertySymbols;var es=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var _e=S=>{throw TypeError(S)};var Ve=(S,n,e)=>n in S?ts(S,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[n]=e,He=(S,n)=>{for(var e in n||(n={}))es.call(n,e)&&Ve(S,e,n[e]);if(Oe)for(var e of Oe(n))ss.call(n,e)&&Ve(S,e,n[e]);return S};var ke=(S,n,e)=>n.has(S)||_e("Cannot "+e);var t=(S,n,e)=>(ke(S,n,"read from private field"),e?e.call(S):n.get(S)),s=(S,n,e)=>n.has(S)?_e("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,e),h=(S,n,e,i)=>(ke(S,n,"write to private field"),i?i.call(S,e):n.set(S,e),e),c=(S,n,e)=>(ke(S,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const is=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),rs=require("../easings-GegIwET5.cjs"),ne=require("../events-KVanG9sR.cjs"),Ae=require("../function-MthRj-GJ.cjs"),We=require("../jss-CRBgdvJ3.cjs"),Vt=require("../layout-Ctc2p3uz.cjs"),Fe=require("../math-GDWEqu7y.cjs"),Ne=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const xe=require("../order/index.cjs"),ns=require("../Damped-DgAIjXp3.cjs"),hs=require("../Tweened-DpJDlbj9.cjs"),we=require("../controls/index.cjs"),_t=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),$e=require("../css-unit-parser/index.cjs"),d=require("../css-property/index.cjs"),os=require("../device/index.cjs"),ce=require("../element-resizer/index.cjs"),ls=require("../gestures-C7gbKx11.cjs"),Ue=require("../dom-JBOkFLTh.cjs"),cs=require("../scroll-segment/index.cjs");var p,Ht,g,ue,ae,Ct,V,et,vt,Pt,he;class us{constructor(n,e,i){s(this,Pt);s(this,p);s(this,Ht);s(this,g);s(this,ue,0);s(this,ae,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,Ht,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,Ht))}get element(){return t(this,p)}get index(){return t(this,Ht)}get size(){return t(this,Ct)}get width(){return t(this,ue)}get height(){return t(this,ae)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,ue,t(this,p).offsetWidth),h(this,ae,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Vt.getCumulativeOffsetTop(t(this,p)):Vt.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=Ne.preciseNumber(Fe.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),ne.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){c(this,Pt,he).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,he).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,he).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,he).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Ht=new WeakMap,g=new WeakMap,ue=new WeakMap,ae=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,he=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const as=We.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,st,_,H,$,M,it,rt,W,nt,wt,T,v,xt,zt,Lt,It,$t,kt,A,At,ht,R,ot,F,Rt,lt,Mt,ct,ut,at,f,Wt,l,de,Se,C,m,k,q,dt,D,E,x,Ft,N,U,G,Z,Nt,St,j,Ut,B,P,Gt,K,Tt,Zt,o,Re,oe,Ot,ze,Le,Me,Te,z,pe,Ge,jt,fe,qe,De,gt,Ze,be,le,me;class Dt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new d.CSSProperty(this,"--controls",!0));s(this,w,new d.CSSProperty(this,"--axis","y"));s(this,st,new d.CSSProperty(this,"--reverse",!1));s(this,_,new d.CSSProperty(this,"--direction",0));s(this,H,new d.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new d.CSSProperty(this,"--split",!1));s(this,M,new d.CSSProperty(this,"--sectional",!1));s(this,it,new d.CSSProperty(this,"--tween-easing",!1));s(this,rt,new d.CSSProperty(this,"--tween-duration",!1));s(this,W,new d.CSSProperty(this,"--auto-size",!1));s(this,nt,new d.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new d.CSSProperty(this,"--drag-inertion",1));s(this,T,new d.CSSProperty(this,"--sections-in-view",1));s(this,v,new d.CSSProperty(this,"--loop",!1));s(this,xt,new d.CSSProperty(this,"--damping",20));s(this,zt,new d.CSSProperty(this,"--mass",0));s(this,Lt,new d.CSSProperty(this,"--stiffness",0));s(this,It,new d.CSSProperty(this,"--mouse-drag",!1));s(this,$t,new d.CSSProperty(this,"--section-distance-scale",.5));s(this,kt,new d.CSSProperty(this,"--start-section",0));s(this,A,new d.CSSProperty(this,"--autoplay",0));s(this,At,new d.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new d.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new d.CSSProperty(this,"--classes",!1));s(this,ot,new d.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new d.CSSProperty(this,"--current-index-end-offset",0));s(this,Rt,new d.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new d.CSSProperty(this,"--focus-delay",0));s(this,Mt,new d.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new d.CSSProperty(this,"--disabled",!1));s(this,ut,new d.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,Wt,null);s(this,l,[]);s(this,de,0);s(this,Se,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,E,null);s(this,x,new is.Store(0));s(this,Ft,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Nt);s(this,St);s(this,j,new hs.Tweened);s(this,Ut,!1);s(this,B,null);s(this,P,!1);s(this,Gt,null);s(this,K,[]);s(this,Tt,!1);s(this,Zt);s(this,z,e=>{if(e&&t(this,Tt)){h(this,Tt,!1);return}this.resize()});s(this,pe,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Ft,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,le).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ze).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,jt,(e,i)=>{t(this,Et).current&&(c(this,o,qe).call(this,Math.sign(i)||1),t(this,fe).call(this,e,i))});s(this,fe,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,St)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Nt)),h(this,Nt,setTimeout(()=>{const r=t(this,l)[c(this,o,le).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Mt).current,easing:rs.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!os.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,Ut)?this.scrollToSection(c(this,o,le).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ut,e==="drag")}});s(this,be,Ae.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);clearTimeout(t(this,Zt)),h(this,Tt,!0),this.style.setProperty("--max-section-size",""),h(this,Zt,setTimeout(()=>{h(this,Tt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,me,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Te).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[as];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,f,document.createElement("div")),t(this,f).className="content",h(this,Wt,document.createElement("slot")),t(this,f).appendChild(t(this,Wt)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Gt,new MutationObserver(Ae.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,$t)}get startSectionCSSProperty(){return t(this,kt)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,At)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Rt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Mt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return c(this,o,De).call(this,"current")}get targetScrollValue(){return c(this,o,De).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,l)}get position(){return t(this,de)}get contentPosition(){return t(this,Se)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ft)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,oe).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,Ge).call(this,e),b=t(this,l)[r],y=t(this,l)[u];if(b&&y){let I=0;const Ie=c(this,o,le).call(this),Bt=t(this,l)[Ie],Ee=Bt?this.targetScrollValue-Bt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-b.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-Ee,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,qe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,He({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,de,this.vertical?Vt.getCumulativeOffsetTop(this):Vt.getCumulativeOffsetLeft(this)),h(this,Se,this.vertical?Vt.getCumulativeOffsetTop(t(this,f)):Vt.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||c(this,o,Le).call(this):c(this,o,ze).call(this),t(this,be).call(this),ne.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new ns.Damped(0,{damping:.01,min:0,order:xe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new we.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,jt)),h(this,dt,new we.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,jt)),h(this,D,new we.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,jt)),h(this,E,new we.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,fe)),t(this,w).subscribe(()=>{c(this,o,Re).call(this)}),t(this,st).subscribe(()=>{c(this,o,Re).call(this)}),t(this,nt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,oe).call(this):c(this,o,Ot).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,oe).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,oe).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Ft,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,ht).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,Rt).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ze).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Le).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Te).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,st).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,$t).observe(),t(this,kt).observe(),t(this,A).observe(),t(this,A).observe(),t(this,At).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,Mt).observe(),t(this,ct).observe(),t(this,ut).observe(),_t.windowResizer.subscribe(t(this,me),xe.RESIZE_ORDER.LAST),ce.elementResizer.subscribe(this,t(this,z)),t(this,Gt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,st).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,$t).unobserve(),t(this,kt).unobserve(),t(this,A).unobserve(),t(this,At).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,Mt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),_t.windowResizer.unsubscribe(t(this,me)),ce.elementResizer.unsubscribe(t(this,z)),c(this,o,Me).call(this),t(this,Gt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,st=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,$t=new WeakMap,kt=new WeakMap,A=new WeakMap,At=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,Rt=new WeakMap,lt=new WeakMap,Mt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,Wt=new WeakMap,l=new WeakMap,de=new WeakMap,Se=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,Ft=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Nt=new WeakMap,St=new WeakMap,j=new WeakMap,Ut=new WeakMap,B=new WeakMap,P=new WeakMap,Gt=new WeakMap,K=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,o=new WeakSet,Re=function(){const e=t(this,w).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},oe=function(){c(this,o,Ot).call(this),t(this,Wt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new us(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),ne.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Ot=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),ne.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ze=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,pe)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Nt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},Le=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,pe),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},Me=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,Zt)),_t.windowResizer.unsubscribe(t(this,z)),c(this,o,ze).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Ot).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Te=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,Le).call(this),this.scrollToSection(t(this,kt).current,{behaviour:"instant"}),_t.windowResizer.subscribe(t(this,z),xe.RESIZE_ORDER.SCROLL))},z=new WeakMap,pe=new WeakMap,Ge=function(e){let i=t(this,x).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Fe.clamp(e,0,this.limit),i},jt=new WeakMap,fe=new WeakMap,qe=function(e=1){t(this,ht).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,At).current,this.sectionalCSSProperty.current)},De=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),ne.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),t(this,be).call(this)}}},Ze=function(){if(t(this,R).current){const e=Math.floor(t(this,K).length/2);t(this,K).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,K).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},be=new WeakMap,le=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Ie=t(this,Ut)?I.size*b*-1*.4:0,Bt=I.position;this.overscroll&&Bt===0&&e&&(Bt=t(this,N));let Ee=Math.abs(Bt+Ie-i);Ee<=r&&(r=Ee,u=y)}return u},me=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Dt);var ge;class Be extends HTMLElement{constructor(){super(...arguments);s(this,ge,null)}get scrollElement(){return t(this,ge)}connectedCallback(){const e=Ue.findParentElement(this,Dt);e instanceof Dt?h(this,ge,e):console.error(this,"e-scroll not found")}}ge=new WeakMap;var pt,L,J,Q,Kt,Jt,ft,Qt,ye,Ce;class je extends Be{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,Kt,0);s(this,Jt,0);s(this,ft,()=>{h(this,J,this.offsetWidth>this.offsetHeight);const e=t(this,J)?this.offsetWidth:this.offsetHeight;h(this,Q,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Q,Math.max(t(this,Q),30)),t(this,J)?(t(this,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,Kt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Qt).call(this)});s(this,Qt,()=>{h(this,Jt,this.scrollElement.currentProgress*t(this,Kt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,Jt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Jt)}px, 0px)`});s(this,ye,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ce,e=>{document.documentElement.classList.add("grabbing"),ls.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,Kt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[We.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,Ce)),_t.windowResizer.subscribe(t(this,ft),xe.RESIZE_ORDER.SCROLL),ce.elementResizer.subscribe(this,t(this,ft)),ce.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ye))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,Ce)),_t.windowResizer.unsubscribe(t(this,ft)),ce.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ye))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,ft=new WeakMap,Qt=new WeakMap,ye=new WeakMap,Ce=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",je);var Xt,Yt,te;class Ke extends Be{constructor(){super();s(this,Xt,new d.CSSProperty(this,"--behaviour","smooth"));s(this,Yt,new d.CSSProperty(this,"--tween-easing",!1));s(this,te,new d.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Xt).current,i=t(this,Yt).current,r=t(this,te).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,te).observe()}disconnectedCallback(){t(this,Xt).close(),t(this,Yt).close(),t(this,te).close()}}Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap;var ee;class Je extends Ke{constructor(){super(...arguments);s(this,ee,new d.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ee).current,e)}connectedCallback(){super.connectedCallback(),t(this,ee).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ee).close()}}ee=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Je);var X,se;class Qe extends Ke{constructor(){super(...arguments);s(this,X,new d.CSSProperty(this,"--step",1));s(this,se,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,X).current>0&&this.scrollElement.scrollLine==="end"||t(this,X).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,X).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,X).subscribe(()=>{t(this,se).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,se)),t(this,se).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Qe);var Y,bt,ie,ve,Pe,re;class ds{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,ie,null);s(this,ve,null);s(this,Pe,()=>{t(this,bt).scrollToSection(t(this,ie),{behaviour:t(this,ve)})});s(this,re,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,ie))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,ve,i),h(this,ie,e),t(this,Y).addEventListener("click",t(this,Pe)),t(this,bt).counter.subscribe(t(this,re)),t(this,re).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,Pe)),t(this,bt).counter.unsubscribe(t(this,re)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,ie=new WeakMap,ve=new WeakMap,Pe=new WeakMap,re=new WeakMap;var qt,mt,tt;class Xe extends Be{constructor(){super(...arguments);s(this,qt,null);s(this,mt,[]);s(this,tt,Ae.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new ds(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,qt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,qt,document.createElement("div")),this.appendChild(t(this,qt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,qt).remove()}}qt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Xe);class Ye extends cs.ScrollSegmentElement{connectedCallback(){const n=Ue.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Dt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ye);exports.ScrollBulletButtonsElement=Xe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=Ye;exports.ScrollSetButtonElement=Je;exports.ScrollStepButtonElement=Qe;exports.ScrollbarElement=je;
1
+ "use strict";var ts=Object.defineProperty;var Oe=Object.getOwnPropertySymbols;var es=Object.prototype.hasOwnProperty,ss=Object.prototype.propertyIsEnumerable;var _e=S=>{throw TypeError(S)};var Ve=(S,n,e)=>n in S?ts(S,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):S[n]=e,He=(S,n)=>{for(var e in n||(n={}))es.call(n,e)&&Ve(S,e,n[e]);if(Oe)for(var e of Oe(n))ss.call(n,e)&&Ve(S,e,n[e]);return S};var ke=(S,n,e)=>n.has(S)||_e("Cannot "+e);var t=(S,n,e)=>(ke(S,n,"read from private field"),e?e.call(S):n.get(S)),s=(S,n,e)=>n.has(S)?_e("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(S):n.set(S,e),h=(S,n,e,i)=>(ke(S,n,"write to private field"),i?i.call(S,e):n.set(S,e),e),c=(S,n,e)=>(ke(S,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const is=require("../Store-GokLe_g-.cjs"),O=require("../index-Cqw2NKev.cjs"),rs=require("../easings-GegIwET5.cjs"),ne=require("../events-KVanG9sR.cjs"),Ae=require("../function-MthRj-GJ.cjs"),We=require("../jss-CRBgdvJ3.cjs"),Vt=require("../layout-Ctc2p3uz.cjs"),Fe=require("../math-GDWEqu7y.cjs"),Ne=require("../number-0243DApo.cjs");require("../ticker/index.cjs");const xe=require("../order/index.cjs"),ns=require("../Damped-DNo8YuPM.cjs"),hs=require("../Tweened-DWZ-V8tv.cjs"),we=require("../controls/index.cjs"),_t=require("../window-resizer/index.cjs"),yt=require("../scroll-entries/index.cjs"),$e=require("../css-unit-parser/index.cjs"),d=require("../css-property/index.cjs"),os=require("../device/index.cjs"),ce=require("../element-resizer/index.cjs"),ls=require("../gestures-C7gbKx11.cjs"),Ue=require("../dom-JBOkFLTh.cjs"),cs=require("../scroll-segment/index.cjs");var p,Ht,g,ue,ae,Ct,V,et,vt,Pt,he;class us{constructor(n,e,i){s(this,Pt);s(this,p);s(this,Ht);s(this,g);s(this,ue,0);s(this,ae,0);s(this,Ct,0);s(this,V,0);s(this,et,null);s(this,vt,0);h(this,p,n),h(this,Ht,e),h(this,g,i),yt.scrollEntries.register(t(this,p)),this.setIndex(t(this,Ht))}get element(){return t(this,p)}get index(){return t(this,Ht)}get size(){return t(this,Ct)}get width(){return t(this,ue)}get height(){return t(this,ae)}get position(){return t(this,V)}get transformPosition(){return t(this,vt)}destroy(){yt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,g).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,ue,t(this,p).offsetWidth),h(this,ae,t(this,p).offsetHeight),h(this,Ct,t(this,g).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,V,t(this,g).vertical?Vt.getCumulativeOffsetTop(t(this,p)):Vt.getCumulativeOffsetLeft(t(this,p))),h(this,V,t(this,V)-t(this,g).contentPosition)}transform(){const n=t(this,g).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,g).viewportSize*t(this,g).sectionDistanceScaleCSSProperty.current;t(this,g).loopCSSProperty.current&&t(this,V)+t(this,Ct)<=t(this,g).currentScrollValue-n/2&&(e=(t(this,g).distance-n)*-1-t(this,g).gap),yt.scrollEntries.update(t(this,p),t(this,g).axisCSSProperty.current,e);const r=t(this,g).currentScrollValue+e,u=t(this,V)-t(this,g).viewportSize-i,b=t(this,V)+t(this,Ct)+i,y=Ne.preciseNumber(Fe.clamp(r,u,b),3);h(this,vt,y*-1),t(this,g).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,vt)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,vt)}px, 0px, 0px)`}setMark(n){t(this,et)!==n&&(t(this,et)&&t(this,p).classList.remove(t(this,et)),n&&t(this,p).classList.add(n),h(this,et,n),ne.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,et)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){c(this,Pt,he).call(this,"index",n)}setCurrentIndex(n){c(this,Pt,he).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,Pt,he).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,Pt,he).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Ht=new WeakMap,g=new WeakMap,ue=new WeakMap,ae=new WeakMap,Ct=new WeakMap,V=new WeakMap,et=new WeakMap,vt=new WeakMap,Pt=new WeakSet,he=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const as=We.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".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-wrapper":{width:"100%",height:"100%",overflow:"var(--overflow, initial)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var a,Et,w,st,_,H,$,M,it,rt,W,nt,wt,T,v,xt,zt,Lt,It,$t,kt,A,At,ht,R,ot,F,Rt,lt,Mt,ct,ut,at,f,Wt,l,de,Se,C,m,k,q,dt,D,E,x,Ft,N,U,G,Z,Nt,St,j,Ut,B,P,Gt,K,Tt,Zt,o,Re,oe,Ot,ze,Le,Me,Te,z,pe,Ge,jt,fe,qe,De,gt,Ze,be,le,me;class Dt extends HTMLElement{constructor(){super();s(this,o);s(this,a,null);s(this,Et,new d.CSSProperty(this,"--controls",!0));s(this,w,new d.CSSProperty(this,"--axis","y"));s(this,st,new d.CSSProperty(this,"--reverse",!1));s(this,_,new d.CSSProperty(this,"--direction",0));s(this,H,new d.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,$,new d.CSSProperty(this,"--split",!1));s(this,M,new d.CSSProperty(this,"--sectional",!1));s(this,it,new d.CSSProperty(this,"--tween-easing",!1));s(this,rt,new d.CSSProperty(this,"--tween-duration",!1));s(this,W,new d.CSSProperty(this,"--auto-size",!1));s(this,nt,new d.CSSProperty(this,"--wheel-max-delta",!1));s(this,wt,new d.CSSProperty(this,"--drag-inertion",1));s(this,T,new d.CSSProperty(this,"--sections-in-view",1));s(this,v,new d.CSSProperty(this,"--loop",!1));s(this,xt,new d.CSSProperty(this,"--damping",20));s(this,zt,new d.CSSProperty(this,"--mass",0));s(this,Lt,new d.CSSProperty(this,"--stiffness",0));s(this,It,new d.CSSProperty(this,"--mouse-drag",!1));s(this,$t,new d.CSSProperty(this,"--section-distance-scale",.5));s(this,kt,new d.CSSProperty(this,"--start-section",0));s(this,A,new d.CSSProperty(this,"--autoplay",0));s(this,At,new d.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ht,new d.CSSProperty(this,"--autoplay-user-direction",!1));s(this,R,new d.CSSProperty(this,"--classes",!1));s(this,ot,new d.CSSProperty(this,"--current-index-start-offset",0));s(this,F,new d.CSSProperty(this,"--current-index-end-offset",0));s(this,Rt,new d.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,lt,new d.CSSProperty(this,"--focus-delay",0));s(this,Mt,new d.CSSProperty(this,"--focus-duration",3e3));s(this,ct,new d.CSSProperty(this,"--disabled",!1));s(this,ut,new d.CSSProperty(this,"--hibernate",!1));s(this,at,null);s(this,f,null);s(this,Wt,null);s(this,l,[]);s(this,de,0);s(this,Se,0);s(this,C,0);s(this,m,0);s(this,k,0);s(this,q,null);s(this,dt,null);s(this,D,null);s(this,E,null);s(this,x,new is.Store(0));s(this,Ft,0);s(this,N,0);s(this,U,!1);s(this,G,!0);s(this,Z,!0);s(this,Nt);s(this,St);s(this,j,new hs.Tweened);s(this,Ut,!1);s(this,B,null);s(this,P,!1);s(this,Gt,null);s(this,K,[]);s(this,Tt,!1);s(this,Zt);s(this,z,e=>{if(e&&t(this,Tt)){h(this,Tt,!1);return}this.resize()});s(this,pe,()=>{if(!t(this,U)||t(this,Z)||t(this,G))return;const e=this.currentScrollValue;if(h(this,Ft,Math.max(0,e-t(this,m))),t(this,l).length){for(let i=0;i<t(this,l).length;i++)t(this,l)[i].transform();t(this,x).current=c(this,o,le).call(this)}else this.vertical?t(this,f).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,f).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ze).call(this),yt.scrollEntries.update(this,t(this,w).current,e)});s(this,jt,(e,i)=>{t(this,Et).current&&(c(this,o,qe).call(this,Math.sign(i)||1),t(this,fe).call(this,e,i))});s(this,fe,(e,i)=>{if(t(this,_).current){if(t(this,_).current<0&&i>0)return;if(t(this,_).current>0&&i<0)return}if(t(this,St)||t(this,j).unlistenAnimationFrame(),!t(this,A).current&&t(this,lt).current&&(clearInterval(t(this,Nt)),h(this,Nt,setTimeout(()=>{const r=t(this,l)[c(this,o,le).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,Mt).current,easing:rs.easeInOutExpo}})},t(this,lt).current))),!(e.includes("drag")&&!os.device.isTouch&&!t(this,It).current)){if(t(this,M).current&&e!=="drag"){const r=Math.sign(i);if(t(this,l).length){const u={tween:t(this,it).current||t(this,rt).current?{easing:t(this,it).current||"easeInOutCubic",duration:t(this,rt).current||500}:void 0};t(this,Ut)?this.scrollToSection(c(this,o,le).call(this,!0),u):this.shiftSections(r,u)}else t(this,a).shift(r*t(this,C))}else t(this,a).shift(i);h(this,Ut,e==="drag")}});s(this,be,Ae.debounce(()=>{const e=t(this,K).reduce((i,r)=>{const u=this.vertical?r.width:r.height;return u>i?u:i},0);clearTimeout(t(this,Zt)),h(this,Tt,!0),this.style.setProperty("--max-section-size",""),h(this,Zt,setTimeout(()=>{h(this,Tt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,me,()=>{h(this,P,!0),this.hibernatedCSSProperty.current||c(this,o,Te).call(this)});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[as];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,at,document.createElement("div")),t(this,at).className="content-wrapper",h(this,f,document.createElement("div")),t(this,f).className="content",h(this,Wt,document.createElement("slot")),t(this,f).appendChild(t(this,Wt)),t(this,at).appendChild(t(this,f)),e.appendChild(t(this,at)),h(this,Gt,new MutationObserver(Ae.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,a)}get controlsCSSProperty(){return t(this,Et)}get axisCSSProperty(){return t(this,w)}get reverseCSSProperty(){return t(this,st)}get directionCSSProperty(){return t(this,_)}get pagesCSSProperty(){return t(this,H)}get splitCSSProperty(){return t(this,$)}get sectionalCSSProperty(){return t(this,M)}get easingCSSProperty(){return t(this,it)}get durationCSSProperty(){return t(this,rt)}get autoSizeCSSProperty(){return t(this,W)}get wheelMaxDeltaCSSProperty(){return t(this,nt)}get dragInertionCSSProperty(){return t(this,wt)}get sectionsInViewCSSProperty(){return t(this,T)}get loopCSSProperty(){return t(this,v)}get dampingCSSProperty(){return t(this,xt)}get massCSSProperty(){return t(this,zt)}get stiffnessCSSProperty(){return t(this,Lt)}get mouseDragCSSProperty(){return t(this,It)}get sectionDistanceScaleCSSProperty(){return t(this,$t)}get startSectionCSSProperty(){return t(this,kt)}get autoplayCSSProperty(){return t(this,A)}get autoplayPauseDurationCSSProperty(){return t(this,At)}get autoplayUserDirectionCSSProperty(){return t(this,ht)}get classesCSSProperty(){return t(this,R)}get currentIndexStartOffsetCSSProperty(){return t(this,ot)}get currentIndexEndOffsetCSSProperty(){return t(this,F)}get shiftSectionPositionCSSProperty(){return t(this,Rt)}get focusDelayCSSProperty(){return t(this,lt)}get focusDurationCSSProperty(){return t(this,Mt)}get disabledCSSProperty(){return t(this,ct)}get hibernatedCSSProperty(){return t(this,ut)}get currentScrollValue(){return c(this,o,De).call(this,"current")}get targetScrollValue(){return c(this,o,De).call(this,"target")}get contentWrapperElement(){return t(this,at)}get contentElement(){return t(this,f)}get sections(){return t(this,l)}get position(){return t(this,de)}get contentPosition(){return t(this,Se)}get viewportSize(){return t(this,C)}get scrollSize(){return t(this,m)}get gap(){return t(this,k)}get counter(){return t(this,x)}get limit(){return Math.ceil(t(this,l).length-t(this,T).current)}get distance(){return t(this,N)}get loopDistance(){return t(this,v).current?t(this,N)+t(this,k):t(this,N)}get hasOverflow(){return t(this,U)}get overscroll(){return t(this,Ft)}get scrollLine(){return t(this,B)}get vertical(){return t(this,w).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,w).current==="y"?0:t(this,a).distance}get scrollHeight(){return t(this,w).current==="x"?0:t(this,a).distance}tryResplit(){!t(this,Z)&&(t(this,v).current||t(this,$).current||t(this,v).current||t(this,W).current||t(this,M).current)&&c(this,o,oe).call(this)}onScroll(...e){return t(this,a).subscribe(...e)}offScroll(...e){t(this,a).unsubscribe(...e)}range(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress<u?0:this.currentProgress>b?1:(this.currentProgress-u)/(b-u)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const u=e-r,b=u+i+r*2;return this.currentProgress>=u&&this.currentProgress<=b}scrollToSection(e,i){if(!t(this,l).length)return;const r=t(this,x).current,u=c(this,o,Ge).call(this,e),b=t(this,l)[r],y=t(this,l)[u];if(b&&y){let I=0;const Ie=c(this,o,le).call(this),Bt=t(this,l)[Ie],Ee=Bt?this.targetScrollValue-Bt.position:0;t(this,v).current?u===0&&r===t(this,l).length-1?I=t(this,m)+t(this,C)-b.position+t(this,k):u===t(this,l).length-1&&r===0?I=y.position-(t(this,m)+t(this,C)+t(this,k)):I=y.position-b.position:I=y.position-b.position,this.shiftPosition(I-Ee,i)}}shiftSections(e,i){t(this,l).length&&this.scrollToSection(t(this,x).current+e,i)}setPosition(e,i){c(this,o,qe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,St)||(t(this,j).set(t(this,a).current,{equalize:!0}),t(this,j).set(e,He({},i.tween)),h(this,St,setTimeout(()=>{h(this,St,void 0)},i.tween.duration||0))):t(this,a).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,a).target+e,i)}resize(){if(t(this,ut).current)return;t(this,a).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,m)||0,i=t(this,x).current;if(h(this,de,this.vertical?Vt.getCumulativeOffsetTop(this):Vt.getCumulativeOffsetLeft(this)),h(this,Se,this.vertical?Vt.getCumulativeOffsetTop(t(this,f)):Vt.getCumulativeOffsetLeft(t(this,f))),h(this,C,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).rowGap)):h(this,k,$e.cssUnitParser.parse(getComputedStyle(t(this,f)).columnGap)),t(this,W).current&&t(this,l).length){const r=t(this,T).current,u=(t(this,C)-t(this,k)*(r-1))/r;t(this,l).forEach(b=>{b.setSize(u)})}else t(this,l).forEach(r=>{r.setSize()});if(t(this,l).forEach(r=>{r.resize()}),t(this,H).current){h(this,m,t(this,C)*t(this,H).current);const r=t(this,m)+t(this,C);this.vertical?(t(this,f).style.width=r+"px",t(this,f).style.height="100%"):(t(this,f).style.height=r+"px",t(this,f).style.width="100%")}else this.vertical?(t(this,f).style.width="100%",t(this,f).style.height="max-content",h(this,m,t(this,f).offsetHeight-t(this,C))):(t(this,f).style.width="max-content",t(this,f).style.height="100%",h(this,m,t(this,f).offsetWidth-t(this,C)));if(!t(this,v).current){const r=getComputedStyle(this),u=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,m,t(this,m)+u),t(this,a).max=t(this,m)}if(t(this,v).current&&t(this,l).length){const r=t(this,l)[t(this,l).length-1],u=r.position+r.size-t(this,C),b=t(this,m)-u;h(this,N,r.position+r.size+b)}else h(this,N,t(this,m));if(t(this,M).current&&t(this,l).length){const r=t(this,l)[i];t(this,a).set(r.position,{equalize:!0})}else t(this,a).set(e*t(this,m),{equalize:!0});h(this,U,(this.vertical?t(this,f).offsetHeight:t(this,f).offsetWidth)>t(this,C)),this.classList.toggle("has-overflow",t(this,U)),t(this,U)?t(this,ct).current||c(this,o,Le).call(this):c(this,o,ze).call(this),t(this,be).call(this),ne.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,a).notify()}connectedCallback(){yt.scrollEntries.register(this),h(this,a,new ns.Damped(0,{damping:.01,min:0,order:xe.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,q,new we.WheelControls({element:t(this,f)})),t(this,q).changeEvent.subscribe(t(this,jt)),h(this,dt,new we.KeyboardControls({element:this})),t(this,dt).changeEvent.subscribe(t(this,jt)),h(this,D,new we.DragControls({element:t(this,f),rootElement:this})),t(this,D).changeEvent.subscribe(t(this,jt)),h(this,E,new we.AutoplayControls({culling:this})),t(this,E).changeEvent.subscribe(t(this,fe)),t(this,w).subscribe(()=>{c(this,o,Re).call(this)}),t(this,st).subscribe(()=>{c(this,o,Re).call(this)}),t(this,nt).subscribe(e=>{t(this,q).axis=e.current?"max":t(this,w).current}),t(this,wt).subscribe(e=>{t(this,D).inertion=typeof e.current=="number"?e.current:1}),t(this,H).subscribe(()=>{t(this,P)&&t(this,z).call(this)}),t(this,$).subscribe(({current:e})=>{t(this,P)&&(e?c(this,o,oe).call(this):c(this,o,Ot).call(this))}),t(this,M).subscribe(e=>{t(this,q).debounce=e.current,t(this,D).swipe=e.current,t(this,E).interval=e.current,t(this,P)&&(e.current&&!e.previous&&!t(this,l).length?c(this,o,oe).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,W).subscribe(e=>{t(this,P)&&(t(this,z).call(this),e.current&&!e.previous&&!t(this,l).length?c(this,o,oe).call(this):!e.current&&e.previous&&t(this,l).length&&c(this,o,Ot).call(this))}),t(this,T).subscribe(e=>{t(this,P)&&(t(this,z).call(this),c(this,o,gt).call(this))}),t(this,v).subscribe(e=>{e.current?(t(this,P)&&(t(this,l).length||(t(this,$).current=!0)),t(this,a).max=1/0,t(this,a).min=-1/0):(h(this,Ft,0),t(this,a).max=t(this,m),t(this,a).min=0)}),t(this,xt).subscribe(e=>{t(this,a).damping=e.current}),t(this,zt).subscribe(e=>{t(this,a).mass=e.current}),t(this,Lt).subscribe(e=>{t(this,a).stiffness=e.current}),t(this,A).subscribe(e=>{t(this,E).speed=e.current,!t(this,G)&&e.current&&!e.previous?t(this,E).connect():!e.current&&e.previous&&t(this,E).disconnect()}),t(this,ht).subscribe(e=>{e.current||(t(this,E).direction=1)}),t(this,R).subscribe(e=>{t(this,P)&&c(this,o,gt).call(this)}),t(this,ot).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,F).subscribe(e=>{t(this,P)&&t(this,R).current&&c(this,o,gt).call(this)}),t(this,Rt).subscribe(e=>{t(this,P)&&t(this,a).notify()}),t(this,a).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,x).subscribe(e=>{t(this,l).length&&c(this,o,gt).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,j).subscribe(e=>{t(this,j).isRunning.current&&t(this,a).set(e.current,{equalize:!0})}),t(this,ct).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ze).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Le).call(this))}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Me).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Te).call(this))}),t(this,Et).observe(),t(this,w).observe(),t(this,st).observe(),t(this,_).observe(),t(this,H).observe(),t(this,$).observe(),t(this,M).observe(),t(this,it).observe(),t(this,rt).observe(),t(this,W).observe(),t(this,nt).observe(),t(this,wt).observe(),t(this,T).observe(),t(this,v).observe(),t(this,xt).observe(),t(this,zt).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,$t).observe(),t(this,kt).observe(),t(this,A).observe(),t(this,A).observe(),t(this,At).observe(),t(this,ht).observe(),t(this,R).observe(),t(this,ot).observe(),t(this,F).observe(),t(this,Rt).observe(),t(this,lt).observe(),t(this,Mt).observe(),t(this,ct).observe(),t(this,ut).observe(),_t.windowResizer.subscribe(t(this,me),xe.RESIZE_ORDER.LAST),ce.elementResizer.subscribe(this,t(this,z)),t(this,Gt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,Et).unobserve(),t(this,w).unobserve(),t(this,st).unobserve(),t(this,_).unobserve(),t(this,H).unobserve(),t(this,$).unobserve(),t(this,M).unobserve(),t(this,it).unobserve(),t(this,rt).unobserve(),t(this,W).unobserve(),t(this,nt).unobserve(),t(this,wt).unobserve(),t(this,T).unobserve(),t(this,v).unobserve(),t(this,xt).unobserve(),t(this,zt).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,$t).unobserve(),t(this,kt).unobserve(),t(this,A).unobserve(),t(this,At).unobserve(),t(this,ht).unobserve(),t(this,R).unobserve(),t(this,ot).unobserve(),t(this,F).unobserve(),t(this,Rt).unobserve(),t(this,lt).unobserve(),t(this,Mt).unobserve(),t(this,ct).unobserve(),t(this,ut).unobserve(),_t.windowResizer.unsubscribe(t(this,me)),ce.elementResizer.unsubscribe(t(this,z)),c(this,o,Me).call(this),t(this,Gt).disconnect()}}a=new WeakMap,Et=new WeakMap,w=new WeakMap,st=new WeakMap,_=new WeakMap,H=new WeakMap,$=new WeakMap,M=new WeakMap,it=new WeakMap,rt=new WeakMap,W=new WeakMap,nt=new WeakMap,wt=new WeakMap,T=new WeakMap,v=new WeakMap,xt=new WeakMap,zt=new WeakMap,Lt=new WeakMap,It=new WeakMap,$t=new WeakMap,kt=new WeakMap,A=new WeakMap,At=new WeakMap,ht=new WeakMap,R=new WeakMap,ot=new WeakMap,F=new WeakMap,Rt=new WeakMap,lt=new WeakMap,Mt=new WeakMap,ct=new WeakMap,ut=new WeakMap,at=new WeakMap,f=new WeakMap,Wt=new WeakMap,l=new WeakMap,de=new WeakMap,Se=new WeakMap,C=new WeakMap,m=new WeakMap,k=new WeakMap,q=new WeakMap,dt=new WeakMap,D=new WeakMap,E=new WeakMap,x=new WeakMap,Ft=new WeakMap,N=new WeakMap,U=new WeakMap,G=new WeakMap,Z=new WeakMap,Nt=new WeakMap,St=new WeakMap,j=new WeakMap,Ut=new WeakMap,B=new WeakMap,P=new WeakMap,Gt=new WeakMap,K=new WeakMap,Tt=new WeakMap,Zt=new WeakMap,o=new WeakSet,Re=function(){const e=t(this,w).current,i=t(this,st).current?"-reverse":"";t(this,f).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,q).axis=t(this,nt).current?"max":e,t(this,dt).dimension=e==="x"?"width":"height",t(this,D).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,P)&&t(this,z).call(this)},oe=function(){c(this,o,Ot).call(this),t(this,Wt).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&t(this,l).push(new us(e,i,this))}),t(this,f).style.transform="",this.style.setProperty("--sections",t(this,l).length.toString()),ne.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,z).call(this),c(this,o,gt).call(this)},Ot=function(){t(this,l).forEach(e=>{e.destroy()}),h(this,l,[]),t(this,x).reset(),t(this,a).reset(),this.style.removeProperty("--max-section-size"),ne.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ze=function(){t(this,G)||(h(this,G,!0),t(this,a).unsubscribe(t(this,pe)),t(this,a).unlistenAnimationFrame(),clearInterval(t(this,Nt)),clearInterval(t(this,St)),t(this,j).unlistenAnimationFrame(),t(this,q).disconnect(),t(this,dt).disconnect(),t(this,D).disconnect(),t(this,E).disconnect(),t(this,U)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,z).call(this)))},Le=function(){t(this,G)&&(h(this,G,!1),t(this,a).subscribe(t(this,pe),-1e4),t(this,a).notify(),t(this,q).connect(),t(this,dt).connect(),t(this,D).connect(),t(this,A).current&&t(this,E).connect())},Me=function(){t(this,Z)||(h(this,Z,!0),clearTimeout(t(this,Zt)),_t.windowResizer.unsubscribe(t(this,z)),c(this,o,ze).call(this),t(this,f).style.transform="",t(this,f).style.height="",t(this,f).style.width="",this.classList.remove("has-overflow","start","end"),t(this,l).length?c(this,o,Ot).call(this):(t(this,x).reset(),t(this,a).reset()),yt.scrollEntries.unregister(this))},Te=function(){t(this,Z)&&(h(this,Z,!1),yt.scrollEntries.register(this),this.tryResplit(),c(this,o,Le).call(this),this.scrollToSection(t(this,kt).current,{behaviour:"instant"}),_t.windowResizer.subscribe(t(this,z),xe.RESIZE_ORDER.SCROLL))},z=new WeakMap,pe=new WeakMap,Ge=function(e){let i=t(this,x).current;return t(this,v).current?i=Ne.loopNumber(e,t(this,l).length):i=Fe.clamp(e,0,this.limit),i},jt=new WeakMap,fe=new WeakMap,qe=function(e=1){t(this,ht).current&&(t(this,E).direction=e),t(this,A).current&&t(this,E).pauseAndContinue(t(this,At).current,this.sectionalCSSProperty.current)},De=function(e="current"){if(t(this,v).current&&t(this,l).length){const i=t(this,a)[e]%Math.round(t(this,m)+t(this,C)+t(this,k));return i<0?t(this,m)+i+t(this,C)+t(this,k):i}else return t(this,a)[e]},gt=function(){if(t(this,l).length){const e=t(this,x).current+t(this,ot).current;if(e===0?h(this,B,"start"):e===this.limit?h(this,B,"end"):h(this,B,null),ne.dispatchEvent(this,"scrollLine",{detail:{line:t(this,B)}}),t(this,R).current){this.classList.remove("end","start"),t(this,B)&&this.classList.add(t(this,B));const i=t(this,T).current+t(this,F).current;h(this,K,[]),t(this,l).forEach((r,u)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const b=e-this.limit-1+t(this,F).current,y=e+i,I=this.sections.length-y;u>=e&&u<y||u<=b?(r.setMark("current"),t(this,K).push(r)):u>=y&&u<y+I/2||u<=b+i?r.setMark("next"):r.setMark("previous")}),t(this,be).call(this)}}},Ze=function(){if(t(this,R).current){const e=Math.floor(t(this,K).length/2);t(this,K).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,K).forEach((i,r)=>{const u=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(u),i.setCurrentIndexArcAbs(Math.abs(u)),i.setMiddle(r===e)})}},be=new WeakMap,le=function(e=!1){let i=this.targetScrollValue,r=1/0,u=0;const b=t(this,a).direction;for(let y=0;y<t(this,l).length;y++){const I=t(this,l)[y];let Ie=t(this,Ut)?I.size*b*-1*.4:0,Bt=I.position;this.overscroll&&Bt===0&&e&&(Bt=t(this,N));let Ee=Math.abs(Bt+Ie-i);Ee<=r&&(r=Ee,u=y)}return u},me=new WeakMap;O.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Dt);var ge;class Be extends HTMLElement{constructor(){super(...arguments);s(this,ge,null)}get scrollElement(){return t(this,ge)}connectedCallback(){const e=Ue.findParentElement(this,Dt);e instanceof Dt?h(this,ge,e):console.error(this,"e-scroll not found")}}ge=new WeakMap;var pt,L,J,Q,Kt,Jt,ft,Qt,ye,Ce;class je extends Be{constructor(){super();s(this,pt,null);s(this,L,null);s(this,J,!1);s(this,Q,0);s(this,Kt,0);s(this,Jt,0);s(this,ft,()=>{h(this,J,this.offsetWidth>this.offsetHeight);const e=t(this,J)?this.offsetWidth:this.offsetHeight;h(this,Q,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Q,Math.max(t(this,Q),30)),t(this,J)?(t(this,L).style.width=t(this,Q)+"px",t(this,L).style.height="100%"):(t(this,L).style.width="100%",t(this,L).style.height=t(this,Q)+"px"),h(this,Kt,e-t(this,Q)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Qt).call(this)});s(this,Qt,()=>{h(this,Jt,this.scrollElement.currentProgress*t(this,Kt)),t(this,J)?t(this,L).style.transform=`translate3d(${t(this,Jt)}px, 0px, 0px)`:t(this,L).style.transform=`translate3d(0px, ${t(this,Jt)}px, 0px)`});s(this,ye,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ce,e=>{document.documentElement.classList.add("grabbing"),ls.setupDrag(u=>{const b=t(this,J)?u.x:u.y,y=this.scrollElement.distance/t(this,Kt),I=(b-r)*y;this.scrollElement.setPosition(i+I)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,J)?e.x:e.y});if(O.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[We.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':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:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,pt,document.createElement("slot")),t(this,pt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,pt))}}get thumbElement(){return t(this,L)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,pt).assignedElements()[0]||t(this,pt).firstElementChild;h(this,L,e),t(this,L).addEventListener("pointerdown",t(this,Ce)),_t.windowResizer.subscribe(t(this,ft),xe.RESIZE_ORDER.SCROLL),ce.elementResizer.subscribe(this,t(this,ft)),ce.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.subscribe(t(this,ye))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,L).removeEventListener("pointerdown",t(this,Ce)),_t.windowResizer.unsubscribe(t(this,ft)),ce.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Qt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,ye))}}pt=new WeakMap,L=new WeakMap,J=new WeakMap,Q=new WeakMap,Kt=new WeakMap,Jt=new WeakMap,ft=new WeakMap,Qt=new WeakMap,ye=new WeakMap,Ce=new WeakMap;O.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",je);var Xt,Yt,te;class Ke extends Be{constructor(){super();s(this,Xt,new d.CSSProperty(this,"--behaviour","smooth"));s(this,Yt,new d.CSSProperty(this,"--tween-easing",!1));s(this,te,new d.CSSProperty(this,"--tween-duration",0));O.isBrowser&&this.addEventListener("click",()=>{const e=t(this,Xt).current,i=t(this,Yt).current,r=t(this,te).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,Xt).observe(),t(this,Yt).observe(),t(this,te).observe()}disconnectedCallback(){t(this,Xt).close(),t(this,Yt).close(),t(this,te).close()}}Xt=new WeakMap,Yt=new WeakMap,te=new WeakMap;var ee;class Je extends Ke{constructor(){super(...arguments);s(this,ee,new d.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ee).current,e)}connectedCallback(){super.connectedCallback(),t(this,ee).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ee).close()}}ee=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",Je);var X,se;class Qe extends Ke{constructor(){super(...arguments);s(this,X,new d.CSSProperty(this,"--step",1));s(this,se,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,X).current>0&&this.scrollElement.scrollLine==="end"||t(this,X).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,X).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,X).subscribe(()=>{t(this,se).call(this)}),t(this,X).observe(),this.scrollElement.addEventListener("scrollLine",t(this,se)),t(this,se).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,X).close(),this.removeAttribute("disabled")}}X=new WeakMap,se=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",Qe);var Y,bt,ie,ve,Pe,re;class ds{constructor(n,e,i){s(this,Y,null);s(this,bt,null);s(this,ie,null);s(this,ve,null);s(this,Pe,()=>{t(this,bt).scrollToSection(t(this,ie),{behaviour:t(this,ve)})});s(this,re,()=>{t(this,Y).classList.toggle("current",t(this,bt).counter.current===t(this,ie))});O.isBrowser&&(h(this,Y,document.createElement("button")),h(this,bt,n),h(this,ve,i),h(this,ie,e),t(this,Y).addEventListener("click",t(this,Pe)),t(this,bt).counter.subscribe(t(this,re)),t(this,re).call(this))}get element(){return t(this,Y)}destroy(){t(this,Y).removeEventListener("click",t(this,Pe)),t(this,bt).counter.unsubscribe(t(this,re)),t(this,Y).remove()}}Y=new WeakMap,bt=new WeakMap,ie=new WeakMap,ve=new WeakMap,Pe=new WeakMap,re=new WeakMap;var qt,mt,tt;class Xe extends Be{constructor(){super(...arguments);s(this,qt,null);s(this,mt,[]);s(this,tt,Ae.debounce(()=>{t(this,mt).forEach(i=>i.destroy()),h(this,mt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.sections.length:e=this.scrollElement.sections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new ds(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,qt).appendChild(r.element),t(this,mt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,tt)),this.scrollElement.loopCSSProperty.subscribe(t(this,tt)),h(this,qt,document.createElement("div")),this.appendChild(t(this,qt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,tt)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,tt)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,tt)),t(this,mt).forEach(e=>e.destroy()),h(this,mt,[]),t(this,qt).remove()}}qt=new WeakMap,mt=new WeakMap,tt=new WeakMap;O.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",Xe);class Ye extends cs.ScrollSegmentElement{connectedCallback(){const n=Ue.findParentElement(this,Dt);n instanceof Dt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Dt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}O.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",Ye);exports.ScrollBulletButtonsElement=Xe;exports.ScrollElement=Dt;exports.ScrollSegmentElement=Ye;exports.ScrollSetButtonElement=Je;exports.ScrollStepButtonElement=Qe;exports.ScrollbarElement=je;
@@ -25,8 +25,8 @@ import { c as qe } from "../math-BOBiC4TN.js";
25
25
  import { p as Ye, l as ts } from "../number-DwCxt_Ck.js";
26
26
  import "../ticker/index.js";
27
27
  import { TICK_ORDER as es, RESIZE_ORDER as Ae } from "../order/index.js";
28
- import { D as ss } from "../Damped-GyAS-U-z.js";
29
- import { T as is } from "../Tweened-BSC-evuL.js";
28
+ import { D as ss } from "../Damped-gai147Ov.js";
29
+ import { T as is } from "../Tweened-xhRceYz9.js";
30
30
  import { WheelControls as rs, KeyboardControls as ns, DragControls as hs, AutoplayControls as os } from "../controls/index.js";
31
31
  import { windowResizer as Ht } from "../window-resizer/index.js";
32
32
  import { scrollEntries as vt } from "../scroll-entries/index.js";
@@ -1 +1 @@
1
- "use strict";var bt=l=>{throw TypeError(l)};var lt=(l,u,r)=>u.has(l)||bt("Cannot "+r);var t=(l,u,r)=>(lt(l,u,"read from private field"),r?r.call(l):u.get(l)),i=(l,u,r)=>u.has(l)?bt("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,r),e=(l,u,r,s)=>(lt(l,u,"write to private field"),s?s.call(l,r):u.set(l,r),r),o=(l,u,r)=>(lt(l,u,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../dom-JBOkFLTh.cjs"),kt=require("../index-Cqw2NKev.cjs"),Ct=require("../element-resizer/index.cjs"),ut=require("../window-resizer/index.cjs"),c=require("../css-property/index.cjs"),gt=require("../order/index.cjs"),et=require("../events-KVanG9sR.cjs"),xt=require("../function-MthRj-GJ.cjs"),St=require("../layout-Ctc2p3uz.cjs"),Mt=require("../math-GDWEqu7y.cjs"),rt=require("../Store-GokLe_g-.cjs"),At=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Dt=require("../Damped-DgAIjXp3.cjs");var w,ct,it,B;class pt{constructor(u){i(this,w,null);i(this,ct);i(this,it,!1);i(this,B,()=>{e(this,it,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,u),e(this,w,qt.findScrollParentElement(t(this,ct))),Ct.elementResizer.subscribe(t(this,w),t(this,B)),ut.windowResizer.subscribe(t(this,B)),t(this,B).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,it)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,it)}destroy(){Ct.elementResizer.unsubscribe(t(this,B)),ut.windowResizer.unsubscribe(t(this,B))}onScroll(u){t(this,w).addEventListener("scroll",u)}offScroll(u){t(this,w).removeEventListener("scroll",u)}}w=new WeakMap,ct=new WeakMap,it=new WeakMap,B=new WeakMap;var S,G,K,Z,J,D,T,_,I,m,g,y,v,$,d,O,q,L,H,Y,k,x,M,p,P,V,R,z,F,ht,n,W,Q,nt,f,A,C,b,E,tt,N,a,U,h,Pt,ft,Vt,wt,Ft,Et,Lt,Rt,ot,st,dt,X,zt,Ot,mt,yt;let vt=(yt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,G);i(this,K);i(this,Z);i(this,J);i(this,D);i(this,T);i(this,_);i(this,I);i(this,m);i(this,g);i(this,y);i(this,v);i(this,$);i(this,d);i(this,O);i(this,q);i(this,L);i(this,H);i(this,Y);i(this,k);i(this,x);i(this,M);i(this,p);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,ht);i(this,n);i(this,W);i(this,Q);i(this,nt);i(this,f);i(this,A);i(this,C);i(this,b);i(this,E);i(this,tt);i(this,N);i(this,a);i(this,U);i(this,ot);i(this,st);e(this,S,null),e(this,G,new c.CSSProperty(this,"--damping",20)),e(this,K,new c.CSSProperty(this,"--mass",0)),e(this,Z,new c.CSSProperty(this,"--stiffness",0)),e(this,J,new c.CSSProperty(this,"--target","")),e(this,D,new c.CSSProperty(this,"--disabled",!1)),e(this,T,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,I,new c.CSSProperty(this,"--capture-once",!1)),e(this,m,new c.CSSProperty(this,"--captured","")),e(this,g,new c.CSSProperty(this,"--released","")),e(this,y,new c.CSSProperty(this,"--captured-from-start","")),e(this,v,new c.CSSProperty(this,"--captured-from-finish","")),e(this,$,new c.CSSProperty(this,"--released-from-start","")),e(this,d,new c.CSSProperty(this,"--released-from-finish","")),e(this,O,new c.CSSProperty(this,"--passed-var","")),e(this,q,new c.CSSProperty(this,"--progress-var","")),e(this,L,new c.CSSProperty(this,"--progress-arc-var","")),e(this,H,new c.CSSProperty(this,"--progress-arc-mult",1)),e(this,Y,new c.CSSProperty(this,"--animation-var-type","target")),e(this,k,new c.CSSProperty(this,"--distance-var","")),e(this,x,new c.CSSProperty(this,"--start-var","")),e(this,M,new c.CSSProperty(this,"--finish-var","")),e(this,p,new rt.Store(!1)),e(this,P,new rt.Store(!1)),e(this,V,new rt.Store(!1)),e(this,R,new rt.Store(!1)),e(this,z,new rt.Store(!1)),e(this,F,new rt.Store(!1)),e(this,ht,[]),e(this,n,this),e(this,W,0),e(this,Q,0),e(this,nt,0),e(this,f,new Dt.Damped(0,{order:gt.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,A,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),e(this,N,!1),e(this,a,!0),e(this,U,!1),this.resize=()=>{e(this,Q,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?St.getCumulativeOffsetTop(this,r):St.getCumulativeOffsetLeft(this,r));const s=St.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,T).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,p).current&&!t(this,P).current&&(t(this,p).current=!0),this.setVar(t(this,x).current,t(this,C)),this.setVar(t(this,M).current,t(this,E)),this.setVar(t(this,k).current,t(this,b)),t(this,f).max=t(this,b),e(this,tt,!0),t(this,st).call(this)},this.findAnotherScrollEntries=xt.debounce(()=>{const r=At.scrollEntries.getAll(this).reverse();let s=0;r.forEach((j,at)=>{j.element===t(this,S)&&(s=at)}),e(this,ht,r.slice(s+1)),this.tick()},0),e(this,ot,()=>{t(this,a)||this.resize()}),e(this,st,()=>{!t(this,a)&&t(this,tt)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){o(this,h,ft).call(this),e(this,S,r),o(this,h,Pt).call(this)}get distanceOffsetCSSProperty(){return t(this,T)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,I)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,y)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,$)}get releasedFromFinishCSSProperty(){return t(this,d)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,L)}get progressArcMultCSSProperty(){return t(this,H)}get animationVarTypeCSSProperty(){return t(this,Y)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,x)}get finishVarCSSProperty(){return t(this,M)}get disabledCSSProperty(){return t(this,D)}get dampingCSSProperty(){return t(this,G)}get massCSSProperty(){return t(this,K)}get stiffnessCSSProperty(){return t(this,Z)}get targetCSSProperty(){return t(this,J)}get isCaptured(){return t(this,p)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,Q)}get passed(){return t(this,f)}get progress(){return t(this,A)}get progressArc(){return Math.abs(Math.cos(t(this,A)*Math.PI))*t(this,H).current}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}tick(){let r=t(this,S).currentScrollValue;t(this,ht).forEach(at=>{r+=at.value});const s=r-t(this,C);t(this,U)||e(this,U,t(this,f).previous?Math.abs(t(this,f).previous-s)>1e3:!1),t(this,f).set(s);const j=Math.round(r);t(this,p).current&&(j>=t(this,C)?t(this,V).current||o(this,h,Ft).call(this):t(this,V).current&&!t(this,R).current&&o(this,h,Lt).call(this),j<t(this,E)?t(this,F).current&&!t(this,z).current&&o(this,h,Et).call(this):t(this,V).current&&!t(this,F).current&&o(this,h,Rt).call(this)),j>=t(this,C)&&j<t(this,E)?t(this,p).current||o(this,h,Vt).call(this):t(this,p).current&&(t(this,f).set(Mt.step(t(this,b)/2,t(this,f).target,0,t(this,b))),o(this,h,wt).call(this)),t(this,N)&&t(this,I).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,Q,0),t(this,f).reset(),e(this,A,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),t(this,p).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),o(this,h,mt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new pt(this)}disconnectedCallback(){t(this,S)instanceof pt&&t(this,S).destroy(),o(this,h,ft).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){if(r){const j=typeof s=="number"?s.toFixed(6):s;t(this,n).style.setProperty(`--${r}`,j)}}getDistance(){return t(this,Q)+t(this,nt)}getStart(){return t(this,W)-t(this,nt)}},S=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,J=new WeakMap,D=new WeakMap,T=new WeakMap,_=new WeakMap,I=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,$=new WeakMap,d=new WeakMap,O=new WeakMap,q=new WeakMap,L=new WeakMap,H=new WeakMap,Y=new WeakMap,k=new WeakMap,x=new WeakMap,M=new WeakMap,p=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,ht=new WeakMap,n=new WeakMap,W=new WeakMap,Q=new WeakMap,nt=new WeakMap,f=new WeakMap,A=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,tt=new WeakMap,N=new WeakMap,a=new WeakMap,U=new WeakMap,h=new WeakSet,Pt=function(){if(!t(this,S))return;t(this,p).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,J).observe(),t(this,D).observe(),t(this,T).observe(),t(this,_).observe(),t(this,I).observe(),t(this,m).observe(),t(this,g).observe(),t(this,y).observe(),t(this,v).observe(),t(this,$).observe(),t(this,d).observe(),t(this,O).observe(),t(this,q).observe(),t(this,L).observe(),t(this,H).observe(),t(this,Y).observe(),t(this,k).observe(),t(this,x).observe(),t(this,M).observe();let r=!1;this.findAnotherScrollEntries(),t(this,D).current||this.enable(),t(this,G).subscribe(s=>{t(this,f).damping=s.current}),t(this,K).subscribe(s=>{t(this,f).mass=s.current}),t(this,Z).subscribe(s=>{t(this,f).stiffness=s.current}),t(this,J).subscribe(s=>{s.previous&&o(this,h,mt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,D).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,T).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,y).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,v).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,g).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,$).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,d).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,I).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,H).subscribe(s=>{t(this,a)||o(this,h,dt).call(this)}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,M).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,f).subscribe(s=>{if(t(this,U)){e(this,U,!1);return}o(this,h,dt).call(this)}),ut.windowResizer.subscribe(t(this,ot),gt.RESIZE_ORDER.SCROLL+1),this.scrollContainer.onScroll(t(this,st)),r=!0},ft=function(){t(this,S)&&(ut.windowResizer.unsubscribe(t(this,ot)),this.scrollContainer.offScroll(t(this,st)),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,J).close(),t(this,D).close(),t(this,T).close(),t(this,_).close(),t(this,I).close(),t(this,m).close(),t(this,g).close(),t(this,y).close(),t(this,v).close(),t(this,$).close(),t(this,d).close(),t(this,O).close(),t(this,q).close(),t(this,L).close(),t(this,H).close(),t(this,k).close(),t(this,x).close(),t(this,M).close(),t(this,p).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable(),t(this,f).close())},Vt=function(){t(this,p).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},wt=function(){t(this,P).current=!0,t(this,p).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ft=function(){t(this,p).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,p).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Lt=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},Rt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},ot=new WeakMap,st=new WeakMap,dt=function(){const r=t(this,f)[t(this,Y).current];this.setVar(t(this,O).current,r),e(this,A,r/t(this,b)||0),this.setVar(t(this,q).current,t(this,A)),t(this,L).current&&this.setVar(t(this,L).current,this.progressArc)},X=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,p).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},zt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Ot=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},mt=function(){o(this,h,zt).call(this,t(this,m).current,t(this,y).current,t(this,v).current,t(this,g).current,t(this,$).current,t(this,d).current),o(this,h,Ot).call(this,t(this,O).current,t(this,q).current,t(this,L).current,t(this,k).current,t(this,x).current,t(this,M).current)},yt);kt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=pt;exports.ScrollSegmentElement=vt;
1
+ "use strict";var bt=l=>{throw TypeError(l)};var lt=(l,u,r)=>u.has(l)||bt("Cannot "+r);var t=(l,u,r)=>(lt(l,u,"read from private field"),r?r.call(l):u.get(l)),i=(l,u,r)=>u.has(l)?bt("Cannot add the same private member more than once"):u instanceof WeakSet?u.add(l):u.set(l,r),e=(l,u,r,s)=>(lt(l,u,"write to private field"),s?s.call(l,r):u.set(l,r),r),o=(l,u,r)=>(lt(l,u,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("../dom-JBOkFLTh.cjs"),kt=require("../index-Cqw2NKev.cjs"),Ct=require("../element-resizer/index.cjs"),ut=require("../window-resizer/index.cjs"),c=require("../css-property/index.cjs"),gt=require("../order/index.cjs"),et=require("../events-KVanG9sR.cjs"),xt=require("../function-MthRj-GJ.cjs"),St=require("../layout-Ctc2p3uz.cjs"),Mt=require("../math-GDWEqu7y.cjs"),rt=require("../Store-GokLe_g-.cjs"),At=require("../scroll-entries/index.cjs");require("../ticker/index.cjs");const Dt=require("../Damped-DNo8YuPM.cjs");var w,ct,it,B;class pt{constructor(u){i(this,w,null);i(this,ct);i(this,it,!1);i(this,B,()=>{e(this,it,!(t(this,w).scrollWidth>t(this,w).clientWidth))});e(this,ct,u),e(this,w,qt.findScrollParentElement(t(this,ct))),Ct.elementResizer.subscribe(t(this,w),t(this,B)),ut.windowResizer.subscribe(t(this,B)),t(this,B).call(this)}get element(){return t(this,w)}get currentScrollValue(){return t(this,it)?t(this,w).scrollTop:t(this,w).scrollLeft}get vertical(){return t(this,it)}destroy(){Ct.elementResizer.unsubscribe(t(this,B)),ut.windowResizer.unsubscribe(t(this,B))}onScroll(u){t(this,w).addEventListener("scroll",u)}offScroll(u){t(this,w).removeEventListener("scroll",u)}}w=new WeakMap,ct=new WeakMap,it=new WeakMap,B=new WeakMap;var S,G,K,Z,J,D,T,_,I,m,g,y,v,$,d,O,q,L,H,Y,k,x,M,p,P,V,R,z,F,ht,n,W,Q,nt,f,A,C,b,E,tt,N,a,U,h,Pt,ft,Vt,wt,Ft,Et,Lt,Rt,ot,st,dt,X,zt,Ot,mt,yt;let vt=(yt=class extends HTMLElement{constructor(){super(...arguments);i(this,h);i(this,S);i(this,G);i(this,K);i(this,Z);i(this,J);i(this,D);i(this,T);i(this,_);i(this,I);i(this,m);i(this,g);i(this,y);i(this,v);i(this,$);i(this,d);i(this,O);i(this,q);i(this,L);i(this,H);i(this,Y);i(this,k);i(this,x);i(this,M);i(this,p);i(this,P);i(this,V);i(this,R);i(this,z);i(this,F);i(this,ht);i(this,n);i(this,W);i(this,Q);i(this,nt);i(this,f);i(this,A);i(this,C);i(this,b);i(this,E);i(this,tt);i(this,N);i(this,a);i(this,U);i(this,ot);i(this,st);e(this,S,null),e(this,G,new c.CSSProperty(this,"--damping",20)),e(this,K,new c.CSSProperty(this,"--mass",0)),e(this,Z,new c.CSSProperty(this,"--stiffness",0)),e(this,J,new c.CSSProperty(this,"--target","")),e(this,D,new c.CSSProperty(this,"--disabled",!1)),e(this,T,new c.CSSProperty(this,"--distance-offset",0,{rawValueCheck:!1})),e(this,_,new c.CSSProperty(this,"--start-offset",0,{rawValueCheck:!1})),e(this,I,new c.CSSProperty(this,"--capture-once",!1)),e(this,m,new c.CSSProperty(this,"--captured","")),e(this,g,new c.CSSProperty(this,"--released","")),e(this,y,new c.CSSProperty(this,"--captured-from-start","")),e(this,v,new c.CSSProperty(this,"--captured-from-finish","")),e(this,$,new c.CSSProperty(this,"--released-from-start","")),e(this,d,new c.CSSProperty(this,"--released-from-finish","")),e(this,O,new c.CSSProperty(this,"--passed-var","")),e(this,q,new c.CSSProperty(this,"--progress-var","")),e(this,L,new c.CSSProperty(this,"--progress-arc-var","")),e(this,H,new c.CSSProperty(this,"--progress-arc-mult",1)),e(this,Y,new c.CSSProperty(this,"--animation-var-type","target")),e(this,k,new c.CSSProperty(this,"--distance-var","")),e(this,x,new c.CSSProperty(this,"--start-var","")),e(this,M,new c.CSSProperty(this,"--finish-var","")),e(this,p,new rt.Store(!1)),e(this,P,new rt.Store(!1)),e(this,V,new rt.Store(!1)),e(this,R,new rt.Store(!1)),e(this,z,new rt.Store(!1)),e(this,F,new rt.Store(!1)),e(this,ht,[]),e(this,n,this),e(this,W,0),e(this,Q,0),e(this,nt,0),e(this,f,new Dt.Damped(0,{order:gt.TICK_ORDER.SEGMENT,min:0,max:1})),e(this,A,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),e(this,N,!1),e(this,a,!0),e(this,U,!1),this.resize=()=>{e(this,Q,t(this,S).vertical?this.offsetHeight:this.offsetWidth);const r=t(this,S)instanceof HTMLElement?t(this,S):t(this,S).element;e(this,W,t(this,S).vertical?St.getCumulativeOffsetTop(this,r):St.getCumulativeOffsetLeft(this,r));const s=St.getStickyOffset(this,t(this,S).vertical?"top":"left");e(this,W,t(this,W)-s),e(this,C,this.getStart()),e(this,b,this.getDistance()),e(this,C,t(this,C)+t(this,_).current),e(this,b,t(this,b)+t(this,T).current),e(this,E,t(this,C)+t(this,b)),t(this,S).currentScrollValue>t(this,E)&&!t(this,p).current&&!t(this,P).current&&(t(this,p).current=!0),this.setVar(t(this,x).current,t(this,C)),this.setVar(t(this,M).current,t(this,E)),this.setVar(t(this,k).current,t(this,b)),t(this,f).max=t(this,b),e(this,tt,!0),t(this,st).call(this)},this.findAnotherScrollEntries=xt.debounce(()=>{const r=At.scrollEntries.getAll(this).reverse();let s=0;r.forEach((j,at)=>{j.element===t(this,S)&&(s=at)}),e(this,ht,r.slice(s+1)),this.tick()},0),e(this,ot,()=>{t(this,a)||this.resize()}),e(this,st,()=>{!t(this,a)&&t(this,tt)&&this.tick()})}get scrollContainer(){return t(this,S)}set scrollContainer(r){o(this,h,ft).call(this),e(this,S,r),o(this,h,Pt).call(this)}get distanceOffsetCSSProperty(){return t(this,T)}get startOffsetCSSProperty(){return t(this,_)}get captureOnceCSSProperty(){return t(this,I)}get capturedCSSProperty(){return t(this,m)}get releasedCSSProperty(){return t(this,g)}get capturedFromStartCSSProperty(){return t(this,y)}get capturedFromFinishCSSProperty(){return t(this,v)}get releasedFromStartCSSProperty(){return t(this,$)}get releasedFromFinishCSSProperty(){return t(this,d)}get passedVarCSSProperty(){return t(this,O)}get progressVarCSSProperty(){return t(this,q)}get progressArcVarCSSProperty(){return t(this,L)}get progressArcMultCSSProperty(){return t(this,H)}get animationVarTypeCSSProperty(){return t(this,Y)}get distanceVarCSSProperty(){return t(this,k)}get startVarCSSProperty(){return t(this,x)}get finishVarCSSProperty(){return t(this,M)}get disabledCSSProperty(){return t(this,D)}get dampingCSSProperty(){return t(this,G)}get massCSSProperty(){return t(this,K)}get stiffnessCSSProperty(){return t(this,Z)}get targetCSSProperty(){return t(this,J)}get isCaptured(){return t(this,p)}get isReleased(){return t(this,P)}get isCapturedFromStart(){return t(this,V)}get isReleasedFromStart(){return t(this,R)}get isCapturedFromFinish(){return t(this,z)}get isReleasedFromFinish(){return t(this,F)}get directionPosition(){return t(this,W)}get directionSize(){return t(this,Q)}get passed(){return t(this,f)}get progress(){return t(this,A)}get progressArc(){return Math.abs(Math.cos(t(this,A)*Math.PI))*t(this,H).current}get start(){return t(this,C)}get finish(){return t(this,E)}get distance(){return t(this,b)}get isCapturedOnce(){return t(this,N)}get isDisabled(){return t(this,a)}tick(){let r=t(this,S).currentScrollValue;t(this,ht).forEach(at=>{r+=at.value});const s=r-t(this,C);t(this,U)||e(this,U,t(this,f).previous?Math.abs(t(this,f).previous-s)>1e3:!1),t(this,f).set(s);const j=Math.round(r);t(this,p).current&&(j>=t(this,C)?t(this,V).current||o(this,h,Ft).call(this):t(this,V).current&&!t(this,R).current&&o(this,h,Lt).call(this),j<t(this,E)?t(this,F).current&&!t(this,z).current&&o(this,h,Et).call(this):t(this,V).current&&!t(this,F).current&&o(this,h,Rt).call(this)),j>=t(this,C)&&j<t(this,E)?t(this,p).current||o(this,h,Vt).call(this):t(this,p).current&&(t(this,f).set(Mt.step(t(this,b)/2,t(this,f).target,0,t(this,b))),o(this,h,wt).call(this)),t(this,N)&&t(this,I).current&&(t(this,m).current&&t(this,n).classList.add(t(this,m).current),e(this,a,!0))}disable(){this.style.cssText="",e(this,W,0),e(this,Q,0),t(this,f).reset(),e(this,A,0),e(this,C,0),e(this,b,0),e(this,E,0),e(this,tt,!1),t(this,p).current=!1,t(this,P).current=!1,t(this,V).current=!1,t(this,R).current=!1,t(this,z).current=!1,t(this,F).current=!1,e(this,N,!1),e(this,a,!0),o(this,h,mt).call(this)}enable(){e(this,a,!1)}connectedCallback(){this.scrollContainer=new pt(this)}disconnectedCallback(){t(this,S)instanceof pt&&t(this,S).destroy(),o(this,h,ft).call(this)}removeVar(r){r&&t(this,n).style.removeProperty(`--${r}`)}setVar(r,s){if(r){const j=typeof s=="number"?s.toFixed(6):s;t(this,n).style.setProperty(`--${r}`,j)}}getDistance(){return t(this,Q)+t(this,nt)}getStart(){return t(this,W)-t(this,nt)}},S=new WeakMap,G=new WeakMap,K=new WeakMap,Z=new WeakMap,J=new WeakMap,D=new WeakMap,T=new WeakMap,_=new WeakMap,I=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,$=new WeakMap,d=new WeakMap,O=new WeakMap,q=new WeakMap,L=new WeakMap,H=new WeakMap,Y=new WeakMap,k=new WeakMap,x=new WeakMap,M=new WeakMap,p=new WeakMap,P=new WeakMap,V=new WeakMap,R=new WeakMap,z=new WeakMap,F=new WeakMap,ht=new WeakMap,n=new WeakMap,W=new WeakMap,Q=new WeakMap,nt=new WeakMap,f=new WeakMap,A=new WeakMap,C=new WeakMap,b=new WeakMap,E=new WeakMap,tt=new WeakMap,N=new WeakMap,a=new WeakMap,U=new WeakMap,h=new WeakSet,Pt=function(){if(!t(this,S))return;t(this,p).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCapture",{composed:!0,custom:!0})}),t(this,V).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromStart",{composed:!0,custom:!0})}),t(this,z).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentCaptureFromFinish",{composed:!0,custom:!0})}),t(this,P).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentRelease",{composed:!0,custom:!0})}),t(this,R).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromStart",{composed:!0,custom:!0})}),t(this,F).subscribe(s=>{s.current&&et.dispatchEvent(this,"scrollSegmentReleaseFromFinish",{composed:!0,custom:!0})}),t(this,G).observe(),t(this,K).observe(),t(this,Z).observe(),t(this,J).observe(),t(this,D).observe(),t(this,T).observe(),t(this,_).observe(),t(this,I).observe(),t(this,m).observe(),t(this,g).observe(),t(this,y).observe(),t(this,v).observe(),t(this,$).observe(),t(this,d).observe(),t(this,O).observe(),t(this,q).observe(),t(this,L).observe(),t(this,H).observe(),t(this,Y).observe(),t(this,k).observe(),t(this,x).observe(),t(this,M).observe();let r=!1;this.findAnotherScrollEntries(),t(this,D).current||this.enable(),t(this,G).subscribe(s=>{t(this,f).damping=s.current}),t(this,K).subscribe(s=>{t(this,f).mass=s.current}),t(this,Z).subscribe(s=>{t(this,f).stiffness=s.current}),t(this,J).subscribe(s=>{s.previous&&o(this,h,mt).call(this),s.current?s.current==="parent"?e(this,n,this.parentElement||this):e(this,n,document.querySelector(s.current)||this):e(this,n,this)}),t(this,D).subscribe(s=>{s.current&&!s.previous?this.disable():!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,_).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,T).subscribe(()=>{r&&!t(this,a)&&this.resize()}),t(this,m).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,y).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,v).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,g).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,$).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,d).subscribe(s=>{o(this,h,X).call(this,s)}),t(this,I).subscribe(s=>{t(this,a)||!s.current&&s.previous&&(this.resize(),this.enable())}),t(this,O).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.passed.current))}),t(this,q).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,A)))}),t(this,L).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,this.progressArc))}),t(this,H).subscribe(s=>{t(this,a)||o(this,h,dt).call(this)}),t(this,x).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,C)))}),t(this,M).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,E)))}),t(this,k).subscribe(s=>{t(this,a)||(this.removeVar(s.previous),this.setVar(s.current,t(this,b)))}),t(this,f).subscribe(s=>{if(t(this,U)){e(this,U,!1);return}o(this,h,dt).call(this)}),ut.windowResizer.subscribe(t(this,ot),gt.RESIZE_ORDER.SCROLL+1),this.scrollContainer.onScroll(t(this,st)),r=!0},ft=function(){t(this,S)&&(ut.windowResizer.unsubscribe(t(this,ot)),this.scrollContainer.offScroll(t(this,st)),t(this,G).close(),t(this,K).close(),t(this,Z).close(),t(this,J).close(),t(this,D).close(),t(this,T).close(),t(this,_).close(),t(this,I).close(),t(this,m).close(),t(this,g).close(),t(this,y).close(),t(this,v).close(),t(this,$).close(),t(this,d).close(),t(this,O).close(),t(this,q).close(),t(this,L).close(),t(this,H).close(),t(this,k).close(),t(this,x).close(),t(this,M).close(),t(this,p).close(),t(this,P).close(),t(this,V).close(),t(this,R).close(),t(this,z).close(),t(this,F).close(),this.disable(),t(this,f).close())},Vt=function(){t(this,p).current=!0,t(this,P).current=!1,e(this,N,!0),t(this,g).current&&t(this,n).classList.remove(t(this,g).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,d).current&&t(this,n).classList.remove(t(this,d).current),t(this,m).current&&t(this,n).classList.add(t(this,m).current)},wt=function(){t(this,P).current=!0,t(this,p).current=!1,e(this,N,!0),t(this,m).current&&t(this,n).classList.remove(t(this,m).current),t(this,y).current&&t(this,n).classList.remove(t(this,y).current),t(this,v).current&&t(this,n).classList.remove(t(this,v).current),t(this,g).current&&t(this,n).classList.add(t(this,g).current)},Ft=function(){t(this,p).current=!0,t(this,V).current=!0,t(this,R).current=!1,t(this,y).current&&t(this,n).classList.add(t(this,y).current)},Et=function(){t(this,p).current=!0,t(this,z).current=!0,t(this,F).current=!1,t(this,v).current&&t(this,n).classList.add(t(this,v).current)},Lt=function(){t(this,P).current=!0,t(this,R).current=!0,t(this,V).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},Rt=function(){t(this,P).current=!0,t(this,F).current=!0,t(this,z).current=!1,t(this,d).current&&t(this,n).classList.add(t(this,d).current)},ot=new WeakMap,st=new WeakMap,dt=function(){const r=t(this,f)[t(this,Y).current];this.setVar(t(this,O).current,r),e(this,A,r/t(this,b)||0),this.setVar(t(this,q).current,t(this,A)),t(this,L).current&&this.setVar(t(this,L).current,this.progressArc)},X=function(r){if(t(this,a)){r.previous&&t(this,n).classList.remove(r.previous),r.current&&t(this,n).classList.remove(r.current);return}r.current&&t(this,p).current?(r.previous&&t(this,n).classList.remove(r.previous),t(this,n).classList.add(r.current)):!r.current&&r.previous&&t(this,n).classList.remove(r.previous)},zt=function(...r){r.forEach(s=>{s&&t(this,n).classList.remove(s)})},Ot=function(...r){r.forEach(s=>{s&&t(this,n).style.removeProperty(`--${s}`)})},mt=function(){o(this,h,zt).call(this,t(this,m).current,t(this,y).current,t(this,v).current,t(this,g).current,t(this,$).current,t(this,d).current),o(this,h,Ot).call(this,t(this,O).current,t(this,q).current,t(this,L).current,t(this,k).current,t(this,x).current,t(this,M).current)},yt);kt.isBrowser&&!customElements.get("scroll-segment")&&customElements.define("scroll-segment",vt);exports.ScrollSegmentDefaultContainer=pt;exports.ScrollSegmentElement=vt;
@@ -16,7 +16,7 @@ import { s as xt } from "../math-BOBiC4TN.js";
16
16
  import { S as rt } from "../Store-swP_0ymB.js";
17
17
  import { scrollEntries as It } from "../scroll-entries/index.js";
18
18
  import "../ticker/index.js";
19
- import { D as $t } from "../Damped-GyAS-U-z.js";
19
+ import { D as $t } from "../Damped-gai147Ov.js";
20
20
  var F, ot, it, G;
21
21
  class bt {
22
22
  constructor(u) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.55.0",
3
+ "version": "0.56.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1,107 +0,0 @@
1
- var I = (i) => {
2
- throw TypeError(i);
3
- };
4
- var S = (i, s, t) => s.has(i) || I("Cannot " + t);
5
- var e = (i, s, t) => (S(i, s, "read from private field"), t ? t.call(i) : s.get(i)), a = (i, s, t) => s.has(i) ? I("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, t), r = (i, s, t, u) => (S(i, s, "write to private field"), u ? u.call(i, t) : s.set(i, t), t), P = (i, s, t) => (S(i, s, "access private method"), t);
6
- import { S as q } from "./Store-swP_0ymB.js";
7
- import { c as R } from "./math-BOBiC4TN.js";
8
- import { p as y } from "./number-DwCxt_Ck.js";
9
- import { n as A } from "./polyfills-DJrTJQky.js";
10
- import "./index-euf5anj6.js";
11
- import { ticker as z } from "./ticker/index.js";
12
- import { TICK_ORDER as N } from "./order/index.js";
13
- var g, d, b, l, F, h, m, c, n, f, M, O, x;
14
- class V extends q {
15
- constructor(t, u) {
16
- super(t || 0, u);
17
- a(this, M);
18
- a(this, g);
19
- a(this, d, N.ANIMATION);
20
- a(this, b);
21
- a(this, l, new q(!1));
22
- a(this, F, 0);
23
- a(this, h, 0);
24
- a(this, m, -1 / 0);
25
- a(this, c, 1 / 0);
26
- a(this, n, 0);
27
- a(this, f, null);
28
- a(this, x, (t) => {
29
- this.handleAnimationFrame(t);
30
- });
31
- r(this, h, this.current);
32
- }
33
- get direction() {
34
- return e(this, F);
35
- }
36
- get target() {
37
- return e(this, h);
38
- }
39
- get min() {
40
- return e(this, m);
41
- }
42
- set min(t) {
43
- r(this, m, t), this.set(e(this, h), {
44
- equalize: !0
45
- });
46
- }
47
- get max() {
48
- return e(this, c);
49
- }
50
- set max(t) {
51
- r(this, c, t), this.set(e(this, h), {
52
- equalize: !0
53
- });
54
- }
55
- get from() {
56
- return e(this, n);
57
- }
58
- get isRunning() {
59
- return e(this, l);
60
- }
61
- get delta() {
62
- return Math.abs(e(this, h) - e(this, n));
63
- }
64
- get deltaProgress() {
65
- return this.delta ? y(Math.abs(this.current - e(this, n)) / this.delta, 6) : 0;
66
- }
67
- get distance() {
68
- return Math.abs(e(this, c) - e(this, m));
69
- }
70
- get distanceProgress() {
71
- return this.distance ? y(Math.abs(this.current - e(this, m)) / this.distance, 6) : 0;
72
- }
73
- set(t, u) {
74
- (e(this, h) !== t || u != null && u.restart) && (r(this, f, t), this.updateOptions(u), r(this, f, null), e(this, h) !== this.current && this.start());
75
- }
76
- shift(t, u) {
77
- this.set(e(this, h) + t, u);
78
- }
79
- reset() {
80
- super.reset(), this.set(this.initial, { equalize: !0 });
81
- }
82
- close() {
83
- super.close(), this.reset(), this.unlistenAnimationFrame();
84
- }
85
- listenAnimationFrame() {
86
- e(this, l).current || (e(this, l).current = !0, z.subscribe(e(this, x), {
87
- maxFPS: e(this, g),
88
- order: e(this, d),
89
- culling: e(this, b)
90
- }));
91
- }
92
- unlistenAnimationFrame() {
93
- e(this, l).current && (e(this, l).current = !1, z.unsubscribe(e(this, x)));
94
- }
95
- updateOptions(t) {
96
- r(this, g, A(t == null ? void 0 : t.maxFPS, e(this, g))), r(this, d, A(t == null ? void 0 : t.order, e(this, d))), r(this, b, A(t == null ? void 0 : t.culling, e(this, b))), r(this, m, A(t == null ? void 0 : t.min, e(this, m))), r(this, c, A(t == null ? void 0 : t.max, e(this, c))), P(this, M, O).call(this, typeof e(this, f) == "number" ? e(this, f) : e(this, h)), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = r(this, n, e(this, h))), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = r(this, n, this.initial)), typeof (t == null ? void 0 : t.current) == "number" && r(this, n, this.current = t.current);
97
- }
98
- start() {
99
- this.listenAnimationFrame();
100
- }
101
- }
102
- g = new WeakMap(), d = new WeakMap(), b = new WeakMap(), l = new WeakMap(), F = new WeakMap(), h = new WeakMap(), m = new WeakMap(), c = new WeakMap(), n = new WeakMap(), f = new WeakMap(), M = new WeakSet(), O = function(t) {
103
- r(this, F, Math.sign(t - e(this, h))), r(this, h, R(t, e(this, m), e(this, c))), r(this, n, this.current);
104
- }, x = new WeakMap();
105
- export {
106
- V as A
107
- };
@@ -1 +0,0 @@
1
- "use strict";var C=i=>{throw TypeError(i)};var S=(i,s,t)=>s.has(i)||C("Cannot "+t);var e=(i,s,t)=>(S(i,s,"read from private field"),t?t.call(i):s.get(i)),u=(i,s,t)=>s.has(i)?C("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),r=(i,s,t,a)=>(S(i,s,"write to private field"),a?a.call(i,t):s.set(i,t),t),M=(i,s,t)=>(S(i,s,"access private method"),t);const y=require("./Store-GokLe_g-.cjs"),N=require("./math-GDWEqu7y.cjs"),I=require("./number-0243DApo.cjs"),q=require("./polyfills-Df4r-ETT.cjs");require("./index-Cqw2NKev.cjs");const P=require("./ticker/index.cjs"),O=require("./order/index.cjs");var d,f,b,m,A,h,n,c,l,g,x,z,F;class R extends y.Store{constructor(t,a){super(t||0,a);u(this,x);u(this,d);u(this,f,O.TICK_ORDER.ANIMATION);u(this,b);u(this,m,new y.Store(!1));u(this,A,0);u(this,h,0);u(this,n,-1/0);u(this,c,1/0);u(this,l,0);u(this,g,null);u(this,F,t=>{this.handleAnimationFrame(t)});r(this,h,this.current)}get direction(){return e(this,A)}get target(){return e(this,h)}get min(){return e(this,n)}set min(t){r(this,n,t),this.set(e(this,h),{equalize:!0})}get max(){return e(this,c)}set max(t){r(this,c,t),this.set(e(this,h),{equalize:!0})}get from(){return e(this,l)}get isRunning(){return e(this,m)}get delta(){return Math.abs(e(this,h)-e(this,l))}get deltaProgress(){return this.delta?I.preciseNumber(Math.abs(this.current-e(this,l))/this.delta,6):0}get distance(){return Math.abs(e(this,c)-e(this,n))}get distanceProgress(){return this.distance?I.preciseNumber(Math.abs(this.current-e(this,n))/this.distance,6):0}set(t,a){(e(this,h)!==t||a!=null&&a.restart)&&(r(this,g,t),this.updateOptions(a),r(this,g,null),e(this,h)!==this.current&&this.start())}shift(t,a){this.set(e(this,h)+t,a)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,m).current||(e(this,m).current=!0,P.ticker.subscribe(e(this,F),{maxFPS:e(this,d),order:e(this,f),culling:e(this,b)}))}unlistenAnimationFrame(){e(this,m).current&&(e(this,m).current=!1,P.ticker.unsubscribe(e(this,F)))}updateOptions(t){r(this,d,q.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,d))),r(this,f,q.nullishCoalescing(t==null?void 0:t.order,e(this,f))),r(this,b,q.nullishCoalescing(t==null?void 0:t.culling,e(this,b))),r(this,n,q.nullishCoalescing(t==null?void 0:t.min,e(this,n))),r(this,c,q.nullishCoalescing(t==null?void 0:t.max,e(this,c))),M(this,x,z).call(this,typeof e(this,g)=="number"?e(this,g):e(this,h)),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=r(this,l,e(this,h))),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=r(this,l,this.initial)),typeof(t==null?void 0:t.current)=="number"&&r(this,l,this.current=t.current)}start(){this.listenAnimationFrame()}}d=new WeakMap,f=new WeakMap,b=new WeakMap,m=new WeakMap,A=new WeakMap,h=new WeakMap,n=new WeakMap,c=new WeakMap,l=new WeakMap,g=new WeakMap,x=new WeakSet,z=function(t){r(this,A,Math.sign(t-e(this,h))),r(this,h,N.clamp(t,e(this,n),e(this,c))),r(this,l,this.current)},F=new WeakMap;exports.Animation=R;