aptechka 0.32.1 → 0.32.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
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)),a=(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),h=(i,s,t,n)=>(S(i,s,"write to private field"),n?n.call(i,t):s.set(i,t),t),M=(i,s,t)=>(S(i,s,"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,A,c,F,r,u,l,g,d,q,y,x;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,A);a(this,c,new I.Store(!1));a(this,F,0);a(this,r,0);a(this,u,-1/0);a(this,l,1/0);a(this,g,0);a(this,d,null);a(this,x,t=>{this.handleAnimationFrame(t)});h(this,r,this.current)}get direction(){return e(this,F)}get target(){return e(this,r)}get min(){return e(this,u)}set min(t){h(this,u,t),this.set(e(this,r),{equalize:!0})}get max(){return e(this,l)}set max(t){h(this,l,t),this.set(e(this,r),{equalize:!0})}get from(){return e(this,g)}get isRunning(){return e(this,c)}get delta(){return Math.abs(e(this,r)-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,r)!==t||n!=null&&n.restart)&&(h(this,d,t),this.updateOptions(n),h(this,d,null),e(this,r)!==this.current&&this.start())}shift(t,n){this.set(e(this,r)+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,x),{maxFPS:e(this,f),order:e(this,b),culling:e(this,A)}))}unlistenAnimationFrame(){e(this,c).current&&(e(this,c).current=!1,P.ticker.unsubscribe(e(this,x)))}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,A,m.nullishCoalescing(t==null?void 0:t.culling,e(this,A))),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,r)),t!=null&&t.equalize&&(this.unlistenAnimationFrame(),this.current=e(this,r)),t!=null&&t.restart&&(this.unlistenAnimationFrame(),this.current=this.initial)}start(){this.listenAnimationFrame()}}f=new WeakMap,b=new WeakMap,A=new WeakMap,c=new WeakMap,F=new WeakMap,r=new WeakMap,u=new WeakMap,l=new WeakMap,g=new WeakMap,d=new WeakMap,q=new WeakSet,y=function(t){h(this,F,Math.sign(t-e(this,r))),h(this,r,z.clamp(t,e(this,u),e(this,l))),h(this,g,this.current)},x=new WeakMap;exports.Animation=O;
@@ -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 A } from "./polyfills-X6KXuHg-.js";
8
+ import { p as z, n as F } 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, b, l, F, s, n, m, c, g, M, R, x;
11
+ var f, d, A, l, b, 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, b);
18
+ a(this, A);
19
19
  a(this, l, new q(!1));
20
- a(this, F, 0);
20
+ a(this, b, 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, F);
32
+ return e(this, b);
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, b)
87
+ culling: e(this, A)
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, 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);
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);
95
95
  }
96
96
  start() {
97
97
  this.listenAnimationFrame();
98
98
  }
99
99
  }
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);
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);
102
102
  }, x = new WeakMap();
