aptechka 0.88.0 → 0.88.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/lib/Animation-BGpgWWgS.cjs +1 -0
  2. package/lib/{Animation-BUD5w3AB.js → Animation-CSofkIFz.js} +15 -9
  3. package/lib/{Composed-BI5oe4Ij.cjs → Composed-DO9sJgZQ.cjs} +1 -1
  4. package/lib/{Composed-BaevH-MP.js → Composed-Uq5ADyUF.js} +1 -1
  5. package/lib/{Damped-BHm2IuyN.cjs → Damped-C3R5LGcL.cjs} +1 -1
  6. package/lib/{Damped-Ds17AUU-.js → Damped-CInILmq-.js} +1 -1
  7. package/lib/{DerivedArray-C1gHUvCT.js → DerivedArray-CcS3cOIY.js} +1 -1
  8. package/lib/{DerivedArray-CiMrwSDt.cjs → DerivedArray-DTrXDt04.cjs} +1 -1
  9. package/lib/{DragControls-BNaevZBQ.js → DragControls-DL5Iteu5.js} +3 -3
  10. package/lib/{DragControls-XC4E7seK.cjs → DragControls-WuHf9pRX.cjs} +1 -1
  11. package/lib/{SourceElement-DNyrQby1.cjs → SourceElement-Bsp3SG7N.cjs} +1 -1
  12. package/lib/{SourceElement-DC726HMy.js → SourceElement-C5Yo94tp.js} +2 -2
  13. package/lib/{Store-BRTHeZmO.js → Store-B2Y_0Tw9.js} +1 -1
  14. package/lib/{Store-DZnOrofs.cjs → Store-ClBpeYgL.cjs} +1 -1
  15. package/lib/{Tweened-3UYSwrvs.cjs → Tweened--qNhMQ8U.cjs} +1 -1
  16. package/lib/{Tweened-C1FsHjhN.js → Tweened-CSPu3mVO.js} +4 -4
  17. package/lib/{Viewport-D26fEJOk.cjs → Viewport-BXCUex5k.cjs} +1 -1
  18. package/lib/{Viewport-0n1C_IoN.js → Viewport-D5edy_zd.js} +1 -1
  19. package/lib/animation/Animation.d.ts +1 -0
  20. package/lib/animation/Tweened.d.ts +1 -1
  21. package/lib/animation/index.cjs +1 -1
  22. package/lib/animation/index.js +3 -3
  23. package/lib/attribute/index.cjs +1 -1
  24. package/lib/attribute/index.js +1 -1
  25. package/lib/canvas/index.cjs +1 -1
  26. package/lib/canvas/index.js +1 -1
  27. package/lib/color/Color.d.ts +22 -4
  28. package/lib/color/index.cjs +1 -1
  29. package/lib/color/index.js +35 -23
  30. package/lib/controls/index.cjs +1 -1
  31. package/lib/controls/index.js +1 -1
  32. package/lib/css-property/index.cjs +1 -1
  33. package/lib/css-property/index.js +1 -1
  34. package/lib/css-value-parser/index.cjs +1 -1
  35. package/lib/css-value-parser/index.js +1 -1
  36. package/lib/dev/index.cjs +1 -1
  37. package/lib/dev/index.js +1 -1
  38. package/lib/device/index.cjs +1 -1
  39. package/lib/device/index.js +1 -1
  40. package/lib/{easings-DE1AUrbN.js → easings-B5flyl-V.js} +13 -14
  41. package/lib/{easings-BWq0pPLq.cjs → easings-YkfoM7J2.cjs} +1 -1
  42. package/lib/element-linked-store/index.cjs +1 -1
  43. package/lib/element-linked-store/index.js +1 -1
  44. package/lib/iframe/index.cjs +1 -1
  45. package/lib/iframe/index.js +2 -2
  46. package/lib/image/index.cjs +1 -1
  47. package/lib/image/index.js +3 -3
  48. package/lib/jsx/index.cjs +1 -1
  49. package/lib/jsx/index.js +8 -8
  50. package/lib/ladder/index.cjs +1 -1
  51. package/lib/ladder/index.js +1 -1
  52. package/lib/masonry-layout/index.cjs +1 -1
  53. package/lib/masonry-layout/index.js +1 -1
  54. package/lib/media/index.cjs +1 -1
  55. package/lib/media/index.js +1 -1
  56. package/lib/morph/index.cjs +1 -1
  57. package/lib/morph/index.js +2 -2
  58. package/lib/need_redo_tweaker/index.cjs +1 -1
  59. package/lib/need_redo_tweaker/index.js +3 -3
  60. package/lib/notched/index.cjs +1 -1
  61. package/lib/notched/index.js +1 -1
  62. package/lib/pixel-perfect/index.cjs +1 -1
  63. package/lib/pixel-perfect/index.js +1 -1
  64. package/lib/pointer/index.cjs +1 -1
  65. package/lib/pointer/index.js +2 -2
  66. package/lib/popover/index.cjs +1 -1
  67. package/lib/popover/index.js +1 -1
  68. package/lib/{render-R8P4qkHo.cjs → render-CS4sSmHy.cjs} +1 -1
  69. package/lib/{render-DHKcgkoZ.js → render-DMAVQ_JX.js} +3 -3
  70. package/lib/router/index.cjs +1 -1
  71. package/lib/router/index.js +1 -1
  72. package/lib/scroll/index.cjs +1 -1
  73. package/lib/scroll/index.js +8 -8
  74. package/lib/{scroll-CHhF7Put.js → scroll-CB2aFkff.js} +0 -4
  75. package/lib/scroll-Cut0Rc1_.cjs +1 -0
  76. package/lib/scroll-kit/index.cjs +1 -1
  77. package/lib/scroll-kit/index.js +42 -13
  78. package/lib/sequence/index.cjs +1 -1
  79. package/lib/sequence/index.js +2 -2
  80. package/lib/source/index.cjs +1 -1
  81. package/lib/source/index.js +1 -1
  82. package/lib/store/index.cjs +1 -1
  83. package/lib/store/index.js +3 -3
  84. package/lib/{string-CbRNzmd9.cjs → string-Bx5N38JG.cjs} +1 -1
  85. package/lib/{string-B3lm2b7v.js → string-Ct-dy_cs.js} +6 -0
  86. package/lib/{stylesheet-xM7sMeuo.cjs → stylesheet-C0qxw7Dj.cjs} +1 -1
  87. package/lib/{stylesheet-CBTuup4f.js → stylesheet-Dlk4dsJR.js} +1 -1
  88. package/lib/utils/easings.d.ts +18 -0
  89. package/lib/utils/index.cjs +1 -1
  90. package/lib/utils/index.js +36 -22
  91. package/lib/utils/progress.d.ts +1 -0
  92. package/lib/utils/scroll.d.ts +0 -1
  93. package/lib/utils/string.d.ts +1 -0
  94. package/lib/video/index.cjs +1 -1
  95. package/lib/video/index.js +2 -2
  96. package/lib/youtube/index.cjs +1 -1
  97. package/lib/youtube/index.js +3 -3
  98. package/package.json +1 -1
  99. package/lib/Animation-BtUdarQ7.cjs +0 -1
  100. package/lib/scroll-BtUpTUwr.cjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const order_index=require("./order/index.cjs"),Store=require("./Store-ClBpeYgL.cjs"),math=require("./math-C-knY2TL.cjs"),number=require("./number-Bu4sGvW7.cjs"),polyfills=require("./polyfills-DZCuDBkA.cjs");require("construct-style-sheets-polyfill");const intersector_index=require("./index-DZ44osDT.cjs");var _maxFPS,_order,_culling,_delay,_delayTimeoutId,_isRunning,_direction,_target,_min,_max,_from,_tmpSetValue,_Animation_instances,setTarget_fn,_animationFrameListener,clearDelayTimeout_fn;const _Animation=class _Animation extends Store.Store{constructor(initial,options){super(initial||0,options);__privateAdd(this,_Animation_instances);__privateAdd(this,_maxFPS);__privateAdd(this,_order,order_index.TICK_ORDER.ANIMATION);__privateAdd(this,_culling);__privateAdd(this,_delay,0);__privateAdd(this,_delayTimeoutId,null);__privateAdd(this,_isRunning,new Store.Store(!1));__privateAdd(this,_direction,0);__privateAdd(this,_target,0);__privateAdd(this,_min,-1/0);__privateAdd(this,_max,1/0);__privateAdd(this,_from,0);__privateAdd(this,_tmpSetValue,null);__privateAdd(this,_animationFrameListener,__name(e=>{this.handleAnimationFrame(e)},"#animationFrameListener"));__privateSet(this,_target,this.current)}get direction(){return __privateGet(this,_direction)}get target(){return __privateGet(this,_target)}get min(){return __privateGet(this,_min)}set min(value){__privateSet(this,_min,value),this.set(__privateGet(this,_target),{equalize:!0})}get max(){return __privateGet(this,_max)}set max(value){__privateSet(this,_max,value),this.set(__privateGet(this,_target),{equalize:!0})}get from(){return __privateGet(this,_from)}get isRunning(){return __privateGet(this,_isRunning)}get delta(){return Math.abs(__privateGet(this,_target)-__privateGet(this,_from))}get deltaProgress(){return this.delta?number.preciseNumber(Math.abs(this.current-__privateGet(this,_from))/this.delta,6):0}get distance(){return Math.abs(__privateGet(this,_max)-__privateGet(this,_min))}get distanceProgress(){return this.distance?number.preciseNumber(Math.abs(this.current-__privateGet(this,_min))/this.distance,6):0}set(value,options){(__privateGet(this,_target)!==value||options!=null&&options.restart)&&(__privateSet(this,_tmpSetValue,value),this.updateOptions(options),__privateSet(this,_tmpSetValue,null),__privateGet(this,_target)!==this.current&&this.start())}shift(value,options){this.set(__privateGet(this,_target)+value,options)}reset(){super.reset(),__privateMethod(this,_Animation_instances,clearDelayTimeout_fn).call(this),this.set(this.initial,{equalize:!0})}close(){super.close(),__privateMethod(this,_Animation_instances,clearDelayTimeout_fn).call(this),this.reset(),this.unlistenAnimationFrame()}listenAnimationFrame(){__privateGet(this,_isRunning).current||(__privateGet(this,_isRunning).current=!0,intersector_index.ticker.subscribe(__privateGet(this,_animationFrameListener),{maxFPS:__privateGet(this,_maxFPS),order:__privateGet(this,_order),culling:__privateGet(this,_culling)}))}unlistenAnimationFrame(){__privateGet(this,_isRunning).current&&(__privateGet(this,_isRunning).current=!1,intersector_index.ticker.unsubscribe(__privateGet(this,_animationFrameListener)))}updateOptions(options){__privateSet(this,_maxFPS,polyfills.nullishCoalescing(options==null?void 0:options.maxFPS,__privateGet(this,_maxFPS))),__privateSet(this,_order,polyfills.nullishCoalescing(options==null?void 0:options.order,__privateGet(this,_order))),__privateSet(this,_culling,polyfills.nullishCoalescing(options==null?void 0:options.culling,__privateGet(this,_culling))),__privateSet(this,_min,polyfills.nullishCoalescing(options==null?void 0:options.min,__privateGet(this,_min))),__privateSet(this,_max,polyfills.nullishCoalescing(options==null?void 0:options.max,__privateGet(this,_max))),__privateSet(this,_delay,polyfills.nullishCoalescing(options==null?void 0:options.delay,__privateGet(this,_delay))),__privateMethod(this,_Animation_instances,setTarget_fn).call(this,typeof __privateGet(this,_tmpSetValue)=="number"?__privateGet(this,_tmpSetValue):__privateGet(this,_target)),options!=null&&options.equalize&&!(options!=null&&options.restart)&&(__privateMethod(this,_Animation_instances,clearDelayTimeout_fn).call(this),this.unlistenAnimationFrame(),this.current=__privateSet(this,_from,__privateGet(this,_target))),options!=null&&options.restart&&(__privateMethod(this,_Animation_instances,clearDelayTimeout_fn).call(this),this.unlistenAnimationFrame(),this.current=__privateSet(this,_from,this.initial),options!=null&&options.equalize&&(this.current=__privateSet(this,_from,__privateGet(this,_target)))),typeof(options==null?void 0:options.current)=="number"&&__privateSet(this,_from,this.current=options.current)}start(){__privateMethod(this,_Animation_instances,clearDelayTimeout_fn).call(this),__privateGet(this,_delay)>0?__privateSet(this,_delayTimeoutId,window.setTimeout(()=>{__privateSet(this,_delayTimeoutId,null),this.listenAnimationFrame()},__privateGet(this,_delay))):this.listenAnimationFrame()}};_maxFPS=new WeakMap,_order=new WeakMap,_culling=new WeakMap,_delay=new WeakMap,_delayTimeoutId=new WeakMap,_isRunning=new WeakMap,_direction=new WeakMap,_target=new WeakMap,_min=new WeakMap,_max=new WeakMap,_from=new WeakMap,_tmpSetValue=new WeakMap,_Animation_instances=new WeakSet,setTarget_fn=__name(function(value){__privateSet(this,_direction,Math.sign(value-__privateGet(this,_target))),__privateSet(this,_target,math.clamp(value,__privateGet(this,_min),__privateGet(this,_max))),__privateSet(this,_from,this.current)},"#setTarget"),_animationFrameListener=new WeakMap,clearDelayTimeout_fn=__name(function(){__privateGet(this,_delayTimeoutId)!==null&&(window.clearTimeout(__privateGet(this,_delayTimeoutId)),__privateSet(this,_delayTimeoutId,null))},"#clearDelayTimeout"),__name(_Animation,"Animation");let Animation=_Animation;exports.Animation=Animation;
