aptechka 0.37.0 → 0.37.2

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,7 +5,7 @@ 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 F } from "./polyfills-CxfUK5OU.js";
9
9
  import { ticker as O } from "./ticker/vanilla/index.js";
10
10
  import { TICK_ORDER as N } from "./order/index.js";
11
11
  var f, d, A, l, b, s, n, m, c, g, M, R, x;
@@ -1 +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;
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-BANSrI_m.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;
@@ -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-BANSrI_m.cjs"),B=require("./Animation-DgE_dc5D.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;
@@ -16,8 +16,8 @@ var f = (s, e, t) => e in s ? v(s, e, { enumerable: !0, configurable: !0, writab
16
16
  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
- import { n as u, p as F } from "./polyfills-X6KXuHg-.js";
20
- import { A as q } from "./Animation-DN95L7Xo.js";
19
+ import { n as u, p as F } from "./polyfills-CxfUK5OU.js";
20
+ import { A as q } from "./Animation-DRQRcOQg.js";
21
21
  var i, h;
22
22
  class j extends q {
23
23
  constructor(t, r) {
@@ -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,a,e)=>a in i?y(i,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[a]=e,g=(i,a)=>{for(var e in a||(a={}))w.call(a,e)&&m(i,e,a[e]);if(h)for(var e of h(a))S.call(a,e)&&m(i,e,a[e]);return i},f=(i,a)=>O(i,b(a));var A=(i,a,e)=>a.has(i)||d("Cannot "+e);var s=(i,a,e)=>(A(i,a,"read from private field"),e?e.call(i):a.get(i)),l=(i,a,e)=>a.has(i)?d("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(i):a.set(i,e),c=(i,a,e,r)=>(A(i,a,"write to private field"),r?r.call(i,e):a.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 n,t;class z extends x.Animation{constructor(e,r){super(e||0,r);l(this,n,u.linear);l(this,t,1e3);this.updateOptions(f(g({},r),{equalize:!0}))}updateOptions(e){super.updateOptions(e),c(this,n,typeof(e==null?void 0:e.easing)=="function"?e.easing:typeof(e==null?void 0:e.easing)=="string"&&u.easings[e.easing]||u.linear),c(this,t,(e==null?void 0:e.duration)===!1?0:q.nullishCoalescing(e==null?void 0:e.duration,s(this,t)))}handleAnimationFrame(e){const r=e.timeElapsedSinceSubscription/1e3/(s(this,t)/1e3)||0,F=s(this,n).call(this,T.clamp(r,0,1));this.current=q.preciseNumber(this.from+(this.target-this.from)*F,6),r>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,t=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,a,e)=>a in i?y(i,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[a]=e,g=(i,a)=>{for(var e in a||(a={}))w.call(a,e)&&m(i,e,a[e]);if(h)for(var e of h(a))S.call(a,e)&&m(i,e,a[e]);return i},f=(i,a)=>O(i,b(a));var A=(i,a,e)=>a.has(i)||d("Cannot "+e);var s=(i,a,e)=>(A(i,a,"read from private field"),e?e.call(i):a.get(i)),l=(i,a,e)=>a.has(i)?d("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(i):a.set(i,e),c=(i,a,e,r)=>(A(i,a,"write to private field"),r?r.call(i,e):a.set(i,e),e);const u=require("./easings-GegIwET5.cjs"),T=require("./math-GDWEqu7y.cjs"),q=require("./polyfills-BANSrI_m.cjs"),x=require("./Animation-DgE_dc5D.cjs");var n,t;class z extends x.Animation{constructor(e,r){super(e||0,r);l(this,n,u.linear);l(this,t,1e3);this.updateOptions(f(g({},r),{equalize:!0}))}updateOptions(e){super.updateOptions(e),c(this,n,typeof(e==null?void 0:e.easing)=="function"?e.easing:typeof(e==null?void 0:e.easing)=="string"&&u.easings[e.easing]||u.linear),c(this,t,(e==null?void 0:e.duration)===!1?0:q.nullishCoalescing(e==null?void 0:e.duration,s(this,t)))}handleAnimationFrame(e){const r=e.timeElapsedSinceSubscription/1e3/(s(this,t)/1e3)||0,F=s(this,n).call(this,T.clamp(r,0,1));this.current=q.preciseNumber(this.from+(this.target-this.from)*F,6),r>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}}n=new WeakMap,t=new WeakMap;exports.Tweened=z;
@@ -17,8 +17,8 @@ var A = (a, r, e) => r.has(a) || f("Cannot " + e);
17
17
  var m = (a, r, e) => (A(a, r, "read from private field"), e ? e.call(a) : r.get(a)), n = (a, r, e) => r.has(a) ? f("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(a) : r.set(a, e), u = (a, r, e, i) => (A(a, r, "write to private field"), i ? i.call(a, e) : r.set(a, e), e);
18
18
  import { l as h, e as T } from "./easings-BEmRlrDd.js";
19
19
  import { c as q } from "./math-BOBiC4TN.js";
20
- import { n as w, p as z } from "./polyfills-X6KXuHg-.js";
21
- import { A as C } from "./Animation-DN95L7Xo.js";
20
+ import { n as w, p as z } from "./polyfills-CxfUK5OU.js";
21
+ import { A as C } from "./Animation-DRQRcOQg.js";
22
22
  var s, t;
23
23
  class B extends C {
24
24
  constructor(e, i) {
@@ -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-lT5myPAZ.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-DgE_dc5D.cjs"),n=require("../Damped-DbVDDRZi.cjs"),i=require("../Tweened-DEqfwKKF.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-DJzAFsVZ.js";
1
+ import { A as r } from "../Animation-DRQRcOQg.js";
2
+ import { D as m } from "../Damped-GT4z9D9j.js";
3
+ import { T as t } from "../Tweened-YkiLB0BU.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-lT5myPAZ.cjs"),_=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-CM4SCDTt.cjs"),p=require("../order/index.cjs");var R;class Y{constructor(){s(this,R,new G.Notifier)}get changeEvent(){return t(this,R)}}R=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,O,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,O).call(this)}set speed(e){i(this,g,e),t(this,f)&&k(this,w,O).call(this)}connect(){t(this,f)||(i(this,f,!0),k(this,w,O).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,O=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)*1||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*1))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,S=!1;i(this,l,0),document.documentElement.classList.add("grabbing");let K=0,N=0;_.setupDrag(L=>{t(E,M)&&t(E,M)!==t(this,o)||(K=a.x-L.x,N=a.y-L.y,this.axis==="x"?i(this,l,K):i(this,l,N),a=L,S=this.axis==="x"&&Math.abs(K)>Math.abs(N)||this.axis==="y"&&Math.abs(N)>Math.abs(K),S&&(i(E,M,t(this,o)),this.changeEvent.notify("drag",t(this,l))))},()=>{i(E,M,null),S&&!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-DEqfwKKF.cjs"),_=require("../gestures-DHLrn6Q8.cjs"),$=require("../polyfills-BANSrI_m.cjs"),p=require("../order/index.cjs");var R;class Y{constructor(){s(this,R,new G.Notifier)}get changeEvent(){return t(this,R)}}R=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,O,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,O).call(this)}set speed(e){i(this,g,e),t(this,f)&&k(this,w,O).call(this)}connect(){t(this,f)||(i(this,f,!0),k(this,w,O).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,O=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)*1||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)*1))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,S=!1;i(this,l,0),document.documentElement.classList.add("grabbing");let K=0,N=0;_.setupDrag(L=>{t(E,M)&&t(E,M)!==t(this,o)||(K=a.x-L.x,N=a.y-L.y,this.axis==="x"?i(this,l,K):i(this,l,N),a=L,S=this.axis==="x"&&Math.abs(K)>Math.abs(N)||this.axis==="y"&&Math.abs(N)>Math.abs(K),S&&(i(E,M,t(this,o)),this.changeEvent.notify("drag",t(this,l))))},()=>{i(E,M,null),S&&!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,9 +9,9 @@ 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-DJzAFsVZ.js";
12
+ import { T as Z } from "../Tweened-YkiLB0BU.js";
13
13
  import { s as $ } from "../gestures-D2Fdra_G.js";
14
- import { p } from "../polyfills-X6KXuHg-.js";
14
+ import { p } from "../polyfills-CxfUK5OU.js";
15
15
  import { TICK_ORDER as _ } from "../order/index.js";
16
16
  var O;
17
17
  class B {
@@ -1,4 +1,4 @@
1
- "use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),Yt=require("../file-EevnUtRj.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-CM4SCDTt.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=require("../style-At6aDoqG.cjs"),es=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,kt,Et,xt,Xe,Qe,Ct,Tt,Lt,zt,je,et,Rt,tt,st,Mt,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else es.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function ts(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function At(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function ss(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ss({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',is='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',$t=`<svg
1
+ "use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),Yt=require("../file-EevnUtRj.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-BANSrI_m.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=require("../style-At6aDoqG.cjs"),es=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,kt,Et,xt,Xe,Qe,Ct,Tt,Lt,zt,je,et,Rt,tt,st,Mt,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else es.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function ts(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function At(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function ss(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ss({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',is='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',$t=`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="32"
4
4
  height="32"
@@ -14,7 +14,7 @@ import { i as yt } from "../object-D6MVWB4l.js";
14
14
  import { connector as jt } from "../connector/index.js";
15
15
  import { ViewportMediaRules as es } from "../device/index.js";
16
16
  import { c as ts } from "../math-BOBiC4TN.js";
17
- import { n as St, t as ss } from "../polyfills-X6KXuHg-.js";
17
+ import { n as St, t as ss } from "../polyfills-CxfUK5OU.js";
18
18
  import { elementResizer as kt } from "../element-resizer/vanilla/index.js";
19
19
  import { g as is } from "../style-j2TwriJ_.js";
20
20
  const ns = /* @__PURE__ */ new Set([
@@ -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-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;
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-DbVDDRZi.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-Chu29wn-.js";
22
+ import { D as R } from "../Damped-GT4z9D9j.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";
@@ -0,0 +1 @@
1
+ "use strict";const o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10];function i(e,n=5){return Math.round(e*o[n])/o[n]}function u(e,n){return Math.round(e/n)*n}function c(e,n){var t;const r=((t=n.toString().split(".")[1])==null?void 0:t.length)||0;return r?+e.toFixed(r):Math.ceil(e)}function s(e,n){return e=e%n,e=e<0?n+e:e,e}function p(e,n){return typeof e=="undefined"?n:e}exports.loopNumber=s;exports.nullishCoalescing=p;exports.preciseNumber=i;exports.roundNumberTo=u;exports.toStep=c;
@@ -0,0 +1,37 @@
1
+ const o = [
2
+ 1,
3
+ 10,
4
+ 100,
5
+ 1e3,
6
+ 1e4,
7
+ 1e5,
8
+ 1e6,
9
+ 1e7,
10
+ 1e8,
11
+ 1e9,
12
+ 1e10
13
+ ];
14
+ function i(n, t = 5) {
15
+ return Math.round(n * o[t]) / o[t];
16
+ }
17
+ function s(n, t) {
18
+ return Math.round(n / t) * t;
19
+ }
20
+ function c(n, t) {
21
+ var r;
22
+ const e = ((r = t.toString().split(".")[1]) == null ? void 0 : r.length) || 0;
23
+ return e ? +n.toFixed(e) : Math.ceil(n);
24
+ }
25
+ function u(n, t) {
26
+ return n = n % t, n = n < 0 ? t + n : n, n;
27
+ }
28
+ function f(n, t) {
29
+ return typeof n == "undefined" ? t : n;
30
+ }
31
+ export {
32
+ u as l,
33
+ f as n,
34
+ i as p,
35
+ s as r,
36
+ c as t
37
+ };
@@ -1 +1 @@
1
- "use strict";var G=n=>{throw TypeError(n)};var N=(n,c,t)=>c.has(n)||G("Cannot "+t);var e=(n,c,t)=>(N(n,c,"read from private field"),t?t.call(n):c.get(n)),s=(n,c,t)=>c.has(n)?G("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,t),i=(n,c,t,h)=>(N(n,c,"write to private field"),h?h.call(n,t):c.set(n,t),t),b=(n,c,t)=>(N(n,c,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../css-property/index.cjs"),V=require("../Store-CDb6RMce.cjs"),I=require("../events-KVanG9sR.cjs"),X=require("../function-MthRj-GJ.cjs"),Y=require("../style-At6aDoqG.cjs"),J=require("../window-resizer/vanilla/index.cjs"),Z=require("../browser-CpzFX2xg.cjs");var A,d,q,w,p,g,u,v,m,f,y,S,l,K,T,D,k,j,C,_,M,x,U;const a=class a extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,A);s(this,d);s(this,q);s(this,w);s(this,p);s(this,g);s(this,u);s(this,v);s(this,m);s(this,f);s(this,y);s(this,S);s(this,T);s(this,k);s(this,C);s(this,_);s(this,M);s(this,x);i(this,A,-1),i(this,d,new V.Store(!1)),i(this,p,new E.CSSProperty(this,"--history",!1)),i(this,g,new E.CSSProperty(this,"--restore",!1)),i(this,u,new E.CSSProperty(this,"--dominance",0)),i(this,v,new E.CSSProperty(this,"--group","")),i(this,m,new E.CSSProperty(this,"--click-outside",!1)),i(this,f,new E.CSSProperty(this,"--escape",!1)),i(this,y,!1),this.open=t=>{if(e(this,d).current)return;i(this,S,t==null?void 0:t.trigger),e(this,d).current=!0,e(this,u).current&&(a.__opened=a.__opened.filter(o=>o!==this&&b(this,l,U).call(this,this,o)?(o.close(),!1):!0)),a.__opened.push(this),i(this,A,a.__opened.length-1),e(this,p).current&&e(this,y)&&history.pushState("","",e(this,l,K)),clearTimeout(e(this,q)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",I.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,S)}});const h=()=>{addEventListener("click",e(this,T)),addEventListener("keydown",e(this,k)),e(this,x).call(this),this.style.opacity="1",this.classList.add("opened"),I.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,S)}}),i(this,w,void 0)};t!=null&&t.skipTransition?h():i(this,w,setTimeout(h,10))},this.close=()=>{e(this,d).current&&(removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,k)),e(this,d).current=!1,a.__opened=a.__opened.filter(t=>t===this?!1:!e(t,w)&&b(this,l,U).call(this,this,t)?(t.close(),!1):!0),b(this,l,D).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",I.dispatchEvent(this,"popoverClosing",{custom:!0}),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",I.dispatchEvent(this,"popoverClosed",{custom:!0})},Y.getElementTransitionDurationMS(this)+10))},i(this,T,t=>{e(this,m).current&&b(this,l,j).call(this,()=>{var W;const h=t.composedPath();if(h.find(F=>F instanceof HTMLElement&&F.hasAttribute("data-popover-content")))return;const o=h[0],$=o instanceof HTMLElement&&(this.contains(o)||((W=this.shadowRoot)==null?void 0:W.contains(o))),P=o instanceof HTMLElement&&o.hasAttribute("data-outside");(!$||P)&&this.close()})}),i(this,k,t=>{e(this,f).current&&b(this,l,j).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,C,()=>{i(this,y,!1),e(this,d).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,d).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),i(this,y,!0)}),i(this,_,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,M).call(this)}),i(this,M,X.debounce(()=>{e(this,x).call(this)},10)),i(this,x,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,p)}get restore(){return e(this,g)}get dominance(){return e(this,u)}get group(){return e(this,v)}get clickOutside(){return e(this,m)}get escape(){return e(this,f)}get opened(){return e(this,d)}get lastTrigger(){return e(this,S)}connectedCallback(){e(this,p).observe(),e(this,g).observe(),e(this,u).observe(),e(this,v).observe(),e(this,m).observe(),e(this,f).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,C)),setTimeout(()=>{e(this,g).current?e(this,C).call(this):(b(this,l,D).call(this),i(this,y,!0))},0),J.windowResizer.subscribe(e(this,_))}disconnectedCallback(){J.windowResizer.unsubscribe(e(this,_)),e(this,p).close(),e(this,g).close(),e(this,u).close(),e(this,v).close(),e(this,m).close(),e(this,f).close(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),a.__opened=a.__opened.filter(t=>t!==this),clearTimeout(e(this,q)),clearTimeout(e(this,w)),removeEventListener("popstate",e(this,C)),removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,k)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height")}};A=new WeakMap,d=new WeakMap,q=new WeakMap,w=new WeakMap,p=new WeakMap,g=new WeakMap,u=new WeakMap,v=new WeakMap,m=new WeakMap,f=new WeakMap,y=new WeakMap,S=new WeakMap,l=new WeakSet,K=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},T=new WeakMap,D=function(){if(e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},k=new WeakMap,j=function(t){(a.__opened[e(this,A)-1]||a.__opened.length===1||a.__opened.filter(h=>h!==this).every(h=>e(this,u).current>h.dominance.current))&&t()},C=new WeakMap,_=new WeakMap,M=new WeakMap,x=new WeakMap,U=function(t,h){if(e(t,v).current===e(h,v).current&&t.dominance.current>=h.dominance.current)return!0},a.__opened=[];let B=a;customElements.get("e-popover")||customElements.define("e-popover",B);var r,L,O,R,H,z;class Q extends HTMLElement{constructor(){super();s(this,r);s(this,L,new E.CSSProperty(this,"--type","open"));s(this,O,()=>{this.classList.add("triggered")});s(this,R,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});s(this,H,()=>{this.classList.remove("opened")});s(this,z,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});Z.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=e(this,L).current;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 type(){return e(this,L)}get popoverElement(){return e(this,r)}connectedCallback(){var h;e(this,L).subscribe(o=>{e(this,r)&&(o.current!=="close"?(this.setAttribute("aria-has-popup","true"),this.setAttribute("aria-expanded",e(this,r).opened.current?"true":"false"),this.setAttribute("aria-controls",e(this,r).id||"")):(this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let o=null;if(t==="parent"){const $=this.closest("[popover-target]");if($)o=$;else{const P=this.getRootNode();P instanceof ShadowRoot?o=P.host.closest("[popover-target]"):P instanceof HTMLElement&&(o=P.closest("[popover-target]"))}}else t==="sibling"?o=(h=this.parentElement)==null?void 0:h.querySelector("[popover-target]"):o=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);o instanceof HTMLElement?(i(this,r,o),e(this,r).addEventListener("popoverTriggered",e(this,O)),e(this,r).addEventListener("popoverOpened",e(this,R)),e(this,r).addEventListener("popoverClosing",e(this,H)),e(this,r).addEventListener("popoverClosed",e(this,z))):console.warn(this,`target ${t} not found`)}e(this,L).observe()}disconnectedCallback(){e(this,L).unobserve(),this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,O)),e(this,r).removeEventListener("popoverOpened",e(this,R)),e(this,r).removeEventListener("popoverClosing",e(this,H)),e(this,r).removeEventListener("popoverClosed",e(this,z)))}}r=new WeakMap,L=new WeakMap,O=new WeakMap,R=new WeakMap,H=new WeakMap,z=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",Q);exports.PopoverButtonElement=Q;exports.PopoverElement=B;
1
+ "use strict";var G=h=>{throw TypeError(h)};var N=(h,c,t)=>c.has(h)||G("Cannot "+t);var e=(h,c,t)=>(N(h,c,"read from private field"),t?t.call(h):c.get(h)),s=(h,c,t)=>c.has(h)?G("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(h):c.set(h,t),i=(h,c,t,o)=>(N(h,c,"write to private field"),o?o.call(h,t):c.set(h,t),t),b=(h,c,t)=>(N(h,c,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../css-property/index.cjs"),V=require("../Store-CDb6RMce.cjs"),I=require("../events-KVanG9sR.cjs"),X=require("../function-MthRj-GJ.cjs"),Y=require("../style-At6aDoqG.cjs"),J=require("../window-resizer/vanilla/index.cjs"),Z=require("../browser-CpzFX2xg.cjs");var A,d,q,w,p,g,v,u,m,f,y,S,l,K,T,D,k,j,C,_,M,x,U;const a=class a extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,A);s(this,d);s(this,q);s(this,w);s(this,p);s(this,g);s(this,v);s(this,u);s(this,m);s(this,f);s(this,y);s(this,S);s(this,T);s(this,k);s(this,C);s(this,_);s(this,M);s(this,x);i(this,A,-1),i(this,d,new V.Store(!1)),i(this,p,new E.CSSProperty(this,"--history",!1)),i(this,g,new E.CSSProperty(this,"--restore",!1)),i(this,v,new E.CSSProperty(this,"--dominance",0)),i(this,u,new E.CSSProperty(this,"--group","")),i(this,m,new E.CSSProperty(this,"--click-outside",!1)),i(this,f,new E.CSSProperty(this,"--escape",!1)),i(this,y,!1),this.open=t=>{if(e(this,d).current)return;i(this,S,t==null?void 0:t.trigger),e(this,d).current=!0,e(this,v).current&&(a.__opened=a.__opened.filter(n=>n!==this&&b(this,l,U).call(this,this,n)?(n.close(),!1):!0)),a.__opened.push(this),i(this,A,a.__opened.length-1),e(this,p).current&&e(this,y)&&history.pushState("","",e(this,l,K)),clearTimeout(e(this,q)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",I.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,S)}});const o=()=>{addEventListener("click",e(this,T)),addEventListener("keydown",e(this,k)),e(this,x).call(this),this.style.opacity="1",this.classList.add("opened"),I.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,S)}}),i(this,w,void 0)};t!=null&&t.skipTransition?o():i(this,w,setTimeout(o,10))},this.close=()=>{e(this,d).current&&(removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,k)),e(this,d).current=!1,a.__opened=a.__opened.filter(t=>t===this?!1:!e(t,w)&&b(this,l,U).call(this,this,t)?(t.close(),!1):!0),b(this,l,D).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.style.opacity="0",I.dispatchEvent(this,"popoverClosing",{custom:!0}),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",I.dispatchEvent(this,"popoverClosed",{custom:!0})},Y.getElementTransitionDurationMS(this)+10))},i(this,T,t=>{e(this,m).current&&b(this,l,j).call(this,()=>{var W;const o=t.composedPath();if(o.find(F=>F instanceof HTMLElement&&F.hasAttribute("data-popover-content")))return;const n=o[0],$=n instanceof HTMLElement&&(this.contains(n)||((W=this.shadowRoot)==null?void 0:W.contains(n))),P=n instanceof HTMLElement&&n.hasAttribute("data-outside");(!$||P)&&this.close()})}),i(this,k,t=>{e(this,f).current&&b(this,l,j).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,C,()=>{i(this,y,!1),e(this,d).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,d).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),i(this,y,!0)}),i(this,_,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,M).call(this)}),i(this,M,X.debounce(()=>{e(this,x).call(this)},10)),i(this,x,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,p)}get restore(){return e(this,g)}get dominance(){return e(this,v)}get group(){return e(this,u)}get clickOutside(){return e(this,m)}get escape(){return e(this,f)}get opened(){return e(this,d)}get lastTrigger(){return e(this,S)}connectedCallback(){e(this,p).observe(),e(this,g).observe(),e(this,v).observe(),e(this,u).observe(),e(this,m).observe(),e(this,f).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,C)),setTimeout(()=>{e(this,g).current?e(this,C).call(this):(b(this,l,D).call(this),i(this,y,!0))},0),J.windowResizer.subscribe(e(this,_))}disconnectedCallback(){J.windowResizer.unsubscribe(e(this,_)),e(this,p).close(),e(this,g).close(),e(this,v).close(),e(this,u).close(),e(this,m).close(),e(this,f).close(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),a.__opened=a.__opened.filter(t=>t!==this),clearTimeout(e(this,q)),clearTimeout(e(this,w)),removeEventListener("popstate",e(this,C)),removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,k)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height")}};A=new WeakMap,d=new WeakMap,q=new WeakMap,w=new WeakMap,p=new WeakMap,g=new WeakMap,v=new WeakMap,u=new WeakMap,m=new WeakMap,f=new WeakMap,y=new WeakMap,S=new WeakMap,l=new WeakSet,K=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},T=new WeakMap,D=function(){if(e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}},k=new WeakMap,j=function(t){(a.__opened[e(this,A)-1]||a.__opened.length===1||a.__opened.filter(o=>o!==this).every(o=>e(this,v).current>o.dominance.current))&&t()},C=new WeakMap,_=new WeakMap,M=new WeakMap,x=new WeakMap,U=function(t,o){if(console.log(e(t,u).current,e(o,u).current),e(t,u).current===e(o,u).current&&t.dominance.current>=o.dominance.current)return!0},a.__opened=[];let B=a;customElements.get("e-popover")||customElements.define("e-popover",B);var r,L,O,R,H,z;class Q extends HTMLElement{constructor(){super();s(this,r);s(this,L,new E.CSSProperty(this,"--type","open"));s(this,O,()=>{this.classList.add("triggered")});s(this,R,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});s(this,H,()=>{this.classList.remove("opened")});s(this,z,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});Z.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=e(this,L).current;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 type(){return e(this,L)}get popoverElement(){return e(this,r)}connectedCallback(){var o;e(this,L).subscribe(n=>{e(this,r)&&(n.current!=="close"?(this.setAttribute("aria-has-popup","true"),this.setAttribute("aria-expanded",e(this,r).opened.current?"true":"false"),this.setAttribute("aria-controls",e(this,r).id||"")):(this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let n=null;if(t==="parent"){const $=this.closest("[popover-target]");if($)n=$;else{const P=this.getRootNode();P instanceof ShadowRoot?n=P.host.closest("[popover-target]"):P instanceof HTMLElement&&(n=P.closest("[popover-target]"))}}else t==="sibling"?n=(o=this.parentElement)==null?void 0:o.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,O)),e(this,r).addEventListener("popoverOpened",e(this,R)),e(this,r).addEventListener("popoverClosing",e(this,H)),e(this,r).addEventListener("popoverClosed",e(this,z))):console.warn(this,`target ${t} not found`)}e(this,L).observe()}disconnectedCallback(){e(this,L).unobserve(),this.removeAttribute("aria-has-popup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,O)),e(this,r).removeEventListener("popoverOpened",e(this,R)),e(this,r).removeEventListener("popoverClosing",e(this,H)),e(this,r).removeEventListener("popoverClosed",e(this,z)))}}r=new WeakMap,L=new WeakMap,O=new WeakMap,R=new WeakMap,H=new WeakMap,z=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",Q);exports.PopoverButtonElement=Q;exports.PopoverElement=B;
@@ -1,8 +1,8 @@
1
- var G = (n) => {
2
- throw TypeError(n);
1
+ var G = (h) => {
2
+ throw TypeError(h);
3
3
  };
4
- var N = (n, c, t) => c.has(n) || G("Cannot " + t);
5
- var e = (n, c, t) => (N(n, c, "read from private field"), t ? t.call(n) : c.get(n)), s = (n, c, t) => c.has(n) ? G("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(n) : c.set(n, t), i = (n, c, t, h) => (N(n, c, "write to private field"), h ? h.call(n, t) : c.set(n, t), t), b = (n, c, t) => (N(n, c, "access private method"), t);
4
+ var N = (h, c, t) => c.has(h) || G("Cannot " + t);
5
+ var e = (h, c, t) => (N(h, c, "read from private field"), t ? t.call(h) : c.get(h)), s = (h, c, t) => c.has(h) ? G("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(h) : c.set(h, t), i = (h, c, t, o) => (N(h, c, "write to private field"), o ? o.call(h, t) : c.set(h, t), t), b = (h, c, t) => (N(h, c, "access private method"), t);
6
6
  import { CSSProperty as E } from "../css-property/index.js";
7
7
  import { S as Q } from "../Store-OTdcl6SX.js";
8
8
  import { d as q } from "../events-CsVF98U6.js";
@@ -10,7 +10,7 @@ import { d as V } from "../function-C10DGppn.js";
10
10
  import { g as X } from "../style-j2TwriJ_.js";
11
11
  import { windowResizer as J } from "../window-resizer/vanilla/index.js";
12
12
  import { i as Y } from "../browser-0zX67oeU.js";
13
- var C, d, H, T, p, g, u, v, m, f, L, w, l, K, k, D, A, U, S, _, M, P, W;
13
+ var C, d, H, T, p, v, g, u, m, f, L, w, l, K, k, D, A, U, S, _, M, P, W;
14
14
  const a = class a extends HTMLElement {
15
15
  constructor() {
16
16
  super(...arguments);
@@ -20,9 +20,9 @@ const a = class a extends HTMLElement {
20
20
  s(this, H);
21
21
  s(this, T);
22
22
  s(this, p);
23
+ s(this, v);
23
24
  s(this, g);
24
25
  s(this, u);
25
- s(this, v);
26
26
  s(this, m);
27
27
  s(this, f);
28
28
  s(this, L);
@@ -33,16 +33,16 @@ const a = class a extends HTMLElement {
33
33
  s(this, _);
34
34
  s(this, M);
35
35
  s(this, P);
36
- i(this, C, -1), i(this, d, new Q(!1)), i(this, p, new E(this, "--history", !1)), i(this, g, new E(this, "--restore", !1)), i(this, u, new E(this, "--dominance", 0)), i(this, v, new E(this, "--group", "")), i(this, m, new E(this, "--click-outside", !1)), i(this, f, new E(this, "--escape", !1)), i(this, L, !1), this.open = (t) => {
36
+ i(this, C, -1), i(this, d, new Q(!1)), i(this, p, new E(this, "--history", !1)), i(this, v, new E(this, "--restore", !1)), i(this, g, new E(this, "--dominance", 0)), i(this, u, new E(this, "--group", "")), i(this, m, new E(this, "--click-outside", !1)), i(this, f, new E(this, "--escape", !1)), i(this, L, !1), this.open = (t) => {
37
37
  if (e(this, d).current)
38
38
  return;
39
- i(this, w, t == null ? void 0 : t.trigger), e(this, d).current = !0, e(this, u).current && (a.__opened = a.__opened.filter((o) => o !== this && b(this, l, W).call(this, this, o) ? (o.close(), !1) : !0)), a.__opened.push(this), i(this, C, a.__opened.length - 1), e(this, p).current && e(this, L) && history.pushState("", "", e(this, l, K)), clearTimeout(e(this, H)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", q(this, "popoverTriggered", {
39
+ i(this, w, t == null ? void 0 : t.trigger), e(this, d).current = !0, e(this, g).current && (a.__opened = a.__opened.filter((n) => n !== this && b(this, l, W).call(this, this, n) ? (n.close(), !1) : !0)), a.__opened.push(this), i(this, C, a.__opened.length - 1), e(this, p).current && e(this, L) && history.pushState("", "", e(this, l, K)), clearTimeout(e(this, H)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", q(this, "popoverTriggered", {
40
40
  custom: !0,
41
41
  detail: {
42
42
  trigger: e(this, w)
43
43
  }
44
44
  });
45
- const h = () => {
45
+ const o = () => {
46
46
  addEventListener("click", e(this, k)), addEventListener("keydown", e(this, A)), e(this, P).call(this), this.style.opacity = "1", this.classList.add("opened"), q(this, "popoverOpened", {
47
47
  custom: !0,
48
48
  detail: {
@@ -50,7 +50,7 @@ const a = class a extends HTMLElement {
50
50
  }
51
51
  }), i(this, T, void 0);
52
52
  };
53
- t != null && t.skipTransition ? h() : i(this, T, setTimeout(h, 10));
53
+ t != null && t.skipTransition ? o() : i(this, T, setTimeout(o, 10));
54
54
  }, this.close = () => {
55
55
  e(this, d).current && (removeEventListener("click", e(this, k)), removeEventListener("keydown", e(this, A)), e(this, d).current = !1, a.__opened = a.__opened.filter((t) => t === this ? !1 : !e(t, T) && b(this, l, W).call(this, this, t) ? (t.close(), !1) : !0), b(this, l, D).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.style.opacity = "0", q(this, "popoverClosing", {
56
56
  custom: !0
@@ -62,12 +62,12 @@ const a = class a extends HTMLElement {
62
62
  }, i(this, k, (t) => {
63
63
  e(this, m).current && b(this, l, U).call(this, () => {
64
64
  var j;
65
- const h = t.composedPath();
66
- if (h.find(
65
+ const o = t.composedPath();
66
+ if (o.find(
67
67
  (F) => F instanceof HTMLElement && F.hasAttribute("data-popover-content")
68
68
  ))
69
69
  return;
70
- const o = h[0], z = o instanceof HTMLElement && (this.contains(o) || ((j = this.shadowRoot) == null ? void 0 : j.contains(o))), x = o instanceof HTMLElement && o.hasAttribute("data-outside");
70
+ const n = o[0], z = n instanceof HTMLElement && (this.contains(n) || ((j = this.shadowRoot) == null ? void 0 : j.contains(n))), x = n instanceof HTMLElement && n.hasAttribute("data-outside");
71
71
  (!z || x) && this.close();
72
72
  });
73
73
  }), i(this, A, (t) => {
@@ -88,13 +88,13 @@ const a = class a extends HTMLElement {
88
88
  return e(this, p);
89
89
  }
90
90
  get restore() {
91
- return e(this, g);
91
+ return e(this, v);
92
92
  }
93
93
  get dominance() {
94
- return e(this, u);
94
+ return e(this, g);
95
95
  }
96
96
  get group() {
97
- return e(this, v);
97
+ return e(this, u);
98
98
  }
99
99
  get clickOutside() {
100
100
  return e(this, m);
@@ -109,15 +109,15 @@ const a = class a extends HTMLElement {
109
109
  return e(this, w);
110
110
  }
111
111
  connectedCallback() {
112
- e(this, p).observe(), e(this, g).observe(), e(this, u).observe(), e(this, v).observe(), e(this, m).observe(), e(this, f).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, S)), setTimeout(() => {
113
- e(this, g).current ? e(this, S).call(this) : (b(this, l, D).call(this), i(this, L, !0));
112
+ e(this, p).observe(), e(this, v).observe(), e(this, g).observe(), e(this, u).observe(), e(this, m).observe(), e(this, f).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, S)), setTimeout(() => {
113
+ e(this, v).current ? e(this, S).call(this) : (b(this, l, D).call(this), i(this, L, !0));
114
114
  }, 0), J.subscribe(e(this, _));
115
115
  }
116
116
  disconnectedCallback() {
117
- J.unsubscribe(e(this, _)), e(this, p).close(), e(this, g).close(), e(this, u).close(), e(this, v).close(), e(this, m).close(), e(this, f).close(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), a.__opened = a.__opened.filter((t) => t !== this), clearTimeout(e(this, H)), clearTimeout(e(this, T)), removeEventListener("popstate", e(this, S)), removeEventListener("click", e(this, k)), removeEventListener("keydown", e(this, A)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height");
117
+ J.unsubscribe(e(this, _)), e(this, p).close(), e(this, v).close(), e(this, g).close(), e(this, u).close(), e(this, m).close(), e(this, f).close(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), a.__opened = a.__opened.filter((t) => t !== this), clearTimeout(e(this, H)), clearTimeout(e(this, T)), removeEventListener("popstate", e(this, S)), removeEventListener("click", e(this, k)), removeEventListener("keydown", e(this, A)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height");
118
118
  }
119
119
  };
120
- C = new WeakMap(), d = new WeakMap(), H = new WeakMap(), T = new WeakMap(), p = new WeakMap(), g = new WeakMap(), u = new WeakMap(), v = new WeakMap(), m = new WeakMap(), f = new WeakMap(), L = new WeakMap(), w = new WeakMap(), l = new WeakSet(), K = function() {
120
+ C = new WeakMap(), d = new WeakMap(), H = new WeakMap(), T = new WeakMap(), p = new WeakMap(), v = new WeakMap(), g = new WeakMap(), u = new WeakMap(), m = new WeakMap(), f = new WeakMap(), L = new WeakMap(), w = new WeakMap(), l = new WeakSet(), K = function() {
121
121
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
122
122
  }, k = new WeakMap(), D = function() {
123
123
  if (e(this, p).current) {
@@ -125,9 +125,9 @@ C = new WeakMap(), d = new WeakMap(), H = new WeakMap(), T = new WeakMap(), p =
125
125
  t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
126
126
  }
127
127
  }, A = new WeakMap(), U = function(t) {
128
- (a.__opened[e(this, C) - 1] || a.__opened.length === 1 || a.__opened.filter((h) => h !== this).every((h) => e(this, u).current > h.dominance.current)) && t();
129
- }, S = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), P = new WeakMap(), W = function(t, h) {
130
- if (e(t, v).current === e(h, v).current && t.dominance.current >= h.dominance.current)
128
+ (a.__opened[e(this, C) - 1] || a.__opened.length === 1 || a.__opened.filter((o) => o !== this).every((o) => e(this, g).current > o.dominance.current)) && t();
129
+ }, S = new WeakMap(), _ = new WeakMap(), M = new WeakMap(), P = new WeakMap(), W = function(t, o) {
130
+ if (console.log(e(t, u).current, e(o, u).current), e(t, u).current === e(o, u).current && t.dominance.current >= o.dominance.current)
131
131
  return !0;
132
132
  }, a.__opened = [];
133
133
  let B = a;
@@ -166,26 +166,26 @@ class Z extends HTMLElement {
166
166
  return e(this, r);
167
167
  }
168
168
  connectedCallback() {
169
- var h;
170
- e(this, y).subscribe((o) => {
171
- e(this, r) && (o.current !== "close" ? (this.setAttribute("aria-has-popup", "true"), this.setAttribute(
169
+ var o;
170
+ e(this, y).subscribe((n) => {
171
+ e(this, r) && (n.current !== "close" ? (this.setAttribute("aria-has-popup", "true"), this.setAttribute(
172
172
  "aria-expanded",
173
173
  e(this, r).opened.current ? "true" : "false"
174
174
  ), this.setAttribute("aria-controls", e(this, r).id || "")) : (this.removeAttribute("aria-has-popup"), this.removeAttribute("aria-expanded"), this.removeAttribute("aria-controls")));
175
175
  }), this.hasAttribute("tabindex") || (this.tabIndex = 0);
176
176
  const t = this.getAttribute("target");
177
177
  if (t) {
178
- let o = null;
178
+ let n = null;
179
179
  if (t === "parent") {
180
180
  const z = this.closest("[popover-target]");
181
181
  if (z)
182
- o = z;
182
+ n = z;
183
183
  else {
184
184
  const x = this.getRootNode();
185
- x instanceof ShadowRoot ? o = x.host.closest("[popover-target]") : x instanceof HTMLElement && (o = x.closest("[popover-target]"));
185
+ x instanceof ShadowRoot ? n = x.host.closest("[popover-target]") : x instanceof HTMLElement && (n = x.closest("[popover-target]"));
186
186
  }
187
- } else t === "sibling" ? o = (h = this.parentElement) == null ? void 0 : h.querySelector("[popover-target]") : o = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
188
- o instanceof HTMLElement ? (i(this, r, o), e(this, r).addEventListener(
187
+ } else t === "sibling" ? n = (o = this.parentElement) == null ? void 0 : o.querySelector("[popover-target]") : n = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
188
+ n instanceof HTMLElement ? (i(this, r, n), e(this, r).addEventListener(
189
189
  "popoverTriggered",
190
190
  e(this, O)
191
191
  ), e(this, r).addEventListener(