aptechka 0.31.1 → 0.32.0

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.
@@ -5,19 +5,19 @@ var S = (i, r, t) => r.has(i) || I("Cannot " + t);
5
5
  var e = (i, r, t) => (S(i, r, "read from private field"), t ? t.call(i) : r.get(i)), a = (i, r, t) => r.has(i) ? I("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, t), h = (i, r, t, u) => (S(i, r, "write to private field"), u ? u.call(i, t) : r.set(i, t), t), P = (i, r, t) => (S(i, r, "access private method"), t);
6
6
  import { S as q } from "./Store-OTdcl6SX.js";
7
7
  import { c as y } from "./math-BOBiC4TN.js";
8
- import { p as z, n as F } from "./polyfills-X6KXuHg-.js";
8
+ import { p as z, n as A } from "./polyfills-X6KXuHg-.js";
9
9
  import { ticker as O } from "./ticker/vanilla/index.js";
10
10
  import { TICK_ORDER as N } from "./order/index.js";
11
- var f, d, A, l, b, s, n, m, c, g, M, R, x;
11
+ var f, d, b, l, F, s, n, m, c, g, M, R, x;
12
12
  class K extends q {
13
13
  constructor(t, u) {
14
14
  super(t || 0, u);
15
15
  a(this, M);
16
16
  a(this, f);
17
17
  a(this, d, N.ANIMATION);
18
- a(this, A);
18
+ a(this, b);
19
19
  a(this, l, new q(!1));
20
- a(this, b, 0);
20
+ a(this, F, 0);
21
21
  a(this, s, 0);
22
22
  a(this, n, -1 / 0);
23
23
  a(this, m, 1 / 0);
@@ -29,7 +29,7 @@ class K extends q {
29
29
  h(this, s, this.current);
30
30
  }
31
31
  get direction() {
32
- return e(this, b);
32
+ return e(this, F);
33
33
  }
34
34
  get target() {
35
35
  return e(this, s);
@@ -84,21 +84,21 @@ class K extends q {
84
84
  e(this, l).current || (e(this, l).current = !0, O.subscribe(e(this, x), {
85
85
  maxFPS: e(this, f),
86
86
  order: e(this, d),
87
- culling: e(this, A)
87
+ culling: e(this, b)
88
88
  }));
89
89
  }
90
90
  unlistenAnimationFrame() {
91
91
  e(this, l).current && (e(this, l).current = !1, O.unsubscribe(e(this, x)));
92
92
  }
93
93
  updateOptions(t) {
94
- h(this, f, F(t == null ? void 0 : t.maxFPS, e(this, f))), h(this, d, F(t == null ? void 0 : t.order, e(this, d))), h(this, A, F(t == null ? void 0 : t.culling, e(this, A))), h(this, n, F(t == null ? void 0 : t.min, e(this, n))), h(this, m, F(t == null ? void 0 : t.max, e(this, m))), P(this, M, R).call(this, typeof e(this, g) == "number" ? e(this, g) : e(this, s)), t != null && t.equalize && (this.unlistenAnimationFrame(), this.current = e(this, s)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
94
+ h(this, f, A(t == null ? void 0 : t.maxFPS, e(this, f))), h(this, d, A(t == null ? void 0 : t.order, e(this, d))), h(this, b, A(t == null ? void 0 : t.culling, e(this, b))), h(this, n, A(t == null ? void 0 : t.min, e(this, n))), h(this, m, A(t == null ? void 0 : t.max, e(this, m))), P(this, M, R).call(this, typeof e(this, g) == "number" ? e(this, g) : e(this, s)), t != null && t.equalize && (this.current = e(this, s)), t != null && t.restart && (this.unlistenAnimationFrame(), this.current = this.initial);
95
95
  }
96
96
  start() {
97
97
  this.listenAnimationFrame();
98
98
  }
99
99
  }
100
- f = new WeakMap(), d = new WeakMap(), A = new WeakMap(), l = new WeakMap(), b = new WeakMap(), s = new WeakMap(), n = new WeakMap(), m = new WeakMap(), c = new WeakMap(), g = new WeakMap(), M = new WeakSet(), R = function(t) {
101
- h(this, b, Math.sign(t - e(this, s))), h(this, s, y(t, e(this, n), e(this, m))), h(this, c, this.current);
100
+ f = new WeakMap(), d = new WeakMap(), b = new WeakMap(), l = new WeakMap(), F = new WeakMap(), s = new WeakMap(), n = new WeakMap(), m = new WeakMap(), c = new WeakMap(), g = new WeakMap(), M = new WeakSet(), R = function(t) {
101
+ h(this, F, Math.sign(t - e(this, s))), h(this, s, y(t, e(this, n), e(this, m))), h(this, c, this.current);
102
102
  }, x = new WeakMap();
103
103
  export {
104
104
  K as A
@@ -0,0 +1 @@
1
+ "use strict";var C=i=>{throw TypeError(i)};var S=(i,r,t)=>r.has(i)||C("Cannot "+t);var e=(i,r,t)=>(S(i,r,"read from private field"),t?t.call(i):r.get(i)),a=(i,r,t)=>r.has(i)?C("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(i):r.set(i,t),h=(i,r,t,n)=>(S(i,r,"write to private field"),n?n.call(i,t):r.set(i,t),t),M=(i,r,t)=>(S(i,r,"access private method"),t);const I=require("./Store-CDb6RMce.cjs"),z=require("./math-GDWEqu7y.cjs"),m=require("./polyfills-CM4SCDTt.cjs"),P=require("./ticker/vanilla/index.cjs"),N=require("./order/index.cjs");var f,b,x,c,A,s,u,l,g,d,q,y,F;class O extends I.Store{constructor(t,n){super(t||0,n);a(this,q);a(this,f);a(this,b,N.TICK_ORDER.ANIMATION);a(this,x);a(this,c,new I.Store(!1));a(this,A,0);a(this,s,0);a(this,u,-1/0);a(this,l,1/0);a(this,g,0);a(this,d,null);a(this,F,t=>{this.handleAnimationFrame(t)});h(this,s,this.current)}get direction(){return e(this,A)}get target(){return e(this,s)}get min(){return e(this,u)}set min(t){h(this,u,t),this.set(e(this,s),{equalize:!0})}get max(){return e(this,l)}set max(t){h(this,l,t),this.set(e(this,s),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,c)}get delta(){return Math.abs(e(this,s)-e(this,g))}get deltaProgress(){return this.delta?m.preciseNumber(Math.abs(this.current-e(this,g))/this.delta,6):0}get distance(){return Math.abs(e(this,l)-e(this,u))}get distanceProgress(){return this.distance?m.preciseNumber(Math.abs(this.current-e(this,u))/this.distance,6):0}set(t,n){(e(this,s)!==t||n!=null&&n.restart)&&(h(this,d,t),this.updateOptions(n),h(this,d,null),e(this,s)!==this.current&&this.start())}shift(t,n){this.set(e(this,s)+t,n)}reset(){super.reset(),this.set(this.initial,{equalize:!0})}close(){super.close(),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){e(this,c).current||(e(this,c).current=!0,P.ticker.subscribe(e(this,F),{maxFPS:e(this,f),order:e(this,b),culling:e(this,x)}))}unlistenAnimationFrame(){e(this,c).current&&(e(this,c).current=!1,P.ticker.unsubscribe(e(this,F)))}updateOptions(t){h(this,f,m.nullishCoalescing(t==null?void 0:t.maxFPS,e(this,f))),h(this,b,m.nullishCoalescing(t==null?void 0:t.order,e(this,b))),h(this,x,m.nullishCoalescing(t==null?void 0:t.culling,e(this,x))),h(this,u,m.nullishCoalescing(t==null?void 0:t.min,e(this,u))),h(this,l,m.nullishCoalescing(t==null?void 0:t.max,e(this,l))),M(this,q,y).call(this,typeof e(this,d)=="number"?e(this,d):e(this,s)),t!=null&&t.equalize&&(this.current=e(this,s)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}f=new WeakMap,b=new WeakMap,x=new WeakMap,c=new WeakMap,A=new WeakMap,s=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,d=new WeakMap,q=new WeakSet,y=function(t){h(this,A,Math.sign(t-e(this,s))),h(this,s,z.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},F=new WeakMap;exports.Animation=O;
@@ -1 +1 @@
1
- "use strict";var b=Object.defineProperty,y=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))O.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))v.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>y(t,C(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)),u=(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 w=require("./math-GDWEqu7y.cjs"),c=require("./polyfills-CM4SCDTt.cjs"),B=require("./Animation-B9m8bw96.cjs");var i,h;class D extends B.Animation{constructor(s,r){super(s,r);u(this,i);u(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=c.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=c.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=c.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){c.preciseNumber(this.current,6)===c.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 m=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*m),this.current+=a(this,i)*m}else this.current=w.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,h=new WeakMap;exports.Damped=D;
1
+ "use strict";var b=Object.defineProperty,y=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var l=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var g=t=>{throw TypeError(t)};var d=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))O.call(e,s)&&d(t,s,e[s]);if(l)for(var s of l(e))v.call(e,s)&&d(t,s,e[s]);return t},p=(t,e)=>y(t,C(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)),u=(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 w=require("./math-GDWEqu7y.cjs"),c=require("./polyfills-CM4SCDTt.cjs"),B=require("./Animation-CN0h3D4p.cjs");var i,h;class D extends B.Animation{constructor(s,r){super(s,r);u(this,i);u(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=c.nullishCoalescing(s==null?void 0:s.damping,this.damping),this.mass=c.nullishCoalescing(s==null?void 0:s.mass,this.mass),this.stiffness=c.nullishCoalescing(s==null?void 0:s.stiffness,this.stiffness),super.updateOptions(s)}handleAnimationFrame(s){c.preciseNumber(this.current,6)===c.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 m=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*m),this.current+=a(this,i)*m}else this.current=w.damp(this.current,this.target,this.damping,m)}}i=new WeakMap,h=new WeakMap;exports.Damped=D;
@@ -17,7 +17,7 @@ var A = (s, e, t) => e.has(s) || g("Cannot " + t);
17
17
  var a = (s, e, t) => (A(s, e, "read from private field"), t ? t.call(s) : e.get(s)), c = (s, e, t) => e.has(s) ? g("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(s) : e.set(s, t), m = (s, e, t, r) => (A(s, e, "write to private field"), r ? r.call(s, t) : e.set(s, t), t);
18
18
  import { d as D } from "./math-BOBiC4TN.js";
19
19
  import { n as u, p as F } from "./polyfills-X6KXuHg-.js";
20
- import { A as q } from "./Animation-DN95L7Xo.js";
20
+ import { A as q } from "./Animation-B1AS8IQG.js";
21
21
  var i, h;
22
22
  class j extends q {
23
23
  constructor(t, r) {
@@ -0,0 +1 @@
1
+ "use strict";var y=Object.defineProperty,O=Object.defineProperties;var b=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var w=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable;var d=i=>{throw TypeError(i)};var m=(i,t,e)=>t in i?y(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,g=(i,t)=>{for(var e in t||(t={}))w.call(t,e)&&m(i,e,t[e]);if(h)for(var e of h(t))S.call(t,e)&&m(i,e,t[e]);return i},f=(i,t)=>O(i,b(t));var A=(i,t,e)=>t.has(i)||d("Cannot "+e);var s=(i,t,e)=>(A(i,t,"read from private field"),e?e.call(i):t.get(i)),c=(i,t,e)=>t.has(i)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),l=(i,t,e,a)=>(A(i,t,"write to private field"),a?a.call(i,e):t.set(i,e),e);const u=require("./easings-GegIwET5.cjs"),T=require("./math-GDWEqu7y.cjs"),q=require("./polyfills-CM4SCDTt.cjs"),x=require("./Animation-CN0h3D4p.cjs");var r,n;class z extends x.Animation{constructor(e,a){super(e||0,a);c(this,r,u.linear);c(this,n,1e3);this.updateOptions(f(g({},a),{equalize:!0}))}updateOptions(e){super.updateOptions(e),l(this,r,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,n,q.nullishCoalescing(e==null?void 0:e.duration,s(this,n)))}handleAnimationFrame(e){const a=e.timeElapsedSinceSubscription/1e3/(s(this,n)/1e3)||0,F=s(this,r).call(this,T.clamp(a,0,1));this.current=q.preciseNumber(this.from+(this.target-this.from)*F,6),a>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}r=new WeakMap,n=new WeakMap;exports.Tweened=z;
@@ -0,0 +1,44 @@
1
+ var O = Object.defineProperty, b = Object.defineProperties;
2
+ var p = Object.getOwnPropertyDescriptors;
3
+ var c = Object.getOwnPropertySymbols;
4
+ var x = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
5
+ var f = (a) => {
6
+ throw TypeError(a);
7
+ };
8
+ var l = (a, i, e) => i in a ? O(a, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[i] = e, d = (a, i) => {
9
+ for (var e in i || (i = {}))
10
+ x.call(i, e) && l(a, e, i[e]);
11
+ if (c)
12
+ for (var e of c(i))
13
+ y.call(i, e) && l(a, e, i[e]);
14
+ return a;
15
+ }, g = (a, i) => b(a, p(i));
16
+ var A = (a, i, e) => i.has(a) || f("Cannot " + e);
17
+ var n = (a, i, e) => (A(a, i, "read from private field"), e ? e.call(a) : i.get(a)), m = (a, i, e) => i.has(a) ? f("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(a) : i.set(a, e), u = (a, i, e, t) => (A(a, i, "write to private field"), t ? t.call(a, e) : i.set(a, e), e);
18
+ import { l as h, e as S } from "./easings-BEmRlrDd.js";
19
+ import { c as T } from "./math-BOBiC4TN.js";
20
+ import { n as q, p as w } from "./polyfills-X6KXuHg-.js";
21
+ import { A as z } from "./Animation-B1AS8IQG.js";
22
+ var s, r;
23
+ class v extends z {
24
+ constructor(e, t) {
25
+ super(e || 0, t);
26
+ m(this, s, h);
27
+ m(this, r, 1e3);
28
+ this.updateOptions(g(d({}, t), { equalize: !0 }));
29
+ }
30
+ updateOptions(e) {
31
+ super.updateOptions(e), u(this, s, typeof (e == null ? void 0 : e.easing) == "function" ? e.easing : typeof (e == null ? void 0 : e.easing) == "string" ? S[e.easing] || h : h), u(this, r, q(e == null ? void 0 : e.duration, n(this, r)));
32
+ }
33
+ handleAnimationFrame(e) {
34
+ const t = e.timeElapsedSinceSubscription / 1e3 / (n(this, r) / 1e3) || 0, F = n(this, s).call(this, T(t, 0, 1));
35
+ this.current = w(this.from + (this.target - this.from) * F, 6), t > 1 && this.unlistenAnimationFrame();
36
+ }
37
+ start() {
38
+ this.unlistenAnimationFrame(), this.listenAnimationFrame();
39
+ }
40
+ }
41
+ s = new WeakMap(), r = new WeakMap();
42
+ export {
43
+ v as T
44
+ };
@@ -2,8 +2,10 @@ import { TickerCallbackEntry } from '../ticker/vanilla';
2
2
  import { EasingFunction } from '../utils';
3
3
  import { Animation, AnimationConstructorOptions, AnimationOptions } from './Animation';
4
4
 
5
+ import * as easings from '@packages/utils/easings';
6
+ export type TweenEasingName = keyof typeof easings;
5
7
  export interface TweenedOptions extends AnimationOptions {
6
- easing?: EasingFunction;
8
+ easing?: EasingFunction | TweenEasingName;
7
9
  duration?: number;
8
10
  }
9
11
  export declare class Tweened extends Animation<TweenedOptions> {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-B9m8bw96.cjs"),n=require("../Damped-CTsV8tl_.cjs"),i=require("../Tweened-BttGiyB0.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-CN0h3D4p.cjs"),n=require("../Damped-C3MyWa5_.cjs"),i=require("../Tweened-ChIsd14E.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
@@ -1,6 +1,6 @@
1
- import { A as r } from "../Animation-DN95L7Xo.js";
2
- import { D as m } from "../Damped-Chu29wn-.js";
3
- import { T as t } from "../Tweened-BUuSLSF7.js";
1
+ import { A as r } from "../Animation-B1AS8IQG.js";
2
+ import { D as m } from "../Damped-cQCN3d0W.js";
3
+ import { T as t } from "../Tweened-CynwDTYT.js";
4
4
  export {
5
5
  r as Animation,
6
6
  m as Damped,
@@ -10,6 +10,7 @@ export declare class DragControls extends Controls {
10
10
  #private;
11
11
  axis: Axes2D;
12
12
  swipe: boolean;
13
+ inertion: number;
13
14
  constructor(options?: DragControlsOptions);
14
15
  connect(): void;
15
16
  disconnect(): void;
@@ -1 +1 @@
1
- "use strict";var Q=h=>{throw TypeError(h)};var N=(h,a,e)=>a.has(h)||Q("Cannot "+e);var t=(h,a,e)=>(N(h,a,"read from private field"),e?e.call(h):a.get(h)),s=(h,a,e)=>a.has(h)?Q("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(h):a.set(h,e),i=(h,a,e,n)=>(N(h,a,"write to private field"),n?n.call(h,e):a.set(h,e),e),L=(h,a,e)=>(N(h,a,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const V=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),j=require("../dom-JBOkFLTh.cjs"),k=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const G=require("../easings-DsS5-Kqc.cjs"),J=require("../Tweened-BttGiyB0.cjs"),Z=require("../gestures-DHLrn6Q8.cjs"),_=require("../polyfills-CM4SCDTt.cjs"),$=require("../order/index.cjs");var O;class Y{constructor(){s(this,O,new V.Notifier)}get changeEvent(){return t(this,O)}}O=new WeakMap;var w,c,u,I;class p extends Y{constructor(e){super();s(this,w,null);s(this,c,null);s(this,u,"offsetHeight");s(this,I,e=>{const n=e.shiftKey?-1:1;let r;e.code==="Space"?r=n*t(this,c)[t(this,u)]*.4:e.code==="ArrowLeft"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowRight"?r=1*t(this,c)[t(this,u)]*.2:e.code==="ArrowUp"?r=-1*t(this,c)[t(this,u)]*.2:e.code==="ArrowDown"?r=1*t(this,c)[t(this,u)]*.2:e.code==="PageUp"?r=-1*t(this,c)[t(this,u)]:e.code==="PageDown"?r=1*t(this,c)[t(this,u)]:e.code==="Home"?r=0:e.code==="End"&&(r=t(this,u)==="offsetWidth"?t(this,c).scrollWidth:t(this,c).scrollHeight),r&&(e.stopPropagation(),this.changeEvent.notify("keyboard",r))});m.isBrowser&&(i(this,w,e!=null&&e.element&&j.getElement(e.element)||window),i(this,c,t(this,w)instanceof HTMLElement?t(this,w):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,w).addEventListener("keydown",t(this,I))}disconnect(){m.isBrowser&&t(this,w).removeEventListener("keydown",t(this,I))}}w=new WeakMap,c=new WeakMap,u=new WeakMap,I=new WeakMap;var b,E,H,P,d,q,f,o,K,F,C,z,T;class ee extends Y{constructor(e){super();s(this,o);s(this,b);s(this,E);s(this,H);s(this,P);s(this,d);s(this,q);s(this,f);s(this,C);s(this,z);s(this,T);this.direction=1,i(this,d,new J.Tweened(0,{easing:G.easeInQuad})),i(this,f,!1),i(this,C,n=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",n.timeBetweenFrames*t(this,b)*this.direction*(1-t(this,d).current))}),i(this,z,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,b))*this.direction*(1-t(this,d).current))}),i(this,T,()=>{t(this,E)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,b,(e==null?void 0:e.speed)||1),i(this,E,(e==null?void 0:e.interval)||!1),i(this,H,e)}set interval(e){i(this,E,e),t(this,f)&&L(this,o,K).call(this)}set speed(e){i(this,b,e),t(this,f)&&L(this,o,K).call(this)}connect(){t(this,f)||(i(this,f,!0),L(this,o,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),L(this,o,F).call(this))}pauseAndContinue(e,n){t(this,f)&&e&&(clearTimeout(t(this,q)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:n}),i(this,q,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:n})},e)))}}b=new WeakMap,E=new WeakMap,H=new WeakMap,P=new WeakMap,d=new WeakMap,q=new WeakMap,f=new WeakMap,o=new WeakSet,K=function(){L(this,o,F).call(this),t(this,E)?i(this,P,setInterval(t(this,z),Math.abs(t(this,b)))):k.ticker.subscribe(t(this,C),t(this,H)),document.addEventListener("visibilitychange",t(this,T))},F=function(){clearInterval(t(this,P)),k.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,q)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,T))},C=new WeakMap,z=new WeakMap,T=new WeakMap;var B,x,A,W;class te extends Y{constructor(e){super();s(this,B,null);s(this,x);s(this,A);s(this,W,e=>{let n=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(e.preventDefault(),n=(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 r=Date.now();if(r-t(this,A)>40&&(n=100*Math.sign(n)),i(this,A,r),Math.abs(n)<100||t(this,x))return;this.changeEvent.notify("wheel",n),i(this,x,setTimeout(()=>{i(this,x,void 0)},80))}else this.changeEvent.notify("wheel",n)});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,A,Date.now()),m.isBrowser&&i(this,B,e!=null&&e.element&&j.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,B).addEventListener("wheel",t(this,W),{passive:!1})}disconnect(){m.isBrowser&&(t(this,B).removeEventListener("wheel",t(this,W)),clearTimeout(t(this,x)))}}B=new WeakMap,x=new WeakMap,A=new WeakMap,W=new WeakMap;var v,g,D,l,X,M;const y=class y extends Y{constructor(e){super();s(this,g,null);s(this,D,!1);s(this,l,0);s(this,X,e=>{if(e.composedPath().find(r=>r instanceof HTMLElement&&r.hasAttribute("drag-dead-zone")))return;this.swipe||k.ticker.unsubscribe(t(this,M));let n=e;i(this,l,0),document.documentElement.classList.add("grabbing"),Z.setupDrag(r=>{if(t(this,D)||t(y,v)&&t(y,v)!==t(this,g))return;this.swipe&&i(this,D,!0);const R=n.x-r.x,S=n.y-r.y;this.axis==="x"?i(this,l,R):i(this,l,S),n=r,(this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R))&&(i(y,v,t(this,g)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(y,v,null),this.swipe||(i(this,l,t(this,l)*3),k.ticker.subscribe(t(this,M),{order:$.TICK_ORDER.CONTROLS-1})),document.documentElement.classList.remove("grabbing"),i(this,D,!1)})});s(this,M,()=>{Math.floor(Math.abs(t(this,l)))||k.ticker.unsubscribe(t(this,M)),i(this,l,t(this,l)*.95),i(this,l,_.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,g,e!=null&&e.element&&j.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,g).addEventListener("pointerdown",t(this,X))}disconnect(){m.isBrowser&&(t(this,g).removeEventListener("pointerdown",t(this,X)),k.ticker.unsubscribe(t(this,M)))}};v=new WeakMap,g=new WeakMap,D=new WeakMap,l=new WeakMap,X=new WeakMap,M=new WeakMap,s(y,v,null);let U=y;exports.AutoplayControls=ee;exports.Controls=Y;exports.DragControls=U;exports.KeyboardControls=p;exports.WheelControls=te;
1
+ "use strict";var V=h=>{throw TypeError(h)};var F=(h,n,e)=>n.has(h)||V("Cannot "+e);var t=(h,n,e)=>(F(h,n,"read from private field"),e?e.call(h):n.get(h)),s=(h,n,e)=>n.has(h)?V("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(h):n.set(h,e),i=(h,n,e,r)=>(F(h,n,"write to private field"),r?r.call(h,e):n.set(h,e),e),k=(h,n,e)=>(F(h,n,"access private method"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const G=require("../notifier/index.cjs"),m=require("../browser-CpzFX2xg.cjs"),Q=require("../dom-JBOkFLTh.cjs"),q=require("../ticker/vanilla/index.cjs");require("../Store-CDb6RMce.cjs");const J=require("../easings-GegIwET5.cjs"),Z=require("../Tweened-ChIsd14E.cjs"),_=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-CM4SCDTt.cjs"),p=require("../order/index.cjs");var N;class Y{constructor(){s(this,N,new G.Notifier)}get changeEvent(){return t(this,N)}}N=new WeakMap;var b,c,u,H;class ee extends Y{constructor(e){super();s(this,b,null);s(this,c,null);s(this,u,"offsetHeight");s(this,H,e=>{const r=e.shiftKey?-1:1;let a;e.code==="Space"?a=r*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))});m.isBrowser&&(i(this,b,e!=null&&e.element&&Q.getElement(e.element)||window),i(this,c,t(this,b)instanceof HTMLElement?t(this,b):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,u,e==="width"?"offsetWidth":"offsetHeight")}connect(){m.isBrowser&&t(this,b).addEventListener("keydown",t(this,H))}disconnect(){m.isBrowser&&t(this,b).removeEventListener("keydown",t(this,H))}}b=new WeakMap,c=new WeakMap,u=new WeakMap,H=new WeakMap;var g,x,P,z,d,T,f,w,K,U,C,W,B;class te extends Y{constructor(e){super();s(this,w);s(this,g);s(this,x);s(this,P);s(this,z);s(this,d);s(this,T);s(this,f);s(this,C);s(this,W);s(this,B);this.direction=1,i(this,d,new Z.Tweened(0,{easing:J.easeInQuad})),i(this,f,!1),i(this,C,r=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",r.timeBetweenFrames*t(this,g)*this.direction*(1-t(this,d).current))}),i(this,W,()=>{t(this,d).current!==1&&this.changeEvent.notify("autoplay",Math.sign(t(this,g))*this.direction*(1-t(this,d).current))}),i(this,B,()=>{t(this,x)&&(document.hidden?t(this,d).set(1,{equalize:!0}):t(this,d).set(0,{equalize:!0}))}),i(this,g,(e==null?void 0:e.speed)||1),i(this,x,(e==null?void 0:e.interval)||!1),i(this,P,e)}set interval(e){i(this,x,e),t(this,f)&&k(this,w,K).call(this)}set speed(e){i(this,g,e),t(this,f)&&k(this,w,K).call(this)}connect(){t(this,f)||(i(this,f,!0),k(this,w,K).call(this))}disconnect(){t(this,f)&&(i(this,f,!1),k(this,w,U).call(this))}pauseAndContinue(e,r){t(this,f)&&e&&(clearTimeout(t(this,T)),t(this,d).set(1,{duration:Math.min(e,1e3),equalize:r}),i(this,T,setTimeout(()=>{t(this,d).set(0,{duration:Math.min(e,5e3),equalize:r})},e)))}}g=new WeakMap,x=new WeakMap,P=new WeakMap,z=new WeakMap,d=new WeakMap,T=new WeakMap,f=new WeakMap,w=new WeakSet,K=function(){k(this,w,U).call(this),t(this,x)?i(this,z,setInterval(t(this,W),Math.abs(t(this,g)))):q.ticker.subscribe(t(this,C),t(this,P)),document.addEventListener("visibilitychange",t(this,B))},U=function(){clearInterval(t(this,z)),q.ticker.unsubscribe(t(this,C)),clearTimeout(t(this,T)),t(this,d).close(),document.removeEventListener("visibilitychange",t(this,B))},C=new WeakMap,W=new WeakMap,B=new WeakMap;var A,v,D,X;class ie extends Y{constructor(e){super();s(this,A,null);s(this,v);s(this,D);s(this,X,e=>{let r=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)*.5||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*.5))if(e.preventDefault(),r=(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,D)>40&&(r=100*Math.sign(r)),i(this,D,a),Math.abs(r)<100||t(this,v))return;this.changeEvent.notify("wheel",r),i(this,v,setTimeout(()=>{i(this,v,void 0)},80))}else this.changeEvent.notify("wheel",r)});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,D,Date.now()),m.isBrowser&&i(this,A,e!=null&&e.element&&Q.getElement(e.element)||window)}connect(){m.isBrowser&&t(this,A).addEventListener("wheel",t(this,X),{passive:!1})}disconnect(){m.isBrowser&&(t(this,A).removeEventListener("wheel",t(this,X)),clearTimeout(t(this,v)))}}A=new WeakMap,v=new WeakMap,D=new WeakMap,X=new WeakMap;var M,o,l,I,y;const E=class E extends Y{constructor(e){super();s(this,o);s(this,l);s(this,I);s(this,y);this.inertion=1,i(this,o,null),i(this,l,0),i(this,I,r=>{if(r.composedPath().find(L=>L instanceof HTMLElement&&L.hasAttribute("drag-dead-zone")))return;this.swipe||q.ticker.unsubscribe(t(this,y));let a=r,O=!1;i(this,l,0),document.documentElement.classList.add("grabbing"),_.setupDrag(L=>{if(t(E,M)&&t(E,M)!==t(this,o))return;const R=a.x-L.x,S=a.y-L.y;this.axis==="x"?i(this,l,R):i(this,l,S),a=L,O=this.axis==="x"&&Math.abs(R)>Math.abs(S)||this.axis==="y"&&Math.abs(S)>Math.abs(R),O&&(i(E,M,t(this,o)),this.changeEvent.notify("drag",t(this,l)))},()=>{i(E,M,null),O&&(!this.swipe&&this.inertion?(i(this,l,t(this,l)*this.inertion),q.ticker.subscribe(t(this,y),{order:p.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",t(this,l))),document.documentElement.classList.remove("grabbing")})}),i(this,y,()=>{Math.floor(Math.abs(t(this,l)))||q.ticker.unsubscribe(t(this,y)),i(this,l,t(this,l)*.95),i(this,l,$.preciseNumber(t(this,l),3)),this.changeEvent.notify("drag",t(this,l))}),this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,m.isBrowser&&i(this,o,e!=null&&e.element&&Q.getElement(e.element)||document.documentElement)}connect(){m.isBrowser&&t(this,o).addEventListener("pointerdown",t(this,I))}disconnect(){m.isBrowser&&(t(this,o).removeEventListener("pointerdown",t(this,I)),q.ticker.unsubscribe(t(this,y)))}};M=new WeakMap,o=new WeakMap,l=new WeakMap,I=new WeakMap,y=new WeakMap,s(E,M,null);let j=E;exports.AutoplayControls=te;exports.Controls=Y;exports.DragControls=j;exports.KeyboardControls=ee;exports.WheelControls=ie;
@@ -1,215 +1,213 @@
1
- var Q = (h) => {
1
+ var V = (h) => {
2
2
  throw TypeError(h);
3
3
  };
4
- var F = (h, r, e) => r.has(h) || Q("Cannot " + e);
5
- var t = (h, r, e) => (F(h, r, "read from private field"), e ? e.call(h) : r.get(h)), s = (h, r, e) => r.has(h) ? Q("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(h) : r.set(h, e), i = (h, r, e, n) => (F(h, r, "write to private field"), n ? n.call(h, e) : r.set(h, e), e), L = (h, r, e) => (F(h, r, "access private method"), e);
6
- import { Notifier as j } from "../notifier/index.js";
7
- import { i as m } from "../browser-0zX67oeU.js";
8
- import { g as U } from "../dom-0S_WDL4g.js";
9
- import { ticker as T } from "../ticker/vanilla/index.js";
4
+ var S = (h, n, e) => n.has(h) || V("Cannot " + e);
5
+ var t = (h, n, e) => (S(h, n, "read from private field"), e ? e.call(h) : n.get(h)), s = (h, n, e) => n.has(h) ? V("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(h) : n.set(h, e), i = (h, n, e, a) => (S(h, n, "write to private field"), a ? a.call(h, e) : n.set(h, e), e), T = (h, n, e) => (S(h, n, "access private method"), e);
6
+ import { Notifier as G } from "../notifier/index.js";
7
+ import { i as o } from "../browser-0zX67oeU.js";
8
+ import { g as Q } from "../dom-0S_WDL4g.js";
9
+ import { ticker as k } from "../ticker/vanilla/index.js";
10
10
  import "../Store-OTdcl6SX.js";
11
- import { e as G } from "../easings-BKi40vHz.js";
12
- import { T as J } from "../Tweened-BUuSLSF7.js";
13
- import { s as Z } from "../gestures-D2Fdra_G.js";
14
- import { p as $ } from "../polyfills-X6KXuHg-.js";
15
- import { TICK_ORDER as p } from "../order/index.js";
16
- var K;
17
- class N {
11
+ import { a as J } from "../easings-BEmRlrDd.js";
12
+ import { T as Z } from "../Tweened-CynwDTYT.js";
13
+ import { s as $ } from "../gestures-D2Fdra_G.js";
14
+ import { p } from "../polyfills-X6KXuHg-.js";
15
+ import { TICK_ORDER as _ } from "../order/index.js";
16
+ var W;
17
+ class K {
18
18
  constructor() {
19
- s(this, K, new j());
19
+ s(this, W, new G());
20
20
  }
21
21
  get changeEvent() {
22
- return t(this, K);
22
+ return t(this, W);
23
23
  }
24
24
  }
25
- K = new WeakMap();
26
- var b, d, f, z;
27
- class ce extends N {
25
+ W = new WeakMap();
26
+ var w, d, f, P;
27
+ class fe extends K {
28
28
  constructor(e) {
29
29
  super();
30
- s(this, b, null);
30
+ s(this, w, null);
31
31
  s(this, d, null);
32
32
  s(this, f, "offsetHeight");
33
- s(this, z, (e) => {
34
- const n = e.shiftKey ? -1 : 1;
35
- let a;
36
- e.code === "Space" ? a = n * t(this, d)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? a = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? a = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? a = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? a = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "PageUp" ? a = -1 * t(this, d)[t(this, f)] : e.code === "PageDown" ? a = 1 * t(this, d)[t(this, f)] : e.code === "Home" ? a = 0 : e.code === "End" && (a = t(this, f) === "offsetWidth" ? t(this, d).scrollWidth : t(this, d).scrollHeight), a && (e.stopPropagation(), this.changeEvent.notify("keyboard", a));
33
+ s(this, P, (e) => {
34
+ const a = e.shiftKey ? -1 : 1;
35
+ let r;
36
+ e.code === "Space" ? r = a * t(this, d)[t(this, f)] * 0.4 : e.code === "ArrowLeft" ? r = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowRight" ? r = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowUp" ? r = -1 * t(this, d)[t(this, f)] * 0.2 : e.code === "ArrowDown" ? r = 1 * t(this, d)[t(this, f)] * 0.2 : e.code === "PageUp" ? r = -1 * t(this, d)[t(this, f)] : e.code === "PageDown" ? r = 1 * t(this, d)[t(this, f)] : e.code === "Home" ? r = 0 : e.code === "End" && (r = t(this, f) === "offsetWidth" ? t(this, d).scrollWidth : t(this, d).scrollHeight), r && (e.stopPropagation(), this.changeEvent.notify("keyboard", r));
37
37
  });
38
- m && (i(this, b, e != null && e.element && U(e.element) || window), i(this, d, t(this, b) instanceof HTMLElement ? t(this, b) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
38
+ o && (i(this, w, e != null && e.element && Q(e.element) || window), i(this, d, t(this, w) instanceof HTMLElement ? t(this, w) : document.documentElement), this.dimension = e == null ? void 0 : e.dimension);
39
39
  }
40
40
  set dimension(e) {
41
41
  i(this, f, e === "width" ? "offsetWidth" : "offsetHeight");
42
42
  }
43
43
  connect() {
44
- m && t(this, b).addEventListener(
44
+ o && t(this, w).addEventListener(
45
45
  "keydown",
46
- t(this, z)
46
+ t(this, P)
47
47
  );
48
48
  }
49
49
  disconnect() {
50
- m && t(this, b).removeEventListener(
50
+ o && t(this, w).removeEventListener(
51
51
  "keydown",
52
- t(this, z)
52
+ t(this, P)
53
53
  );
54
54
  }
55
55
  }
56
- b = new WeakMap(), d = new WeakMap(), f = new WeakMap(), z = new WeakMap();
57
- var w, y, P, X, c, k, u, o, W, S, C, Y, A;
58
- class fe extends N {
56
+ w = new WeakMap(), d = new WeakMap(), f = new WeakMap(), P = new WeakMap();
57
+ var g, x, X, Y, c, C, u, b, R, U, A, q, I;
58
+ class ue extends K {
59
59
  constructor(e) {
60
60
  super();
61
- s(this, o);
62
- s(this, w);
63
- s(this, y);
64
- s(this, P);
61
+ s(this, b);
62
+ s(this, g);
63
+ s(this, x);
65
64
  s(this, X);
65
+ s(this, Y);
66
66
  s(this, c);
67
- s(this, k);
68
- s(this, u);
69
67
  s(this, C);
70
- s(this, Y);
68
+ s(this, u);
71
69
  s(this, A);
72
- this.direction = 1, i(this, c, new J(0, { easing: G })), i(this, u, !1), i(this, C, (n) => {
70
+ s(this, q);
71
+ s(this, I);
72
+ this.direction = 1, i(this, c, new Z(0, { easing: J })), i(this, u, !1), i(this, A, (a) => {
73
73
  t(this, c).current !== 1 && this.changeEvent.notify(
74
74
  "autoplay",
75
- n.timeBetweenFrames * t(this, w) * this.direction * (1 - t(this, c).current)
75
+ a.timeBetweenFrames * t(this, g) * this.direction * (1 - t(this, c).current)
76
76
  );
77
- }), i(this, Y, () => {
77
+ }), i(this, q, () => {
78
78
  t(this, c).current !== 1 && this.changeEvent.notify(
79
79
  "autoplay",
80
- Math.sign(t(this, w)) * this.direction * (1 - t(this, c).current)
80
+ Math.sign(t(this, g)) * this.direction * (1 - t(this, c).current)
81
81
  );
82
- }), i(this, A, () => {
83
- t(this, y) && (document.hidden ? t(this, c).set(1, { equalize: !0 }) : t(this, c).set(0, { equalize: !0 }));
84
- }), i(this, w, (e == null ? void 0 : e.speed) || 1), i(this, y, (e == null ? void 0 : e.interval) || !1), i(this, P, e);
82
+ }), i(this, I, () => {
83
+ t(this, x) && (document.hidden ? t(this, c).set(1, { equalize: !0 }) : t(this, c).set(0, { equalize: !0 }));
84
+ }), i(this, g, (e == null ? void 0 : e.speed) || 1), i(this, x, (e == null ? void 0 : e.interval) || !1), i(this, X, e);
85
85
  }
86
86
  set interval(e) {
87
- i(this, y, e), t(this, u) && L(this, o, W).call(this);
87
+ i(this, x, e), t(this, u) && T(this, b, R).call(this);
88
88
  }
89
89
  set speed(e) {
90
- i(this, w, e), t(this, u) && L(this, o, W).call(this);
90
+ i(this, g, e), t(this, u) && T(this, b, R).call(this);
91
91
  }
92
92
  connect() {
93
- t(this, u) || (i(this, u, !0), L(this, o, W).call(this));
93
+ t(this, u) || (i(this, u, !0), T(this, b, R).call(this));
94
94
  }
95
95
  disconnect() {
96
- t(this, u) && (i(this, u, !1), L(this, o, S).call(this));
96
+ t(this, u) && (i(this, u, !1), T(this, b, U).call(this));
97
97
  }
98
- pauseAndContinue(e, n) {
99
- t(this, u) && e && (clearTimeout(t(this, k)), t(this, c).set(1, {
98
+ pauseAndContinue(e, a) {
99
+ t(this, u) && e && (clearTimeout(t(this, C)), t(this, c).set(1, {
100
100
  duration: Math.min(e, 1e3),
101
- equalize: n
102
- }), i(this, k, setTimeout(() => {
101
+ equalize: a
102
+ }), i(this, C, setTimeout(() => {
103
103
  t(this, c).set(0, {
104
104
  duration: Math.min(e, 5e3),
105
- equalize: n
105
+ equalize: a
106
106
  });
107
107
  }, e)));
108
108
  }
109
109
  }
110
- w = new WeakMap(), y = new WeakMap(), P = new WeakMap(), X = new WeakMap(), c = new WeakMap(), k = new WeakMap(), u = new WeakMap(), o = new WeakSet(), W = function() {
111
- L(this, o, S).call(this), t(this, y) ? i(this, X, setInterval(
112
- t(this, Y),
113
- Math.abs(t(this, w))
114
- )) : T.subscribe(t(this, C), t(this, P)), document.addEventListener(
110
+ g = new WeakMap(), x = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), c = new WeakMap(), C = new WeakMap(), u = new WeakMap(), b = new WeakSet(), R = function() {
111
+ T(this, b, U).call(this), t(this, x) ? i(this, Y, setInterval(
112
+ t(this, q),
113
+ Math.abs(t(this, g))
114
+ )) : k.subscribe(t(this, A), t(this, X)), document.addEventListener(
115
115
  "visibilitychange",
116
- t(this, A)
116
+ t(this, I)
117
117
  );
118
- }, S = function() {
119
- clearInterval(t(this, X)), T.unsubscribe(t(this, C)), clearTimeout(t(this, k)), t(this, c).close(), document.removeEventListener(
118
+ }, U = function() {
119
+ clearInterval(t(this, Y)), k.unsubscribe(t(this, A)), clearTimeout(t(this, C)), t(this, c).close(), document.removeEventListener(
120
120
  "visibilitychange",
121
- t(this, A)
121
+ t(this, I)
122
122
  );
123
- }, C = new WeakMap(), Y = new WeakMap(), A = new WeakMap();
124
- var I, x, D, q;
125
- class ue extends N {
123
+ }, A = new WeakMap(), q = new WeakMap(), I = new WeakMap();
124
+ var D, v, H, N;
125
+ class me extends K {
126
126
  constructor(e) {
127
127
  super();
128
- s(this, I, null);
129
- s(this, x);
130
- s(this, D);
131
- s(this, q, (e) => {
132
- let n = 0;
128
+ s(this, D, null);
129
+ s(this, v);
130
+ s(this, H);
131
+ s(this, N, (e) => {
132
+ let a = 0;
133
133
  if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) * 0.5 || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY) * 0.5))
134
- if (e.preventDefault(), n = (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) {
135
- const a = Date.now();
136
- if (a - t(this, D) > 40 && (n = 100 * Math.sign(n)), i(this, D, a), Math.abs(n) < 100 || t(this, x))
134
+ if (e.preventDefault(), a = (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) {
135
+ const r = Date.now();
136
+ if (r - t(this, H) > 40 && (a = 100 * Math.sign(a)), i(this, H, r), Math.abs(a) < 100 || t(this, v))
137
137
  return;
138
- this.changeEvent.notify("wheel", n), i(this, x, setTimeout(() => {
139
- i(this, x, void 0);
138
+ this.changeEvent.notify("wheel", a), i(this, v, setTimeout(() => {
139
+ i(this, v, void 0);
140
140
  }, 80));
141
141
  } else
142
- this.changeEvent.notify("wheel", n);
142
+ this.changeEvent.notify("wheel", a);
143
143
  });
144
- 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, D, Date.now()), m && i(this, I, e != null && e.element && U(e.element) || window);
144
+ 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()), o && i(this, D, e != null && e.element && Q(e.element) || window);
145
145
  }
146
146
  connect() {
147
- m && t(this, I).addEventListener(
147
+ o && t(this, D).addEventListener(
148
148
  "wheel",
149
- t(this, q),
149
+ t(this, N),
150
150
  {
151
151
  passive: !1
152
152
  }
153
153
  );
154
154
  }
155
155
  disconnect() {
156
- m && (t(this, I).removeEventListener(
156
+ o && (t(this, D).removeEventListener(
157
157
  "wheel",
158
- t(this, q)
159
- ), clearTimeout(t(this, x)));
158
+ t(this, N)
159
+ ), clearTimeout(t(this, v)));
160
160
  }
161
161
  }
162
- I = new WeakMap(), x = new WeakMap(), D = new WeakMap(), q = new WeakMap();
163
- var v, g, H, l, R, M;
164
- const E = class E extends N {
162
+ D = new WeakMap(), v = new WeakMap(), H = new WeakMap(), N = new WeakMap();
163
+ var M, m, l, z, y;
164
+ const E = class E extends K {
165
165
  constructor(e) {
166
166
  super();
167
- s(this, g, null);
168
- s(this, H, !1);
169
- s(this, l, 0);
170
- s(this, R, (e) => {
171
- if (e.composedPath().find(
172
- (a) => a instanceof HTMLElement && a.hasAttribute("drag-dead-zone")
167
+ s(this, m);
168
+ s(this, l);
169
+ s(this, z);
170
+ s(this, y);
171
+ this.inertion = 1, i(this, m, null), i(this, l, 0), i(this, z, (a) => {
172
+ if (a.composedPath().find(
173
+ (L) => L instanceof HTMLElement && L.hasAttribute("drag-dead-zone")
173
174
  ))
174
175
  return;
175
- this.swipe || T.unsubscribe(t(this, M));
176
- let n = e;
177
- i(this, l, 0), document.documentElement.classList.add("grabbing"), Z(
178
- (a) => {
179
- if (t(this, H) || t(E, v) && t(E, v) !== t(this, g))
176
+ this.swipe || k.unsubscribe(t(this, y));
177
+ let r = a, O = !1;
178
+ i(this, l, 0), document.documentElement.classList.add("grabbing"), $(
179
+ (L) => {
180
+ if (t(E, M) && t(E, M) !== t(this, m))
180
181
  return;
181
- this.swipe && i(this, H, !0);
182
- const O = n.x - a.x, B = n.y - a.y;
183
- this.axis === "x" ? i(this, l, O) : i(this, l, B), n = a, (this.axis === "x" && Math.abs(O) > Math.abs(B) || this.axis === "y" && Math.abs(B) > Math.abs(O)) && (i(E, v, t(this, g)), this.changeEvent.notify("drag", t(this, l)));
182
+ const B = r.x - L.x, F = r.y - L.y;
183
+ this.axis === "x" ? i(this, l, B) : i(this, l, F), r = L, O = this.axis === "x" && Math.abs(B) > Math.abs(F) || this.axis === "y" && Math.abs(F) > Math.abs(B), O && (i(E, M, t(this, m)), this.changeEvent.notify("drag", t(this, l)));
184
184
  },
185
185
  () => {
186
- i(E, v, null), this.swipe || (i(this, l, t(this, l) * 3), T.subscribe(t(this, M), {
187
- order: p.CONTROLS - 1
188
- })), document.documentElement.classList.remove("grabbing"), i(this, H, !1);
186
+ i(E, M, null), O && (!this.swipe && this.inertion ? (i(this, l, t(this, l) * this.inertion), k.subscribe(t(this, y), {
187
+ order: _.CONTROLS - 1
188
+ })) : this.swipe && this.changeEvent.notify("drag-end", t(this, l))), document.documentElement.classList.remove("grabbing");
189
189
  }
190
190
  );
191
- });
192
- s(this, M, () => {
193
- Math.floor(Math.abs(t(this, l))) || T.unsubscribe(t(this, M)), i(this, l, t(this, l) * 0.95), i(this, l, $(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
194
- });
195
- this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, m && i(this, g, e != null && e.element && U(e.element) || document.documentElement);
191
+ }), i(this, y, () => {
192
+ Math.floor(Math.abs(t(this, l))) || k.unsubscribe(t(this, y)), i(this, l, t(this, l) * 0.95), i(this, l, p(t(this, l), 3)), this.changeEvent.notify("drag", t(this, l));
193
+ }), this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, o && i(this, m, e != null && e.element && Q(e.element) || document.documentElement);
196
194
  }
197
195
  connect() {
198
- m && t(this, g).addEventListener("pointerdown", t(this, R));
196
+ o && t(this, m).addEventListener("pointerdown", t(this, z));
199
197
  }
200
198
  disconnect() {
201
- m && (t(this, g).removeEventListener(
199
+ o && (t(this, m).removeEventListener(
202
200
  "pointerdown",
203
- t(this, R)
204
- ), T.unsubscribe(t(this, M)));
201
+ t(this, z)
202
+ ), k.unsubscribe(t(this, y)));
205
203
  }
206
204
  };
207
- v = new WeakMap(), g = new WeakMap(), H = new WeakMap(), l = new WeakMap(), R = new WeakMap(), M = new WeakMap(), s(E, v, null);
208
- let V = E;
205
+ M = new WeakMap(), m = new WeakMap(), l = new WeakMap(), z = new WeakMap(), y = new WeakMap(), s(E, M, null);
206
+ let j = E;
209
207
  export {
210
- fe as AutoplayControls,
211
- N as Controls,
212
- V as DragControls,
213
- ce as KeyboardControls,
214
- ue as WheelControls
208
+ ue as AutoplayControls,
209
+ K as Controls,
210
+ j as DragControls,
211
+ fe as KeyboardControls,
212
+ me as WheelControls
215
213
  };
@@ -0,0 +1,38 @@
1
+ const n = (e) => e, s = (e) => e * e, a = (e) => e * (2 - e), r = (e) => e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e, u = (e) => e * e * e, o = (e) => --e * e * e + 1, c = (e) => e < 0.5 ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1, O = (e) => e * e * e * e, i = (e) => 1 - --e * e * e * e, I = (e) => e < 0.5 ? 8 * e * e * e * e : 1 - 8 * --e * e * e * e, Q = (e) => e * e * e * e * e, b = (e) => 1 + --e * e * e * e * e, l = (e) => e < 0.5 ? 16 * e * e * e * e * e : 1 + 16 * --e * e * e * e * e, p = (e) => e === 0 ? 0 : 2 ** (10 * (e - 1)), d = (e) => e === 1 ? 1 : 1 - 2 ** (-10 * e), g = (e) => e === 0 || e === 1 ? e : e < 0.5 ? 0.5 * 2 ** (20 * (e - 0.5)) : 0.5 * (2 - Math.abs(2 ** (-20 * (e - 0.5)))), x = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2
+ __proto__: null,
3
+ easeInCubic: u,
4
+ easeInExpo: p,
5
+ easeInOutCubic: c,
6
+ easeInOutExpo: g,
7
+ easeInOutQuad: r,
8
+ easeInOutQuart: I,
9
+ easeInOutQuint: l,
10
+ easeInQuad: s,
11
+ easeInQuart: O,
12
+ easeInQuint: Q,
13
+ easeOutCubic: o,
14
+ easeOutExpo: d,
15
+ easeOutQuad: a,
16
+ easeOutQuart: i,
17
+ easeOutQuint: b,
18
+ linear: n
19
+ }, Symbol.toStringTag, { value: "Module" }));
20
+ export {
21
+ s as a,
22
+ a as b,
23
+ r as c,
24
+ u as d,
25
+ x as e,
26
+ o as f,
27
+ c as g,
28
+ O as h,
29
+ i,
30
+ I as j,
31
+ Q as k,
32
+ n as l,
33
+ b as m,
34
+ l as n,
35
+ p as o,
36
+ d as p,
37
+ g as q
38
+ };
@@ -0,0 +1 @@
1
+ "use strict";const n=e=>e,u=e=>e*e,s=e=>e*(2-e),a=e=>e<.5?2*e*e:-1+(4-2*e)*e,r=e=>e*e*e,o=e=>--e*e*e+1,c=e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,O=e=>e*e*e*e,I=e=>1- --e*e*e*e,i=e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,t=e=>e*e*e*e*e,Q=e=>1+--e*e*e*e*e,b=e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e,d=e=>e===0?0:2**(10*(e-1)),p=e=>e===1?1:1-2**(-10*e),l=e=>e===0||e===1?e:e<.5?.5*2**(20*(e-.5)):.5*(2-Math.abs(2**(-20*(e-.5)))),x=Object.freeze(Object.defineProperty({__proto__:null,easeInCubic:r,easeInExpo:d,easeInOutCubic:c,easeInOutExpo:l,easeInOutQuad:a,easeInOutQuart:i,easeInOutQuint:b,easeInQuad:u,easeInQuart:O,easeInQuint:t,easeOutCubic:o,easeOutExpo:p,easeOutQuad:s,easeOutQuart:I,easeOutQuint:Q,linear:n},Symbol.toStringTag,{value:"Module"}));exports.easeInCubic=r;exports.easeInExpo=d;exports.easeInOutCubic=c;exports.easeInOutExpo=l;exports.easeInOutQuad=a;exports.easeInOutQuart=i;exports.easeInOutQuint=b;exports.easeInQuad=u;exports.easeInQuart=O;exports.easeInQuint=t;exports.easeOutCubic=o;exports.easeOutExpo=p;exports.easeOutQuad=s;exports.easeOutQuart=I;exports.easeOutQuint=Q;exports.easings=x;exports.linear=n;