@@ -5,14 +5,14 @@ var __typeError = (msg) => {
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
6
6
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
7
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
8
- import { S as Store } from "./Store-BRTHeZmO.js";
8
+ import { TICK_ORDER } from "./order/index.js";
9
+ import { S as Store } from "./Store-B2Y_0Tw9.js";
9
10
  import { c as clamp } from "./math-r8V23YFe.js";
10
11
  import { p as preciseNumber } from "./number-DiVt2xnh.js";
11
12
  import { n as nullishCoalescing } from "./polyfills-CG1XJNia.js";
12
13
  import "construct-style-sheets-polyfill";
13
14
  import { t as ticker } from "./index-ClTMVKJp.js";
14
- import { TICK_ORDER } from "./order/index.js";
15
- var _maxFPS, _order, _culling, _isRunning, _direction, _target, _min, _max, _from, _tmpSetValue, _Animation_instances, setTarget_fn, _animationFrameListener;
15
+ var _maxFPS, _order, _culling, _delay, _delayTimeoutId, _isRunning, _direction, _target, _min, _max, _from, _tmpSetValue, _Animation_instances, setTarget_fn, _animationFrameListener, clearDelayTimeout_fn;
16
16
  const _Animation = class _Animation extends Store {
17
17
  constructor(initial, options) {
18
18
  super(initial || 0, options);
@@ -20,6 +20,8 @@ const _Animation = class _Animation extends Store {
20
20
  __privateAdd(this, _maxFPS);
21
21
  __privateAdd(this, _order, TICK_ORDER.ANIMATION);
22
22
  __privateAdd(this, _culling);
23
+ __privateAdd(this, _delay, 0);
24
+ __privateAdd(this, _delayTimeoutId, null);
23
25
  __privateAdd(this, _isRunning, new Store(!1));
24
26
  __privateAdd(this, _direction, 0);
25
27
  __privateAdd(this, _target, 0);
@@ -79,10 +81,10 @@ const _Animation = class _Animation extends Store {
79
81
  this.set(__privateGet(this, _target) + value, options);
80
82
  }
81
83
  reset() {
82
- super.reset(), this.set(this.initial, { equalize: !0 });
84
+ super.reset(), __privateMethod(this, _Animation_instances, clearDelayTimeout_fn).call(this), this.set(this.initial, { equalize: !0 });
83
85
  }
84
86
  close() {
85
- super.close(), this.reset(), this.unlistenAnimationFrame();
87
+ super.close(), __privateMethod(this, _Animation_instances, clearDelayTimeout_fn).call(this), this.reset(), this.unlistenAnimationFrame();
86
88
  }
87
89
  listenAnimationFrame() {
88
90
  __privateGet(this, _isRunning).current || (__privateGet(this, _isRunning).current = !0, ticker.subscribe(__privateGet(this, _animationFrameListener), {
@@ -95,15 +97,19 @@ const _Animation = class _Animation extends Store {
95
97
  __privateGet(this, _isRunning).current && (__privateGet(this, _isRunning).current = !1, ticker.unsubscribe(__privateGet(this, _animationFrameListener)));
96
98
  }
97
99
  updateOptions(options) {
98
- __privateSet(this, _maxFPS, nullishCoalescing(options == null ? void 0 : options.maxFPS, __privateGet(this, _maxFPS))), __privateSet(this, _order, nullishCoalescing(options == null ? void 0 : options.order, __privateGet(this, _order))), __privateSet(this, _culling, nullishCoalescing(options == null ? void 0 : options.culling, __privateGet(this, _culling))), __privateSet(this, _min, nullishCoalescing(options == null ? void 0 : options.min, __privateGet(this, _min))), __privateSet(this, _max, nullishCoalescing(options == null ? void 0 : options.max, __privateGet(this, _max))), __privateMethod(this, _Animation_instances, setTarget_fn).call(this, typeof __privateGet(this, _tmpSetValue) == "number" ? __privateGet(this, _tmpSetValue) : __privateGet(this, _target)), options != null && options.equalize && !(options != null && options.restart) && (this.unlistenAnimationFrame(), this.current = __privateSet(this, _from, __privateGet(this, _target))), options != null && options.restart && (this.unlistenAnimationFrame(), this.current = __privateSet(this, _from, this.initial), options != null && options.equalize && (this.current = __privateSet(this, _from, __privateGet(this, _target)))), typeof (options == null ? void 0 : options.current) == "number" && __privateSet(this, _from, this.current = options.current);
100
+ __privateSet(this, _maxFPS, nullishCoalescing(options == null ? void 0 : options.maxFPS, __privateGet(this, _maxFPS))), __privateSet(this, _order, nullishCoalescing(options == null ? void 0 : options.order, __privateGet(this, _order))), __privateSet(this, _culling, nullishCoalescing(options == null ? void 0 : options.culling, __privateGet(this, _culling))), __privateSet(this, _min, nullishCoalescing(options == null ? void 0 : options.min, __privateGet(this, _min))), __privateSet(this, _max, nullishCoalescing(options == null ? void 0 : options.max, __privateGet(this, _max))), __privateSet(this, _delay, nullishCoalescing(options == null ? void 0 : options.delay, __privateGet(this, _delay))), __privateMethod(this, _Animation_instances, setTarget_fn).call(this, typeof __privateGet(this, _tmpSetValue) == "number" ? __privateGet(this, _tmpSetValue) : __privateGet(this, _target)), options != null && options.equalize && !(options != null && options.restart) && (__privateMethod(this, _Animation_instances, clearDelayTimeout_fn).call(this), this.unlistenAnimationFrame(), this.current = __privateSet(this, _from, __privateGet(this, _target))), options != null && options.restart && (__privateMethod(this, _Animation_instances, clearDelayTimeout_fn).call(this), this.unlistenAnimationFrame(), this.current = __privateSet(this, _from, this.initial), options != null && options.equalize && (this.current = __privateSet(this, _from, __privateGet(this, _target)))), typeof (options == null ? void 0 : options.current) == "number" && __privateSet(this, _from, this.current = options.current);
99
101
  }
100
102
  start() {
101
- this.listenAnimationFrame();
103
+ __privateMethod(this, _Animation_instances, clearDelayTimeout_fn).call(this), __privateGet(this, _delay) > 0 ? __privateSet(this, _delayTimeoutId, window.setTimeout(() => {
104
+ __privateSet(this, _delayTimeoutId, null), this.listenAnimationFrame();
105
+ }, __privateGet(this, _delay))) : this.listenAnimationFrame();
102
106
  }
103
107
  };
104
- _maxFPS = new WeakMap(), _order = new WeakMap(), _culling = new WeakMap(), _isRunning = new WeakMap(), _direction = new WeakMap(), _target = new WeakMap(), _min = new WeakMap(), _max = new WeakMap(), _from = new WeakMap(), _tmpSetValue = new WeakMap(), _Animation_instances = new WeakSet(), setTarget_fn = /* @__PURE__ */ __name(function(value) {
108
+ _maxFPS = new WeakMap(), _order = new WeakMap(), _culling = new WeakMap(), _delay = new WeakMap(), _delayTimeoutId = new WeakMap(), _isRunning = new WeakMap(), _direction = new WeakMap(), _target = new WeakMap(), _min = new WeakMap(), _max = new WeakMap(), _from = new WeakMap(), _tmpSetValue = new WeakMap(), _Animation_instances = new WeakSet(), setTarget_fn = /* @__PURE__ */ __name(function(value) {
105
109
  __privateSet(this, _direction, Math.sign(value - __privateGet(this, _target))), __privateSet(this, _target, clamp(value, __privateGet(this, _min), __privateGet(this, _max))), __privateSet(this, _from, this.current);
106
- }, "#setTarget"), _animationFrameListener = new WeakMap(), __name(_Animation, "Animation");
110
+ }, "#setTarget"), _animationFrameListener = new WeakMap(), clearDelayTimeout_fn = /* @__PURE__ */ __name(function() {
111
+ __privateGet(this, _delayTimeoutId) !== null && (window.clearTimeout(__privateGet(this, _delayTimeoutId)), __privateSet(this, _delayTimeoutId, null));
112
+ }, "#clearDelayTimeout"), __name(_Animation, "Animation");
107
113
  let Animation = _Animation;
108
114
  export {
109
115
  Animation as A
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const Store=require("./Store-DZnOrofs.cjs"),_function=require("./function-H4b_gTg6.cjs");require("construct-style-sheets-polyfill");require("./index-DZ44osDT.cjs");var _unsubscriber;const _Derived=class _Derived extends Store.Store{constructor(store,callback,parameters){super(null,parameters);__privateAdd(this,_unsubscriber);__privateSet(this,_unsubscriber,store.subscribe(e=>{this.current=callback(e.current)}))}close(){super.close(),__privateGet(this,_unsubscriber).call(this)}};_unsubscriber=new WeakMap,__name(_Derived,"Derived");let Derived=_Derived;var _fetcher,_isPending,_fetchIndex;const _Resource=class _Resource extends Store.Store{constructor(defaultValue,fetcher,options){super(defaultValue,options);__privateAdd(this,_fetcher);__privateAdd(this,_isPending);__privateAdd(this,_fetchIndex,0);__privateSet(this,_isPending,new Store.Store(!1)),__privateSet(this,_fetcher,fetcher),options!=null&&options.manualControl||this.refetch()}get isPending(){return __privateGet(this,_isPending)}refetch(){__privateGet(this,_isPending).current=!0,__privateSet(this,_fetchIndex,__privateGet(this,_fetchIndex)+1);const fetchIndex=__privateGet(this,_fetchIndex);__privateGet(this,_fetcher).call(this).then(v=>{fetchIndex===__privateGet(this,_fetchIndex)&&(__privateGet(this,_isPending).current=!1,this.current=v)})}};_fetcher=new WeakMap,_isPending=new WeakMap,_fetchIndex=new WeakMap,__name(_Resource,"Resource");let Resource=_Resource;var _unsubscribers;const _Composed=class _Composed extends Store.Store{constructor(stores,callback,parameters){super(null,parameters);__privateAdd(this,_unsubscribers,[]);const update=_function.debounce(()=>{this.current=callback()},0);stores.forEach(store=>{__privateGet(this,_unsubscribers).push(store.subscribe(()=>{update()}))})}close(){super.close(),__privateGet(this,_unsubscribers).forEach(u=>u())}};_unsubscribers=new WeakMap,__name(_Composed,"Composed");let Composed=_Composed;exports.Composed=Composed;exports.Derived=Derived;exports.Resource=Resource;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const Store=require("./Store-ClBpeYgL.cjs"),_function=require("./function-H4b_gTg6.cjs");require("construct-style-sheets-polyfill");require("./index-DZ44osDT.cjs");var _unsubscriber;const _Derived=class _Derived extends Store.Store{constructor(store,callback,parameters){super(null,parameters);__privateAdd(this,_unsubscriber);__privateSet(this,_unsubscriber,store.subscribe(e=>{this.current=callback(e.current)}))}close(){super.close(),__privateGet(this,_unsubscriber).call(this)}};_unsubscriber=new WeakMap,__name(_Derived,"Derived");let Derived=_Derived;var _fetcher,_isPending,_fetchIndex;const _Resource=class _Resource extends Store.Store{constructor(defaultValue,fetcher,options){super(defaultValue,options);__privateAdd(this,_fetcher);__privateAdd(this,_isPending);__privateAdd(this,_fetchIndex,0);__privateSet(this,_isPending,new Store.Store(!1)),__privateSet(this,_fetcher,fetcher),options!=null&&options.manualControl||this.refetch()}get isPending(){return __privateGet(this,_isPending)}refetch(){__privateGet(this,_isPending).current=!0,__privateSet(this,_fetchIndex,__privateGet(this,_fetchIndex)+1);const fetchIndex=__privateGet(this,_fetchIndex);__privateGet(this,_fetcher).call(this).then(v=>{fetchIndex===__privateGet(this,_fetchIndex)&&(__privateGet(this,_isPending).current=!1,this.current=v)})}};_fetcher=new WeakMap,_isPending=new WeakMap,_fetchIndex=new WeakMap,__name(_Resource,"Resource");let Resource=_Resource;var _unsubscribers;const _Composed=class _Composed extends Store.Store{constructor(stores,callback,parameters){super(null,parameters);__privateAdd(this,_unsubscribers,[]);const update=_function.debounce(()=>{this.current=callback()},0);stores.forEach(store=>{__privateGet(this,_unsubscribers).push(store.subscribe(()=>{update()}))})}close(){super.close(),__privateGet(this,_unsubscribers).forEach(u=>u())}};_unsubscribers=new WeakMap,__name(_Composed,"Composed");let Composed=_Composed;exports.Composed=Composed;exports.Derived=Derived;exports.Resource=Resource;
@@ -5,7 +5,7 @@ var __typeError = (msg) => {
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
6
6
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
7
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
- import { S as Store } from "./Store-BRTHeZmO.js";
8
+ import { S as Store } from "./Store-B2Y_0Tw9.js";
9
9
  import { d as debounce } from "./function-UmbPrOHm.js";
10
10
  import "construct-style-sheets-polyfill";
11
11
  import "./index-ClTMVKJp.js";
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable;var __typeError=msg=>{throw TypeError(msg)};var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a},__spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b)),__name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const math=require("./math-C-knY2TL.cjs"),number=require("./number-Bu4sGvW7.cjs"),polyfills=require("./polyfills-DZCuDBkA.cjs");require("construct-style-sheets-polyfill");require("./index-DZ44osDT.cjs");const Animation=require("./Animation-BtUdarQ7.cjs");var _velocity,_speed;const _Damped=class _Damped extends Animation.Animation{constructor(initial,options){super(initial,options);__privateAdd(this,_velocity);__privateAdd(this,_speed);this.damping=20,this.stiffness=0,this.mass=0,__privateSet(this,_velocity,0),__privateSet(this,_speed,0),this.updateOptions(__spreadProps(__spreadValues({},options),{equalize:!0}))}get velocity(){return __privateGet(this,_velocity)}get speed(){return __privateGet(this,_speed)}updateOptions(options){this.damping=polyfills.nullishCoalescing(options==null?void 0:options.damping,this.damping),this.mass=polyfills.nullishCoalescing(options==null?void 0:options.mass,this.mass),this.stiffness=polyfills.nullishCoalescing(options==null?void 0:options.stiffness,this.stiffness),super.updateOptions(options)}handleAnimationFrame(e){number.preciseNumber(this.current,6)===number.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const current=this.current,delta=Math.abs(current-this.target);__privateSet(this,_speed,delta/e.timeBetweenFrames);const dt=e.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const acceleration=(this.target-this.current)*this.stiffness-__privateGet(this,_velocity)*this.damping;__privateSet(this,_velocity,__privateGet(this,_velocity)+acceleration/this.mass*dt),this.current+=__privateGet(this,_velocity)*dt}else this.current=math.damp(this.current,this.target,this.damping,dt)}};_velocity=new WeakMap,_speed=new WeakMap,__name(_Damped,"Damped");let Damped=_Damped;exports.Damped=Damped;
1
+ "use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable;var __typeError=msg=>{throw TypeError(msg)};var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a},__spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b)),__name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const math=require("./math-C-knY2TL.cjs"),number=require("./number-Bu4sGvW7.cjs"),polyfills=require("./polyfills-DZCuDBkA.cjs");require("construct-style-sheets-polyfill");require("./index-DZ44osDT.cjs");const Animation=require("./Animation-BGpgWWgS.cjs");var _velocity,_speed;const _Damped=class _Damped extends Animation.Animation{constructor(initial,options){super(initial,options);__privateAdd(this,_velocity);__privateAdd(this,_speed);this.damping=20,this.stiffness=0,this.mass=0,__privateSet(this,_velocity,0),__privateSet(this,_speed,0),this.updateOptions(__spreadProps(__spreadValues({},options),{equalize:!0}))}get velocity(){return __privateGet(this,_velocity)}get speed(){return __privateGet(this,_speed)}updateOptions(options){this.damping=polyfills.nullishCoalescing(options==null?void 0:options.damping,this.damping),this.mass=polyfills.nullishCoalescing(options==null?void 0:options.mass,this.mass),this.stiffness=polyfills.nullishCoalescing(options==null?void 0:options.stiffness,this.stiffness),super.updateOptions(options)}handleAnimationFrame(e){number.preciseNumber(this.current,6)===number.preciseNumber(this.target,6)&&(this.unlistenAnimationFrame(),this.current=this.target);const current=this.current,delta=Math.abs(current-this.target);__privateSet(this,_speed,delta/e.timeBetweenFrames);const dt=e.timeBetweenFrames/1e3;if(this.mass||this.stiffness){const acceleration=(this.target-this.current)*this.stiffness-__privateGet(this,_velocity)*this.damping;__privateSet(this,_velocity,__privateGet(this,_velocity)+acceleration/this.mass*dt),this.current+=__privateGet(this,_velocity)*dt}else this.current=math.damp(this.current,this.target,this.damping,dt)}};_velocity=new WeakMap,_speed=new WeakMap,__name(_Damped,"Damped");let Damped=_Damped;exports.Damped=Damped;
@@ -20,7 +20,7 @@ import { p as preciseNumber } from "./number-DiVt2xnh.js";
20
20
  import { n as nullishCoalescing } from "./polyfills-CG1XJNia.js";
21
21
  import "construct-style-sheets-polyfill";
22
22
  import "./index-ClTMVKJp.js";
23
- import { A as Animation } from "./Animation-BUD5w3AB.js";
23
+ import { A as Animation } from "./Animation-CSofkIFz.js";
24
24
  var _velocity, _speed;
25
25
  const _Damped = class _Damped extends Animation {
26
26
  constructor(initial, options) {
@@ -5,7 +5,7 @@ var __typeError = (msg) => {
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
6
6
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
7
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
- import { S as Store } from "./Store-BRTHeZmO.js";
8
+ import { S as Store } from "./Store-B2Y_0Tw9.js";
9
9
  var _unsubscriber, _revalidateAll;
10
10
  const _DerivedArray = class _DerivedArray extends Store {
11
11
  constructor(store, callback, options) {
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const Store=require("./Store-DZnOrofs.cjs");var _unsubscriber,_revalidateAll;const _DerivedArray=class _DerivedArray extends Store.Store{constructor(store,callback,options){super(null,options);__privateAdd(this,_unsubscriber);__privateAdd(this,_revalidateAll);__privateSet(this,_revalidateAll,!!(options!=null&&options.revalidateAll)),__privateSet(this,_unsubscriber,store.subscribe(e=>{this.current=e.current.map((item,i,arr)=>{var _a,_b;return!__privateGet(this,_revalidateAll)&&((_a=this.current)!=null&&_a.length)&&((_b=e.previous)!=null&&_b.length)&&e.previous[i]===item?this.current[i]:callback(item,i,arr)})}))}close(){super.close(),__privateGet(this,_unsubscriber).call(this)}};_unsubscriber=new WeakMap,_revalidateAll=new WeakMap,__name(_DerivedArray,"DerivedArray");let DerivedArray=_DerivedArray;var _unsubscriber2,_revalidateAll2;const _DerivedKeyedArray=class _DerivedKeyedArray extends Store.Store{constructor(store,callback,options){super(null,options);__privateAdd(this,_unsubscriber2);__privateAdd(this,_revalidateAll2);__privateSet(this,_revalidateAll2,!!(options!=null&&options.revalidateAll)),__privateSet(this,_unsubscriber2,store.subscribe(e=>{this.current=e.current.map((item,i,arr)=>{var _a,_b;if(!__privateGet(this,_revalidateAll2)){const same=(_a=e.previous)==null?void 0:_a.find(previous=>previous.key===item.key&&JSON.stringify(previous)===JSON.stringify(item));if(same){const founded=(_b=this.current)==null?void 0:_b.find(current=>typeof current=="object"&&current&&"__key"in current&&current.__key===same.key);if(founded)return founded}}const callbackResult=callback(item,i,arr);return callbackResult&&typeof callbackResult=="object"&&(callbackResult.__key=item.key),callbackResult})}))}close(){super.close(),__privateGet(this,_unsubscriber2).call(this)}};_unsubscriber2=new WeakMap,_revalidateAll2=new WeakMap,__name(_DerivedKeyedArray,"DerivedKeyedArray");let DerivedKeyedArray=_DerivedKeyedArray;exports.DerivedArray=DerivedArray;exports.DerivedKeyedArray=DerivedKeyedArray;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const Store=require("./Store-ClBpeYgL.cjs");var _unsubscriber,_revalidateAll;const _DerivedArray=class _DerivedArray extends Store.Store{constructor(store,callback,options){super(null,options);__privateAdd(this,_unsubscriber);__privateAdd(this,_revalidateAll);__privateSet(this,_revalidateAll,!!(options!=null&&options.revalidateAll)),__privateSet(this,_unsubscriber,store.subscribe(e=>{this.current=e.current.map((item,i,arr)=>{var _a,_b;return!__privateGet(this,_revalidateAll)&&((_a=this.current)!=null&&_a.length)&&((_b=e.previous)!=null&&_b.length)&&e.previous[i]===item?this.current[i]:callback(item,i,arr)})}))}close(){super.close(),__privateGet(this,_unsubscriber).call(this)}};_unsubscriber=new WeakMap,_revalidateAll=new WeakMap,__name(_DerivedArray,"DerivedArray");let DerivedArray=_DerivedArray;var _unsubscriber2,_revalidateAll2;const _DerivedKeyedArray=class _DerivedKeyedArray extends Store.Store{constructor(store,callback,options){super(null,options);__privateAdd(this,_unsubscriber2);__privateAdd(this,_revalidateAll2);__privateSet(this,_revalidateAll2,!!(options!=null&&options.revalidateAll)),__privateSet(this,_unsubscriber2,store.subscribe(e=>{this.current=e.current.map((item,i,arr)=>{var _a,_b;if(!__privateGet(this,_revalidateAll2)){const same=(_a=e.previous)==null?void 0:_a.find(previous=>previous.key===item.key&&JSON.stringify(previous)===JSON.stringify(item));if(same){const founded=(_b=this.current)==null?void 0:_b.find(current=>typeof current=="object"&&current&&"__key"in current&&current.__key===same.key);if(founded)return founded}}const callbackResult=callback(item,i,arr);return callbackResult&&typeof callbackResult=="object"&&(callbackResult.__key=item.key),callbackResult})}))}close(){super.close(),__privateGet(this,_unsubscriber2).call(this)}};_unsubscriber2=new WeakMap,_revalidateAll2=new WeakMap,__name(_DerivedKeyedArray,"DerivedKeyedArray");let DerivedKeyedArray=_DerivedKeyedArray;exports.DerivedArray=DerivedArray;exports.DerivedKeyedArray=DerivedKeyedArray;
@@ -8,9 +8,9 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
8
8
  import { i as isBrowser, a as intersector, t as ticker } from "./index-ClTMVKJp.js";
9
9
  import { g as getElement } from "./dom-D8D-_9ty.js";
10
10
  import "construct-style-sheets-polyfill";
11
- import "./Store-BRTHeZmO.js";
12
- import { a as easeInQuad } from "./easings-DE1AUrbN.js";
13
- import { T as Tweened } from "./Tweened-C1FsHjhN.js";
11
+ import "./Store-B2Y_0Tw9.js";
12
+ import { a as easeInQuad } from "./easings-B5flyl-V.js";
13
+ import { T as Tweened } from "./Tweened-CSPu3mVO.js";
14
14
  import { s as setupDrag } from "./gestures-DmKKNnh4.js";
15
15
  import { p as preciseNumber } from "./number-DiVt2xnh.js";
16
16
  import { TICK_ORDER } from "./order/index.js";
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const intersector_index=require("./index-DZ44osDT.cjs"),dom=require("./dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");require("./Store-DZnOrofs.cjs");const easings=require("./easings-BWq0pPLq.cjs"),Tweened=require("./Tweened-3UYSwrvs.cjs"),gestures=require("./gestures-DtYbQr49.cjs"),number=require("./number-Bu4sGvW7.cjs"),order_index=require("./order/index.cjs"),notifier_index=require("./notifier/index.cjs");var _changeEvent;const _Controls=class _Controls{constructor(){__privateAdd(this,_changeEvent,new notifier_index.Notifier)}get changeEvent(){return __privateGet(this,_changeEvent)}};_changeEvent=new WeakMap,__name(_Controls,"Controls");let Controls=_Controls;var _element,_dimensionElement,_dimension,_keydownListener;const _KeyboardControls=class _KeyboardControls extends Controls{constructor(options){super();__privateAdd(this,_element,null);__privateAdd(this,_dimensionElement,null);__privateAdd(this,_dimension,"offsetHeight");__privateAdd(this,_keydownListener,__name(e=>{const dir=e.shiftKey?-1:1;let value;e.code==="Space"?value=dir*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.4:e.code==="ArrowLeft"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowRight"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="PageUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="PageDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="Home"?value=0:e.code==="End"&&(value=__privateGet(this,_dimension)==="offsetWidth"?__privateGet(this,_dimensionElement).scrollWidth:__privateGet(this,_dimensionElement).scrollHeight),value&&(e.stopPropagation(),this.changeEvent.notify("keyboard",value,e))},"#keydownListener"));intersector_index.isBrowser&&(__privateSet(this,_element,options!=null&&options.element&&dom.getElement(options.element)||window),__privateSet(this,_dimensionElement,__privateGet(this,_element)instanceof HTMLElement?__privateGet(this,_element):document.documentElement),this.dimension=options==null?void 0:options.dimension)}set dimension(value){__privateSet(this,_dimension,value==="width"?"offsetWidth":"offsetHeight")}connect(){intersector_index.isBrowser&&__privateGet(this,_element).addEventListener("keydown",__privateGet(this,_keydownListener))}disconnect(){intersector_index.isBrowser&&__privateGet(this,_element).removeEventListener("keydown",__privateGet(this,_keydownListener))}};_element=new WeakMap,_dimensionElement=new WeakMap,_dimension=new WeakMap,_keydownListener=new WeakMap,__name(_KeyboardControls,"KeyboardControls");let KeyboardControls=_KeyboardControls;var _speed,_interval,_options,_intervalId,_paused,_pauseTimeoutId,_connected,_isIntersecting,_AutoplayControls_instances,setup_fn,clear_fn,startInterval_fn,_animationFrameCallback,_intervalCallback,_documentVisibilityChangeListener,_intersectionListener;const _AutoplayControls=class _AutoplayControls extends Controls{constructor(options){super();__privateAdd(this,_AutoplayControls_instances);__privateAdd(this,_speed);__privateAdd(this,_interval);__privateAdd(this,_options);__privateAdd(this,_intervalId);__privateAdd(this,_paused);__privateAdd(this,_pauseTimeoutId);__privateAdd(this,_connected);__privateAdd(this,_isIntersecting);__privateAdd(this,_animationFrameCallback);__privateAdd(this,_intervalCallback);__privateAdd(this,_documentVisibilityChangeListener);__privateAdd(this,_intersectionListener);this.direction=1,__privateSet(this,_paused,new Tweened.Tweened(0,{easing:easings.easeInQuad})),__privateSet(this,_connected,!1),__privateSet(this,_isIntersecting,!1),__privateSet(this,_animationFrameCallback,e=>{__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",e.timeBetweenFrames*__privateGet(this,_speed)*this.direction*(1-__privateGet(this,_paused).current),e)}),__privateSet(this,_intervalCallback,()=>{__privateGet(this,_isIntersecting)&&__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",Math.sign(__privateGet(this,_speed))*this.direction*(1-__privateGet(this,_paused).current),null)}),__privateSet(this,_documentVisibilityChangeListener,()=>{__privateGet(this,_interval)&&(document.hidden?__privateGet(this,_paused).set(1,{equalize:!0}):__privateGet(this,_paused).set(0,{equalize:!0}))}),__privateSet(this,_intersectionListener,e=>{__privateSet(this,_isIntersecting,e.isIntersecting),__privateGet(this,_isIntersecting)?__privateMethod(this,_AutoplayControls_instances,startInterval_fn).call(this):clearInterval(__privateGet(this,_intervalId))}),__privateSet(this,_speed,(options==null?void 0:options.speed)||1),__privateSet(this,_interval,(options==null?void 0:options.interval)||!1),__privateSet(this,_options,options)}set interval(value){__privateSet(this,_interval,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}set speed(value){__privateSet(this,_speed,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}connect(){__privateGet(this,_connected)||(__privateSet(this,_connected,!0),__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this))}disconnect(){__privateGet(this,_connected)&&(__privateSet(this,_connected,!1),__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this))}pauseAndContinue(duration,instant){__privateGet(this,_connected)&&duration&&(clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).set(1,{duration:Math.min(duration,1e3),equalize:instant}),__privateSet(this,_pauseTimeoutId,setTimeout(()=>{__privateGet(this,_paused).set(0,{duration:Math.min(duration,5e3),equalize:instant})},duration)))}};_speed=new WeakMap,_interval=new WeakMap,_options=new WeakMap,_intervalId=new WeakMap,_paused=new WeakMap,_pauseTimeoutId=new WeakMap,_connected=new WeakMap,_isIntersecting=new WeakMap,_AutoplayControls_instances=new WeakSet,setup_fn=__name(function(){var _a,_b;__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this),__privateGet(this,_interval)?(_a=__privateGet(this,_options))!=null&&_a.culling?intersector_index.intersector.subscribe((_b=__privateGet(this,_options))==null?void 0:_b.culling,__privateGet(this,_intersectionListener)):__privateMethod(this,_AutoplayControls_instances,startInterval_fn).call(this):intersector_index.ticker.subscribe(__privateGet(this,_animationFrameCallback),__privateGet(this,_options)),document.addEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#setup"),clear_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),intersector_index.ticker.unsubscribe(__privateGet(this,_animationFrameCallback)),intersector_index.intersector.unsubscribe(__privateGet(this,_intersectionListener)),clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).close(),document.removeEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#clear"),startInterval_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),__privateSet(this,_intervalId,setInterval(__privateGet(this,_intervalCallback),Math.abs(__privateGet(this,_speed))))},"#startInterval"),_animationFrameCallback=new WeakMap,_intervalCallback=new WeakMap,_documentVisibilityChangeListener=new WeakMap,_intersectionListener=new WeakMap,__name(_AutoplayControls,"AutoplayControls");let AutoplayControls=_AutoplayControls;var _element2,_timeoutId,_prevEventDate,_wheelListener;const _WheelControls=class _WheelControls extends Controls{constructor(options){super();__privateAdd(this,_element2,null);__privateAdd(this,_timeoutId);__privateAdd(this,_prevEventDate);__privateAdd(this,_wheelListener,__name(event=>{let delta=0;const absY=Math.abs(event.deltaY),absX=Math.abs(event.deltaX);if(!(this.axis==="x"&&absY>absX||this.axis==="y"&&absX>absY)&&(event.preventDefault(),!(this.debounce&&this.axis==="x"&&absX<5||this.debounce&&this.axis==="y"&&absY<5)))if(delta=(this.axis==="max"?absX>absY?event.deltaX:event.deltaY:this.axis==="x"?event.deltaX:event.deltaY)*this.speed,event.stopPropagation(),this.debounce){const now=Date.now();if(now-__privateGet(this,_prevEventDate)>40&&(delta=100*Math.sign(delta)),__privateSet(this,_prevEventDate,now),Math.abs(delta)<100||__privateGet(this,_timeoutId))return;this.changeEvent.notify("wheel",delta,event),__privateSet(this,_timeoutId,setTimeout(()=>{__privateSet(this,_timeoutId,void 0)},80))}else this.changeEvent.notify("wheel",delta,event)},"#wheelListener"));this.axis=(options==null?void 0:options.axis)||"y",this.speed=(options==null?void 0:options.speed)||1,this.debounce=(options==null?void 0:options.debounce)||!1,__privateSet(this,_prevEventDate,Date.now()),intersector_index.isBrowser&&__privateSet(this,_element2,options!=null&&options.element&&dom.getElement(options.element)||window)}connect(){intersector_index.isBrowser&&__privateGet(this,_element2).addEventListener("wheel",__privateGet(this,_wheelListener),{passive:!1})}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_element2).removeEventListener("wheel",__privateGet(this,_wheelListener)),clearTimeout(__privateGet(this,_timeoutId)))}};_element2=new WeakMap,_timeoutId=new WeakMap,_prevEventDate=new WeakMap,_wheelListener=new WeakMap,__name(_WheelControls,"WheelControls");let WheelControls=_WheelControls;var _currentElement,_rootElement,_element3,_delta,_linkElements,_dragDelta,_linkClickListener,_pointerdownListener,_tickListener;const _DragControls=class _DragControls extends Controls{constructor(options){super();__privateAdd(this,_rootElement);__privateAdd(this,_element3);__privateAdd(this,_delta);__privateAdd(this,_linkElements);__privateAdd(this,_dragDelta);__privateAdd(this,_linkClickListener);__privateAdd(this,_pointerdownListener);__privateAdd(this,_tickListener);this.inertion=1,__privateSet(this,_rootElement,null),__privateSet(this,_element3,null),__privateSet(this,_delta,0),__privateSet(this,_linkElements,[]),__privateSet(this,_dragDelta,0),__privateSet(this,_linkClickListener,e=>{Math.abs(__privateGet(this,_dragDelta))>2&&e.preventDefault()}),__privateSet(this,_pointerdownListener,grabEvent=>{if(__privateSet(this,_dragDelta,0),__privateSet(this,_delta,0),grabEvent.button!==0||grabEvent.composedPath().find(p=>p instanceof HTMLElement&&p.hasAttribute("drag-dead-zone")))return;this.swipe||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener));let prev=grabEvent,okToNotify=!1;document.documentElement.classList.add("grabbing");let dx=0,dy=0,ddx=0,ddy=0;gestures.setupDrag(moveEvent=>{__privateGet(_DragControls,_currentElement)&&__privateGet(_DragControls,_currentElement)!==__privateGet(this,_element3)||(dx=prev.x-moveEvent.x,dy=prev.y-moveEvent.y,ddx=moveEvent.x-grabEvent.x,ddy=moveEvent.y-grabEvent.y,this.axis==="x"?(__privateSet(this,_dragDelta,ddx),__privateSet(this,_delta,dx)):(__privateSet(this,_dragDelta,ddy),__privateSet(this,_delta,dy)),prev=moveEvent,okToNotify=this.axis==="x"&&Math.abs(ddx)>Math.abs(ddy)||this.axis==="y"&&Math.abs(ddy)>Math.abs(ddx),okToNotify&&(document.documentElement.classList.add("dragging"),document.documentElement.classList.add("click-disabled"),__privateSet(_DragControls,_currentElement,__privateGet(this,_element3)),this.changeEvent.notify("drag",__privateGet(this,_delta),moveEvent)))},e=>{__privateSet(_DragControls,_currentElement,null),okToNotify&&(!this.swipe&&this.inertion?(__privateSet(this,_delta,__privateGet(this,_delta)*this.inertion),intersector_index.ticker.subscribe(__privateGet(this,_tickListener),{order:order_index.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",__privateGet(this,_delta),e)),setTimeout(()=>{document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging"),document.documentElement.classList.remove("click-disabled")})})}),__privateSet(this,_tickListener,()=>{Math.floor(Math.abs(__privateGet(this,_delta)))||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)),__privateSet(this,_delta,__privateGet(this,_delta)*.95),__privateSet(this,_delta,number.preciseNumber(__privateGet(this,_delta),3)),this.changeEvent.notify("drag",__privateGet(this,_delta),null)}),this.axis=(options==null?void 0:options.axis)||"y",this.swipe=(options==null?void 0:options.swipe)||!1,intersector_index.isBrowser&&(__privateSet(this,_element3,options!=null&&options.element&&dom.getElement(options.element)||document.documentElement),__privateSet(this,_rootElement,(options==null?void 0:options.rootElement)||__privateGet(this,_element3)))}connect(){intersector_index.isBrowser&&(__privateSet(this,_linkElements,[...__privateGet(this,_rootElement).querySelectorAll("a")]),__privateGet(this,_linkElements).forEach(element=>{element.addEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).addEventListener("pointerdown",__privateGet(this,_pointerdownListener)))}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_linkElements).forEach(element=>{element.removeEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).removeEventListener("pointerdown",__privateGet(this,_pointerdownListener)),intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)))}};_currentElement=new WeakMap,_rootElement=new WeakMap,_element3=new WeakMap,_delta=new WeakMap,_linkElements=new WeakMap,_dragDelta=new WeakMap,_linkClickListener=new WeakMap,_pointerdownListener=new WeakMap,_tickListener=new WeakMap,__name(_DragControls,"DragControls"),__privateAdd(_DragControls,_currentElement,null);let DragControls=_DragControls;exports.AutoplayControls=AutoplayControls;exports.Controls=Controls;exports.DragControls=DragControls;exports.KeyboardControls=KeyboardControls;exports.WheelControls=WheelControls;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const intersector_index=require("./index-DZ44osDT.cjs"),dom=require("./dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");require("./Store-ClBpeYgL.cjs");const easings=require("./easings-YkfoM7J2.cjs"),Tweened=require("./Tweened--qNhMQ8U.cjs"),gestures=require("./gestures-DtYbQr49.cjs"),number=require("./number-Bu4sGvW7.cjs"),order_index=require("./order/index.cjs"),notifier_index=require("./notifier/index.cjs");var _changeEvent;const _Controls=class _Controls{constructor(){__privateAdd(this,_changeEvent,new notifier_index.Notifier)}get changeEvent(){return __privateGet(this,_changeEvent)}};_changeEvent=new WeakMap,__name(_Controls,"Controls");let Controls=_Controls;var _element,_dimensionElement,_dimension,_keydownListener;const _KeyboardControls=class _KeyboardControls extends Controls{constructor(options){super();__privateAdd(this,_element,null);__privateAdd(this,_dimensionElement,null);__privateAdd(this,_dimension,"offsetHeight");__privateAdd(this,_keydownListener,__name(e=>{const dir=e.shiftKey?-1:1;let value;e.code==="Space"?value=dir*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.4:e.code==="ArrowLeft"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowRight"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="ArrowDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]*.2:e.code==="PageUp"?value=-1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="PageDown"?value=1*__privateGet(this,_dimensionElement)[__privateGet(this,_dimension)]:e.code==="Home"?value=0:e.code==="End"&&(value=__privateGet(this,_dimension)==="offsetWidth"?__privateGet(this,_dimensionElement).scrollWidth:__privateGet(this,_dimensionElement).scrollHeight),value&&(e.stopPropagation(),this.changeEvent.notify("keyboard",value,e))},"#keydownListener"));intersector_index.isBrowser&&(__privateSet(this,_element,options!=null&&options.element&&dom.getElement(options.element)||window),__privateSet(this,_dimensionElement,__privateGet(this,_element)instanceof HTMLElement?__privateGet(this,_element):document.documentElement),this.dimension=options==null?void 0:options.dimension)}set dimension(value){__privateSet(this,_dimension,value==="width"?"offsetWidth":"offsetHeight")}connect(){intersector_index.isBrowser&&__privateGet(this,_element).addEventListener("keydown",__privateGet(this,_keydownListener))}disconnect(){intersector_index.isBrowser&&__privateGet(this,_element).removeEventListener("keydown",__privateGet(this,_keydownListener))}};_element=new WeakMap,_dimensionElement=new WeakMap,_dimension=new WeakMap,_keydownListener=new WeakMap,__name(_KeyboardControls,"KeyboardControls");let KeyboardControls=_KeyboardControls;var _speed,_interval,_options,_intervalId,_paused,_pauseTimeoutId,_connected,_isIntersecting,_AutoplayControls_instances,setup_fn,clear_fn,startInterval_fn,_animationFrameCallback,_intervalCallback,_documentVisibilityChangeListener,_intersectionListener;const _AutoplayControls=class _AutoplayControls extends Controls{constructor(options){super();__privateAdd(this,_AutoplayControls_instances);__privateAdd(this,_speed);__privateAdd(this,_interval);__privateAdd(this,_options);__privateAdd(this,_intervalId);__privateAdd(this,_paused);__privateAdd(this,_pauseTimeoutId);__privateAdd(this,_connected);__privateAdd(this,_isIntersecting);__privateAdd(this,_animationFrameCallback);__privateAdd(this,_intervalCallback);__privateAdd(this,_documentVisibilityChangeListener);__privateAdd(this,_intersectionListener);this.direction=1,__privateSet(this,_paused,new Tweened.Tweened(0,{easing:easings.easeInQuad})),__privateSet(this,_connected,!1),__privateSet(this,_isIntersecting,!1),__privateSet(this,_animationFrameCallback,e=>{__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",e.timeBetweenFrames*__privateGet(this,_speed)*this.direction*(1-__privateGet(this,_paused).current),e)}),__privateSet(this,_intervalCallback,()=>{__privateGet(this,_isIntersecting)&&__privateGet(this,_paused).current!==1&&this.changeEvent.notify("autoplay",Math.sign(__privateGet(this,_speed))*this.direction*(1-__privateGet(this,_paused).current),null)}),__privateSet(this,_documentVisibilityChangeListener,()=>{__privateGet(this,_interval)&&(document.hidden?__privateGet(this,_paused).set(1,{equalize:!0}):__privateGet(this,_paused).set(0,{equalize:!0}))}),__privateSet(this,_intersectionListener,e=>{__privateSet(this,_isIntersecting,e.isIntersecting),__privateGet(this,_isIntersecting)?__privateMethod(this,_AutoplayControls_instances,startInterval_fn).call(this):clearInterval(__privateGet(this,_intervalId))}),__privateSet(this,_speed,(options==null?void 0:options.speed)||1),__privateSet(this,_interval,(options==null?void 0:options.interval)||!1),__privateSet(this,_options,options)}set interval(value){__privateSet(this,_interval,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}set speed(value){__privateSet(this,_speed,value),__privateGet(this,_connected)&&__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this)}connect(){__privateGet(this,_connected)||(__privateSet(this,_connected,!0),__privateMethod(this,_AutoplayControls_instances,setup_fn).call(this))}disconnect(){__privateGet(this,_connected)&&(__privateSet(this,_connected,!1),__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this))}pauseAndContinue(duration,instant){__privateGet(this,_connected)&&duration&&(clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).set(1,{duration:Math.min(duration,1e3),equalize:instant}),__privateSet(this,_pauseTimeoutId,setTimeout(()=>{__privateGet(this,_paused).set(0,{duration:Math.min(duration,5e3),equalize:instant})},duration)))}};_speed=new WeakMap,_interval=new WeakMap,_options=new WeakMap,_intervalId=new WeakMap,_paused=new WeakMap,_pauseTimeoutId=new WeakMap,_connected=new WeakMap,_isIntersecting=new WeakMap,_AutoplayControls_instances=new WeakSet,setup_fn=__name(function(){var _a,_b;__privateMethod(this,_AutoplayControls_instances,clear_fn).call(this),__privateGet(this,_interval)?(_a=__privateGet(this,_options))!=null&&_a.culling?intersector_index.intersector.subscribe((_b=__privateGet(this,_options))==null?void 0:_b.culling,__privateGet(this,_intersectionListener)):__privateMethod(this,_AutoplayControls_instances,startInterval_fn).call(this):intersector_index.ticker.subscribe(__privateGet(this,_animationFrameCallback),__privateGet(this,_options)),document.addEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#setup"),clear_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),intersector_index.ticker.unsubscribe(__privateGet(this,_animationFrameCallback)),intersector_index.intersector.unsubscribe(__privateGet(this,_intersectionListener)),clearTimeout(__privateGet(this,_pauseTimeoutId)),__privateGet(this,_paused).close(),document.removeEventListener("visibilitychange",__privateGet(this,_documentVisibilityChangeListener))},"#clear"),startInterval_fn=__name(function(){clearInterval(__privateGet(this,_intervalId)),__privateSet(this,_intervalId,setInterval(__privateGet(this,_intervalCallback),Math.abs(__privateGet(this,_speed))))},"#startInterval"),_animationFrameCallback=new WeakMap,_intervalCallback=new WeakMap,_documentVisibilityChangeListener=new WeakMap,_intersectionListener=new WeakMap,__name(_AutoplayControls,"AutoplayControls");let AutoplayControls=_AutoplayControls;var _element2,_timeoutId,_prevEventDate,_wheelListener;const _WheelControls=class _WheelControls extends Controls{constructor(options){super();__privateAdd(this,_element2,null);__privateAdd(this,_timeoutId);__privateAdd(this,_prevEventDate);__privateAdd(this,_wheelListener,__name(event=>{let delta=0;const absY=Math.abs(event.deltaY),absX=Math.abs(event.deltaX);if(!(this.axis==="x"&&absY>absX||this.axis==="y"&&absX>absY)&&(event.preventDefault(),!(this.debounce&&this.axis==="x"&&absX<5||this.debounce&&this.axis==="y"&&absY<5)))if(delta=(this.axis==="max"?absX>absY?event.deltaX:event.deltaY:this.axis==="x"?event.deltaX:event.deltaY)*this.speed,event.stopPropagation(),this.debounce){const now=Date.now();if(now-__privateGet(this,_prevEventDate)>40&&(delta=100*Math.sign(delta)),__privateSet(this,_prevEventDate,now),Math.abs(delta)<100||__privateGet(this,_timeoutId))return;this.changeEvent.notify("wheel",delta,event),__privateSet(this,_timeoutId,setTimeout(()=>{__privateSet(this,_timeoutId,void 0)},80))}else this.changeEvent.notify("wheel",delta,event)},"#wheelListener"));this.axis=(options==null?void 0:options.axis)||"y",this.speed=(options==null?void 0:options.speed)||1,this.debounce=(options==null?void 0:options.debounce)||!1,__privateSet(this,_prevEventDate,Date.now()),intersector_index.isBrowser&&__privateSet(this,_element2,options!=null&&options.element&&dom.getElement(options.element)||window)}connect(){intersector_index.isBrowser&&__privateGet(this,_element2).addEventListener("wheel",__privateGet(this,_wheelListener),{passive:!1})}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_element2).removeEventListener("wheel",__privateGet(this,_wheelListener)),clearTimeout(__privateGet(this,_timeoutId)))}};_element2=new WeakMap,_timeoutId=new WeakMap,_prevEventDate=new WeakMap,_wheelListener=new WeakMap,__name(_WheelControls,"WheelControls");let WheelControls=_WheelControls;var _currentElement,_rootElement,_element3,_delta,_linkElements,_dragDelta,_linkClickListener,_pointerdownListener,_tickListener;const _DragControls=class _DragControls extends Controls{constructor(options){super();__privateAdd(this,_rootElement);__privateAdd(this,_element3);__privateAdd(this,_delta);__privateAdd(this,_linkElements);__privateAdd(this,_dragDelta);__privateAdd(this,_linkClickListener);__privateAdd(this,_pointerdownListener);__privateAdd(this,_tickListener);this.inertion=1,__privateSet(this,_rootElement,null),__privateSet(this,_element3,null),__privateSet(this,_delta,0),__privateSet(this,_linkElements,[]),__privateSet(this,_dragDelta,0),__privateSet(this,_linkClickListener,e=>{Math.abs(__privateGet(this,_dragDelta))>2&&e.preventDefault()}),__privateSet(this,_pointerdownListener,grabEvent=>{if(__privateSet(this,_dragDelta,0),__privateSet(this,_delta,0),grabEvent.button!==0||grabEvent.composedPath().find(p=>p instanceof HTMLElement&&p.hasAttribute("drag-dead-zone")))return;this.swipe||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener));let prev=grabEvent,okToNotify=!1;document.documentElement.classList.add("grabbing");let dx=0,dy=0,ddx=0,ddy=0;gestures.setupDrag(moveEvent=>{__privateGet(_DragControls,_currentElement)&&__privateGet(_DragControls,_currentElement)!==__privateGet(this,_element3)||(dx=prev.x-moveEvent.x,dy=prev.y-moveEvent.y,ddx=moveEvent.x-grabEvent.x,ddy=moveEvent.y-grabEvent.y,this.axis==="x"?(__privateSet(this,_dragDelta,ddx),__privateSet(this,_delta,dx)):(__privateSet(this,_dragDelta,ddy),__privateSet(this,_delta,dy)),prev=moveEvent,okToNotify=this.axis==="x"&&Math.abs(ddx)>Math.abs(ddy)||this.axis==="y"&&Math.abs(ddy)>Math.abs(ddx),okToNotify&&(document.documentElement.classList.add("dragging"),document.documentElement.classList.add("click-disabled"),__privateSet(_DragControls,_currentElement,__privateGet(this,_element3)),this.changeEvent.notify("drag",__privateGet(this,_delta),moveEvent)))},e=>{__privateSet(_DragControls,_currentElement,null),okToNotify&&(!this.swipe&&this.inertion?(__privateSet(this,_delta,__privateGet(this,_delta)*this.inertion),intersector_index.ticker.subscribe(__privateGet(this,_tickListener),{order:order_index.TICK_ORDER.CONTROLS-1})):this.swipe&&this.changeEvent.notify("drag-end",__privateGet(this,_delta),e)),setTimeout(()=>{document.documentElement.classList.remove("grabbing"),document.documentElement.classList.remove("dragging"),document.documentElement.classList.remove("click-disabled")})})}),__privateSet(this,_tickListener,()=>{Math.floor(Math.abs(__privateGet(this,_delta)))||intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)),__privateSet(this,_delta,__privateGet(this,_delta)*.95),__privateSet(this,_delta,number.preciseNumber(__privateGet(this,_delta),3)),this.changeEvent.notify("drag",__privateGet(this,_delta),null)}),this.axis=(options==null?void 0:options.axis)||"y",this.swipe=(options==null?void 0:options.swipe)||!1,intersector_index.isBrowser&&(__privateSet(this,_element3,options!=null&&options.element&&dom.getElement(options.element)||document.documentElement),__privateSet(this,_rootElement,(options==null?void 0:options.rootElement)||__privateGet(this,_element3)))}connect(){intersector_index.isBrowser&&(__privateSet(this,_linkElements,[...__privateGet(this,_rootElement).querySelectorAll("a")]),__privateGet(this,_linkElements).forEach(element=>{element.addEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).addEventListener("pointerdown",__privateGet(this,_pointerdownListener)))}disconnect(){intersector_index.isBrowser&&(__privateGet(this,_linkElements).forEach(element=>{element.removeEventListener("click",__privateGet(this,_linkClickListener))}),__privateGet(this,_element3).removeEventListener("pointerdown",__privateGet(this,_pointerdownListener)),intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)))}};_currentElement=new WeakMap,_rootElement=new WeakMap,_element3=new WeakMap,_delta=new WeakMap,_linkElements=new WeakMap,_dragDelta=new WeakMap,_linkClickListener=new WeakMap,_pointerdownListener=new WeakMap,_tickListener=new WeakMap,__name(_DragControls,"DragControls"),__privateAdd(_DragControls,_currentElement,null);let DragControls=_DragControls;exports.AutoplayControls=AutoplayControls;exports.Controls=Controls;exports.DragControls=DragControls;exports.KeyboardControls=KeyboardControls;exports.WheelControls=WheelControls;
@@ -1,4 +1,4 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const elementLinkedStore_index=require("./element-linked-store/index.cjs"),loading_index=require("./loading/index.cjs"),intersector_index=require("./index-DZ44osDT.cjs"),events=require("./events-UlGk63iC.cjs"),string=require("./string-CbRNzmd9.cjs"),metadata=require("./metadata-BrHUfpV9.cjs");require("construct-style-sheets-polyfill");const order_index=require("./order/index.cjs"),windowResizer_index=require("./window-resizer/index.cjs"),Store=require("./Store-DZnOrofs.cjs");var _url,_name,_density,_query,_queryValue,_queryType,_extension;const _Source=class _Source{constructor(url){__privateAdd(this,_url);__privateAdd(this,_name);__privateAdd(this,_density);__privateAdd(this,_query);__privateAdd(this,_queryValue);__privateAdd(this,_queryType);__privateAdd(this,_extension);__privateSet(this,_url,url);let splitted=url.split(".");const xpattern=/\b\d{1,2}x\b/g,xmatch=splitted.find(s=>s.match(xpattern)&&parseInt(s));__privateSet(this,_density,xmatch?parseInt(xmatch):1),xmatch&&(splitted=splitted.slice(0,-1)),__privateSet(this,_name,splitted.length>1?splitted.slice(0,-1).join("."):splitted.join("."));const maxpattern=/\d+max/g,minpattern=/\d+min/g,maxAspectPattern=/\d+mar/g,minAspectPattern=/\d+mir/g,maxmatch=splitted.find(s=>s.match(maxpattern)),minmatch=splitted.find(s=>s.match(minpattern)),maxRatioMatch=splitted.find(s=>s.match(maxAspectPattern)),minRatioMatch=splitted.find(s=>s.match(minAspectPattern));maxRatioMatch?(__privateSet(this,_queryValue,parseInt(maxRatioMatch)),__privateSet(this,_queryType,"max"),__privateSet(this,_query,`(max-aspect-ratio: ${__privateGet(this,_queryValue)})`)):minRatioMatch?(__privateSet(this,_queryValue,parseInt(minRatioMatch)),__privateSet(this,_queryType,"max"),__privateSet(this,_query,`(min-aspect-ratio: ${__privateGet(this,_queryValue)})`)):maxmatch?(__privateSet(this,_queryValue,parseInt(maxmatch)),__privateSet(this,_queryType,"max"),__privateSet(this,_query,`(max-width: ${__privateGet(this,_queryValue)}px)`)):minmatch?(__privateSet(this,_queryValue,parseInt(minmatch)),__privateSet(this,_query,`(min-width: ${__privateGet(this,_queryValue)}px)`),__privateSet(this,_queryType,"min")):(__privateSet(this,_queryValue,0),__privateSet(this,_query,`(min-width: ${__privateGet(this,_queryValue)}px)`),__privateSet(this,_queryType,"min")),__privateSet(this,_name,__privateGet(this,_name).replace(`.${__privateGet(this,_queryValue)}${__privateGet(this,_queryType)}`,"")),__privateSet(this,_extension,splitted[splitted.length-1]===__privateGet(this,_name)?"":"."+splitted[splitted.length-1]),__privateSet(this,_extension,__privateGet(this,_extension).replace(`.${__privateGet(this,_queryValue)}${__privateGet(this,_queryType)}`,""))}get url(){return __privateGet(this,_url)}get name(){return __privateGet(this,_name)}get density(){return __privateGet(this,_density)}get query(){return __privateGet(this,_query)}get extension(){return __privateGet(this,_extension)}get queryType(){return __privateGet(this,_queryType)}get queryValue(){return __privateGet(this,_queryValue)}};_url=new WeakMap,_name=new WeakMap,_density=new WeakMap,_query=new WeakMap,_queryValue=new WeakMap,_queryType=new WeakMap,_extension=new WeakMap,__name(_Source,"Source");let Source=_Source;var _mediaBuckets;const _SourceSet=class _SourceSet{constructor(sourceSet,options){__privateAdd(this,_mediaBuckets);__privateSet(this,_mediaBuckets,new Map);const allowMediaBuckets=(options==null?void 0:options.mediaBuckets)!==!1,mediaBuckets=typeof sourceSet=="string"?allowMediaBuckets?sourceSet.trim().split(",").map(u=>u.trim()).filter(u=>!!u):[sourceSet]:sourceSet,tmp=[];mediaBuckets.forEach(v=>{const source=new Source(v);tmp.push([source.query,source])});const max=tmp.filter(v=>v[1].queryType.includes("max")).sort((a,b)=>b[1].queryValue-a[1].queryValue),min=tmp.filter(v=>v[1].queryType.includes("min")&&v[1].queryValue!==0).sort((a,b)=>a[1].queryValue-b[1].queryValue),defaultMatch=tmp.filter(t=>t[0]==="(min-width: 0px)");(defaultMatch?[...defaultMatch,...max,...min]:[...max,...min]).forEach(v=>{__privateGet(this,_mediaBuckets).has(v[0])||__privateGet(this,_mediaBuckets).set(v[0],[]),__privateGet(this,_mediaBuckets).get(v[0]).push(v[1])})}get mediaBuckets(){return __privateGet(this,_mediaBuckets)}};_mediaBuckets=new WeakMap,__name(_SourceSet,"SourceSet");let SourceSet=_SourceSet;var _srcset,_resizeListener;const _SourceManager=class _SourceManager extends Store.Store{constructor(parameters){super(void 0);__privateAdd(this,_srcset);__privateAdd(this,_resizeListener,__name(()=>{let matchedSources;__privateGet(this,_srcset).mediaBuckets.forEach((sources,query)=>{matchMedia(query).matches&&(matchedSources=sources)});let matchedSouce,maxDensity=0;matchedSources==null||matchedSources.forEach(s=>{s.density>maxDensity&&s.density<=Math.max(devicePixelRatio,1)&&(maxDensity=s.density,matchedSouce=s)}),matchedSources!=null&&matchedSources.length&&!matchedSouce&&(matchedSouce=matchedSources[0]),this.current=matchedSouce},"#resizeListener"));__privateSet(this,_srcset,new SourceSet(parameters.srcset,parameters.sourceSetOptions))}updateSource(parameters){__privateSet(this,_srcset,new SourceSet(parameters.srcset,parameters.sourceSetOptions)),__privateGet(this,_resizeListener).call(this)}close(){super.close(),this.disconnect()}connect(){windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener),order_index.RESIZE_ORDER.SOURCE_MANAGER),__privateGet(this,_resizeListener).call(this)}disconnect(){windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener))}};_srcset=new WeakMap,_resizeListener=new WeakMap,__name(_SourceManager,"SourceManager");let SourceManager=_SourceManager,id=0;var _sourceManager,_consumerElement,_consumerHolderElement,_isFirstLoadHappened,_lazyLoaded,_isLazy,_id,_idWithUrl,_status,_intersectionObserver,_clearTimeoutId,_currentURL,_sourceSetOptions,_SourceElement_instances,loadSource_fn,_intersectionListener,_loadListener,_errorListener,_playListener,_pauseListener,_loadedmetadataListener;const _SourceElement=class _SourceElement extends HTMLElement{constructor(options){super();__privateAdd(this,_SourceElement_instances);__privateAdd(this,_sourceManager,null);__privateAdd(this,_consumerElement,null);__privateAdd(this,_consumerHolderElement,this);__privateAdd(this,_isFirstLoadHappened,!1);__privateAdd(this,_lazyLoaded,!1);__privateAdd(this,_isLazy,!1);__privateAdd(this,_id,"");__privateAdd(this,_idWithUrl,"");__privateAdd(this,_status,new elementLinkedStore_index.ElementLinkedStore(this,{loading:!1,loaded:!1,error:!1,clear:!1,playing:!1,metadata:!1}));__privateAdd(this,_intersectionObserver,null);__privateAdd(this,_clearTimeoutId);__privateAdd(this,_currentURL,null);__privateAdd(this,_sourceSetOptions);__privateAdd(this,_intersectionListener,__name(entries=>{const entry=entries[0];__privateGet(this,_isLazy)&&(!__privateGet(this,_lazyLoaded)||this.hasAttribute("reload-source"))&&entry.isIntersecting&&this.triggerLazyLoad(),entry.isIntersecting?events.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(__privateMethod(this,_SourceElement_instances,loadSource_fn).call(this,void 0),__privateSet(this,_lazyLoaded,!1)),events.dispatchEvent(this,"sourceRelease",{custom:!0}))},"#intersectionListener"));__privateAdd(this,_loadListener,__name(()=>{__privateGet(this,_status).set("loaded",!0),__privateGet(this,_status).set("error",!1),__privateGet(this,_status).set("loading",!1),!__privateGet(this,_isLazy)&&!__privateGet(this,_isFirstLoadHappened)&&loading_index.loading.complete(__privateGet(this,_idWithUrl)),events.dispatchEvent(this,"sourceLoaded",{custom:!0});const clearDuration=getComputedStyle(this).getPropertyValue("--clear-duration");clearDuration?__privateSet(this,_clearTimeoutId,setTimeout(()=>{__privateGet(this,_status).set("clear",!0)},parseFloat(clearDuration)*1e3)):__privateGet(this,_status).set("clear",!0),__privateSet(this,_isFirstLoadHappened,!0)},"#loadListener"));__privateAdd(this,_errorListener,__name(url=>{__privateGet(this,_status).set("loaded",!1),__privateGet(this,_status).set("error",!0),__privateGet(this,_status).set("loading",!1),!__privateGet(this,_isLazy)&&!__privateGet(this,_isFirstLoadHappened)&&loading_index.loading.error(__privateGet(this,_idWithUrl)),events.dispatchEvent(this,"sourceError",{custom:!0}),__privateSet(this,_isFirstLoadHappened,!0)},"#errorListener"));__privateAdd(this,_playListener,__name(()=>{__privateGet(this,_status).set("playing",!0),events.dispatchEvent(this,"sourcePlay",{custom:!0})},"#playListener"));__privateAdd(this,_pauseListener,__name(()=>{__privateGet(this,_status).set("playing",!1),events.dispatchEvent(this,"sourcePause",{custom:!0})},"#pauseListener"));__privateAdd(this,_loadedmetadataListener,__name(()=>{const consumerElement=__privateGet(this,_consumerElement);(consumerElement.tagName==="VIDEO"||consumerElement.tagName==="AUDIO")&&consumerElement.readyState>=1&&(__privateGet(this,_status).set("metadata",!0),events.dispatchEvent(this,"sourceMetadataLoaded",{custom:!0}),this.querySelectorAll("[data-source-duration]").forEach(el=>{el.textContent=metadata.formatMediaDuration(consumerElement.duration)}))},"#loadedmetadataListener"));__privateSet(this,_sourceSetOptions,options==null?void 0:options.sourceSetOptions),intersector_index.isBrowser&&window.IntersectionObserver&&__privateSet(this,_intersectionObserver,new IntersectionObserver(__privateGet(this,_intersectionListener))),__privateGet(this,_status).subscribe(e=>{var _a;const globalClasses=(_a=this.getAttribute("data-global-play-class"))==null?void 0:_a.split(",");globalClasses!=null&&globalClasses.length&&(e.current.playing?globalClasses.forEach(className=>{document.documentElement.classList.add(className.trim())}):globalClasses.forEach(className=>{document.documentElement.classList.remove(className.trim())}))})}get consumerElement(){return __privateGet(this,_consumerElement)}get consumerHolderElement(){return __privateGet(this,_consumerHolderElement)}get sourceManager(){return __privateGet(this,_sourceManager)}get status(){return __privateGet(this,_status)}get isLazy(){return __privateGet(this,_isLazy)}get currentURL(){return __privateGet(this,_currentURL)}get isFirstLoadHappened(){return __privateGet(this,_isFirstLoadHappened)}triggerLazyLoad(){!__privateGet(this,_lazyLoaded)&&__privateGet(this,_sourceManager).current&&__privateGet(this,_sourceManager).current!==__privateGet(this,_sourceManager).previous&&(__privateSet(this,_lazyLoaded,!0),__privateMethod(this,_SourceElement_instances,loadSource_fn).call(this,__privateGet(this,_sourceManager).current))}connectedCallback(){__privateSet(this,_id,`source-consumer-${++id}`);const srcset=this.getAttribute("srcset")||"",notifyElement=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;notifyElement&&__privateGet(this,_status).addElement(notifyElement),__privateSet(this,_consumerHolderElement,this.querySelector("[data-consumer-holder]")||this),this.querySelectorAll(".source-consumer").forEach(el=>el==null?void 0:el.remove()),__privateSet(this,_consumerElement,this.createConsumer()),__privateGet(this,_consumerElement).style.cssText=`
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);const elementLinkedStore_index=require("./element-linked-store/index.cjs"),loading_index=require("./loading/index.cjs"),intersector_index=require("./index-DZ44osDT.cjs"),events=require("./events-UlGk63iC.cjs"),string=require("./string-Bx5N38JG.cjs"),metadata=require("./metadata-BrHUfpV9.cjs");require("construct-style-sheets-polyfill");const order_index=require("./order/index.cjs"),windowResizer_index=require("./window-resizer/index.cjs"),Store=require("./Store-ClBpeYgL.cjs");var _url,_name,_density,_query,_queryValue,_queryType,_extension;const _Source=class _Source{constructor(url){__privateAdd(this,_url);__privateAdd(this,_name);__privateAdd(this,_density);__privateAdd(this,_query);__privateAdd(this,_queryValue);__privateAdd(this,_queryType);__privateAdd(this,_extension);__privateSet(this,_url,url);let splitted=url.split(".");const xpattern=/\b\d{1,2}x\b/g,xmatch=splitted.find(s=>s.match(xpattern)&&parseInt(s));__privateSet(this,_density,xmatch?parseInt(xmatch):1),xmatch&&(splitted=splitted.slice(0,-1)),__privateSet(this,_name,splitted.length>1?splitted.slice(0,-1).join("."):splitted.join("."));const maxpattern=/\d+max/g,minpattern=/\d+min/g,maxAspectPattern=/\d+mar/g,minAspectPattern=/\d+mir/g,maxmatch=splitted.find(s=>s.match(maxpattern)),minmatch=splitted.find(s=>s.match(minpattern)),maxRatioMatch=splitted.find(s=>s.match(maxAspectPattern)),minRatioMatch=splitted.find(s=>s.match(minAspectPattern));maxRatioMatch?(__privateSet(this,_queryValue,parseInt(maxRatioMatch)),__privateSet(this,_queryType,"max"),__privateSet(this,_query,`(max-aspect-ratio: ${__privateGet(this,_queryValue)})`)):minRatioMatch?(__privateSet(this,_queryValue,parseInt(minRatioMatch)),__privateSet(this,_queryType,"max"),__privateSet(this,_query,`(min-aspect-ratio: ${__privateGet(this,_queryValue)})`)):maxmatch?(__privateSet(this,_queryValue,parseInt(maxmatch)),__privateSet(this,_queryType,"max"),__privateSet(this,_query,`(max-width: ${__privateGet(this,_queryValue)}px)`)):minmatch?(__privateSet(this,_queryValue,parseInt(minmatch)),__privateSet(this,_query,`(min-width: ${__privateGet(this,_queryValue)}px)`),__privateSet(this,_queryType,"min")):(__privateSet(this,_queryValue,0),__privateSet(this,_query,`(min-width: ${__privateGet(this,_queryValue)}px)`),__privateSet(this,_queryType,"min")),__privateSet(this,_name,__privateGet(this,_name).replace(`.${__privateGet(this,_queryValue)}${__privateGet(this,_queryType)}`,"")),__privateSet(this,_extension,splitted[splitted.length-1]===__privateGet(this,_name)?"":"."+splitted[splitted.length-1]),__privateSet(this,_extension,__privateGet(this,_extension).replace(`.${__privateGet(this,_queryValue)}${__privateGet(this,_queryType)}`,""))}get url(){return __privateGet(this,_url)}get name(){return __privateGet(this,_name)}get density(){return __privateGet(this,_density)}get query(){return __privateGet(this,_query)}get extension(){return __privateGet(this,_extension)}get queryType(){return __privateGet(this,_queryType)}get queryValue(){return __privateGet(this,_queryValue)}};_url=new WeakMap,_name=new WeakMap,_density=new WeakMap,_query=new WeakMap,_queryValue=new WeakMap,_queryType=new WeakMap,_extension=new WeakMap,__name(_Source,"Source");let Source=_Source;var _mediaBuckets;const _SourceSet=class _SourceSet{constructor(sourceSet,options){__privateAdd(this,_mediaBuckets);__privateSet(this,_mediaBuckets,new Map);const allowMediaBuckets=(options==null?void 0:options.mediaBuckets)!==!1,mediaBuckets=typeof sourceSet=="string"?allowMediaBuckets?sourceSet.trim().split(",").map(u=>u.trim()).filter(u=>!!u):[sourceSet]:sourceSet,tmp=[];mediaBuckets.forEach(v=>{const source=new Source(v);tmp.push([source.query,source])});const max=tmp.filter(v=>v[1].queryType.includes("max")).sort((a,b)=>b[1].queryValue-a[1].queryValue),min=tmp.filter(v=>v[1].queryType.includes("min")&&v[1].queryValue!==0).sort((a,b)=>a[1].queryValue-b[1].queryValue),defaultMatch=tmp.filter(t=>t[0]==="(min-width: 0px)");(defaultMatch?[...defaultMatch,...max,...min]:[...max,...min]).forEach(v=>{__privateGet(this,_mediaBuckets).has(v[0])||__privateGet(this,_mediaBuckets).set(v[0],[]),__privateGet(this,_mediaBuckets).get(v[0]).push(v[1])})}get mediaBuckets(){return __privateGet(this,_mediaBuckets)}};_mediaBuckets=new WeakMap,__name(_SourceSet,"SourceSet");let SourceSet=_SourceSet;var _srcset,_resizeListener;const _SourceManager=class _SourceManager extends Store.Store{constructor(parameters){super(void 0);__privateAdd(this,_srcset);__privateAdd(this,_resizeListener,__name(()=>{let matchedSources;__privateGet(this,_srcset).mediaBuckets.forEach((sources,query)=>{matchMedia(query).matches&&(matchedSources=sources)});let matchedSouce,maxDensity=0;matchedSources==null||matchedSources.forEach(s=>{s.density>maxDensity&&s.density<=Math.max(devicePixelRatio,1)&&(maxDensity=s.density,matchedSouce=s)}),matchedSources!=null&&matchedSources.length&&!matchedSouce&&(matchedSouce=matchedSources[0]),this.current=matchedSouce},"#resizeListener"));__privateSet(this,_srcset,new SourceSet(parameters.srcset,parameters.sourceSetOptions))}updateSource(parameters){__privateSet(this,_srcset,new SourceSet(parameters.srcset,parameters.sourceSetOptions)),__privateGet(this,_resizeListener).call(this)}close(){super.close(),this.disconnect()}connect(){windowResizer_index.windowResizer.subscribe(__privateGet(this,_resizeListener),order_index.RESIZE_ORDER.SOURCE_MANAGER),__privateGet(this,_resizeListener).call(this)}disconnect(){windowResizer_index.windowResizer.unsubscribe(__privateGet(this,_resizeListener))}};_srcset=new WeakMap,_resizeListener=new WeakMap,__name(_SourceManager,"SourceManager");let SourceManager=_SourceManager,id=0;var _sourceManager,_consumerElement,_consumerHolderElement,_isFirstLoadHappened,_lazyLoaded,_isLazy,_id,_idWithUrl,_status,_intersectionObserver,_clearTimeoutId,_currentURL,_sourceSetOptions,_SourceElement_instances,loadSource_fn,_intersectionListener,_loadListener,_errorListener,_playListener,_pauseListener,_loadedmetadataListener;const _SourceElement=class _SourceElement extends HTMLElement{constructor(options){super();__privateAdd(this,_SourceElement_instances);__privateAdd(this,_sourceManager,null);__privateAdd(this,_consumerElement,null);__privateAdd(this,_consumerHolderElement,this);__privateAdd(this,_isFirstLoadHappened,!1);__privateAdd(this,_lazyLoaded,!1);__privateAdd(this,_isLazy,!1);__privateAdd(this,_id,"");__privateAdd(this,_idWithUrl,"");__privateAdd(this,_status,new elementLinkedStore_index.ElementLinkedStore(this,{loading:!1,loaded:!1,error:!1,clear:!1,playing:!1,metadata:!1}));__privateAdd(this,_intersectionObserver,null);__privateAdd(this,_clearTimeoutId);__privateAdd(this,_currentURL,null);__privateAdd(this,_sourceSetOptions);__privateAdd(this,_intersectionListener,__name(entries=>{const entry=entries[0];__privateGet(this,_isLazy)&&(!__privateGet(this,_lazyLoaded)||this.hasAttribute("reload-source"))&&entry.isIntersecting&&this.triggerLazyLoad(),entry.isIntersecting?events.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&(__privateMethod(this,_SourceElement_instances,loadSource_fn).call(this,void 0),__privateSet(this,_lazyLoaded,!1)),events.dispatchEvent(this,"sourceRelease",{custom:!0}))},"#intersectionListener"));__privateAdd(this,_loadListener,__name(()=>{__privateGet(this,_status).set("loaded",!0),__privateGet(this,_status).set("error",!1),__privateGet(this,_status).set("loading",!1),!__privateGet(this,_isLazy)&&!__privateGet(this,_isFirstLoadHappened)&&loading_index.loading.complete(__privateGet(this,_idWithUrl)),events.dispatchEvent(this,"sourceLoaded",{custom:!0});const clearDuration=getComputedStyle(this).getPropertyValue("--clear-duration");clearDuration?__privateSet(this,_clearTimeoutId,setTimeout(()=>{__privateGet(this,_status).set("clear",!0)},parseFloat(clearDuration)*1e3)):__privateGet(this,_status).set("clear",!0),__privateSet(this,_isFirstLoadHappened,!0)},"#loadListener"));__privateAdd(this,_errorListener,__name(url=>{__privateGet(this,_status).set("loaded",!1),__privateGet(this,_status).set("error",!0),__privateGet(this,_status).set("loading",!1),!__privateGet(this,_isLazy)&&!__privateGet(this,_isFirstLoadHappened)&&loading_index.loading.error(__privateGet(this,_idWithUrl)),events.dispatchEvent(this,"sourceError",{custom:!0}),__privateSet(this,_isFirstLoadHappened,!0)},"#errorListener"));__privateAdd(this,_playListener,__name(()=>{__privateGet(this,_status).set("playing",!0),events.dispatchEvent(this,"sourcePlay",{custom:!0})},"#playListener"));__privateAdd(this,_pauseListener,__name(()=>{__privateGet(this,_status).set("playing",!1),events.dispatchEvent(this,"sourcePause",{custom:!0})},"#pauseListener"));__privateAdd(this,_loadedmetadataListener,__name(()=>{const consumerElement=__privateGet(this,_consumerElement);(consumerElement.tagName==="VIDEO"||consumerElement.tagName==="AUDIO")&&consumerElement.readyState>=1&&(__privateGet(this,_status).set("metadata",!0),events.dispatchEvent(this,"sourceMetadataLoaded",{custom:!0}),this.querySelectorAll("[data-source-duration]").forEach(el=>{el.textContent=metadata.formatMediaDuration(consumerElement.duration)}))},"#loadedmetadataListener"));__privateSet(this,_sourceSetOptions,options==null?void 0:options.sourceSetOptions),intersector_index.isBrowser&&window.IntersectionObserver&&__privateSet(this,_intersectionObserver,new IntersectionObserver(__privateGet(this,_intersectionListener))),__privateGet(this,_status).subscribe(e=>{var _a;const globalClasses=(_a=this.getAttribute("data-global-play-class"))==null?void 0:_a.split(",");globalClasses!=null&&globalClasses.length&&(e.current.playing?globalClasses.forEach(className=>{document.documentElement.classList.add(className.trim())}):globalClasses.forEach(className=>{document.documentElement.classList.remove(className.trim())}))})}get consumerElement(){return __privateGet(this,_consumerElement)}get consumerHolderElement(){return __privateGet(this,_consumerHolderElement)}get sourceManager(){return __privateGet(this,_sourceManager)}get status(){return __privateGet(this,_status)}get isLazy(){return __privateGet(this,_isLazy)}get currentURL(){return __privateGet(this,_currentURL)}get isFirstLoadHappened(){return __privateGet(this,_isFirstLoadHappened)}triggerLazyLoad(){!__privateGet(this,_lazyLoaded)&&__privateGet(this,_sourceManager).current&&__privateGet(this,_sourceManager).current!==__privateGet(this,_sourceManager).previous&&(__privateSet(this,_lazyLoaded,!0),__privateMethod(this,_SourceElement_instances,loadSource_fn).call(this,__privateGet(this,_sourceManager).current))}connectedCallback(){__privateSet(this,_id,`source-consumer-${++id}`);const srcset=this.getAttribute("srcset")||"",notifyElement=this.hasAttribute("notify")?this.closest(this.getAttribute("notify")):null;notifyElement&&__privateGet(this,_status).addElement(notifyElement),__privateSet(this,_consumerHolderElement,this.querySelector("[data-consumer-holder]")||this),this.querySelectorAll(".source-consumer").forEach(el=>el==null?void 0:el.remove()),__privateSet(this,_consumerElement,this.createConsumer()),__privateGet(this,_consumerElement).style.cssText=`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
@@ -9,12 +9,12 @@ import { ElementLinkedStore } from "./element-linked-store/index.js";
9
9
  import { loading } from "./loading/index.js";
10
10
  import { i as isBrowser } from "./index-ClTMVKJp.js";
11
11
  import { d as dispatchEvent } from "./events-Ds-TuvYW.js";
12
- import { k as kebabToCamel } from "./string-B3lm2b7v.js";
12
+ import { k as kebabToCamel } from "./string-Ct-dy_cs.js";
13
13
  import { f as formatMediaDuration } from "./metadata-BNdkmeeD.js";
14
14
  import "construct-style-sheets-polyfill";
15
15
  import { RESIZE_ORDER } from "./order/index.js";
16
16
  import { windowResizer } from "./window-resizer/index.js";
17
- import { S as Store } from "./Store-BRTHeZmO.js";
17
+ import { S as Store } from "./Store-B2Y_0Tw9.js";
18
18
  var _url, _name, _density, _query, _queryValue, _queryType, _extension;
19
19
  const _Source = class _Source {
20
20
  constructor(url) {
@@ -6,7 +6,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
6
6
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
7
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
8
8
  import { Notifier } from "./notifier/index.js";
9
- import { g as generateId } from "./string-B3lm2b7v.js";
9
+ import { g as generateId } from "./string-Ct-dy_cs.js";
10
10
  import "construct-style-sheets-polyfill";
11
11
  import { i as isBrowser } from "./index-ClTMVKJp.js";
12
12
  var _loadedState;
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const notifier_index=require("./notifier/index.cjs"),string=require("./string-CbRNzmd9.cjs");require("construct-style-sheets-polyfill");const intersector_index=require("./index-DZ44osDT.cjs");var _loadedState;const _StoreRegistry=class _StoreRegistry{constructor(){__privateAdd(this,_loadedState);this.storage=null,this.name="store-registry",__privateSet(this,_loadedState,null),intersector_index.isBrowser&&(this.storage=localStorage)}get loadedState(){return __privateGet(this,_loadedState)}saveState(){const fullState=this.getState(),stringState=JSON.stringify(fullState);localStorage.setItem(this.name,stringState)}loadState(state=localStorage.getItem(this.name)){state&&(typeof state=="string"?__privateSet(this,_loadedState,JSON.parse(state)):__privateSet(this,_loadedState,state),activeStores.current.forEach(store=>{store.name&&this.updateStore(store)}))}resetState(){activeStores.current.forEach(store=>{store.name&&store.reset()}),this.saveState()}updateStore(store){var _a,_b;if(!Array.isArray((_a=__privateGet(this,_loadedState))==null?void 0:_a.stores))return store;if(store.name){const match=(_b=__privateGet(this,_loadedState))==null?void 0:_b.stores.find(s=>s.name===store.name);match&&(store.current=match.value)}return store}getState(){const state={stores:[]};return activeStores.current.forEach(store=>{store.name&&(state.stores.find(s=>s.name===store.name)||state.stores.push({value:store.current,name:store.name}))}),state}};_loadedState=new WeakMap,__name(_StoreRegistry,"StoreRegistry");let StoreRegistry=_StoreRegistry;const storeRegistry=new StoreRegistry;var _name,_state,_equalityCheck,_notifier,_skipSubscribeNotification,_middlewares,_notifyAndClose,_invisible,_id;const _Store=class _Store{constructor(value,options){__privateAdd(this,_name);__privateAdd(this,_state);__privateAdd(this,_equalityCheck);__privateAdd(this,_notifier,new notifier_index.Notifier);__privateAdd(this,_skipSubscribeNotification);__privateAdd(this,_middlewares);__privateAdd(this,_notifyAndClose);__privateAdd(this,_invisible);__privateAdd(this,_id,"store-"+string.generateId(10));__privateSet(this,_name,options==null?void 0:options.name),this.__manager=options==null?void 0:options.__manager,__privateSet(this,_state,{initial:value,previous:void 0,current:value}),__privateSet(this,_equalityCheck,(options==null?void 0:options.equalityCheck)||((currentValue,newValue)=>currentValue===newValue)),options!=null&&options.validate&&this.addMiddleware(options.validate),__privateSet(this,_notifyAndClose,(options==null?void 0:options.notifyAndClose)||!1),__privateSet(this,_invisible,(options==null?void 0:options.invisible)||!1),__privateSet(this,_skipSubscribeNotification,(options==null?void 0:options.skipSubscribeNotification)||!1),__privateGet(this,_name)&&storeRegistry.updateStore(this)}get id(){return __privateGet(this,_id)}get name(){return __privateGet(this,_name)}get initial(){return __privateGet(this,_state).initial}get previous(){return __privateGet(this,_state).previous}get current(){return __privateGet(this,_state).current}set current(value){if(!__privateGet(this,_equalityCheck).call(this,__privateGet(this,_state).current,value)){if(__privateGet(this,_state).previous=__privateGet(this,_state).current,__privateGet(this,_middlewares))for(const middleware of __privateGet(this,_middlewares))value=middleware(value);__privateGet(this,_state).current=value,this.notify(),__privateGet(this,_notifyAndClose)&&this.close()}}setCurrent(value){this.current=value}update(callback){this.current=callback(this.current)}add(value){Array.isArray(this.current)&&(this.current=[...this.current,value])}filter(callback){Array.isArray(this.current)&&(this.current=this.current.filter(callback))}get subscribers(){return __privateGet(this,_notifier).subscribers}notify(){__privateGet(this,_notifier).notify(__privateGet(this,_state))}addMiddleware(middleware){__privateGet(this,_middlewares)||__privateSet(this,_middlewares,new Set),__privateGet(this,_middlewares).add(middleware)}removeMiddleware(middleware){var _a,_b;(_a=__privateGet(this,_middlewares))==null||_a.delete(middleware),(_b=__privateGet(this,_middlewares))!=null&&_b.size||__privateSet(this,_middlewares,void 0)}subscribe(callback,order){return!__privateGet(this,_invisible)&&!__privateGet(this,_notifier).size&&shareStore(this),__privateGet(this,_notifier).subscribe(callback,order),__privateGet(this,_skipSubscribeNotification)||callback(__privateGet(this,_state)),()=>{this.unsubscribe(callback)}}unsubscribe(callback){__privateGet(this,_notifier).unsubscribe(callback),__privateGet(this,_notifier).size||unshareStore(this)}reset(){this.current=Array.isArray(this.initial)?[...this.initial]:this.initial}close(){__privateGet(this,_notifier).close(),__privateGet(this,_state).previous=void 0,__privateGet(this,_state).current=__privateGet(this,_state).initial,unshareStore(this)}};_name=new WeakMap,_state=new WeakMap,_equalityCheck=new WeakMap,_notifier=new WeakMap,_skipSubscribeNotification=new WeakMap,_middlewares=new WeakMap,_notifyAndClose=new WeakMap,_invisible=new WeakMap,_id=new WeakMap,__name(_Store,"Store");let Store=_Store;const activeStores=new Store([],{invisible:!0});function shareStore(store){activeStores.current.includes(store)||(activeStores.current=[...activeStores.current,store])}__name(shareStore,"shareStore");function unshareStore(store){activeStores.current.includes(store)&&(activeStores.current=activeStores.current.filter(s=>s!==store))}__name(unshareStore,"unshareStore");exports.Store=Store;exports.activeStores=activeStores;exports.storeRegistry=storeRegistry;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const notifier_index=require("./notifier/index.cjs"),string=require("./string-Bx5N38JG.cjs");require("construct-style-sheets-polyfill");const intersector_index=require("./index-DZ44osDT.cjs");var _loadedState;const _StoreRegistry=class _StoreRegistry{constructor(){__privateAdd(this,_loadedState);this.storage=null,this.name="store-registry",__privateSet(this,_loadedState,null),intersector_index.isBrowser&&(this.storage=localStorage)}get loadedState(){return __privateGet(this,_loadedState)}saveState(){const fullState=this.getState(),stringState=JSON.stringify(fullState);localStorage.setItem(this.name,stringState)}loadState(state=localStorage.getItem(this.name)){state&&(typeof state=="string"?__privateSet(this,_loadedState,JSON.parse(state)):__privateSet(this,_loadedState,state),activeStores.current.forEach(store=>{store.name&&this.updateStore(store)}))}resetState(){activeStores.current.forEach(store=>{store.name&&store.reset()}),this.saveState()}updateStore(store){var _a,_b;if(!Array.isArray((_a=__privateGet(this,_loadedState))==null?void 0:_a.stores))return store;if(store.name){const match=(_b=__privateGet(this,_loadedState))==null?void 0:_b.stores.find(s=>s.name===store.name);match&&(store.current=match.value)}return store}getState(){const state={stores:[]};return activeStores.current.forEach(store=>{store.name&&(state.stores.find(s=>s.name===store.name)||state.stores.push({value:store.current,name:store.name}))}),state}};_loadedState=new WeakMap,__name(_StoreRegistry,"StoreRegistry");let StoreRegistry=_StoreRegistry;const storeRegistry=new StoreRegistry;var _name,_state,_equalityCheck,_notifier,_skipSubscribeNotification,_middlewares,_notifyAndClose,_invisible,_id;const _Store=class _Store{constructor(value,options){__privateAdd(this,_name);__privateAdd(this,_state);__privateAdd(this,_equalityCheck);__privateAdd(this,_notifier,new notifier_index.Notifier);__privateAdd(this,_skipSubscribeNotification);__privateAdd(this,_middlewares);__privateAdd(this,_notifyAndClose);__privateAdd(this,_invisible);__privateAdd(this,_id,"store-"+string.generateId(10));__privateSet(this,_name,options==null?void 0:options.name),this.__manager=options==null?void 0:options.__manager,__privateSet(this,_state,{initial:value,previous:void 0,current:value}),__privateSet(this,_equalityCheck,(options==null?void 0:options.equalityCheck)||((currentValue,newValue)=>currentValue===newValue)),options!=null&&options.validate&&this.addMiddleware(options.validate),__privateSet(this,_notifyAndClose,(options==null?void 0:options.notifyAndClose)||!1),__privateSet(this,_invisible,(options==null?void 0:options.invisible)||!1),__privateSet(this,_skipSubscribeNotification,(options==null?void 0:options.skipSubscribeNotification)||!1),__privateGet(this,_name)&&storeRegistry.updateStore(this)}get id(){return __privateGet(this,_id)}get name(){return __privateGet(this,_name)}get initial(){return __privateGet(this,_state).initial}get previous(){return __privateGet(this,_state).previous}get current(){return __privateGet(this,_state).current}set current(value){if(!__privateGet(this,_equalityCheck).call(this,__privateGet(this,_state).current,value)){if(__privateGet(this,_state).previous=__privateGet(this,_state).current,__privateGet(this,_middlewares))for(const middleware of __privateGet(this,_middlewares))value=middleware(value);__privateGet(this,_state).current=value,this.notify(),__privateGet(this,_notifyAndClose)&&this.close()}}setCurrent(value){this.current=value}update(callback){this.current=callback(this.current)}add(value){Array.isArray(this.current)&&(this.current=[...this.current,value])}filter(callback){Array.isArray(this.current)&&(this.current=this.current.filter(callback))}get subscribers(){return __privateGet(this,_notifier).subscribers}notify(){__privateGet(this,_notifier).notify(__privateGet(this,_state))}addMiddleware(middleware){__privateGet(this,_middlewares)||__privateSet(this,_middlewares,new Set),__privateGet(this,_middlewares).add(middleware)}removeMiddleware(middleware){var _a,_b;(_a=__privateGet(this,_middlewares))==null||_a.delete(middleware),(_b=__privateGet(this,_middlewares))!=null&&_b.size||__privateSet(this,_middlewares,void 0)}subscribe(callback,order){return!__privateGet(this,_invisible)&&!__privateGet(this,_notifier).size&&shareStore(this),__privateGet(this,_notifier).subscribe(callback,order),__privateGet(this,_skipSubscribeNotification)||callback(__privateGet(this,_state)),()=>{this.unsubscribe(callback)}}unsubscribe(callback){__privateGet(this,_notifier).unsubscribe(callback),__privateGet(this,_notifier).size||unshareStore(this)}reset(){this.current=Array.isArray(this.initial)?[...this.initial]:this.initial}close(){__privateGet(this,_notifier).close(),__privateGet(this,_state).previous=void 0,__privateGet(this,_state).current=__privateGet(this,_state).initial,unshareStore(this)}};_name=new WeakMap,_state=new WeakMap,_equalityCheck=new WeakMap,_notifier=new WeakMap,_skipSubscribeNotification=new WeakMap,_middlewares=new WeakMap,_notifyAndClose=new WeakMap,_invisible=new WeakMap,_id=new WeakMap,__name(_Store,"Store");let Store=_Store;const activeStores=new Store([],{invisible:!0});function shareStore(store){activeStores.current.includes(store)||(activeStores.current=[...activeStores.current,store])}__name(shareStore,"shareStore");function unshareStore(store){activeStores.current.includes(store)&&(activeStores.current=activeStores.current.filter(s=>s!==store))}__name(unshareStore,"unshareStore");exports.Store=Store;exports.activeStores=activeStores;exports.storeRegistry=storeRegistry;
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable;var __typeError=msg=>{throw TypeError(msg)};var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a},__spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b)),__name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const easings=require("./easings-BWq0pPLq.cjs"),math=require("./math-C-knY2TL.cjs"),number=require("./number-Bu4sGvW7.cjs"),polyfills=require("./polyfills-DZCuDBkA.cjs");require("construct-style-sheets-polyfill");require("./index-DZ44osDT.cjs");const Animation=require("./Animation-BtUdarQ7.cjs");var _easing,_duration;const _Tweened=class _Tweened extends Animation.Animation{constructor(initial,options){super(initial||0,options);__privateAdd(this,_easing,easings.linear);__privateAdd(this,_duration,1e3);this.updateOptions(__spreadProps(__spreadValues({},options),{equalize:!0}))}updateOptions(options){super.updateOptions(options),__privateSet(this,_easing,typeof(options==null?void 0:options.easing)=="function"?options.easing:typeof(options==null?void 0:options.easing)=="string"&&easings.easings[options.easing]||easings.linear),__privateSet(this,_duration,(options==null?void 0:options.duration)===!1?0:polyfills.nullishCoalescing(options==null?void 0:options.duration,__privateGet(this,_duration)))}handleAnimationFrame(e){const t=e.timeElapsedSinceSubscription/1e3/(__privateGet(this,_duration)/1e3)||0,et=__privateGet(this,_easing).call(this,math.clamp(t,0,1));this.current=number.preciseNumber(this.from+(this.target-this.from)*et,6),t>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),this.listenAnimationFrame()}};_easing=new WeakMap,_duration=new WeakMap,__name(_Tweened,"Tweened");let Tweened=_Tweened;exports.Tweened=Tweened;
1
+ "use strict";var __defProp=Object.defineProperty,__defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable;var __typeError=msg=>{throw TypeError(msg)};var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value,__spreadValues=(a,b)=>{for(var prop in b||(b={}))__hasOwnProp.call(b,prop)&&__defNormalProp(a,prop,b[prop]);if(__getOwnPropSymbols)for(var prop of __getOwnPropSymbols(b))__propIsEnum.call(b,prop)&&__defNormalProp(a,prop,b[prop]);return a},__spreadProps=(a,b)=>__defProps(a,__getOwnPropDescs(b)),__name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const easings=require("./easings-YkfoM7J2.cjs"),math=require("./math-C-knY2TL.cjs"),number=require("./number-Bu4sGvW7.cjs"),polyfills=require("./polyfills-DZCuDBkA.cjs");require("construct-style-sheets-polyfill");require("./index-DZ44osDT.cjs");const Animation=require("./Animation-BGpgWWgS.cjs");var _easing,_duration;const _Tweened=class _Tweened extends Animation.Animation{constructor(initial,options){super(initial||0,options);__privateAdd(this,_easing,easings.linear);__privateAdd(this,_duration,1e3);this.updateOptions(__spreadProps(__spreadValues({},options),{equalize:!0}))}updateOptions(options){super.updateOptions(options),__privateSet(this,_easing,typeof(options==null?void 0:options.easing)=="function"?options.easing:typeof(options==null?void 0:options.easing)=="string"?easings.easings[options.easing]||easings.easings.linear:__privateGet(this,_easing)),__privateSet(this,_duration,(options==null?void 0:options.duration)===!1?0:polyfills.nullishCoalescing(options==null?void 0:options.duration,__privateGet(this,_duration)))}handleAnimationFrame(e){const t=e.timeElapsedSinceSubscription/1e3/(__privateGet(this,_duration)/1e3)||0,et=__privateGet(this,_easing).call(this,math.clamp(t,0,1));this.current=number.preciseNumber(this.from+(this.target-this.from)*et,6),t>1&&this.unlistenAnimationFrame()}start(){this.unlistenAnimationFrame(),super.start()}};_easing=new WeakMap,_duration=new WeakMap,__name(_Tweened,"Tweened");let Tweened=_Tweened;exports.Tweened=Tweened;
@@ -15,13 +15,13 @@ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { en
15
15
  }, __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)), __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
16
16
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
17
17
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
18
- import { l as linear, e as easings } from "./easings-DE1AUrbN.js";
18
+ import { l as linear, e as easings } from "./easings-B5flyl-V.js";
19
19
  import { c as clamp } from "./math-r8V23YFe.js";
20
20
  import { p as preciseNumber } from "./number-DiVt2xnh.js";
21
21
  import { n as nullishCoalescing } from "./polyfills-CG1XJNia.js";
22
22
  import "construct-style-sheets-polyfill";
23
23
  import "./index-ClTMVKJp.js";
24
- import { A as Animation } from "./Animation-BUD5w3AB.js";
24
+ import { A as Animation } from "./Animation-CSofkIFz.js";
25
25
  var _easing, _duration;
26
26
  const _Tweened = class _Tweened extends Animation {
27
27
  constructor(initial, options) {
@@ -31,14 +31,14 @@ const _Tweened = class _Tweened extends Animation {
31
31
  this.updateOptions(__spreadProps(__spreadValues({}, options), { equalize: !0 }));
32
32
  }
33
33
  updateOptions(options) {
34
- super.updateOptions(options), __privateSet(this, _easing, typeof (options == null ? void 0 : options.easing) == "function" ? options.easing : typeof (options == null ? void 0 : options.easing) == "string" ? easings[options.easing] || linear : linear), __privateSet(this, _duration, (options == null ? void 0 : options.duration) === !1 ? 0 : nullishCoalescing(options == null ? void 0 : options.duration, __privateGet(this, _duration)));
34
+ super.updateOptions(options), __privateSet(this, _easing, typeof (options == null ? void 0 : options.easing) == "function" ? options.easing : typeof (options == null ? void 0 : options.easing) == "string" ? easings[options.easing] || easings.linear : __privateGet(this, _easing)), __privateSet(this, _duration, (options == null ? void 0 : options.duration) === !1 ? 0 : nullishCoalescing(options == null ? void 0 : options.duration, __privateGet(this, _duration)));
35
35
  }
36
36
  handleAnimationFrame(e) {
37
37
  const t = e.timeElapsedSinceSubscription / 1e3 / (__privateGet(this, _duration) / 1e3) || 0, et = __privateGet(this, _easing).call(this, clamp(t, 0, 1));
38
38
  this.current = preciseNumber(this.from + (this.target - this.from) * et, 6), t > 1 && this.unlistenAnimationFrame();
39
39
  }
40
40
  start() {
41
- this.unlistenAnimationFrame(), this.listenAnimationFrame();
41
+ this.unlistenAnimationFrame(), super.start();
42
42
  }
43
43
  };
44
44
  _easing = new WeakMap(), _duration = new WeakMap(), __name(_Tweened, "Tweened");
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const order_index=require("./order/index.cjs"),windowResizer_index=require("./window-resizer/index.cjs"),intersector_index=require("./index-DZ44osDT.cjs");require("construct-style-sheets-polyfill");const Store=require("./Store-DZnOrofs.cjs");var _OS,_isMobile,_isTouch,_isWebgl,_isWebp,_isApple;const _Device=class _Device{constructor(){__privateAdd(this,_OS);__privateAdd(this,_isMobile);__privateAdd(this,_isTouch);__privateAdd(this,_isWebgl);__privateAdd(this,_isWebp);__privateAdd(this,_isApple);var _a,_b;if(__privateSet(this,_OS,"unknown"),__privateSet(this,_isMobile,!1),__privateSet(this,_isTouch,!1),__privateSet(this,_isWebgl,!1),__privateSet(this,_isWebp,!1),__privateSet(this,_isApple,!1),this.resize=()=>{__privateSet(this,_isMobile,/Mobi|Android/i.test(navigator.userAgent)),__privateSet(this,_isTouch,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{__privateSet(this,_isTouch,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},intersector_index.isBrowser){this.resize(),windowResizer_index.windowResizer.subscribe(this.resize,order_index.RESIZE_ORDER.DEVICE);{const canvas=document.createElement("canvas"),gl=canvas.getContext("webgl")||canvas.getContext("experimental-webgl");__privateSet(this,_isWebgl,gl&&gl instanceof WebGLRenderingContext||!1)}{const canvas=document.createElement("canvas");canvas.getContext("2d")&&__privateSet(this,_isWebp,canvas.toDataURL("image/webp").indexOf("data:image/webp")==0)}const userAgent=window.navigator.userAgent,platform=((_b=(_a=window.navigator)==null?void 0:_a.userAgentData)==null?void 0:_b.platform)||window.navigator.platform,macosPlatforms=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],windowsPlatforms=["Win32","Win64","Windows","WinCE"],iosPlatforms=["iPhone","iPad","iPod"];macosPlatforms.includes(platform)?(__privateSet(this,_OS,"macOS"),__privateSet(this,_isApple,!0)):iosPlatforms.includes(platform)?(__privateSet(this,_OS,"iOS"),__privateSet(this,_isApple,!0)):windowsPlatforms.includes(platform)?__privateSet(this,_OS,"Windows"):/Android/.test(userAgent)?__privateSet(this,_OS,"Android"):/Linux/.test(platform)?__privateSet(this,_OS,"Linux"):__privateSet(this,_OS,"unknown")}}get OS(){return __privateGet(this,_OS)}get isMobile(){return __privateGet(this,_isMobile)}get isTouch(){return __privateGet(this,_isTouch)}get isWebgl(){return __privateGet(this,_isWebgl)}get isWebp(){return __privateGet(this,_isWebp)}get isApple(){return __privateGet(this,_isApple)}};_OS=new WeakMap,_isMobile=new WeakMap,_isTouch=new WeakMap,_isWebgl=new WeakMap,_isWebp=new WeakMap,_isApple=new WeakMap,__name(_Device,"Device");let Device=_Device;const device=new Device;var ViewportBreakpoints=(ViewportBreakpoints2=>(ViewportBreakpoints2.mobile="600px",ViewportBreakpoints2.tablet="1024px",ViewportBreakpoints2.notebook="1280px",ViewportBreakpoints2.desktop="1281px",ViewportBreakpoints2))(ViewportBreakpoints||{}),ViewportMediaRules=(ViewportMediaRules2=>(ViewportMediaRules2["<=mobile"]="(max-width: 600px)",ViewportMediaRules2[">=mobile"]="(min-width: 601px)",ViewportMediaRules2["<=tablet"]="(max-width: 1024px)",ViewportMediaRules2[">=tablet"]="(min-width: 1025px)",ViewportMediaRules2["<=notebook"]="(max-width: 1280px)",ViewportMediaRules2[">=notebook"]="(min-width: 1281px)",ViewportMediaRules2["<=desktop"]="(max-width: 1280px)",ViewportMediaRules2[">=desktop"]="(min-width: 1281px)",ViewportMediaRules2))(ViewportMediaRules||{}),_width,_height,_pixelRatio,_type;const _Viewport=class _Viewport{constructor(){__privateAdd(this,_width);__privateAdd(this,_height);__privateAdd(this,_pixelRatio);__privateAdd(this,_type);__privateSet(this,_width,0),__privateSet(this,_height,0),__privateSet(this,_pixelRatio,0),__privateSet(this,_type,new Store.Store(void 0)),this.resize=()=>{__privateSet(this,_width,document.documentElement.clientWidth),__privateSet(this,_height,innerHeight),__privateSet(this,_pixelRatio,devicePixelRatio),matchMedia("(max-width: 600px)").matches?__privateGet(this,_type).current="mobile":matchMedia("(max-width: 1024px)").matches?__privateGet(this,_type).current="tablet":matchMedia("(max-width: 1280px)").matches?__privateGet(this,_type).current="notebook":matchMedia("(min-width: 1281px)").matches&&(__privateGet(this,_type).current="desktop")},intersector_index.isBrowser&&(this.resize(),windowResizer_index.windowResizer.subscribe(this.resize,order_index.RESIZE_ORDER.DEVICE))}get width(){return __privateGet(this,_width)}get height(){return __privateGet(this,_height)}get type(){return __privateGet(this,_type)}get pixelRatio(){return __privateGet(this,_pixelRatio)}};_width=new WeakMap,_height=new WeakMap,_pixelRatio=new WeakMap,_type=new WeakMap,__name(_Viewport,"Viewport");let Viewport=_Viewport;const viewport=new Viewport;exports.ViewportBreakpoints=ViewportBreakpoints;exports.ViewportMediaRules=ViewportMediaRules;exports.device=device;exports.viewport=viewport;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value);const order_index=require("./order/index.cjs"),windowResizer_index=require("./window-resizer/index.cjs"),intersector_index=require("./index-DZ44osDT.cjs");require("construct-style-sheets-polyfill");const Store=require("./Store-ClBpeYgL.cjs");var _OS,_isMobile,_isTouch,_isWebgl,_isWebp,_isApple;const _Device=class _Device{constructor(){__privateAdd(this,_OS);__privateAdd(this,_isMobile);__privateAdd(this,_isTouch);__privateAdd(this,_isWebgl);__privateAdd(this,_isWebp);__privateAdd(this,_isApple);var _a,_b;if(__privateSet(this,_OS,"unknown"),__privateSet(this,_isMobile,!1),__privateSet(this,_isTouch,!1),__privateSet(this,_isWebgl,!1),__privateSet(this,_isWebp,!1),__privateSet(this,_isApple,!1),this.resize=()=>{__privateSet(this,_isMobile,/Mobi|Android/i.test(navigator.userAgent)),__privateSet(this,_isTouch,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{__privateSet(this,_isTouch,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},intersector_index.isBrowser){this.resize(),windowResizer_index.windowResizer.subscribe(this.resize,order_index.RESIZE_ORDER.DEVICE);{const canvas=document.createElement("canvas"),gl=canvas.getContext("webgl")||canvas.getContext("experimental-webgl");__privateSet(this,_isWebgl,gl&&gl instanceof WebGLRenderingContext||!1)}{const canvas=document.createElement("canvas");canvas.getContext("2d")&&__privateSet(this,_isWebp,canvas.toDataURL("image/webp").indexOf("data:image/webp")==0)}const userAgent=window.navigator.userAgent,platform=((_b=(_a=window.navigator)==null?void 0:_a.userAgentData)==null?void 0:_b.platform)||window.navigator.platform,macosPlatforms=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],windowsPlatforms=["Win32","Win64","Windows","WinCE"],iosPlatforms=["iPhone","iPad","iPod"];macosPlatforms.includes(platform)?(__privateSet(this,_OS,"macOS"),__privateSet(this,_isApple,!0)):iosPlatforms.includes(platform)?(__privateSet(this,_OS,"iOS"),__privateSet(this,_isApple,!0)):windowsPlatforms.includes(platform)?__privateSet(this,_OS,"Windows"):/Android/.test(userAgent)?__privateSet(this,_OS,"Android"):/Linux/.test(platform)?__privateSet(this,_OS,"Linux"):__privateSet(this,_OS,"unknown")}}get OS(){return __privateGet(this,_OS)}get isMobile(){return __privateGet(this,_isMobile)}get isTouch(){return __privateGet(this,_isTouch)}get isWebgl(){return __privateGet(this,_isWebgl)}get isWebp(){return __privateGet(this,_isWebp)}get isApple(){return __privateGet(this,_isApple)}};_OS=new WeakMap,_isMobile=new WeakMap,_isTouch=new WeakMap,_isWebgl=new WeakMap,_isWebp=new WeakMap,_isApple=new WeakMap,__name(_Device,"Device");let Device=_Device;const device=new Device;var ViewportBreakpoints=(ViewportBreakpoints2=>(ViewportBreakpoints2.mobile="600px",ViewportBreakpoints2.tablet="1024px",ViewportBreakpoints2.notebook="1280px",ViewportBreakpoints2.desktop="1281px",ViewportBreakpoints2))(ViewportBreakpoints||{}),ViewportMediaRules=(ViewportMediaRules2=>(ViewportMediaRules2["<=mobile"]="(max-width: 600px)",ViewportMediaRules2[">=mobile"]="(min-width: 601px)",ViewportMediaRules2["<=tablet"]="(max-width: 1024px)",ViewportMediaRules2[">=tablet"]="(min-width: 1025px)",ViewportMediaRules2["<=notebook"]="(max-width: 1280px)",ViewportMediaRules2[">=notebook"]="(min-width: 1281px)",ViewportMediaRules2["<=desktop"]="(max-width: 1280px)",ViewportMediaRules2[">=desktop"]="(min-width: 1281px)",ViewportMediaRules2))(ViewportMediaRules||{}),_width,_height,_pixelRatio,_type;const _Viewport=class _Viewport{constructor(){__privateAdd(this,_width);__privateAdd(this,_height);__privateAdd(this,_pixelRatio);__privateAdd(this,_type);__privateSet(this,_width,0),__privateSet(this,_height,0),__privateSet(this,_pixelRatio,0),__privateSet(this,_type,new Store.Store(void 0)),this.resize=()=>{__privateSet(this,_width,document.documentElement.clientWidth),__privateSet(this,_height,innerHeight),__privateSet(this,_pixelRatio,devicePixelRatio),matchMedia("(max-width: 600px)").matches?__privateGet(this,_type).current="mobile":matchMedia("(max-width: 1024px)").matches?__privateGet(this,_type).current="tablet":matchMedia("(max-width: 1280px)").matches?__privateGet(this,_type).current="notebook":matchMedia("(min-width: 1281px)").matches&&(__privateGet(this,_type).current="desktop")},intersector_index.isBrowser&&(this.resize(),windowResizer_index.windowResizer.subscribe(this.resize,order_index.RESIZE_ORDER.DEVICE))}get width(){return __privateGet(this,_width)}get height(){return __privateGet(this,_height)}get type(){return __privateGet(this,_type)}get pixelRatio(){return __privateGet(this,_pixelRatio)}};_width=new WeakMap,_height=new WeakMap,_pixelRatio=new WeakMap,_type=new WeakMap,__name(_Viewport,"Viewport");let Viewport=_Viewport;const viewport=new Viewport;exports.ViewportBreakpoints=ViewportBreakpoints;exports.ViewportMediaRules=ViewportMediaRules;exports.device=device;exports.viewport=viewport;
@@ -9,7 +9,7 @@ import { RESIZE_ORDER } from "./order/index.js";
9
9
  import { windowResizer } from "./window-resizer/index.js";
10
10
  import { i as isBrowser } from "./index-ClTMVKJp.js";
11
11
  import "construct-style-sheets-polyfill";
12
- import { S as Store } from "./Store-BRTHeZmO.js";
12
+ import { S as Store } from "./Store-B2Y_0Tw9.js";
13
13
  var _OS, _isMobile, _isTouch, _isWebgl, _isWebp, _isApple;
14
14
  const _Device = class _Device {
15
15
  constructor() {
@@ -6,6 +6,7 @@ export interface AnimationOptions extends TickerAddOptions {
6
6
  equalize?: boolean;
7
7
  restart?: boolean;
8
8
  current?: number;
9
+ delay?: number;
9
10
  }
10
11
  export type AnimationConstructorOptions<Options extends AnimationOptions> = StoreOptions<number> & Options;
11
12
  export declare abstract class Animation<Options extends AnimationOptions = AnimationOptions> extends Store<number> {
@@ -1,7 +1,7 @@
1
1
  import { TickerCallbackEntry } from '../ticker';
2
2
  import { EasingFunction } from '../utils';
3
+ import { easings } from '../utils/easings';
3
4
  import { Animation, AnimationConstructorOptions, AnimationOptions } from './Animation';
4
- import * as easings from '@packages/utils/easings';
5
5
  export type TweenEasingName = keyof typeof easings;
6
6
  export interface TweenedOptions extends AnimationOptions {
7
7
  easing?: EasingFunction | TweenEasingName | false;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Animation=require("../Animation-BtUdarQ7.cjs"),Damped=require("../Damped-BHm2IuyN.cjs"),Tweened=require("../Tweened-3UYSwrvs.cjs");exports.Animation=Animation.Animation;exports.Damped=Damped.Damped;exports.Tweened=Tweened.Tweened;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Animation=require("../Animation-BGpgWWgS.cjs"),Damped=require("../Damped-C3R5LGcL.cjs"),Tweened=require("../Tweened--qNhMQ8U.cjs");exports.Animation=Animation.Animation;exports.Damped=Damped.Damped;exports.Tweened=Tweened.Tweened;
@@ -1,6 +1,6 @@
1
- import { A } from "../Animation-BUD5w3AB.js";
2
- import { D } from "../Damped-Ds17AUU-.js";
3
- import { T } from "../Tweened-C1FsHjhN.js";
1
+ import { A } from "../Animation-CSofkIFz.js";
2
+ import { D } from "../Damped-CInILmq-.js";
3
+ import { T } from "../Tweened-CSPu3mVO.js";
4
4
  export {
5
5
  A as Animation,
6
6
  D as Damped,
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Store=require("../Store-DZnOrofs.cjs"),attributes=require("../attributes-BADnRZpK.cjs"),intersector_index=require("../index-DZ44osDT.cjs"),dom=require("../dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");var _element,_name,_mutationObserver,_active,_Attribute_instances,tryUpdate_fn;const _Attribute=class _Attribute extends Store.Store{constructor(elementOrSelector,name,defaultValue,options){super(defaultValue,options);__privateAdd(this,_Attribute_instances);__privateAdd(this,_element,null);__privateAdd(this,_name);__privateAdd(this,_mutationObserver,null);__privateAdd(this,_active,!1);__privateSet(this,_name,name),intersector_index.isBrowser&&(__privateSet(this,_element,dom.getElement(elementOrSelector)),__privateSet(this,_mutationObserver,new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.type==="attributes"&&mutation.attributeName===__privateGet(this,_name)&&__privateMethod(this,_Attribute_instances,tryUpdate_fn).call(this)})})),options!=null&&options.sync&&this.subscribe(e=>{__privateGet(this,_element).setAttribute(__privateGet(this,_name),e.current.toString())}))}subscribe(callback,order){return this.subscribers.length||this.observe(),super.subscribe(callback,order)}unsubscribe(callback){super.unsubscribe(callback),this.subscribers.length||this.unobserve()}observe(){__privateGet(this,_active)||(__privateSet(this,_active,!0),__privateGet(this,_mutationObserver).observe(__privateGet(this,_element),{attributes:!0}),__privateMethod(this,_Attribute_instances,tryUpdate_fn).call(this))}unobserve(){__privateGet(this,_active)&&(__privateSet(this,_active,!1),__privateGet(this,_mutationObserver).disconnect())}close(){super.close(),this.unobserve()}};_element=new WeakMap,_name=new WeakMap,_mutationObserver=new WeakMap,_active=new WeakMap,_Attribute_instances=new WeakSet,tryUpdate_fn=__name(function(){const value=__privateGet(this,_element).getAttribute(__privateGet(this,_name));value!=null&&(this.current=attributes.parseAttributeValue(value))},"#tryUpdate"),__name(_Attribute,"Attribute");let Attribute=_Attribute;exports.Attribute=Attribute;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Store=require("../Store-ClBpeYgL.cjs"),attributes=require("../attributes-BADnRZpK.cjs"),intersector_index=require("../index-DZ44osDT.cjs"),dom=require("../dom-B40i6NXw.cjs");require("construct-style-sheets-polyfill");var _element,_name,_mutationObserver,_active,_Attribute_instances,tryUpdate_fn;const _Attribute=class _Attribute extends Store.Store{constructor(elementOrSelector,name,defaultValue,options){super(defaultValue,options);__privateAdd(this,_Attribute_instances);__privateAdd(this,_element,null);__privateAdd(this,_name);__privateAdd(this,_mutationObserver,null);__privateAdd(this,_active,!1);__privateSet(this,_name,name),intersector_index.isBrowser&&(__privateSet(this,_element,dom.getElement(elementOrSelector)),__privateSet(this,_mutationObserver,new MutationObserver(mutations=>{mutations.forEach(mutation=>{mutation.type==="attributes"&&mutation.attributeName===__privateGet(this,_name)&&__privateMethod(this,_Attribute_instances,tryUpdate_fn).call(this)})})),options!=null&&options.sync&&this.subscribe(e=>{__privateGet(this,_element).setAttribute(__privateGet(this,_name),e.current.toString())}))}subscribe(callback,order){return this.subscribers.length||this.observe(),super.subscribe(callback,order)}unsubscribe(callback){super.unsubscribe(callback),this.subscribers.length||this.unobserve()}observe(){__privateGet(this,_active)||(__privateSet(this,_active,!0),__privateGet(this,_mutationObserver).observe(__privateGet(this,_element),{attributes:!0}),__privateMethod(this,_Attribute_instances,tryUpdate_fn).call(this))}unobserve(){__privateGet(this,_active)&&(__privateSet(this,_active,!1),__privateGet(this,_mutationObserver).disconnect())}close(){super.close(),this.unobserve()}};_element=new WeakMap,_name=new WeakMap,_mutationObserver=new WeakMap,_active=new WeakMap,_Attribute_instances=new WeakSet,tryUpdate_fn=__name(function(){const value=__privateGet(this,_element).getAttribute(__privateGet(this,_name));value!=null&&(this.current=attributes.parseAttributeValue(value))},"#tryUpdate"),__name(_Attribute,"Attribute");let Attribute=_Attribute;exports.Attribute=Attribute;
@@ -5,7 +5,7 @@ var __typeError = (msg) => {
5
5
  var __name = (target, value) => __defProp(target, "name", { value, configurable: !0 });
6
6
  var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
7
7
  var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)), __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value), __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value), __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
8
- import { S as Store } from "../Store-BRTHeZmO.js";
8
+ import { S as Store } from "../Store-B2Y_0Tw9.js";
9
9
  import { p as parseAttributeValue } from "../attributes-FObgMNCf.js";
10
10
  import { i as isBrowser } from "../index-ClTMVKJp.js";
11
11
  import { g as getElement } from "../dom-D8D-_9ty.js";
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cssProperty_index=require("../css-property/index.cjs"),elementResizer_index=require("../element-resizer/index.cjs"),intersector_index=require("../index-DZ44osDT.cjs"),math=require("../math-C-knY2TL.cjs"),stylesheet=require("../stylesheet-xM7sMeuo.cjs");var _fpsCSSProperty,_canvasElement,_context,_width,_height,_pixelRatio,_timestamp,_timeBetweenFrames,_CanvasElement_instances,run_fn,stop_fn,_resizeListener,_tickListener,dispatchRenderEvent_fn,dispatchResizeEvent_fn;const _CanvasElement=class _CanvasElement extends HTMLElement{constructor(){super();__privateAdd(this,_CanvasElement_instances);__privateAdd(this,_fpsCSSProperty,new cssProperty_index.CSSProperty(this,"--fps",0));__privateAdd(this,_canvasElement,null);__privateAdd(this,_context,null);__privateAdd(this,_width,0);__privateAdd(this,_height,0);__privateAdd(this,_pixelRatio,1);__privateAdd(this,_timestamp,0);__privateAdd(this,_timeBetweenFrames,1);__privateAdd(this,_resizeListener,__name(e=>{__privateSet(this,_pixelRatio,math.clamp(devicePixelRatio,1,2)),__privateSet(this,_width,e.contentRect.width),__privateSet(this,_height,e.contentRect.height),__privateGet(this,_canvasElement).width=__privateGet(this,_width)*this.pixelRatio,__privateGet(this,_canvasElement).height=__privateGet(this,_height)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),__privateMethod(this,_CanvasElement_instances,dispatchResizeEvent_fn).call(this),__privateMethod(this,_CanvasElement_instances,dispatchRenderEvent_fn).call(this)},"#resizeListener"));__privateAdd(this,_tickListener,__name(e=>{__privateSet(this,_timestamp,e.timestamp),__privateSet(this,_timeBetweenFrames,e.timeBetweenFrames),__privateMethod(this,_CanvasElement_instances,dispatchRenderEvent_fn).call(this)},"#tickListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[stylesheet.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],__privateSet(this,_canvasElement,document.createElement("canvas")),__privateSet(this,_context,__privateGet(this,_canvasElement).getContext("2d")),shadow.appendChild(__privateGet(this,_canvasElement)),__privateGet(this,_fpsCSSProperty).subscribe(e=>{typeof e.previous!="undefined"&&e.current!==e.previous&&__privateMethod(this,_CanvasElement_instances,run_fn).call(this)})}}get fpsCSSProperty(){return __privateGet(this,_fpsCSSProperty)}get canvasElement(){return __privateGet(this,_canvasElement)}get context(){return __privateGet(this,_context)}get pixelRatio(){return __privateGet(this,_pixelRatio)}get width(){return __privateGet(this,_width)}get height(){return __privateGet(this,_height)}get detail(){return{width:__privateGet(this,_width),height:__privateGet(this,_height),element:this,canvasElement:__privateGet(this,_canvasElement),pixelRatio:__privateGet(this,_pixelRatio),context:__privateGet(this,_context),timestamp:__privateGet(this,_timestamp),timeBetweenFrames:__privateGet(this,_timeBetweenFrames)}}connectedCallback(){__privateGet(this,_fpsCSSProperty).observe(),elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener)),__privateMethod(this,_CanvasElement_instances,run_fn).call(this)}disconnectedCallback(){__privateGet(this,_fpsCSSProperty).unobserve(),elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener)),__privateMethod(this,_CanvasElement_instances,stop_fn).call(this)}};_fpsCSSProperty=new WeakMap,_canvasElement=new WeakMap,_context=new WeakMap,_width=new WeakMap,_height=new WeakMap,_pixelRatio=new WeakMap,_timestamp=new WeakMap,_timeBetweenFrames=new WeakMap,_CanvasElement_instances=new WeakSet,run_fn=__name(function(){intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)),this.hasAttribute("static")||intersector_index.ticker.subscribe(__privateGet(this,_tickListener),{culling:this,maxFPS:__privateGet(this,_fpsCSSProperty).current})},"#run"),stop_fn=__name(function(){intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener))},"#stop"),_resizeListener=new WeakMap,_tickListener=new WeakMap,dispatchRenderEvent_fn=__name(function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},"#dispatchRenderEvent"),dispatchResizeEvent_fn=__name(function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))},"#dispatchResizeEvent"),__name(_CanvasElement,"CanvasElement");let CanvasElement=_CanvasElement;intersector_index.isBrowser&&!customElements.get("e-canvas")&&customElements.define("e-canvas",CanvasElement);exports.CanvasElement=CanvasElement;
1
+ "use strict";var __defProp=Object.defineProperty;var __typeError=msg=>{throw TypeError(msg)};var __name=(target,value)=>__defProp(target,"name",{value,configurable:!0});var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(obj,member,"access private method"),method);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const cssProperty_index=require("../css-property/index.cjs"),elementResizer_index=require("../element-resizer/index.cjs"),intersector_index=require("../index-DZ44osDT.cjs"),math=require("../math-C-knY2TL.cjs"),stylesheet=require("../stylesheet-C0qxw7Dj.cjs");var _fpsCSSProperty,_canvasElement,_context,_width,_height,_pixelRatio,_timestamp,_timeBetweenFrames,_CanvasElement_instances,run_fn,stop_fn,_resizeListener,_tickListener,dispatchRenderEvent_fn,dispatchResizeEvent_fn;const _CanvasElement=class _CanvasElement extends HTMLElement{constructor(){super();__privateAdd(this,_CanvasElement_instances);__privateAdd(this,_fpsCSSProperty,new cssProperty_index.CSSProperty(this,"--fps",0));__privateAdd(this,_canvasElement,null);__privateAdd(this,_context,null);__privateAdd(this,_width,0);__privateAdd(this,_height,0);__privateAdd(this,_pixelRatio,1);__privateAdd(this,_timestamp,0);__privateAdd(this,_timeBetweenFrames,1);__privateAdd(this,_resizeListener,__name(e=>{__privateSet(this,_pixelRatio,math.clamp(devicePixelRatio,1,2)),__privateSet(this,_width,e.contentRect.width),__privateSet(this,_height,e.contentRect.height),__privateGet(this,_canvasElement).width=__privateGet(this,_width)*this.pixelRatio,__privateGet(this,_canvasElement).height=__privateGet(this,_height)*this.pixelRatio,this.context.scale(this.pixelRatio,this.pixelRatio),__privateMethod(this,_CanvasElement_instances,dispatchResizeEvent_fn).call(this),__privateMethod(this,_CanvasElement_instances,dispatchRenderEvent_fn).call(this)},"#resizeListener"));__privateAdd(this,_tickListener,__name(e=>{__privateSet(this,_timestamp,e.timestamp),__privateSet(this,_timeBetweenFrames,e.timeBetweenFrames),__privateMethod(this,_CanvasElement_instances,dispatchRenderEvent_fn).call(this)},"#tickListener"));if(intersector_index.isBrowser){const shadow=this.attachShadow({mode:"open"});shadow.adoptedStyleSheets=[stylesheet.createStylesheet({" :host, canvas":{display:"block",width:"100%",height:"100%"}})],__privateSet(this,_canvasElement,document.createElement("canvas")),__privateSet(this,_context,__privateGet(this,_canvasElement).getContext("2d")),shadow.appendChild(__privateGet(this,_canvasElement)),__privateGet(this,_fpsCSSProperty).subscribe(e=>{typeof e.previous!="undefined"&&e.current!==e.previous&&__privateMethod(this,_CanvasElement_instances,run_fn).call(this)})}}get fpsCSSProperty(){return __privateGet(this,_fpsCSSProperty)}get canvasElement(){return __privateGet(this,_canvasElement)}get context(){return __privateGet(this,_context)}get pixelRatio(){return __privateGet(this,_pixelRatio)}get width(){return __privateGet(this,_width)}get height(){return __privateGet(this,_height)}get detail(){return{width:__privateGet(this,_width),height:__privateGet(this,_height),element:this,canvasElement:__privateGet(this,_canvasElement),pixelRatio:__privateGet(this,_pixelRatio),context:__privateGet(this,_context),timestamp:__privateGet(this,_timestamp),timeBetweenFrames:__privateGet(this,_timeBetweenFrames)}}connectedCallback(){__privateGet(this,_fpsCSSProperty).observe(),elementResizer_index.elementResizer.subscribe(this,__privateGet(this,_resizeListener)),__privateMethod(this,_CanvasElement_instances,run_fn).call(this)}disconnectedCallback(){__privateGet(this,_fpsCSSProperty).unobserve(),elementResizer_index.elementResizer.unsubscribe(__privateGet(this,_resizeListener)),__privateMethod(this,_CanvasElement_instances,stop_fn).call(this)}};_fpsCSSProperty=new WeakMap,_canvasElement=new WeakMap,_context=new WeakMap,_width=new WeakMap,_height=new WeakMap,_pixelRatio=new WeakMap,_timestamp=new WeakMap,_timeBetweenFrames=new WeakMap,_CanvasElement_instances=new WeakSet,run_fn=__name(function(){intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener)),this.hasAttribute("static")||intersector_index.ticker.subscribe(__privateGet(this,_tickListener),{culling:this,maxFPS:__privateGet(this,_fpsCSSProperty).current})},"#run"),stop_fn=__name(function(){intersector_index.ticker.unsubscribe(__privateGet(this,_tickListener))},"#stop"),_resizeListener=new WeakMap,_tickListener=new WeakMap,dispatchRenderEvent_fn=__name(function(){this.dispatchEvent(new CustomEvent("canvasRender",{composed:!0,detail:this.detail}))},"#dispatchRenderEvent"),dispatchResizeEvent_fn=__name(function(){this.dispatchEvent(new CustomEvent("canvasResize",{composed:!0,detail:this.detail}))},"#dispatchResizeEvent"),__name(_CanvasElement,"CanvasElement");let CanvasElement=_CanvasElement;intersector_index.isBrowser&&!customElements.get("e-canvas")&&customElements.define("e-canvas",CanvasElement);exports.CanvasElement=CanvasElement;