103
103
  export {
104
104
  K as A
@@ -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-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;
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;
@@ -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-B1AS8IQG.js";
20
+ import { A as q } from "./Animation-DN95L7Xo.js";
21
21
  var i, h;
22
22
  class j extends q {
23
23
  constructor(t, r) {
@@ -18,7 +18,7 @@ var n = (a, i, e) => (A(a, i, "read from private field"), e ? e.call(a) : i.get(
18
18
  import { l as h, e as S } from "./easings-BEmRlrDd.js";
19
19
  import { c as T } from "./math-BOBiC4TN.js";
20
20
  import { n as q, p as w } from "./polyfills-X6KXuHg-.js";
21
- import { A as z } from "./Animation-B1AS8IQG.js";
21
+ import { A as z } from "./Animation-DN95L7Xo.js";
22
22
  var s, r;
23
23
  class v extends z {
24
24
  constructor(e, t) {
@@ -1 +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;
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-B9m8bw96.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;
@@ -1 +1 @@
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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../Animation-B9m8bw96.cjs"),n=require("../Damped-CTsV8tl_.cjs"),i=require("../Tweened-C0-UzxN-.cjs");exports.Animation=e.Animation;exports.Damped=n.Damped;exports.Tweened=i.Tweened;
@@ -1,6 +1,6 @@
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";
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-B_ZFQKGQ.js";
4
4
  export {
5
5
  r as Animation,
6
6
  m as Damped,
@@ -1 +1 @@
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
+ "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-C0-UzxN-.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;
@@ -9,7 +9,7 @@ import { g as Q } from "../dom-0S_WDL4g.js";
9
9
  import { ticker as k } from "../ticker/vanilla/index.js";
10
10
  import "../Store-OTdcl6SX.js";
11
11
  import { a as J } from "../easings-BEmRlrDd.js";
12
- import { T as Z } from "../Tweened-CynwDTYT.js";
12
+ import { T as Z } from "../Tweened-B_ZFQKGQ.js";
13
13
  import { s as $ } from "../gestures-D2Fdra_G.js";
14
14
  import { p } from "../polyfills-X6KXuHg-.js";
15
15
  import { TICK_ORDER as _ } from "../order/index.js";
@@ -1 +1 @@
1
- "use strict";var A=Object.defineProperty;var _=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var D=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&D(i,t,s[t]);if(_)for(var t of _(s))G.call(s,t)&&D(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,a)=>(k(i,s,"write to private field"),a?a.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CDb6RMce.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/vanilla/index.cjs");const R=require("../Damped-C3MyWa5_.cjs"),j=require("../element-resizer/vanilla/index.cjs"),B=require("../window-resizer/vanilla/index.cjs"),P=require("../css-property/index.cjs");var o,l,m,d,y,u,b,v,f,w,C,p;class O{constructor(s){n(this,o);n(this,l);n(this,m);n(this,d);n(this,y);n(this,u);n(this,b,0);n(this,v,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),a={width:e(this,b),height:e(this,v)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,a);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,a);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,l).set(h.x),e(this,m).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,v,this.element.clientHeight);let s=0,t=0,a=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,a=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,a=e(this,v)/2*-1,h=e(this,v)/2*1):e(this,u)?(s=0,t=1,a=0,h=1):(s=0,t=e(this,b),a=0,h=e(this,v)),e(this,l).min=s,e(this,l).max=t,e(this,m).min=a,e(this,m).max=h});c(this,o,I.getElement(s.element)),c(this,l,new R.Damped(0,s.damped)),c(this,m,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,T({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,l)}get y(){return e(this,m)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).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)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}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)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,l).reset(),e(this,m).reset(),e(this,d).reset()}}o=new WeakMap,l=new WeakMap,m=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,v=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,x,g,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,x,new P.CSSProperty(this,"--damping",20));n(this,g,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,x).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,g).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,x).observe(),e(this,g).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,x).unobserve(),e(this,g).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,x=new WeakMap,g=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
1
+ "use strict";var A=Object.defineProperty;var _=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var M=i=>{throw TypeError(i)};var D=(i,s,t)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,T=(i,s)=>{for(var t in s||(s={}))F.call(s,t)&&D(i,t,s[t]);if(_)for(var t of _(s))G.call(s,t)&&D(i,t,s[t]);return i};var k=(i,s,t)=>s.has(i)||M("Cannot "+t);var e=(i,s,t)=>(k(i,s,"read from private field"),t?t.call(i):s.get(i)),n=(i,s,t)=>s.has(i)?M("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),c=(i,s,t,a)=>(k(i,s,"write to private field"),a?a.call(i,t):s.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-CDb6RMce.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),I=require("../dom-JBOkFLTh.cjs"),H=require("../math-GDWEqu7y.cjs");require("../ticker/vanilla/index.cjs");const R=require("../Damped-CTsV8tl_.cjs"),j=require("../element-resizer/vanilla/index.cjs"),B=require("../window-resizer/vanilla/index.cjs"),P=require("../css-property/index.cjs");var o,l,m,d,y,u,b,v,f,w,C,p;class O{constructor(s){n(this,o);n(this,l);n(this,m);n(this,d);n(this,y);n(this,u);n(this,b,0);n(this,v,0);n(this,f,s=>{e(this,d).set(1)});n(this,w,s=>{e(this,d).set(0)});n(this,C,s=>{const t=q.getPointerPosition(s,e(this,o).getBoundingClientRect()),a={width:e(this,b),height:e(this,v)},h={x:t.x,y:t.y};if(e(this,y)){const z=q.screenToCartesian(h,a);h.x=z.x,h.y=z.y}if(e(this,u)){const z=q.normalize(h,a);h.x=H.clamp(z.x*2,-1,1),h.y=H.clamp(z.y*2,-1,1)}e(this,l).set(h.x),e(this,m).set(h.y)});n(this,p,()=>{c(this,b,this.element.clientWidth),c(this,v,this.element.clientHeight);let s=0,t=0,a=0,h=0;e(this,y)?e(this,u)?(s=-1,t=1,a=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,a=e(this,v)/2*-1,h=e(this,v)/2*1):e(this,u)?(s=0,t=1,a=0,h=1):(s=0,t=e(this,b),a=0,h=e(this,v)),e(this,l).min=s,e(this,l).max=t,e(this,m).min=a,e(this,m).max=h});c(this,o,I.getElement(s.element)),c(this,l,new R.Damped(0,s.damped)),c(this,m,new R.Damped(0,s.damped)),c(this,d,new R.Damped(0,T({min:0,max:1},s.damped))),c(this,y,s.cartesian||!1),c(this,u,s.normalize||!1)}get element(){return e(this,o)}get x(){return e(this,l)}get y(){return e(this,m)}get z(){return e(this,d)}get cartesian(){return e(this,y)}set cartesian(s){c(this,y,s),e(this,p).call(this)}get normalize(){return e(this,u)}set normalize(s){c(this,u,s),e(this,p).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)),j.elementResizer.subscribe(e(this,o),e(this,p)),B.windowResizer.subscribe(e(this,p))}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)),j.elementResizer.unsubscribe(e(this,p)),B.windowResizer.unsubscribe(e(this,p)),e(this,l).reset(),e(this,m).reset(),e(this,d).reset()}}o=new WeakMap,l=new WeakMap,m=new WeakMap,d=new WeakMap,y=new WeakMap,u=new WeakMap,b=new WeakMap,v=new WeakMap,f=new WeakMap,w=new WeakMap,C=new WeakMap,p=new WeakMap;var r,x,g,S,E,L;class W extends HTMLElement{constructor(){super();n(this,r);n(this,x,new P.CSSProperty(this,"--damping",20));n(this,g,new P.CSSProperty(this,"--mass",0));n(this,S,new P.CSSProperty(this,"--stiffness",0));n(this,E,new P.CSSProperty(this,"--cartesian",!1));n(this,L,new P.CSSProperty(this,"--normalize",!1));c(this,r,new O({element:this})),e(this,x).subscribe(t=>{e(this,r).x.damping=t.current,e(this,r).y.damping=t.current,e(this,r).z.damping=t.current}),e(this,E).subscribe(t=>{e(this,r).cartesian=t.current}),e(this,L).subscribe(t=>{e(this,r).normalize=t.current}),e(this,g).subscribe(t=>{e(this,r).x.mass=t.current,e(this,r).y.mass=t.current,e(this,r).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,r).x.stiffness=t.current,e(this,r).y.stiffness=t.current,e(this,r).z.stiffness=t.current}),e(this,r).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,r).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,r).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,r)}connectedCallback(){e(this,r).connect(),e(this,x).observe(),e(this,g).observe(),e(this,S).observe()}disconnectedCallback(){e(this,r).disconnect(),e(this,x).unobserve(),e(this,g).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}r=new WeakMap,x=new WeakMap,g=new WeakMap,S=new WeakMap,E=new WeakMap,L=new WeakMap;customElements.get("e-pointer")||customElements.define("e-pointer",W);exports.Pointer=O;exports.PointerElement=W;
@@ -19,7 +19,7 @@ import { g as G, s as I, n as J } from "../coordinates-CgdGoSYs.js";
19
19
  import { g as K } from "../dom-0S_WDL4g.js";
20
20
  import { c as B } from "../math-BOBiC4TN.js";
21
21
  import "../ticker/vanilla/index.js";
22
- import { D as R } from "../Damped-cQCN3d0W.js";
22
+ import { D as R } from "../Damped-Chu29wn-.js";
23
23
  import { elementResizer as W } from "../element-resizer/vanilla/index.js";
24
24
  import { windowResizer as j } from "../window-resizer/vanilla/index.js";
25
25
  import { CSSProperty as P } from "../css-property/index.js";
@@ -16,7 +16,7 @@ export declare class PopoverElement extends HTMLElement {
16
16
  private static __opened;
17
17
  get history(): Attribute<false>;
18
18
  get restore(): Attribute<false>;
19
- get single(): Attribute<false>;
19
+ get dominance(): Attribute<false | "all" | "previous">;
20
20
  get opened(): Store<boolean>;
21
21
  get lastTrigger(): any;
22
22
  open: (options?: {
@@ -1 +1 @@
1
- "use strict";var I=i=>{throw TypeError(i)};var H=(i,o,t)=>o.has(i)||I("Cannot "+t);var e=(i,o,t)=>(H(i,o,"read from private field"),t?t.call(i):o.get(i)),r=(i,o,t)=>o.has(i)?I("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),n=(i,o,t,l)=>(H(i,o,"write to private field"),l?l.call(i,t):o.set(i,t),t),T=(i,o,t)=>(H(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../attribute/index.cjs"),j=require("../Store-CDb6RMce.cjs"),M=require("../events-KVanG9sR.cjs"),D=require("../style-At6aDoqG.cjs"),U=require("../browser-CpzFX2xg.cjs");var E,a,w,d,u,g,v,m,p,B,y,x,b,$,f;const c=class c extends HTMLElement{constructor(){super(...arguments);r(this,p);r(this,E);r(this,a);r(this,w);r(this,d);r(this,u);r(this,g);r(this,v);r(this,m);r(this,y);r(this,b);r(this,f);n(this,E,-1),n(this,a,new j.Store(!1)),n(this,d,new O.Attribute(this,"history",!1)),n(this,u,new O.Attribute(this,"restore",!1)),n(this,g,new O.Attribute(this,"single",!1)),n(this,v,!1),this.open=t=>{if(e(this,a).current)return;n(this,m,t==null?void 0:t.trigger),e(this,a).current=!0,e(this,g).current&&(c.__opened.forEach(h=>h.close()),c.__opened=[]),c.__opened.push(this),n(this,E,c.__opened.length-1),e(this,d).current&&e(this,v)&&history.pushState("","",e(this,p,B)),clearTimeout(e(this,w)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",M.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,m)}});const l=()=>{addEventListener("click",e(this,y)),addEventListener("keydown",e(this,b)),this.style.opacity="1",this.classList.add("opened"),M.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,m)}})};t!=null&&t.skipTransition?l():setTimeout(l,10)},this.close=()=>{e(this,a).current&&(e(this,a).current=!1,c.__opened=c.__opened.filter(t=>t!==this),T(this,p,x).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",M.dispatchEvent(this,"popoverClosing",{custom:!0}),removeEventListener("click",e(this,y)),removeEventListener("keydown",e(this,b)),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",M.dispatchEvent(this,"popoverClosed",{custom:!0})},D.getElementTransitionDurationMS(this)+10))},n(this,y,t=>{T(this,p,$).call(this,()=>{var P;const l=t.composedPath();if(l.find(R=>R instanceof HTMLElement&&R.hasAttribute("data-popover-content")))return;const h=l[0],A=h instanceof HTMLElement&&(this.contains(h)||((P=this.shadowRoot)==null?void 0:P.contains(h))),L=h instanceof HTMLElement&&h.hasAttribute("data-outside");(!A||L)&&this.close()})}),n(this,b,t=>{T(this,p,$).call(this,()=>{t.code==="Escape"&&this.close()})}),n(this,f,()=>{n(this,v,!1),e(this,a).current&&e(this,d).current&&!location.search.includes(this.id)?this.close():!e(this,a).current&&e(this,d).current&&location.search.includes(this.id)&&this.open(),n(this,v,!0)})}get history(){return e(this,d)}get restore(){return e(this,u)}get single(){return e(this,g)}get opened(){return e(this,a)}get lastTrigger(){return e(this,m)}connectedCallback(){e(this,d).observe(),e(this,u).observe(),e(this,g).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("popover-target",""),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,f)),setTimeout(()=>{e(this,u).current?e(this,f).call(this):(T(this,p,x).call(this),n(this,v,!0))},0)}disconnectedCallback(){e(this,d).unobserve(),e(this,u).unobserve(),e(this,g).unobserve(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,w)),removeEventListener("popstate",e(this,f))}};E=new WeakMap,a=new WeakMap,w=new WeakMap,d=new WeakMap,u=new WeakMap,g=new WeakMap,v=new WeakMap,m=new WeakMap,p=new WeakSet,B=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},y=new WeakMap,x=function(){if(e(this,d).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},b=new WeakMap,$=function(t){(c.__opened[e(this,E)-1]||c.__opened.length===1)&&t()},f=new WeakMap,c.__opened=[];let q=c;customElements.get("e-popover")||customElements.define("e-popover",q);var s,k,S,C,_;class N extends HTMLElement{constructor(){super();r(this,s);r(this,k,()=>{this.classList.add("triggered")});r(this,S,()=>{this.classList.add("opened")});r(this,C,()=>{this.classList.remove("opened")});r(this,_,()=>{this.classList.remove("triggered")});U.isBrowser&&(this.addEventListener("click",()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get popoverElement(){return e(this,s)}connectedCallback(){var l;this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let h=null;if(t==="parent"){const A=this.closest("[popover-target]");if(A)h=A;else{const L=this.getRootNode();L instanceof ShadowRoot?h=L.host.closest("[popover-target]"):L instanceof HTMLElement&&(h=L.closest("[popover-target]"))}}else t==="sibling"?h=(l=this.parentElement)==null?void 0:l.querySelector("[popover-target]"):h=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);h instanceof HTMLElement?(n(this,s,h),e(this,s).addEventListener("popoverTriggered",e(this,k)),e(this,s).addEventListener("popoverOpened",e(this,S)),e(this,s).addEventListener("popoverClosing",e(this,C)),e(this,s).addEventListener("popoverClosed",e(this,_))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,k)),e(this,s).removeEventListener("popoverOpened",e(this,S)),e(this,s).removeEventListener("popoverClosing",e(this,C)),e(this,s).removeEventListener("popoverClosed",e(this,_)))}}s=new WeakMap,k=new WeakMap,S=new WeakMap,C=new WeakMap,_=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",N);exports.PopoverButtonElement=N;exports.PopoverElement=q;
1
+ "use strict";var N=o=>{throw TypeError(o)};var H=(o,h,t)=>h.has(o)||N("Cannot "+t);var e=(o,h,t)=>(H(o,h,"read from private field"),t?t.call(o):h.get(o)),s=(o,h,t)=>h.has(o)?N("Cannot add the same private member more than once"):h instanceof WeakSet?h.add(o):h.set(o,t),i=(o,h,t,l)=>(H(o,h,"write to private field"),l?l.call(o,t):h.set(o,t),t),k=(o,h,t)=>(H(o,h,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../attribute/index.cjs"),W=require("../Store-CDb6RMce.cjs"),P=require("../events-KVanG9sR.cjs"),F=require("../function-MthRj-GJ.cjs"),G=require("../style-At6aDoqG.cjs"),j=require("../window-resizer/vanilla/index.cjs"),J=require("../browser-CpzFX2xg.cjs");var E,a,S,d,v,u,m,f,p,D,b,z,w,$,L,T,C,_;const c=class c extends HTMLElement{constructor(){super(...arguments);s(this,p);s(this,E);s(this,a);s(this,S);s(this,d);s(this,v);s(this,u);s(this,m);s(this,f);s(this,b);s(this,w);s(this,L);s(this,T);s(this,C);s(this,_);i(this,E,-1),i(this,a,new W.Store(!1)),i(this,d,new O.Attribute(this,"history",!1)),i(this,v,new O.Attribute(this,"restore",!1)),i(this,u,new O.Attribute(this,"dominance",!1)),i(this,m,!1),this.open=t=>{if(e(this,a).current)return;i(this,f,t==null?void 0:t.trigger),e(this,a).current=!0,e(this,u).current==="all"?(c.__opened.forEach(n=>n.close()),c.__opened=[]):e(this,u).current==="previous"&&(c.__opened=c.__opened.filter((n,y,g)=>y<g.length-1?!0:(n.close(),!1))),c.__opened.push(this),i(this,E,c.__opened.length-1),e(this,d).current&&e(this,m)&&history.pushState("","",e(this,p,D)),clearTimeout(e(this,S)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",P.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,f)}});const l=()=>{addEventListener("click",e(this,b)),addEventListener("keydown",e(this,w)),e(this,_).call(this),this.style.opacity="1",this.classList.add("opened"),P.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,f)}})};t!=null&&t.skipTransition?l():setTimeout(l,10)},this.close=()=>{e(this,a).current&&(e(this,a).current=!1,c.__opened=c.__opened.filter(t=>t!==this),k(this,p,z).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",P.dispatchEvent(this,"popoverClosing",{custom:!0}),removeEventListener("click",e(this,b)),removeEventListener("keydown",e(this,w)),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",P.dispatchEvent(this,"popoverClosed",{custom:!0})},G.getElementTransitionDurationMS(this)+10))},i(this,b,t=>{k(this,p,$).call(this,()=>{var I;const l=t.composedPath();if(l.find(B=>B instanceof HTMLElement&&B.hasAttribute("data-popover-content")))return;const n=l[0],y=n instanceof HTMLElement&&(this.contains(n)||((I=this.shadowRoot)==null?void 0:I.contains(n))),g=n instanceof HTMLElement&&n.hasAttribute("data-outside");(!y||g)&&this.close()})}),i(this,w,t=>{k(this,p,$).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,L,()=>{i(this,m,!1),e(this,a).current&&e(this,d).current&&!location.search.includes(this.id)?this.close():!e(this,a).current&&e(this,d).current&&location.search.includes(this.id)&&this.open(),i(this,m,!0)}),i(this,T,()=>{this.style.width="0px",this.style.height="0px",e(this,C).call(this)}),i(this,C,F.debounce(()=>{e(this,_).call(this),this.style.width="",this.style.height=""},20)),i(this,_,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,d)}get restore(){return e(this,v)}get dominance(){return e(this,u)}get opened(){return e(this,a)}get lastTrigger(){return e(this,f)}connectedCallback(){e(this,d).observe(),e(this,v).observe(),e(this,u).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("popover-target",""),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,L)),setTimeout(()=>{e(this,v).current?e(this,L).call(this):(k(this,p,z).call(this),i(this,m,!0))},0),j.windowResizer.subscribe(e(this,T))}disconnectedCallback(){j.windowResizer.unsubscribe(e(this,T)),e(this,d).unobserve(),e(this,v).unobserve(),e(this,u).unobserve(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,S)),removeEventListener("popstate",e(this,L)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height")}};E=new WeakMap,a=new WeakMap,S=new WeakMap,d=new WeakMap,v=new WeakMap,u=new WeakMap,m=new WeakMap,f=new WeakMap,p=new WeakSet,D=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},b=new WeakMap,z=function(){if(e(this,d).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},w=new WeakMap,$=function(t){(c.__opened[e(this,E)-1]||c.__opened.length===1)&&t()},L=new WeakMap,T=new WeakMap,C=new WeakMap,_=new WeakMap,c.__opened=[];let R=c;customElements.get("e-popover")||customElements.define("e-popover",R);var r,x,A,q,M;class U extends HTMLElement{constructor(){super();s(this,r);s(this,x,()=>{this.classList.add("triggered")});s(this,A,()=>{this.classList.add("opened")});s(this,q,()=>{this.classList.remove("opened")});s(this,M,()=>{this.classList.remove("triggered")});J.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,r).opened.current?e(this,r).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,r).opened.current)&&e(this,r).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get popoverElement(){return e(this,r)}connectedCallback(){var l;this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let n=null;if(t==="parent"){const y=this.closest("[popover-target]");if(y)n=y;else{const g=this.getRootNode();g instanceof ShadowRoot?n=g.host.closest("[popover-target]"):g instanceof HTMLElement&&(n=g.closest("[popover-target]"))}}else t==="sibling"?n=(l=this.parentElement)==null?void 0:l.querySelector("[popover-target]"):n=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);n instanceof HTMLElement?(i(this,r,n),e(this,r).addEventListener("popoverTriggered",e(this,x)),e(this,r).addEventListener("popoverOpened",e(this,A)),e(this,r).addEventListener("popoverClosing",e(this,q)),e(this,r).addEventListener("popoverClosed",e(this,M))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,x)),e(this,r).removeEventListener("popoverOpened",e(this,A)),e(this,r).removeEventListener("popoverClosing",e(this,q)),e(this,r).removeEventListener("popoverClosed",e(this,M)))}}r=new WeakMap,x=new WeakMap,A=new WeakMap,q=new WeakMap,M=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",U);exports.PopoverButtonElement=U;exports.PopoverElement=R;
@@ -1,188 +1,203 @@
1
- var N = (i) => {
2
- throw TypeError(i);
1
+ var B = (o) => {
2
+ throw TypeError(o);
3
3
  };
4
- var H = (i, o, t) => o.has(i) || N("Cannot " + t);
5
- var e = (i, o, t) => (H(i, o, "read from private field"), t ? t.call(i) : o.get(i)), r = (i, o, t) => o.has(i) ? N("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), n = (i, o, t, a) => (H(i, o, "write to private field"), a ? a.call(i, t) : o.set(i, t), t), b = (i, o, t) => (H(i, o, "access private method"), t);
6
- import { Attribute as x } from "../attribute/index.js";
7
- import { S as P } from "../Store-OTdcl6SX.js";
8
- import { d as M } from "../events-CsVF98U6.js";
9
- import { g as D } from "../style-j2TwriJ_.js";
10
- import { i as U } from "../browser-0zX67oeU.js";
11
- var E, l, k, d, u, g, v, m, p, B, y, $, T, R, f;
12
- const c = class c extends HTMLElement {
4
+ var O = (o, h, t) => h.has(o) || B("Cannot " + t);
5
+ var e = (o, h, t) => (O(o, h, "read from private field"), t ? t.call(o) : h.get(o)), s = (o, h, t) => h.has(o) ? B("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(o) : h.set(o, t), i = (o, h, t, c) => (O(o, h, "write to private field"), c ? c.call(o, t) : h.set(o, t), t), _ = (o, h, t) => (O(o, h, "access private method"), t);
6
+ import { Attribute as P } from "../attribute/index.js";
7
+ import { S as W } from "../Store-OTdcl6SX.js";
8
+ import { d as R } from "../events-CsVF98U6.js";
9
+ import { d as j } from "../function-C10DGppn.js";
10
+ import { g as F } from "../style-j2TwriJ_.js";
11
+ import { windowResizer as D } from "../window-resizer/vanilla/index.js";
12
+ import { i as G } from "../browser-0zX67oeU.js";
13
+ var E, a, C, d, v, u, m, f, p, U, b, z, T, I, L, w, S, k;
14
+ const l = class l extends HTMLElement {
13
15
  constructor() {
14
16
  super(...arguments);
15
- r(this, p);
16
- r(this, E);
17
- r(this, l);
18
- r(this, k);
19
- r(this, d);
20
- r(this, u);
21
- r(this, g);
22
- r(this, v);
23
- r(this, m);
24
- r(this, y);
25
- r(this, T);
26
- r(this, f);
27
- n(this, E, -1), n(this, l, new P(!1)), n(this, d, new x(this, "history", !1)), n(this, u, new x(this, "restore", !1)), n(this, g, new x(this, "single", !1)), n(this, v, !1), this.open = (t) => {
28
- if (e(this, l).current)
17
+ s(this, p);
18
+ s(this, E);
19
+ s(this, a);
20
+ s(this, C);
21
+ s(this, d);
22
+ s(this, v);
23
+ s(this, u);
24
+ s(this, m);
25
+ s(this, f);
26
+ s(this, b);
27
+ s(this, T);
28
+ s(this, L);
29
+ s(this, w);
30
+ s(this, S);
31
+ s(this, k);
32
+ i(this, E, -1), i(this, a, new W(!1)), i(this, d, new P(this, "history", !1)), i(this, v, new P(this, "restore", !1)), i(this, u, new P(
33
+ this,
34
+ "dominance",
35
+ !1
36
+ )), i(this, m, !1), this.open = (t) => {
37
+ if (e(this, a).current)
29
38
  return;
30
- n(this, m, t == null ? void 0 : t.trigger), e(this, l).current = !0, e(this, g).current && (c.__opened.forEach((h) => h.close()), c.__opened = []), c.__opened.push(this), n(this, E, c.__opened.length - 1), e(this, d).current && e(this, v) && history.pushState("", "", e(this, p, B)), clearTimeout(e(this, k)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", M(this, "popoverTriggered", {
39
+ i(this, f, t == null ? void 0 : t.trigger), e(this, a).current = !0, e(this, u).current === "all" ? (l.__opened.forEach((n) => n.close()), l.__opened = []) : e(this, u).current === "previous" && (l.__opened = l.__opened.filter((n, y, g) => y < g.length - 1 ? !0 : (n.close(), !1))), l.__opened.push(this), i(this, E, l.__opened.length - 1), e(this, d).current && e(this, m) && history.pushState("", "", e(this, p, U)), clearTimeout(e(this, C)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", R(this, "popoverTriggered", {
31
40
  custom: !0,
32
41
  detail: {
33
- trigger: e(this, m)
42
+ trigger: e(this, f)
34
43
  }
35
44
  });
36
- const a = () => {
37
- addEventListener("click", e(this, y)), addEventListener("keydown", e(this, T)), this.style.opacity = "1", this.classList.add("opened"), M(this, "popoverOpened", {
45
+ const c = () => {
46
+ addEventListener("click", e(this, b)), addEventListener("keydown", e(this, T)), e(this, k).call(this), this.style.opacity = "1", this.classList.add("opened"), R(this, "popoverOpened", {
38
47
  custom: !0,
39
48
  detail: {
40
- trigger: e(this, m)
49
+ trigger: e(this, f)
41
50
  }
42
51
  });
43
52
  };
44
- t != null && t.skipTransition ? a() : setTimeout(a, 10);
53
+ t != null && t.skipTransition ? c() : setTimeout(c, 10);
45
54
  }, this.close = () => {
46
- e(this, l).current && (e(this, l).current = !1, c.__opened = c.__opened.filter((t) => t !== this), b(this, p, $).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", M(this, "popoverClosing", {
55
+ e(this, a).current && (e(this, a).current = !1, l.__opened = l.__opened.filter((t) => t !== this), _(this, p, z).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", R(this, "popoverClosing", {
47
56
  custom: !0
48
- }), removeEventListener("click", e(this, y)), removeEventListener("keydown", e(this, T)), setTimeout(() => {
49
- this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", M(this, "popoverClosed", {
57
+ }), removeEventListener("click", e(this, b)), removeEventListener("keydown", e(this, T)), setTimeout(() => {
58
+ this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", R(this, "popoverClosed", {
50
59
  custom: !0
51
60
  });
52
- }, D(this) + 10));
53
- }, n(this, y, (t) => {
54
- b(this, p, R).call(this, () => {
55
- var I;
56
- const a = t.composedPath();
57
- if (a.find(
58
- (q) => q instanceof HTMLElement && q.hasAttribute("data-popover-content")
61
+ }, F(this) + 10));
62
+ }, i(this, b, (t) => {
63
+ _(this, p, I).call(this, () => {
64
+ var q;
65
+ const c = t.composedPath();
66
+ if (c.find(
67
+ (N) => N instanceof HTMLElement && N.hasAttribute("data-popover-content")
59
68
  ))
60
69
  return;
61
- const h = a[0], A = h instanceof HTMLElement && (this.contains(h) || ((I = this.shadowRoot) == null ? void 0 : I.contains(h))), L = h instanceof HTMLElement && h.hasAttribute("data-outside");
62
- (!A || L) && this.close();
70
+ const n = c[0], y = n instanceof HTMLElement && (this.contains(n) || ((q = this.shadowRoot) == null ? void 0 : q.contains(n))), g = n instanceof HTMLElement && n.hasAttribute("data-outside");
71
+ (!y || g) && this.close();
63
72
  });
64
- }), n(this, T, (t) => {
65
- b(this, p, R).call(this, () => {
73
+ }), i(this, T, (t) => {
74
+ _(this, p, I).call(this, () => {
66
75
  t.code === "Escape" && this.close();
67
76
  });
68
- }), n(this, f, () => {
69
- n(this, v, !1), e(this, l).current && e(this, d).current && !location.search.includes(this.id) ? this.close() : !e(this, l).current && e(this, d).current && location.search.includes(this.id) && this.open(), n(this, v, !0);
77
+ }), i(this, L, () => {
78
+ i(this, m, !1), e(this, a).current && e(this, d).current && !location.search.includes(this.id) ? this.close() : !e(this, a).current && e(this, d).current && location.search.includes(this.id) && this.open(), i(this, m, !0);
79
+ }), i(this, w, () => {
80
+ this.style.width = "0px", this.style.height = "0px", e(this, S).call(this);
81
+ }), i(this, S, j(() => {
82
+ e(this, k).call(this), this.style.width = "", this.style.height = "";
83
+ }, 20)), i(this, k, () => {
84
+ this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
70
85
  });
71
86
  }
72
87
  get history() {
73
88
  return e(this, d);
74
89
  }
75
90
  get restore() {
76
- return e(this, u);
91
+ return e(this, v);
77
92
  }
78
- get single() {
79
- return e(this, g);
93
+ get dominance() {
94
+ return e(this, u);
80
95
  }
81
96
  get opened() {
82
- return e(this, l);
97
+ return e(this, a);
83
98
  }
84
99
  get lastTrigger() {
85
- return e(this, m);
100
+ return e(this, f);
86
101
  }
87
102
  connectedCallback() {
88
- e(this, d).observe(), e(this, u).observe(), e(this, g).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("popover-target", ""), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, f)), setTimeout(() => {
89
- e(this, u).current ? e(this, f).call(this) : (b(this, p, $).call(this), n(this, v, !0));
90
- }, 0);
103
+ e(this, d).observe(), e(this, v).observe(), e(this, u).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("popover-target", ""), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, L)), setTimeout(() => {
104
+ e(this, v).current ? e(this, L).call(this) : (_(this, p, z).call(this), i(this, m, !0));
105
+ }, 0), D.subscribe(e(this, w));
91
106
  }
92
107
  disconnectedCallback() {
93
- e(this, d).unobserve(), e(this, u).unobserve(), e(this, g).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), c.__opened = c.__opened.filter((t) => t !== this), clearTimeout(e(this, k)), removeEventListener("popstate", e(this, f));
108
+ D.unsubscribe(e(this, w)), e(this, d).unobserve(), e(this, v).unobserve(), e(this, u).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), l.__opened = l.__opened.filter((t) => t !== this), clearTimeout(e(this, C)), removeEventListener("popstate", e(this, L)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height");
94
109
  }
95
110
  };
96
- E = new WeakMap(), l = new WeakMap(), k = new WeakMap(), d = new WeakMap(), u = new WeakMap(), g = new WeakMap(), v = new WeakMap(), m = new WeakMap(), p = new WeakSet(), B = function() {
111
+ E = new WeakMap(), a = new WeakMap(), C = new WeakMap(), d = new WeakMap(), v = new WeakMap(), u = new WeakMap(), m = new WeakMap(), f = new WeakMap(), p = new WeakSet(), U = function() {
97
112
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
98
- }, y = new WeakMap(), $ = function() {
113
+ }, b = new WeakMap(), z = function() {
99
114
  if (e(this, d).current) {
100
115
  const t = new URL(location.href);
101
116
  t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
102
117
  }
103
- }, T = new WeakMap(), R = function(t) {
104
- (c.__opened[e(this, E) - 1] || c.__opened.length === 1) && t();
105
- }, f = new WeakMap(), c.__opened = [];
106
- let O = c;
107
- customElements.get("e-popover") || customElements.define("e-popover", O);
108
- var s, w, C, S, _;
109
- class j extends HTMLElement {
118
+ }, T = new WeakMap(), I = function(t) {
119
+ (l.__opened[e(this, E) - 1] || l.__opened.length === 1) && t();
120
+ }, L = new WeakMap(), w = new WeakMap(), S = new WeakMap(), k = new WeakMap(), l.__opened = [];
121
+ let $ = l;
122
+ customElements.get("e-popover") || customElements.define("e-popover", $);
123
+ var r, x, A, H, M;
124
+ class J extends HTMLElement {
110
125
  constructor() {
111
126
  super();
112
- r(this, s);
113
- r(this, w, () => {
127
+ s(this, r);
128
+ s(this, x, () => {
114
129
  this.classList.add("triggered");
115
130
  });
116
- r(this, C, () => {
131
+ s(this, A, () => {
117
132
  this.classList.add("opened");
118
133
  });
119
- r(this, S, () => {
134
+ s(this, H, () => {
120
135
  this.classList.remove("opened");
121
136
  });
122
- r(this, _, () => {
137
+ s(this, M, () => {
123
138
  this.classList.remove("triggered");
124
139
  });
125
- U && (this.addEventListener("click", () => {
126
- if (e(this, s)) {
140
+ G && (this.addEventListener("click", () => {
141
+ if (e(this, r)) {
127
142
  const t = this.getAttribute("type") || "open";
128
- t === "open" || t === "toggle" && !e(this, s).opened.current ? e(this, s).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, s).opened.current) && e(this, s).close();
143
+ t === "open" || t === "toggle" && !e(this, r).opened.current ? e(this, r).open({ trigger: this }) : (t === "close" || t === "toggle" && e(this, r).opened.current) && e(this, r).close();
129
144
  }
130
145
  }), this.addEventListener("keydown", (t) => {
131
146
  t.code === "Space" && t.currentTarget.click();
132
147
  }));
133
148
  }
134
149
  get popoverElement() {
135
- return e(this, s);
150
+ return e(this, r);
136
151
  }
137
152
  connectedCallback() {
138
- var a;
153
+ var c;
139
154
  this.hasAttribute("tabindex") || (this.tabIndex = 0);
140
155
  const t = this.getAttribute("target");
141
156
  if (t) {
142
- let h = null;
157
+ let n = null;
143
158
  if (t === "parent") {
144
- const A = this.closest("[popover-target]");
145
- if (A)
146
- h = A;
159
+ const y = this.closest("[popover-target]");
160
+ if (y)
161
+ n = y;
147
162
  else {
148
- const L = this.getRootNode();
149
- L instanceof ShadowRoot ? h = L.host.closest("[popover-target]") : L instanceof HTMLElement && (h = L.closest("[popover-target]"));
163
+ const g = this.getRootNode();
164
+ g instanceof ShadowRoot ? n = g.host.closest("[popover-target]") : g instanceof HTMLElement && (n = g.closest("[popover-target]"));
150
165
  }
151
- } else t === "sibling" ? h = (a = this.parentElement) == null ? void 0 : a.querySelector("[popover-target]") : h = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
152
- h instanceof HTMLElement ? (n(this, s, h), e(this, s).addEventListener(
166
+ } else t === "sibling" ? n = (c = this.parentElement) == null ? void 0 : c.querySelector("[popover-target]") : n = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
167
+ n instanceof HTMLElement ? (i(this, r, n), e(this, r).addEventListener(
153
168
  "popoverTriggered",
154
- e(this, w)
155
- ), e(this, s).addEventListener(
169
+ e(this, x)
170
+ ), e(this, r).addEventListener(
156
171
  "popoverOpened",
157
- e(this, C)
158
- ), e(this, s).addEventListener(
172
+ e(this, A)
173
+ ), e(this, r).addEventListener(
159
174
  "popoverClosing",
160
- e(this, S)
161
- ), e(this, s).addEventListener(
175
+ e(this, H)
176
+ ), e(this, r).addEventListener(
162
177
  "popoverClosed",
163
- e(this, _)
178
+ e(this, M)
164
179
  )) : console.warn(this, `target ${t} not found`);
165
180
  }
166
181
  }
167
182
  disconnectedCallback() {
168
- e(this, s) && (e(this, s).removeEventListener(
183
+ e(this, r) && (e(this, r).removeEventListener(
169
184
  "popoverTriggered",
170
- e(this, w)
171
- ), e(this, s).removeEventListener(
185
+ e(this, x)
186
+ ), e(this, r).removeEventListener(
172
187
  "popoverOpened",
173
- e(this, C)
174
- ), e(this, s).removeEventListener(
188
+ e(this, A)
189
+ ), e(this, r).removeEventListener(
175
190
  "popoverClosing",
176
- e(this, S)
177
- ), e(this, s).removeEventListener(
191
+ e(this, H)
192
+ ), e(this, r).removeEventListener(
178
193
  "popoverClosed",
179
- e(this, _)
194
+ e(this, M)
180
195
  ));
181
196
  }
182
197
  }
183
- s = new WeakMap(), w = new WeakMap(), C = new WeakMap(), S = new WeakMap(), _ = new WeakMap();
184
- customElements.get("e-popover-button") || customElements.define("e-popover-button", j);
198
+ r = new WeakMap(), x = new WeakMap(), A = new WeakMap(), H = new WeakMap(), M = new WeakMap();
199
+ customElements.get("e-popover-button") || customElements.define("e-popover-button", J);
185
200
  export {
186
- j as PopoverButtonElement,
187
- O as PopoverElement
201
+ J as PopoverButtonElement,
202
+ $ as PopoverElement
188
203
  };