aptechka 0.64.0 → 0.64.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 (118) hide show
  1. package/lib/Animation-BRqj4VfN.cjs +1 -0
  2. package/lib/{Animation-Cb-klopb.js → Animation-D29tc5VS.js} +5 -4
  3. package/lib/Damped-BD1OQ1fH.cjs +1 -0
  4. package/lib/{Damped-ByZFbNSt.js → Damped-YrqW5V4w.js} +5 -4
  5. package/lib/DragControls-D8BXtKVu.cjs +1 -0
  6. package/lib/DragControls-DGDUw6bM.js +226 -0
  7. package/lib/ScrollSegmentElement-B6gp1q_z.js +459 -0
  8. package/lib/ScrollSegmentElement-DtMMAirz.cjs +1 -0
  9. package/lib/SourceElement-D_YeNqsI.cjs +5 -0
  10. package/lib/SourceElement-jbviggZp.js +217 -0
  11. package/lib/{Store-swP_0ymB.js → Store-0BVty6AZ.js} +2 -1
  12. package/lib/Store-Cd1GlEmZ.cjs +1 -0
  13. package/lib/Tweened-B-AHx93m.cjs +1 -0
  14. package/lib/{Tweened-DzZwfKNm.js → Tweened-_pF0zXXN.js} +9 -8
  15. package/lib/Viewport-DA10iWAO.js +109 -0
  16. package/lib/Viewport-DB0qAZPJ.cjs +1 -0
  17. package/lib/accordion/index.cjs +1 -1
  18. package/lib/accordion/index.js +2 -1
  19. package/lib/animation/index.cjs +1 -1
  20. package/lib/animation/index.js +3 -3
  21. package/lib/attribute/index.cjs +1 -1
  22. package/lib/attribute/index.js +5 -4
  23. package/lib/billboard/index.cjs +1 -1
  24. package/lib/billboard/index.js +2 -1
  25. package/lib/canvas/index.cjs +1 -1
  26. package/lib/canvas/index.js +5 -5
  27. package/lib/controls/index.cjs +1 -1
  28. package/lib/controls/index.js +6 -223
  29. package/lib/css-property/index.cjs +1 -1
  30. package/lib/css-property/index.js +15 -14
  31. package/lib/custom-scrollbar/index.cjs +1 -1
  32. package/lib/custom-scrollbar/index.js +25 -24
  33. package/lib/dev/index.cjs +1 -1
  34. package/lib/dev/index.js +7 -6
  35. package/lib/device/index.cjs +1 -1
  36. package/lib/device/index.js +5 -106
  37. package/lib/element-linked-store/index.cjs +1 -1
  38. package/lib/element-linked-store/index.js +5 -4
  39. package/lib/element-resizer/index.cjs +1 -1
  40. package/lib/element-resizer/index.js +22 -21
  41. package/lib/en3/En3View.d.ts +2 -2
  42. package/lib/en3/en3.d.ts +3 -2
  43. package/lib/en3/index.cjs +3 -3
  44. package/lib/en3/index.js +93 -91
  45. package/lib/iframe/index.cjs +1 -1
  46. package/lib/iframe/index.js +4 -3
  47. package/lib/image/index.cjs +1 -1
  48. package/lib/image/index.js +5 -4
  49. package/lib/{index-euf5anj6.js → index-Bv9zgfdb.js} +3 -2
  50. package/lib/index-DekP7OZe.cjs +1 -0
  51. package/lib/intersector/index.cjs +1 -1
  52. package/lib/intersector/index.js +4 -3
  53. package/lib/ladder/index.cjs +1 -1
  54. package/lib/ladder/index.js +41 -40
  55. package/lib/{layout-DpZo-I0y.js → layout-BSMtwCga.js} +2 -2
  56. package/lib/layout-box/index.cjs +1 -1
  57. package/lib/layout-box/index.js +18 -17
  58. package/lib/loading/index.cjs +1 -1
  59. package/lib/loading/index.js +4 -3
  60. package/lib/masonry-layout/index.cjs +1 -1
  61. package/lib/masonry-layout/index.js +2 -2
  62. package/lib/media/index.cjs +1 -1
  63. package/lib/media/index.js +12 -11
  64. package/lib/morph/index.cjs +1 -1
  65. package/lib/morph/index.js +3 -2
  66. package/lib/need_redo_tweaker/index.cjs +3 -3
  67. package/lib/need_redo_tweaker/index.js +368 -340
  68. package/lib/pixel-perfect/index.cjs +1 -1
  69. package/lib/pixel-perfect/index.js +2 -2
  70. package/lib/pointer/index.cjs +1 -1
  71. package/lib/pointer/index.js +19 -18
  72. package/lib/popover/index.cjs +1 -1
  73. package/lib/popover/index.js +3 -2
  74. package/lib/radio/index.cjs +1 -1
  75. package/lib/radio/index.js +2 -1
  76. package/lib/router/index.cjs +1 -1
  77. package/lib/router/index.js +11 -10
  78. package/lib/scroll/index.cjs +1 -1
  79. package/lib/scroll/index.js +66 -65
  80. package/lib/{scroll-Benkuq-t.js → scroll-BWF48oHS.js} +11 -10
  81. package/lib/scroll-CFDCeArT.cjs +1 -0
  82. package/lib/scroll-segment/index.cjs +1 -1
  83. package/lib/scroll-segment/index.js +3 -456
  84. package/lib/sequence/index.cjs +1 -1
  85. package/lib/sequence/index.js +4 -3
  86. package/lib/size-element/index.cjs +1 -1
  87. package/lib/size-element/index.js +2 -1
  88. package/lib/slicer/index.cjs +3 -3
  89. package/lib/slicer/index.js +31 -30
  90. package/lib/source/SourceElement.d.ts +1 -1
  91. package/lib/source/index.cjs +1 -5
  92. package/lib/source/index.js +5 -214
  93. package/lib/store/index.cjs +1 -1
  94. package/lib/store/index.js +14 -13
  95. package/lib/stylesheet-DpnWNVyD.js +24 -0
  96. package/lib/stylesheet-HWF2a3nr.cjs +1 -0
  97. package/lib/ticker/index.cjs +1 -1
  98. package/lib/ticker/index.js +14 -13
  99. package/lib/utils/index.cjs +1 -1
  100. package/lib/utils/index.d.ts +1 -0
  101. package/lib/utils/index.js +5 -5
  102. package/lib/utils/jss.d.ts +0 -1
  103. package/lib/utils/stylesheet.d.ts +2 -0
  104. package/lib/video/index.cjs +1 -1
  105. package/lib/video/index.js +11 -10
  106. package/lib/window-resizer/index.cjs +1 -1
  107. package/lib/window-resizer/index.js +9 -8
  108. package/lib/youtube/index.cjs +1 -1
  109. package/lib/youtube/index.js +12 -11
  110. package/package.json +4 -4
  111. package/lib/Animation-dD_idtTU.cjs +0 -1
  112. package/lib/Damped-B8bmTxAr.cjs +0 -1
  113. package/lib/Store-GokLe_g-.cjs +0 -1
  114. package/lib/Tweened-BsL9FamJ.cjs +0 -1
  115. package/lib/index-Cqw2NKev.cjs +0 -1
  116. package/lib/jss-CRBgdvJ3.cjs +0 -1
  117. package/lib/jss-DtnXPEnq.js +0 -23
  118. package/lib/scroll-DAhSpkhR.cjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";var y=e=>{throw TypeError(e)};var f=(e,s,t)=>s.has(e)||y("Cannot "+t);var i=(e,s,t)=>(f(e,s,"read from private field"),t?t.call(e):s.get(e)),r=(e,s,t)=>s.has(e)?y("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),c=(e,s,t,l)=>(f(e,s,"write to private field"),l?l.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../dom-JBOkFLTh.cjs"),v=require("../jss-CRBgdvJ3.cjs");require("../index-Cqw2NKev.cjs");const E=v.createStylesheet(`
1
+ "use strict";var y=e=>{throw TypeError(e)};var f=(e,s,t)=>s.has(e)||y("Cannot "+t);var i=(e,s,t)=>(f(e,s,"read from private field"),t?t.call(e):s.get(e)),r=(e,s,t)=>s.has(e)?y("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),c=(e,s,t,l)=>(f(e,s,"write to private field"),l?l.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../dom-JBOkFLTh.cjs"),v=require("../stylesheet-HWF2a3nr.cjs");require("../index-DekP7OZe.cjs");const E=v.createStylesheet(`
2
2
  :host {
3
3
  position: fixed;
4
4
  top: 0;
@@ -4,8 +4,8 @@ var f = (e) => {
4
4
  var y = (e, s, t) => s.has(e) || f("Cannot " + t);
5
5
  var i = (e, s, t) => (y(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? f("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), c = (e, s, t, l) => (y(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
6
6
  import { f as x } from "../dom-CVWzyXPH.js";
7
- import { c as g } from "../jss-DtnXPEnq.js";
8
- import "../index-euf5anj6.js";
7
+ import { c as g } from "../stylesheet-DpnWNVyD.js";
8
+ import "../index-Bv9zgfdb.js";
9
9
  const v = g(
10
10
  /*css*/
11
11
  `
@@ -1 +1 @@
1
- "use strict";var J=Object.defineProperty;var B=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var j=i=>{throw TypeError(i)};var H=(i,s,t)=>s in i?J(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,O=(i,s)=>{for(var t in s||(s={}))K.call(s,t)&&H(i,t,s[t]);if(B)for(var t of B(s))N.call(s,t)&&H(i,t,s[t]);return i};var D=(i,s,t)=>s.has(i)||j("Cannot "+t);var e=(i,s,t)=>(D(i,s,"read from private field"),t?t.call(i):s.get(i)),r=(i,s,t)=>s.has(i)?j("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),o=(i,s,t,u)=>(D(i,s,"write to private field"),u?u.call(i,t):s.set(i,t),t),_=(i,s,t)=>(D(i,s,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-GokLe_g-.cjs");const M=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),W=require("../math-GDWEqu7y.cjs"),U=require("../index-Cqw2NKev.cjs");require("../ticker/index.cjs");const T=require("../Damped-B8bmTxAr.cjs"),A=require("../element-resizer/index.cjs"),F=require("../window-resizer/index.cjs"),w=require("../css-property/index.cjs");var c,a,l,y,m,d,b,x,g,z,C,E,p,q,k;class G{constructor(s){r(this,q);r(this,c);r(this,a);r(this,l);r(this,y);r(this,m);r(this,d);r(this,b,0);r(this,x,0);r(this,g,!1);r(this,z,s=>{o(this,g,!0);const t=_(this,q,k).call(this,s);e(this,a).set(t.x,{equalize:!0}),e(this,l).set(t.y,{equalize:!0}),e(this,y).set(1)});r(this,C,s=>{o(this,g,!1),e(this,y).set(0)});r(this,E,s=>{e(this,g)||e(this,z).call(this,s);const t=_(this,q,k).call(this,s);e(this,a).set(t.x),e(this,l).set(t.y)});r(this,p,()=>{o(this,b,this.element.clientWidth),o(this,x,this.element.clientHeight);let s=0,t=0,u=0,h=0;e(this,m)?e(this,d)?(s=-1,t=1,u=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,u=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,d)?(s=0,t=1,u=0,h=1):(s=0,t=e(this,b),u=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=u,e(this,l).max=h});o(this,c,Q.getElement(s.element)),o(this,a,new T.Damped(0,s.damped)),o(this,l,new T.Damped(0,s.damped)),o(this,y,new T.Damped(0,O({min:0,max:1},s.damped))),o(this,m,s.cartesian||!1),o(this,d,s.normalize||!1)}get element(){return e(this,c)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,y)}get cartesian(){return e(this,m)}set cartesian(s){o(this,m,s),e(this,p).call(this)}get normalize(){return e(this,d)}set normalize(s){o(this,d,s),e(this,p).call(this)}connect(){e(this,c).addEventListener("pointerenter",e(this,z)),e(this,c).addEventListener("pointerleave",e(this,C)),e(this,c).addEventListener("pointermove",e(this,E)),A.elementResizer.subscribe(e(this,c),e(this,p)),F.windowResizer.subscribe(e(this,p))}disconnect(){e(this,c).removeEventListener("pointerenter",e(this,z)),e(this,c).removeEventListener("pointerleave",e(this,C)),e(this,c).removeEventListener("pointermove",e(this,E)),A.elementResizer.unsubscribe(e(this,p)),F.windowResizer.unsubscribe(e(this,p)),e(this,a).reset(),e(this,l).reset(),e(this,y).reset()}}c=new WeakMap,a=new WeakMap,l=new WeakMap,y=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,x=new WeakMap,g=new WeakMap,z=new WeakMap,C=new WeakMap,E=new WeakMap,p=new WeakMap,q=new WeakSet,k=function(s){const t=M.getPointerPosition(s,e(this,c).getBoundingClientRect()),u={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,m)){const f=M.screenToCartesian(h,u);h.x=f.x,h.y=f.y}if(e(this,d)){const f=M.normalize(h,u);e(this,m)?(h.x=W.clamp(f.x*2,-1,1),h.y=W.clamp(f.y*2,-1,1)):(h.x=f.x,h.y=f.y)}return h};var n,v,P,S,L,R;class I extends HTMLElement{constructor(){super();r(this,n);r(this,v,new w.CSSProperty(this,"--damping",20));r(this,P,new w.CSSProperty(this,"--mass",0));r(this,S,new w.CSSProperty(this,"--stiffness",0));r(this,L,new w.CSSProperty(this,"--cartesian",!1));r(this,R,new w.CSSProperty(this,"--normalize",!1));o(this,n,new G({element:this})),e(this,v).subscribe(t=>{e(this,n).x.damping=t.current,e(this,n).y.damping=t.current,e(this,n).z.damping=t.current}),e(this,L).subscribe(t=>{e(this,n).cartesian=t.current}),e(this,R).subscribe(t=>{e(this,n).normalize=t.current}),e(this,P).subscribe(t=>{e(this,n).x.mass=t.current,e(this,n).y.mass=t.current,e(this,n).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,n).x.stiffness=t.current,e(this,n).y.stiffness=t.current,e(this,n).z.stiffness=t.current}),e(this,n).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,n).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,n).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,n)}connectedCallback(){e(this,n).connect(),e(this,v).observe(),e(this,P).observe(),e(this,S).observe()}disconnectedCallback(){e(this,n).disconnect(),e(this,v).unobserve(),e(this,P).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}n=new WeakMap,v=new WeakMap,P=new WeakMap,S=new WeakMap,L=new WeakMap,R=new WeakMap;U.isBrowser&&!customElements.get("e-pointer")&&customElements.define("e-pointer",I);exports.Pointer=G;exports.PointerElement=I;
1
+ "use strict";var J=Object.defineProperty;var B=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var j=i=>{throw TypeError(i)};var H=(i,s,t)=>s in i?J(i,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[s]=t,O=(i,s)=>{for(var t in s||(s={}))K.call(s,t)&&H(i,t,s[t]);if(B)for(var t of B(s))N.call(s,t)&&H(i,t,s[t]);return i};var D=(i,s,t)=>s.has(i)||j("Cannot "+t);var e=(i,s,t)=>(D(i,s,"read from private field"),t?t.call(i):s.get(i)),r=(i,s,t)=>s.has(i)?j("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,t),o=(i,s,t,u)=>(D(i,s,"write to private field"),u?u.call(i,t):s.set(i,t),t),_=(i,s,t)=>(D(i,s,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-Cd1GlEmZ.cjs");const M=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),W=require("../math-GDWEqu7y.cjs");require("construct-style-sheets-polyfill");const U=require("../index-DekP7OZe.cjs");require("../ticker/index.cjs");const T=require("../Damped-BD1OQ1fH.cjs"),A=require("../element-resizer/index.cjs"),F=require("../window-resizer/index.cjs"),w=require("../css-property/index.cjs");var c,a,l,y,m,d,b,x,g,z,C,q,p,E,k;class G{constructor(s){r(this,E);r(this,c);r(this,a);r(this,l);r(this,y);r(this,m);r(this,d);r(this,b,0);r(this,x,0);r(this,g,!1);r(this,z,s=>{o(this,g,!0);const t=_(this,E,k).call(this,s);e(this,a).set(t.x,{equalize:!0}),e(this,l).set(t.y,{equalize:!0}),e(this,y).set(1)});r(this,C,s=>{o(this,g,!1),e(this,y).set(0)});r(this,q,s=>{e(this,g)||e(this,z).call(this,s);const t=_(this,E,k).call(this,s);e(this,a).set(t.x),e(this,l).set(t.y)});r(this,p,()=>{o(this,b,this.element.clientWidth),o(this,x,this.element.clientHeight);let s=0,t=0,u=0,h=0;e(this,m)?e(this,d)?(s=-1,t=1,u=-1,h=1):(s=e(this,b)/2*-1,t=e(this,b)/2*1,u=e(this,x)/2*-1,h=e(this,x)/2*1):e(this,d)?(s=0,t=1,u=0,h=1):(s=0,t=e(this,b),u=0,h=e(this,x)),e(this,a).min=s,e(this,a).max=t,e(this,l).min=u,e(this,l).max=h});o(this,c,Q.getElement(s.element)),o(this,a,new T.Damped(0,s.damped)),o(this,l,new T.Damped(0,s.damped)),o(this,y,new T.Damped(0,O({min:0,max:1},s.damped))),o(this,m,s.cartesian||!1),o(this,d,s.normalize||!1)}get element(){return e(this,c)}get x(){return e(this,a)}get y(){return e(this,l)}get z(){return e(this,y)}get cartesian(){return e(this,m)}set cartesian(s){o(this,m,s),e(this,p).call(this)}get normalize(){return e(this,d)}set normalize(s){o(this,d,s),e(this,p).call(this)}connect(){e(this,c).addEventListener("pointerenter",e(this,z)),e(this,c).addEventListener("pointerleave",e(this,C)),e(this,c).addEventListener("pointermove",e(this,q)),A.elementResizer.subscribe(e(this,c),e(this,p)),F.windowResizer.subscribe(e(this,p))}disconnect(){e(this,c).removeEventListener("pointerenter",e(this,z)),e(this,c).removeEventListener("pointerleave",e(this,C)),e(this,c).removeEventListener("pointermove",e(this,q)),A.elementResizer.unsubscribe(e(this,p)),F.windowResizer.unsubscribe(e(this,p)),e(this,a).reset(),e(this,l).reset(),e(this,y).reset()}}c=new WeakMap,a=new WeakMap,l=new WeakMap,y=new WeakMap,m=new WeakMap,d=new WeakMap,b=new WeakMap,x=new WeakMap,g=new WeakMap,z=new WeakMap,C=new WeakMap,q=new WeakMap,p=new WeakMap,E=new WeakSet,k=function(s){const t=M.getPointerPosition(s,e(this,c).getBoundingClientRect()),u={width:e(this,b),height:e(this,x)},h={x:t.x,y:t.y};if(e(this,m)){const f=M.screenToCartesian(h,u);h.x=f.x,h.y=f.y}if(e(this,d)){const f=M.normalize(h,u);e(this,m)?(h.x=W.clamp(f.x*2,-1,1),h.y=W.clamp(f.y*2,-1,1)):(h.x=f.x,h.y=f.y)}return h};var n,v,P,S,L,R;class I extends HTMLElement{constructor(){super();r(this,n);r(this,v,new w.CSSProperty(this,"--damping",20));r(this,P,new w.CSSProperty(this,"--mass",0));r(this,S,new w.CSSProperty(this,"--stiffness",0));r(this,L,new w.CSSProperty(this,"--cartesian",!1));r(this,R,new w.CSSProperty(this,"--normalize",!1));o(this,n,new G({element:this})),e(this,v).subscribe(t=>{e(this,n).x.damping=t.current,e(this,n).y.damping=t.current,e(this,n).z.damping=t.current}),e(this,L).subscribe(t=>{e(this,n).cartesian=t.current}),e(this,R).subscribe(t=>{e(this,n).normalize=t.current}),e(this,P).subscribe(t=>{e(this,n).x.mass=t.current,e(this,n).y.mass=t.current,e(this,n).z.mass=t.current}),e(this,S).subscribe(t=>{e(this,n).x.stiffness=t.current,e(this,n).y.stiffness=t.current,e(this,n).z.stiffness=t.current}),e(this,n).x.subscribe(t=>{this.style.setProperty("--x",t.current.toString())}),e(this,n).y.subscribe(t=>{this.style.setProperty("--y",t.current.toString())}),e(this,n).z.subscribe(t=>{this.style.setProperty("--z",t.current.toString())})}get pointer(){return e(this,n)}connectedCallback(){e(this,n).connect(),e(this,v).observe(),e(this,P).observe(),e(this,S).observe()}disconnectedCallback(){e(this,n).disconnect(),e(this,v).unobserve(),e(this,P).unobserve(),e(this,S).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}}n=new WeakMap,v=new WeakMap,P=new WeakMap,S=new WeakMap,L=new WeakMap,R=new WeakMap;U.isBrowser&&!customElements.get("e-pointer")&&customElements.define("e-pointer",I);exports.Pointer=G;exports.PointerElement=I;
@@ -13,22 +13,23 @@ var T = (i, s, e) => s in i ? I(i, s, { enumerable: !0, configurable: !0, writab
13
13
  return i;
14
14
  };
15
15
  var q = (i, s, e) => s.has(i) || W("Cannot " + e);
16
- var t = (i, s, e) => (q(i, s, "read from private field"), e ? e.call(i) : s.get(i)), r = (i, s, e) => s.has(i) ? W("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, e), o = (i, s, e, m) => (q(i, s, "write to private field"), m ? m.call(i, e) : s.set(i, e), e), B = (i, s, e) => (q(i, s, "access private method"), e);
17
- import "../Store-swP_0ymB.js";
16
+ var t = (i, s, e) => (q(i, s, "read from private field"), e ? e.call(i) : s.get(i)), r = (i, s, e) => s.has(i) ? W("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, e), o = (i, s, e, c) => (q(i, s, "write to private field"), c ? c.call(i, e) : s.set(i, e), e), B = (i, s, e) => (q(i, s, "access private method"), e);
17
+ import "../Store-0BVty6AZ.js";
18
18
  import { g as N, s as O, n as Q } from "../coordinates-CgdGoSYs.js";
19
19
  import { g as U } from "../dom-CVWzyXPH.js";
20
20
  import { c as A } from "../math-BOBiC4TN.js";
21
- import { i as V } from "../index-euf5anj6.js";
21
+ import "construct-style-sheets-polyfill";
22
+ import { i as V } from "../index-Bv9zgfdb.js";
22
23
  import "../ticker/index.js";
23
- import { D } from "../Damped-ByZFbNSt.js";
24
+ import { D } from "../Damped-YrqW5V4w.js";
24
25
  import { elementResizer as F } from "../element-resizer/index.js";
25
26
  import { windowResizer as G } from "../window-resizer/index.js";
26
27
  import { CSSProperty as w } from "../css-property/index.js";
27
- var c, a, l, f, u, p, b, d, g, v, E, L, y, C, H;
28
+ var m, a, l, f, u, p, b, d, g, v, E, L, y, C, H;
28
29
  class X {
29
30
  constructor(s) {
30
31
  r(this, C);
31
- r(this, c);
32
+ r(this, m);
32
33
  r(this, a);
33
34
  r(this, l);
34
35
  r(this, f);
@@ -52,13 +53,13 @@ class X {
52
53
  });
53
54
  r(this, y, () => {
54
55
  o(this, b, this.element.clientWidth), o(this, d, this.element.clientHeight);
55
- let s = 0, e = 0, m = 0, h = 0;
56
- t(this, u) ? t(this, p) ? (s = -1, e = 1, m = -1, h = 1) : (s = t(this, b) / 2 * -1, e = t(this, b) / 2 * 1, m = t(this, d) / 2 * -1, h = t(this, d) / 2 * 1) : t(this, p) ? (s = 0, e = 1, m = 0, h = 1) : (s = 0, e = t(this, b), m = 0, h = t(this, d)), t(this, a).min = s, t(this, a).max = e, t(this, l).min = m, t(this, l).max = h;
56
+ let s = 0, e = 0, c = 0, h = 0;
57
+ t(this, u) ? t(this, p) ? (s = -1, e = 1, c = -1, h = 1) : (s = t(this, b) / 2 * -1, e = t(this, b) / 2 * 1, c = t(this, d) / 2 * -1, h = t(this, d) / 2 * 1) : t(this, p) ? (s = 0, e = 1, c = 0, h = 1) : (s = 0, e = t(this, b), c = 0, h = t(this, d)), t(this, a).min = s, t(this, a).max = e, t(this, l).min = c, t(this, l).max = h;
57
58
  });
58
- o(this, c, U(s.element)), o(this, a, new D(0, s.damped)), o(this, l, new D(0, s.damped)), o(this, f, new D(0, j({ min: 0, max: 1 }, s.damped))), o(this, u, s.cartesian || !1), o(this, p, s.normalize || !1);
59
+ o(this, m, U(s.element)), o(this, a, new D(0, s.damped)), o(this, l, new D(0, s.damped)), o(this, f, new D(0, j({ min: 0, max: 1 }, s.damped))), o(this, u, s.cartesian || !1), o(this, p, s.normalize || !1);
59
60
  }
60
61
  get element() {
61
- return t(this, c);
62
+ return t(this, m);
62
63
  }
63
64
  get x() {
64
65
  return t(this, a);
@@ -82,20 +83,20 @@ class X {
82
83
  o(this, p, s), t(this, y).call(this);
83
84
  }
84
85
  connect() {
85
- t(this, c).addEventListener("pointerenter", t(this, v)), t(this, c).addEventListener("pointerleave", t(this, E)), t(this, c).addEventListener("pointermove", t(this, L)), F.subscribe(t(this, c), t(this, y)), G.subscribe(t(this, y));
86
+ t(this, m).addEventListener("pointerenter", t(this, v)), t(this, m).addEventListener("pointerleave", t(this, E)), t(this, m).addEventListener("pointermove", t(this, L)), F.subscribe(t(this, m), t(this, y)), G.subscribe(t(this, y));
86
87
  }
87
88
  disconnect() {
88
- t(this, c).removeEventListener(
89
+ t(this, m).removeEventListener(
89
90
  "pointerenter",
90
91
  t(this, v)
91
- ), t(this, c).removeEventListener(
92
+ ), t(this, m).removeEventListener(
92
93
  "pointerleave",
93
94
  t(this, E)
94
- ), t(this, c).removeEventListener("pointermove", t(this, L)), F.unsubscribe(t(this, y)), G.unsubscribe(t(this, y)), t(this, a).reset(), t(this, l).reset(), t(this, f).reset();
95
+ ), t(this, m).removeEventListener("pointermove", t(this, L)), F.unsubscribe(t(this, y)), G.unsubscribe(t(this, y)), t(this, a).reset(), t(this, l).reset(), t(this, f).reset();
95
96
  }
96
97
  }
97
- c = new WeakMap(), a = new WeakMap(), l = new WeakMap(), f = new WeakMap(), u = new WeakMap(), p = new WeakMap(), b = new WeakMap(), d = new WeakMap(), g = new WeakMap(), v = new WeakMap(), E = new WeakMap(), L = new WeakMap(), y = new WeakMap(), C = new WeakSet(), H = function(s) {
98
- const e = N(s, t(this, c).getBoundingClientRect()), m = {
98
+ m = new WeakMap(), a = new WeakMap(), l = new WeakMap(), f = new WeakMap(), u = new WeakMap(), p = new WeakMap(), b = new WeakMap(), d = new WeakMap(), g = new WeakMap(), v = new WeakMap(), E = new WeakMap(), L = new WeakMap(), y = new WeakMap(), C = new WeakSet(), H = function(s) {
99
+ const e = N(s, t(this, m).getBoundingClientRect()), c = {
99
100
  width: t(this, b),
100
101
  height: t(this, d)
101
102
  }, h = {
@@ -103,11 +104,11 @@ c = new WeakMap(), a = new WeakMap(), l = new WeakMap(), f = new WeakMap(), u =
103
104
  y: e.y
104
105
  };
105
106
  if (t(this, u)) {
106
- const x = O(h, m);
107
+ const x = O(h, c);
107
108
  h.x = x.x, h.y = x.y;
108
109
  }
109
110
  if (t(this, p)) {
110
- const x = Q(h, m);
111
+ const x = Q(h, c);
111
112
  t(this, u) ? (h.x = A(x.x * 2, -1, 1), h.y = A(x.y * 2, -1, 1)) : (h.x = x.x, h.y = x.y);
112
113
  }
113
114
  return h;
@@ -1 +1 @@
1
- "use strict";var te=c=>{throw TypeError(c)};var Q=(c,o,t)=>o.has(c)||te("Cannot "+t);var e=(c,o,t)=>(Q(c,o,"read from private field"),t?t.call(c):o.get(c)),r=(c,o,t)=>o.has(c)?te("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(c):o.set(c,t),n=(c,o,t,s)=>(Q(c,o,"write to private field"),s?s.call(c,t):o.set(c,t),t),b=(c,o,t)=>(Q(c,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../element-linked-store/index.cjs"),m=require("../css-property/index.cjs"),N=require("../index-Cqw2NKev.cjs"),Y=require("../events-KVanG9sR.cjs"),ce=require("../function-MthRj-GJ.cjs"),se=require("../style-At6aDoqG.cjs"),ie=require("../url-lnBE_6yf.cjs"),re=require("../window-resizer/index.cjs"),F=require("../device/index.cjs");var u,y,J,K;class le{constructor(){r(this,u,new Map);r(this,y,[]);r(this,J,o=>{var s;const t=[...e(this,y)].reverse().find(i=>i.clickOutside.current);if(t){const i=o.composedPath();if(i.find(ee=>ee instanceof HTMLElement&&ee.hasAttribute("data-popover-content")))return;const l=i[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),H=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||H)&&t.close()}});r(this,K,o=>{if(o.code==="Escape"){const t=[...e(this,y)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,J)),addEventListener("keydown",e(this,K))}get groups(){return e(this,u)}get stack(){return e(this,y)}add(o,t){if(t.closeRest.current)e(this,u).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,u).get(o);i==null||i.forEach(l=>{l.close()})}let s=e(this,u).get(o);s!=null&&s.length||(s=[],e(this,u).set(o,s)),e(this,y).push(t),s.push(t)}remove(o,t){if(n(this,y,e(this,y).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(o);e(this,u).delete(o),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,u).get(o);s&&(s=s.filter(i=>i!==t),e(this,u).set(o,s))}}}u=new WeakMap,y=new WeakMap,J=new WeakMap,K=new WeakMap;var f,M,V,C,B,v,w,x,A,g,R,q,L,T,O,a,P,oe,I,$,S,W,G;const E=class E extends HTMLElement{constructor(){super();r(this,P);r(this,f);r(this,M);r(this,V);r(this,C);r(this,B);r(this,v);r(this,w);r(this,x);r(this,A);r(this,g);r(this,R);r(this,q);r(this,L);r(this,T);r(this,O);r(this,a);r(this,$);r(this,S);r(this,W);r(this,G);this.urlValue="",n(this,f,!1),n(this,v,new m.CSSProperty(this,"--history",!1)),n(this,w,new m.CSSProperty(this,"--restore",!1)),n(this,x,new m.CSSProperty(this,"--close-rest",!1)),n(this,A,new m.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new m.CSSProperty(this,"--group","")),n(this,R,new m.CSSProperty(this,"--click-outside",!1)),n(this,q,new m.CSSProperty(this,"--escape",!1)),n(this,L,new m.CSSProperty(this,"--check-viewport-bounds",!1)),n(this,T,!1),n(this,a,new he.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,$,()=>{n(this,T,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,T,!0)}),n(this,S,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,W).call(this)}),n(this,W,ce.debounce(()=>{e(this,G).call(this)},10)),n(this,G,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>F.viewport.width?s=F.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>F.viewport.height?i=F.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,x)}get closeRestInGroup(){return e(this,A)}get group(){return e(this,g)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,O)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ie.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;n(this,O,t==null?void 0:t.trigger),clearTimeout(e(this,M)),clearTimeout(e(this,V)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),Y.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,O)}}),e(this,v).current&&e(this,T)&&history.pushState(history.state,"",e(this,P,oe)),n(this,f,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,S).call(this),e(this,a).set("opened",!0),Y.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,O)}}),n(this,C,void 0),n(this,B,setTimeout(()=>{e(this,a).set("transitionend",!0)},se.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,C,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,C)),clearTimeout(e(this,B)),E.stack.remove(e(this,g).current,this),n(this,f,!1),b(this,P,I).call(this),e(this,a).set("transitionend",!1),n(this,M,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),Y.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,V,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),Y.dispatchEvent(this,"popoverClosed",{custom:!0})},se.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,v).observe(),e(this,w).observe(),e(this,x).observe(),e(this,A).observe(),e(this,g).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,$)),setTimeout(()=>{e(this,w).current?(this.urlValue=ie.parseSearchParameters(location.search)[this.id],e(this,$).call(this)):(b(this,P,I).call(this),n(this,T,!0))},0),e(this,L).subscribe(()=>{e(this,S).call(this)}),re.windowResizer.subscribe(e(this,S))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),re.windowResizer.unsubscribe(e(this,S)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,x).close(),e(this,A).close(),e(this,g).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,M)),clearTimeout(e(this,V)),clearTimeout(e(this,C)),clearTimeout(e(this,B)),removeEventListener("popstate",e(this,$)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),b(this,P,I).call(this)}};f=new WeakMap,M=new WeakMap,V=new WeakMap,C=new WeakMap,B=new WeakMap,v=new WeakMap,w=new WeakMap,x=new WeakMap,A=new WeakMap,g=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,T=new WeakMap,O=new WeakMap,a=new WeakMap,P=new WeakSet,oe=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},$=new WeakMap,S=new WeakMap,W=new WeakMap,G=new WeakMap,E.stack=new le;let z=E;N.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,d,k,Z,D,U,j,X,_;class ne extends HTMLElement{constructor(){super();r(this,k);r(this,h);r(this,d,new m.CSSProperty(this,"--type","open"));r(this,D,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});r(this,U,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,j,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});r(this,X,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});N.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(b(this,k,Z).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const p=this.getRootNode();p instanceof ShadowRoot?i=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(i=p.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let H=p.querySelector("[data-popover]");return!H&&(p!=null&&p.parentElement)&&(H=l(p.parentElement)),H};i=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),i=document.querySelector(t)||this.getRootNode().querySelector(t);i instanceof HTMLElement?(n(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,D)),e(this,h).addEventListener("popoverOpened",e(this,U)),e(this,h).addEventListener("popoverClosing",e(this,j)),e(this,h).addEventListener("popoverClosed",e(this,X))):console.warn(this,`target ${t} not found`)}b(this,k,_).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{b(this,k,_).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),b(this,k,Z).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,Z=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,D)),e(this,h).removeEventListener("popoverOpened",e(this,U)),e(this,h).removeEventListener("popoverClosing",e(this,j)),e(this,h).removeEventListener("popoverClosed",e(this,X)))},D=new WeakMap,U=new WeakMap,j=new WeakMap,X=new WeakMap,_=function(t){e(this,h)instanceof z&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};N.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ne);exports.PopoverButtonElement=ne;exports.PopoverElement=z;
1
+ "use strict";var te=c=>{throw TypeError(c)};var Q=(c,o,t)=>o.has(c)||te("Cannot "+t);var e=(c,o,t)=>(Q(c,o,"read from private field"),t?t.call(c):o.get(c)),r=(c,o,t)=>o.has(c)?te("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(c):o.set(c,t),n=(c,o,t,s)=>(Q(c,o,"write to private field"),s?s.call(c,t):o.set(c,t),t),b=(c,o,t)=>(Q(c,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("../element-linked-store/index.cjs"),m=require("../css-property/index.cjs"),_=require("../index-DekP7OZe.cjs"),Y=require("../events-KVanG9sR.cjs"),ce=require("../function-MthRj-GJ.cjs"),se=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");const ie=require("../url-lnBE_6yf.cjs"),re=require("../window-resizer/index.cjs"),F=require("../Viewport-DB0qAZPJ.cjs");var u,y,J,K;class le{constructor(){r(this,u,new Map);r(this,y,[]);r(this,J,o=>{var s;const t=[...e(this,y)].reverse().find(i=>i.clickOutside.current);if(t){const i=o.composedPath();if(i.find(ee=>ee instanceof HTMLElement&&ee.hasAttribute("data-popover-content")))return;const l=i[0],p=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),H=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!p||H)&&t.close()}});r(this,K,o=>{if(o.code==="Escape"){const t=[...e(this,y)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,J)),addEventListener("keydown",e(this,K))}get groups(){return e(this,u)}get stack(){return e(this,y)}add(o,t){if(t.closeRest.current)e(this,u).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,u).get(o);i==null||i.forEach(l=>{l.close()})}let s=e(this,u).get(o);s!=null&&s.length||(s=[],e(this,u).set(o,s)),e(this,y).push(t),s.push(t)}remove(o,t){if(n(this,y,e(this,y).filter(s=>s!==t)),t.closeRest.current){let s=[];e(this,u).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,u).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,u).get(o);e(this,u).delete(o),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,u).get(o);s&&(s=s.filter(i=>i!==t),e(this,u).set(o,s))}}}u=new WeakMap,y=new WeakMap,J=new WeakMap,K=new WeakMap;var f,$,M,C,B,v,w,x,A,g,R,q,L,T,O,a,P,oe,I,V,S,W,G;const E=class E extends HTMLElement{constructor(){super();r(this,P);r(this,f);r(this,$);r(this,M);r(this,C);r(this,B);r(this,v);r(this,w);r(this,x);r(this,A);r(this,g);r(this,R);r(this,q);r(this,L);r(this,T);r(this,O);r(this,a);r(this,V);r(this,S);r(this,W);r(this,G);this.urlValue="",n(this,f,!1),n(this,v,new m.CSSProperty(this,"--history",!1)),n(this,w,new m.CSSProperty(this,"--restore",!1)),n(this,x,new m.CSSProperty(this,"--close-rest",!1)),n(this,A,new m.CSSProperty(this,"--close-rest-in-group",!1)),n(this,g,new m.CSSProperty(this,"--group","")),n(this,R,new m.CSSProperty(this,"--click-outside",!1)),n(this,q,new m.CSSProperty(this,"--escape",!1)),n(this,L,new m.CSSProperty(this,"--check-viewport-bounds",!1)),n(this,T,!1),n(this,a,new he.ElementLinkedStore(this,{opened:!1,closing:!1,triggered:!1,transitionend:!1})),n(this,V,()=>{n(this,T,!1),e(this,f)&&e(this,v).current&&!location.search.includes(this.id)?this.close():!e(this,f)&&e(this,v).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),n(this,T,!0)}),n(this,S,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,W).call(this)}),n(this,W,ce.debounce(()=>{e(this,G).call(this)},10)),n(this,G,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,L).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>F.viewport.width?s=F.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>F.viewport.height?i=F.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),e(this,g).subscribe(t=>{t.previous&&(E.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=E.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get history(){return e(this,v)}get restore(){return e(this,w)}get closeRest(){return e(this,x)}get closeRestInGroup(){return e(this,A)}get group(){return e(this,g)}get clickOutside(){return e(this,R)}get escape(){return e(this,q)}get opened(){return e(this,f)}get lastTrigger(){return e(this,O)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,f)&&ie.updateSearchParameter(this.id,t)}open(t){if(e(this,f))return;n(this,O,t==null?void 0:t.trigger),clearTimeout(e(this,$)),clearTimeout(e(this,M)),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),Y.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,O)}}),e(this,v).current&&e(this,T)&&history.pushState(history.state,"",e(this,P,oe)),n(this,f,!0);const s=()=>{E.stack.add(e(this,g).current,this),e(this,S).call(this),e(this,a).set("opened",!0),Y.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,O)}}),n(this,C,void 0),n(this,B,setTimeout(()=>{e(this,a).set("transitionend",!0)},se.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():n(this,C,setTimeout(s,10))}close(){e(this,f)&&(clearTimeout(e(this,C)),clearTimeout(e(this,B)),E.stack.remove(e(this,g).current,this),n(this,f,!1),b(this,P,I).call(this),e(this,a).set("transitionend",!1),n(this,$,setTimeout(()=>{e(this,a).set("opened",!1),e(this,a).set("closing",!0),Y.dispatchEvent(this,"popoverClosing",{custom:!0}),n(this,M,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("closing",!1),Y.dispatchEvent(this,"popoverClosed",{custom:!0})},se.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){e(this,v).observe(),e(this,w).observe(),e(this,x).observe(),e(this,A).observe(),e(this,g).observe(),e(this,R).observe(),e(this,q).observe(),e(this,L).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,V)),setTimeout(()=>{e(this,w).current?(this.urlValue=ie.parseSearchParameters(location.search)[this.id],e(this,V).call(this)):(b(this,P,I).call(this),n(this,T,!0))},0),e(this,L).subscribe(()=>{e(this,S).call(this)}),re.windowResizer.subscribe(e(this,S))}disconnectedCallback(){E.stack.remove(e(this,g).current,this),re.windowResizer.unsubscribe(e(this,S)),e(this,a).close(),e(this,v).close(),e(this,w).close(),e(this,x).close(),e(this,A).close(),e(this,g).close(),e(this,R).close(),e(this,q).close(),e(this,L).close(),this.removeAttribute("role"),clearTimeout(e(this,$)),clearTimeout(e(this,M)),clearTimeout(e(this,C)),clearTimeout(e(this,B)),removeEventListener("popstate",e(this,V)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),b(this,P,I).call(this)}};f=new WeakMap,$=new WeakMap,M=new WeakMap,C=new WeakMap,B=new WeakMap,v=new WeakMap,w=new WeakMap,x=new WeakMap,A=new WeakMap,g=new WeakMap,R=new WeakMap,q=new WeakMap,L=new WeakMap,T=new WeakMap,O=new WeakMap,a=new WeakMap,P=new WeakSet,oe=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},I=function(){if(e(this,v).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},V=new WeakMap,S=new WeakMap,W=new WeakMap,G=new WeakMap,E.stack=new le;let z=E;_.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",z);var h,d,k,Z,D,U,j,X,N;class ne extends HTMLElement{constructor(){super();r(this,k);r(this,h);r(this,d,new m.CSSProperty(this,"--type","open"));r(this,D,()=>{e(this,d).current!=="close"&&this.classList.add("triggered")});r(this,U,()=>{e(this,d).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,j,()=>{e(this,d).current!=="close"&&this.classList.remove("opened")});r(this,X,()=>{e(this,d).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});_.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,d).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,d)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(b(this,k,Z).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const p=this.getRootNode();p instanceof ShadowRoot?i=p.host.closest("[data-popover]"):p instanceof HTMLElement&&(i=p.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=p=>{if(!p)return null;let H=p.querySelector("[data-popover]");return!H&&(p!=null&&p.parentElement)&&(H=l(p.parentElement)),H};i=l(this.parentElement)||null}else!t.startsWith(".")&&!t.startsWith("[")&&(t=`#${t}`),i=document.querySelector(t)||this.getRootNode().querySelector(t);i instanceof HTMLElement?(n(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,D)),e(this,h).addEventListener("popoverOpened",e(this,U)),e(this,h).addEventListener("popoverClosing",e(this,j)),e(this,h).addEventListener("popoverClosed",e(this,X))):console.warn(this,`target ${t} not found`)}b(this,k,N).call(this,e(this,d).current)}connectedCallback(){e(this,d).subscribe(s=>{b(this,k,N).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,d).observe()}disconnectedCallback(){e(this,d).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),b(this,k,Z).call(this)}}h=new WeakMap,d=new WeakMap,k=new WeakSet,Z=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,D)),e(this,h).removeEventListener("popoverOpened",e(this,U)),e(this,h).removeEventListener("popoverClosing",e(this,j)),e(this,h).removeEventListener("popoverClosed",e(this,X)))},D=new WeakMap,U=new WeakMap,j=new WeakMap,X=new WeakMap,N=function(t){e(this,h)instanceof z&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};_.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",ne);exports.PopoverButtonElement=ne;exports.PopoverElement=z;
@@ -5,13 +5,14 @@ var Q = (c, o, e) => o.has(c) || et("Cannot " + e);
5
5
  var t = (c, o, e) => (Q(c, o, "read from private field"), e ? e.call(c) : o.get(c)), r = (c, o, e) => o.has(c) ? et("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(c) : o.set(c, e), h = (c, o, e, s) => (Q(c, o, "write to private field"), s ? s.call(c, e) : o.set(c, e), e), y = (c, o, e) => (Q(c, o, "access private method"), e);
6
6
  import { ElementLinkedStore as ot } from "../element-linked-store/index.js";
7
7
  import { CSSProperty as v } from "../css-property/index.js";
8
- import { i as _ } from "../index-euf5anj6.js";
8
+ import { i as _ } from "../index-Bv9zgfdb.js";
9
9
  import { d as Y } from "../events-CsVF98U6.js";
10
10
  import { d as ht } from "../function-C10DGppn.js";
11
11
  import { g as st } from "../style-j2TwriJ_.js";
12
+ import "construct-style-sheets-polyfill";
12
13
  import { u as nt, p as ct } from "../url-Cc-RVfii.js";
13
14
  import { windowResizer as it } from "../window-resizer/index.js";
14
- import { viewport as j } from "../device/index.js";
15
+ import { v as j } from "../Viewport-DA10iWAO.js";
15
16
  var u, b, J, K;
16
17
  class lt {
17
18
  constructor() {
@@ -1 +1 @@
1
- "use strict";var f=i=>{throw TypeError(i)};var v=(i,a,t)=>a.has(i)||f("Cannot "+t);var e=(i,a,t)=>(v(i,a,"read from private field"),t?t.call(i):a.get(i)),r=(i,a,t)=>a.has(i)?f("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(i):a.set(i,t),d=(i,a,t,s)=>(v(i,a,"write to private field"),s?s.call(i,t):a.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../events-KVanG9sR.cjs");require("../index-Cqw2NKev.cjs");var E,n,h,o,c,m,l,b;class g extends HTMLElement{constructor(){super(...arguments);r(this,E,[]);r(this,n,[]);r(this,h);r(this,o,null);r(this,c,!1);r(this,m,()=>{this.isConnected&&(document.documentElement.addEventListener("radioChange",e(this,b)),e(this,n).forEach(t=>{t.addEventListener("click",e(this,l)),t.hasAttribute("data-checked")&&this.setValue(t.getAttribute("data-value"))}))});r(this,l,t=>{if(!e(this,c)){const u=t.currentTarget.getAttribute("data-value");u&&this.setValue(u)}});r(this,b,t=>{const s=t.target;s!==this&&s.name===this.name&&this.setValue(t.detail)})}get value(){return e(this,h)}get name(){return this.getAttribute("name")}get currentButtonElement(){return e(this,o)}get disabled(){return e(this,c)}disable(){d(this,c,!0)}enable(){d(this,c,!1)}addButton(t){e(this,n).push(t),t.addEventListener("click",e(this,l))}removeButton(t){const s=e(this,n).find(u=>u===t);s&&(s.removeEventListener("click",e(this,l)),d(this,n,e(this,n).filter(u=>u!==t)))}setValue(t){t&&t!==e(this,h)&&(d(this,h,t),e(this,n).forEach(s=>{s.getAttribute("data-value")===e(this,h)?(s.setAttribute("data-checked",""),d(this,o,s)):s.removeAttribute("data-checked")}),e(this,o)&&e(this,E).forEach(s=>{s.innerHTML=e(this,o).getAttribute("data-name")||t}),L.dispatchEvent(this,"radioChange",{detail:e(this,h),bubbles:!0}))}connectedCallback(){d(this,E,[...this.querySelectorAll("[data-radio-listener]")]),d(this,n,[...this.querySelectorAll("[data-radio-button]")]),document.readyState==="complete"?e(this,m).call(this):addEventListener("load",e(this,m))}disconnectedCallback(){e(this,n).forEach(t=>{t.removeEventListener("click",e(this,l))}),removeEventListener("load",e(this,m)),document.documentElement.removeEventListener("radioChange",e(this,b))}}E=new WeakMap,n=new WeakMap,h=new WeakMap,o=new WeakMap,c=new WeakMap,m=new WeakMap,l=new WeakMap,b=new WeakMap;customElements.get("e-radio")||customElements.define("e-radio",g);exports.RadioElement=g;
1
+ "use strict";var f=i=>{throw TypeError(i)};var v=(i,a,t)=>a.has(i)||f("Cannot "+t);var e=(i,a,t)=>(v(i,a,"read from private field"),t?t.call(i):a.get(i)),r=(i,a,t)=>a.has(i)?f("Cannot add the same private member more than once"):a instanceof WeakSet?a.add(i):a.set(i,t),d=(i,a,t,s)=>(v(i,a,"write to private field"),s?s.call(i,t):a.set(i,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../events-KVanG9sR.cjs");require("construct-style-sheets-polyfill");require("../index-DekP7OZe.cjs");var E,n,h,o,c,m,u,b;class g extends HTMLElement{constructor(){super(...arguments);r(this,E,[]);r(this,n,[]);r(this,h);r(this,o,null);r(this,c,!1);r(this,m,()=>{this.isConnected&&(document.documentElement.addEventListener("radioChange",e(this,b)),e(this,n).forEach(t=>{t.addEventListener("click",e(this,u)),t.hasAttribute("data-checked")&&this.setValue(t.getAttribute("data-value"))}))});r(this,u,t=>{if(!e(this,c)){const l=t.currentTarget.getAttribute("data-value");l&&this.setValue(l)}});r(this,b,t=>{const s=t.target;s!==this&&s.name===this.name&&this.setValue(t.detail)})}get value(){return e(this,h)}get name(){return this.getAttribute("name")}get currentButtonElement(){return e(this,o)}get disabled(){return e(this,c)}disable(){d(this,c,!0)}enable(){d(this,c,!1)}addButton(t){e(this,n).push(t),t.addEventListener("click",e(this,u))}removeButton(t){const s=e(this,n).find(l=>l===t);s&&(s.removeEventListener("click",e(this,u)),d(this,n,e(this,n).filter(l=>l!==t)))}setValue(t){t&&t!==e(this,h)&&(d(this,h,t),e(this,n).forEach(s=>{s.getAttribute("data-value")===e(this,h)?(s.setAttribute("data-checked",""),d(this,o,s)):s.removeAttribute("data-checked")}),e(this,o)&&e(this,E).forEach(s=>{s.innerHTML=e(this,o).getAttribute("data-name")||t}),L.dispatchEvent(this,"radioChange",{detail:e(this,h),bubbles:!0}))}connectedCallback(){d(this,E,[...this.querySelectorAll("[data-radio-listener]")]),d(this,n,[...this.querySelectorAll("[data-radio-button]")]),document.readyState==="complete"?e(this,m).call(this):addEventListener("load",e(this,m))}disconnectedCallback(){e(this,n).forEach(t=>{t.removeEventListener("click",e(this,u))}),removeEventListener("load",e(this,m)),document.documentElement.removeEventListener("radioChange",e(this,b))}}E=new WeakMap,n=new WeakMap,h=new WeakMap,o=new WeakMap,c=new WeakMap,m=new WeakMap,u=new WeakMap,b=new WeakMap;customElements.get("e-radio")||customElements.define("e-radio",g);exports.RadioElement=g;
@@ -4,7 +4,8 @@ var b = (i) => {
4
4
  var v = (i, a, t) => a.has(i) || b("Cannot " + t);
5
5
  var e = (i, a, t) => (v(i, a, "read from private field"), t ? t.call(i) : a.get(i)), r = (i, a, t) => a.has(i) ? b("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(i) : a.set(i, t), d = (i, a, t, s) => (v(i, a, "write to private field"), s ? s.call(i, t) : a.set(i, t), t);
6
6
  import { d as g } from "../events-CsVF98U6.js";
7
- import "../index-euf5anj6.js";
7
+ import "construct-style-sheets-polyfill";
8
+ import "../index-Bv9zgfdb.js";
8
9
  var E, n, h, o, c, m, l, f;
9
10
  class L extends HTMLElement {
10
11
  constructor() {
@@ -1 +1 @@
1
- "use strict";var Z=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),$=n=>{throw TypeError(n)};var K=(n,e,s)=>e.has(n)||$("Cannot "+s);var t=(n,e,s)=>(K(n,e,"read from private field"),s?s.call(n):e.get(n)),r=(n,e,s)=>e.has(n)?$("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,s),a=(n,e,s,i)=>(K(n,e,"write to private field"),i?i.call(n,s):e.set(n,s),s),W=(n,e,s)=>(K(n,e,"access private method"),s);var B=(n,e,s)=>new Promise((i,h)=>{var o=d=>{try{f(s.next(d))}catch(w){h(w)}},c=d=>{try{f(s.throw(d))}catch(w){h(w)}},f=d=>d.done?i(d.value):Promise.resolve(d.value).then(o,c);f((s=s.apply(n,e)).next())});var Y=(n,e,s)=>(e=n[Z("asyncIterator")])?e.call(n):(n=n[Z("iterator")](),e={},s=(i,h)=>(h=n[i])&&(e[i]=o=>new Promise((c,f,d)=>(o=h.call(n,o),d=o.done,Promise.resolve(o.value).then(w=>c({value:w,done:d}),f)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const at=require("urlpattern-polyfill"),rt=require("../notifier/index.cjs"),tt=require("../index-Cqw2NKev.cjs"),ht=require("../function-MthRj-GJ.cjs"),F=require("../url-lnBE_6yf.cjs"),ot=require("../object-CCiXnER2.cjs");var R,O,A,p,m,v,k,L,b,E,M,et;class ct{constructor(e,s){r(this,M);r(this,R);r(this,O);r(this,A);r(this,p);r(this,m);r(this,v);r(this,k);r(this,L,null);r(this,b,[]);r(this,E,[]);a(this,R,e),a(this,O,s),a(this,A,new URLPattern({pathname:t(this,R)})),a(this,p,null),a(this,m,null),a(this,v,!1),a(this,k,null),tt.isBrowser&&a(this,L,new MutationObserver(i=>{i[0].addedNodes.forEach(o=>{t(this,p)?t(this,E).push(o):t(this,b).push(o)})}))}get pattern(){return t(this,R)}get urlPattern(){return t(this,A)}get isActive(){return t(this,v)}get element(){return t(this,m)}get nest(){return t(this,k)}testPathname(e){return this.urlPattern.test({pathname:e})}render(e,s){return B(this,null,function*(){var i,h;if(t(this,L).observe(document.head,{childList:!0,subtree:!0}),t(this,p))t(this,b).forEach(o=>{document.head.appendChild(o)});else{const o=yield t(this,O).call(this);if(a(this,E,[...t(this,b)]),typeof o.default=="function"&&(a(this,p,o.default),ot.isESClass(o.default))){const c="e-"+((i=t(this,p))==null?void 0:i.name.toLowerCase());customElements.get(c)||customElements.define(c,o.default)}}if(yield W(this,M,et).call(this),t(this,p)){const o=t(this,A).exec({pathname:s}),c=(o==null?void 0:o.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),d={pathnameParams:c,searchParams:f};a(this,m,new(t(this,p))(d)),e.appendChild(t(this,m)),a(this,k,t(this,m).querySelector("[data-nest]")||((h=t(this,m).shadowRoot)==null?void 0:h.querySelector("[data-nest]"))||t(this,m).shadowRoot||t(this,m)),a(this,v,!0)}t(this,L).disconnect()})}close(){var e;t(this,L).disconnect(),(e=t(this,m))==null||e.remove(),a(this,v,!1),t(this,E).forEach(s=>document.head.removeChild(s)),a(this,E,[])}getAnchorElements(){var s;let e=[];return t(this,m)&&(e=[...t(this,m).querySelectorAll("a")]),(s=t(this,m))!=null&&s.shadowRoot&&(e=[...e,...t(this,m).shadowRoot.querySelectorAll("a")]),e}}R=new WeakMap,O=new WeakMap,A=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,k=new WeakMap,L=new WeakMap,b=new WeakMap,E=new WeakMap,M=new WeakSet,et=function(){return B(this,null,function*(){const e=t(this,b).filter(c=>c instanceof HTMLElement?c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK":!1);try{for(var s=Y(e),i,h,o;i=!(h=yield s.next()).done;i=!1){const c=h.value;yield new Promise(f=>{c.onload=()=>{f()}})}}catch(h){o=[h]}finally{try{i&&(h=s.return)&&(yield h.call(s))}finally{if(o)throw o[0]}}})};var S,u,P,U,q,j;class lt{constructor(e,s){r(this,S);r(this,u);r(this,P);r(this,U);r(this,q);r(this,j,e=>{e.preventDefault(),t(this,S).links.forEach(s=>{var i;t(this,P)===t(s,P)||(i=t(s,q))!=null&&i.includes(t(this,P))?t(s,u).classList.add("clicked"):t(s,u).classList.remove("clicked")}),t(this,S).navigate(t(this,P),t(this,U))});var o,c;a(this,S,e),a(this,u,s),a(this,P,t(this,u).getAttribute("href")||"/"),a(this,U,t(this,u).getAttribute("data-history-action")||"push"),t(this,u).addEventListener("click",t(this,j));const i=e.normalizePath(t(this,P)),h=e.normalizePath(location.pathname);a(this,q,(o=t(this,u).getAttribute("data-match-paths"))==null?void 0:o.split(",").map(f=>e.normalizePath(f.trim()).pathname)),t(this,u).hasAttribute("data-include")?h.pathname.includes(i.pathname)&&t(this,u).classList.add("current"):i.pathname===h.pathname||(c=t(this,q))!=null&&c.includes(h.pathname)?(t(this,u).classList.add("current"),t(this,u).classList.add("clicked")):t(this,u).classList.remove("clicked")}destroy(){t(this,u).removeEventListener("click",t(this,j)),t(this,u).classList.remove("current")}}S=new WeakMap,u=new WeakMap,P=new WeakMap,U=new WeakMap,q=new WeakMap,j=new WeakMap;globalThis.URLPattern=at.URLPattern;var N,C,g,z,T,y,H,x,_,I,st,D;class ut{constructor(e){r(this,I);r(this,N,null);r(this,C,null);r(this,g,[]);r(this,z,null);r(this,T,[]);r(this,y);r(this,H,null);r(this,x,new rt.Notifier);r(this,_,ht.debounce(()=>{const e=s=>s.split("/").length;a(this,g,t(this,g).sort((s,i)=>e(s.pattern)-e(i.pattern))),this.navigate(location.pathname)},0));r(this,D,e=>{var s;(s=e.state)!=null&&s.path&&this.navigate(e.state.path,"none")});tt.isBrowser&&(e!=null&&e.base?a(this,C,F.normalizeBase(e.base)):a(this,C,"/"),a(this,N,(e==null?void 0:e.rootElement)||document.body),addEventListener("popstate",t(this,D)))}get currentPathname(){return t(this,H)}get candidatePathname(){return t(this,y)}get routes(){return t(this,g)}get links(){return t(this,T)}navigationEvent(e){return t(this,x).subscribe(e)}defineRoute(e,s){const i=new ct(e,s);t(this,g).push(i),t(this,_).call(this)}navigate(e,s="push"){return B(this,null,function*(){var Q,V;const i=this.normalizePath(e);let{pathname:h,hash:o,parameters:c,leaf:f}=i;if(t(this,y)===h||t(this,H)===h)return;a(this,y,h);const d=t(this,g).filter(l=>l.isActive),w=t(this,g).filter(l=>!d.includes(l)&&l.testPathname(f)),it=d.filter(l=>!l.testPathname(f)),G=d.filter(l=>l.testPathname(f));let J=!0;if(this.preprocessor)try{yield new Promise((l,nt)=>{var X;(X=this.preprocessor)==null||X.call(this,{path:i,resolve:l,reject:nt})})}catch(l){l?console.error(l):console.log("Route change canceled"),J=!1}if(J&&t(this,y)===h){a(this,z,G[G.length-1]),it.forEach(l=>{l.close()}),a(this,H,h),F.changeHistory({action:s,pathname:h,searchParameters:c,hash:o});try{for(var ft=Y(w),pt,gt,Pt;pt=!(gt=yield ft.next()).done;pt=!1){const l=gt.value;yield l.render(((Q=t(this,z))==null?void 0:Q.nest)||t(this,N),h),a(this,z,l)}}catch(gt){Pt=[gt]}finally{try{pt&&(gt=ft.return)&&(yield gt.call(ft))}finally{if(Pt)throw Pt[0]}}W(this,I,st).call(this),(V=this.postprocessor)==null||V.call(this,{pathname:h}),t(this,x).notify({pathname:h})}})}normalizePath(e){return F.splitPath(e,{base:t(this,C)})}}N=new WeakMap,C=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,x=new WeakMap,_=new WeakMap,I=new WeakSet,st=function(){const e=t(this,g).filter(i=>i.isActive),s=Array.from(new Set([...t(this,N).querySelectorAll("a"),...e.map(i=>i.getAnchorElements()).flat()].filter(i=>{var h;return(h=i.getAttribute("href"))==null?void 0:h.startsWith("/")})));t(this,T).forEach(i=>{i.destroy()}),a(this,T,s.map(i=>new lt(this,i)))},D=new WeakMap;exports.Router=ut;
1
+ "use strict";var Z=(n,e)=>(e=Symbol[n])?e:Symbol.for("Symbol."+n),$=n=>{throw TypeError(n)};var K=(n,e,s)=>e.has(n)||$("Cannot "+s);var t=(n,e,s)=>(K(n,e,"read from private field"),s?s.call(n):e.get(n)),r=(n,e,s)=>e.has(n)?$("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,s),a=(n,e,s,i)=>(K(n,e,"write to private field"),i?i.call(n,s):e.set(n,s),s),W=(n,e,s)=>(K(n,e,"access private method"),s);var B=(n,e,s)=>new Promise((i,h)=>{var o=d=>{try{f(s.next(d))}catch(w){h(w)}},c=d=>{try{f(s.throw(d))}catch(w){h(w)}},f=d=>d.done?i(d.value):Promise.resolve(d.value).then(o,c);f((s=s.apply(n,e)).next())});var Y=(n,e,s)=>(e=n[Z("asyncIterator")])?e.call(n):(n=n[Z("iterator")](),e={},s=(i,h)=>(h=n[i])&&(e[i]=o=>new Promise((c,f,d)=>(o=h.call(n,o),d=o.done,Promise.resolve(o.value).then(w=>c({value:w,done:d}),f)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const at=require("urlpattern-polyfill"),rt=require("../notifier/index.cjs"),tt=require("../index-DekP7OZe.cjs"),ht=require("../function-MthRj-GJ.cjs");require("construct-style-sheets-polyfill");const F=require("../url-lnBE_6yf.cjs"),ot=require("../object-CCiXnER2.cjs");var R,O,A,p,m,v,k,L,b,E,M,et;class ct{constructor(e,s){r(this,M);r(this,R);r(this,O);r(this,A);r(this,p);r(this,m);r(this,v);r(this,k);r(this,L,null);r(this,b,[]);r(this,E,[]);a(this,R,e),a(this,O,s),a(this,A,new URLPattern({pathname:t(this,R)})),a(this,p,null),a(this,m,null),a(this,v,!1),a(this,k,null),tt.isBrowser&&a(this,L,new MutationObserver(i=>{i[0].addedNodes.forEach(o=>{t(this,p)?t(this,E).push(o):t(this,b).push(o)})}))}get pattern(){return t(this,R)}get urlPattern(){return t(this,A)}get isActive(){return t(this,v)}get element(){return t(this,m)}get nest(){return t(this,k)}testPathname(e){return this.urlPattern.test({pathname:e})}render(e,s){return B(this,null,function*(){var i,h;if(t(this,L).observe(document.head,{childList:!0,subtree:!0}),t(this,p))t(this,b).forEach(o=>{document.head.appendChild(o)});else{const o=yield t(this,O).call(this);if(a(this,E,[...t(this,b)]),typeof o.default=="function"&&(a(this,p,o.default),ot.isESClass(o.default))){const c="e-"+((i=t(this,p))==null?void 0:i.name.toLowerCase());customElements.get(c)||customElements.define(c,o.default)}}if(yield W(this,M,et).call(this),t(this,p)){const o=t(this,A).exec({pathname:s}),c=(o==null?void 0:o.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),d={pathnameParams:c,searchParams:f};a(this,m,new(t(this,p))(d)),e.appendChild(t(this,m)),a(this,k,t(this,m).querySelector("[data-nest]")||((h=t(this,m).shadowRoot)==null?void 0:h.querySelector("[data-nest]"))||t(this,m).shadowRoot||t(this,m)),a(this,v,!0)}t(this,L).disconnect()})}close(){var e;t(this,L).disconnect(),(e=t(this,m))==null||e.remove(),a(this,v,!1),t(this,E).forEach(s=>document.head.removeChild(s)),a(this,E,[])}getAnchorElements(){var s;let e=[];return t(this,m)&&(e=[...t(this,m).querySelectorAll("a")]),(s=t(this,m))!=null&&s.shadowRoot&&(e=[...e,...t(this,m).shadowRoot.querySelectorAll("a")]),e}}R=new WeakMap,O=new WeakMap,A=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,k=new WeakMap,L=new WeakMap,b=new WeakMap,E=new WeakMap,M=new WeakSet,et=function(){return B(this,null,function*(){const e=t(this,b).filter(c=>c instanceof HTMLElement?c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK":!1);try{for(var s=Y(e),i,h,o;i=!(h=yield s.next()).done;i=!1){const c=h.value;yield new Promise(f=>{c.onload=()=>{f()}})}}catch(h){o=[h]}finally{try{i&&(h=s.return)&&(yield h.call(s))}finally{if(o)throw o[0]}}})};var S,u,P,U,q,j;class lt{constructor(e,s){r(this,S);r(this,u);r(this,P);r(this,U);r(this,q);r(this,j,e=>{e.preventDefault(),t(this,S).links.forEach(s=>{var i;t(this,P)===t(s,P)||(i=t(s,q))!=null&&i.includes(t(this,P))?t(s,u).classList.add("clicked"):t(s,u).classList.remove("clicked")}),t(this,S).navigate(t(this,P),t(this,U))});var o,c;a(this,S,e),a(this,u,s),a(this,P,t(this,u).getAttribute("href")||"/"),a(this,U,t(this,u).getAttribute("data-history-action")||"push"),t(this,u).addEventListener("click",t(this,j));const i=e.normalizePath(t(this,P)),h=e.normalizePath(location.pathname);a(this,q,(o=t(this,u).getAttribute("data-match-paths"))==null?void 0:o.split(",").map(f=>e.normalizePath(f.trim()).pathname)),t(this,u).hasAttribute("data-include")?h.pathname.includes(i.pathname)&&t(this,u).classList.add("current"):i.pathname===h.pathname||(c=t(this,q))!=null&&c.includes(h.pathname)?(t(this,u).classList.add("current"),t(this,u).classList.add("clicked")):t(this,u).classList.remove("clicked")}destroy(){t(this,u).removeEventListener("click",t(this,j)),t(this,u).classList.remove("current")}}S=new WeakMap,u=new WeakMap,P=new WeakMap,U=new WeakMap,q=new WeakMap,j=new WeakMap;globalThis.URLPattern=at.URLPattern;var N,C,g,z,T,y,H,x,_,I,st,D;class ut{constructor(e){r(this,I);r(this,N,null);r(this,C,null);r(this,g,[]);r(this,z,null);r(this,T,[]);r(this,y);r(this,H,null);r(this,x,new rt.Notifier);r(this,_,ht.debounce(()=>{const e=s=>s.split("/").length;a(this,g,t(this,g).sort((s,i)=>e(s.pattern)-e(i.pattern))),this.navigate(location.pathname)},0));r(this,D,e=>{var s;(s=e.state)!=null&&s.path&&this.navigate(e.state.path,"none")});tt.isBrowser&&(e!=null&&e.base?a(this,C,F.normalizeBase(e.base)):a(this,C,"/"),a(this,N,(e==null?void 0:e.rootElement)||document.body),addEventListener("popstate",t(this,D)))}get currentPathname(){return t(this,H)}get candidatePathname(){return t(this,y)}get routes(){return t(this,g)}get links(){return t(this,T)}navigationEvent(e){return t(this,x).subscribe(e)}defineRoute(e,s){const i=new ct(e,s);t(this,g).push(i),t(this,_).call(this)}navigate(e,s="push"){return B(this,null,function*(){var Q,V;const i=this.normalizePath(e);let{pathname:h,hash:o,parameters:c,leaf:f}=i;if(t(this,y)===h||t(this,H)===h)return;a(this,y,h);const d=t(this,g).filter(l=>l.isActive),w=t(this,g).filter(l=>!d.includes(l)&&l.testPathname(f)),it=d.filter(l=>!l.testPathname(f)),G=d.filter(l=>l.testPathname(f));let J=!0;if(this.preprocessor)try{yield new Promise((l,nt)=>{var X;(X=this.preprocessor)==null||X.call(this,{path:i,resolve:l,reject:nt})})}catch(l){l?console.error(l):console.log("Route change canceled"),J=!1}if(J&&t(this,y)===h){a(this,z,G[G.length-1]),it.forEach(l=>{l.close()}),a(this,H,h),F.changeHistory({action:s,pathname:h,searchParameters:c,hash:o});try{for(var ft=Y(w),pt,gt,Pt;pt=!(gt=yield ft.next()).done;pt=!1){const l=gt.value;yield l.render(((Q=t(this,z))==null?void 0:Q.nest)||t(this,N),h),a(this,z,l)}}catch(gt){Pt=[gt]}finally{try{pt&&(gt=ft.return)&&(yield gt.call(ft))}finally{if(Pt)throw Pt[0]}}W(this,I,st).call(this),(V=this.postprocessor)==null||V.call(this,{pathname:h}),t(this,x).notify({pathname:h})}})}normalizePath(e){return F.splitPath(e,{base:t(this,C)})}}N=new WeakMap,C=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,x=new WeakMap,_=new WeakMap,I=new WeakSet,st=function(){const e=t(this,g).filter(i=>i.isActive),s=Array.from(new Set([...t(this,N).querySelectorAll("a"),...e.map(i=>i.getAnchorElements()).flat()].filter(i=>{var h;return(h=i.getAttribute("href"))==null?void 0:h.startsWith("/")})));t(this,T).forEach(i=>{i.destroy()}),a(this,T,s.map(i=>new lt(this,i)))},D=new WeakMap;exports.Router=ut;
@@ -22,8 +22,9 @@ var I = (a, e, s) => new Promise((i, r) => {
22
22
  var $ = (a, e, s) => (e = a[X("asyncIterator")]) ? e.call(a) : (a = a[X("iterator")](), e = {}, s = (i, r) => (r = a[i]) && (e[i] = (o) => new Promise((c, f, m) => (o = r.call(a, o), m = o.done, Promise.resolve(o.value).then((w) => c({ value: w, done: m }), f)))), s("next"), s("return"), e);
23
23
  import { URLPattern as at } from "urlpattern-polyfill";
24
24
  import { Notifier as nt } from "../notifier/index.js";
25
- import { i as _ } from "../index-euf5anj6.js";
25
+ import { i as _ } from "../index-Bv9zgfdb.js";
26
26
  import { d as ht } from "../function-C10DGppn.js";
27
+ import "construct-style-sheets-polyfill";
27
28
  import { n as rt, c as ot, s as ct } from "../url-Cc-RVfii.js";
28
29
  import { i as lt } from "../object-D6MVWB4l.js";
29
30
  var y, U, A, p, d, L, k, v, E, R, M, tt;
@@ -158,7 +159,7 @@ class mt {
158
159
  S = new WeakMap(), u = new WeakMap(), P = new WeakMap(), O = new WeakMap(), N = new WeakMap(), x = new WeakMap();
159
160
  globalThis.URLPattern = at;
160
161
  var C, z, g, q, H, b, T, B, j, D, et, K;
161
- class vt {
162
+ class Et {
162
163
  constructor(e) {
163
164
  h(this, D);
164
165
  h(this, C, null);
@@ -224,18 +225,18 @@ class vt {
224
225
  l.close();
225
226
  }), n(this, T, r), ot({ action: s, pathname: r, searchParameters: c, hash: o });
226
227
  try {
227
- for (var bt = $(w), yt, At, kt; yt = !(At = yield bt.next()).done; yt = !1) {
228
- const l = At.value;
228
+ for (var yt = $(w), At, kt, St; At = !(kt = yield yt.next()).done; At = !1) {
229
+ const l = kt.value;
229
230
  yield l.render(((J = t(this, q)) == null ? void 0 : J.nest) || t(this, C), r), n(this, q, l);
230
231
  }
231
- } catch (At) {
232
- kt = [At];
232
+ } catch (kt) {
233
+ St = [kt];
233
234
  } finally {
234
235
  try {
235
- yt && (At = bt.return) && (yield At.call(bt));
236
+ At && (kt = yt.return) && (yield kt.call(yt));
236
237
  } finally {
237
- if (kt)
238
- throw kt[0];
238
+ if (St)
239
+ throw St[0];
239
240
  }
240
241
  }
241
242
  Y(this, D, et).call(this), (Q = this.postprocessor) == null || Q.call(this, { pathname: r }), t(this, B).notify({ pathname: r });
@@ -263,5 +264,5 @@ C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H =
263
264
  }), n(this, H, s.map((i) => new mt(this, i)));
264
265
  }, K = new WeakMap();
265
266
  export {
266
- vt as Router
267
+ Et as Router
267
268
  };
@@ -1 +1 @@
1
- "use strict";var hs=Object.defineProperty;var $e=Object.getOwnPropertySymbols,os=Object.getPrototypeOf,ls=Object.prototype.hasOwnProperty,cs=Object.prototype.propertyIsEnumerable,us=Reflect.get;var Fe=a=>{throw TypeError(a)};var We=(a,n,e)=>n in a?hs(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Ne=(a,n)=>{for(var e in n||(n={}))ls.call(n,e)&&We(a,e,n[e]);if($e)for(var e of $e(n))cs.call(n,e)&&We(a,e,n[e]);return a};var Te=(a,n,e)=>n.has(a)||Fe("Cannot "+e);var t=(a,n,e)=>(Te(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?Fe("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(Te(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),c=(a,n,e)=>(Te(a,n,"access private method"),e);var Ue=(a,n,e)=>us(os(a),e,n);var Ge=(a,n,e)=>new Promise((i,r)=>{var l=g=>{try{m(e.next(g))}catch(yt){r(yt)}},f=g=>{try{m(e.throw(g))}catch(yt){r(yt)}},m=g=>g.done?i(g.value):Promise.resolve(g.value).then(l,f);m((e=e.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const as=require("../Store-GokLe_g-.cjs"),T=require("../index-Cqw2NKev.cjs"),ds=require("../easings-GegIwET5.cjs"),Ss=require("../element-yhcBhsho.cjs"),le=require("../events-KVanG9sR.cjs"),qe=require("../function-MthRj-GJ.cjs"),je=require("../jss-CRBgdvJ3.cjs"),$t=require("../layout-Ctc2p3uz.cjs"),Ke=require("../math-GDWEqu7y.cjs"),Je=require("../number-DyefJ5a1.cjs");require("../ticker/index.cjs");const Ie=require("../order/index.cjs"),ps=require("../Damped-B8bmTxAr.cjs"),bs=require("../Tweened-BsL9FamJ.cjs"),Le=require("../controls/index.cjs"),Wt=require("../window-resizer/index.cjs"),vt=require("../scroll-entries/index.cjs"),Ze=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),fs=require("../device/index.cjs"),de=require("../element-resizer/index.cjs"),ms=require("../gestures-C7gbKx11.cjs"),Qe=require("../dom-JBOkFLTh.cjs"),gs=require("../scroll-segment/index.cjs");var p,Ft,C,Se,pe,Pt,_,st,Et,wt,ce;class ys{constructor(n,e,i){s(this,wt);s(this,p);s(this,Ft);s(this,C);s(this,Se,0);s(this,pe,0);s(this,Pt,0);s(this,_,0);s(this,st,null);s(this,Et,0);h(this,p,n),h(this,Ft,e),h(this,C,i),vt.scrollEntries.register(t(this,p)),this.setIndex(t(this,Ft))}get element(){return t(this,p)}get index(){return t(this,Ft)}get size(){return t(this,Pt)}get width(){return t(this,Se)}get height(){return t(this,pe)}get position(){return t(this,_)}get transformPosition(){return t(this,Et)}destroy(){vt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,C).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,Se,t(this,p).offsetWidth),h(this,pe,t(this,p).offsetHeight),h(this,Pt,t(this,C).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,_,t(this,C).vertical?$t.getCumulativeOffsetTop(t(this,p)):$t.getCumulativeOffsetLeft(t(this,p))),h(this,_,t(this,_)-t(this,C).contentPosition)}transform(){const n=t(this,C).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,C).viewportSize*t(this,C).sectionDistanceScaleCSSProperty.current;t(this,C).loopCSSProperty.current&&t(this,_)+t(this,Pt)<=t(this,C).currentScrollValue-n/2&&(e=(t(this,C).distance-n)*-1-t(this,C).gap),vt.scrollEntries.update(t(this,p),t(this,C).axisCSSProperty.current,e);const r=t(this,C).currentScrollValue+e,l=t(this,_)-t(this,C).viewportSize-i,f=t(this,_)+t(this,Pt)+i,m=Je.preciseNumber(Ke.clamp(r,l,f),3);h(this,Et,m*-1),t(this,C).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Et)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Et)}px, 0px, 0px)`}setMark(n){t(this,st)!==n&&(t(this,st)&&t(this,p).classList.remove(t(this,st)),n&&t(this,p).classList.add(n),h(this,st,n),le.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,st)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){c(this,wt,ce).call(this,"index",n)}setCurrentIndex(n){c(this,wt,ce).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,wt,ce).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,wt,ce).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Ft=new WeakMap,C=new WeakMap,Se=new WeakMap,pe=new WeakMap,Pt=new WeakMap,_=new WeakMap,st=new WeakMap,Et=new WeakMap,wt=new WeakSet,ce=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const Cs=je.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,xt,x,it,$,W,F,q,rt,nt,N,ht,zt,D,P,Lt,It,kt,At,Nt,Rt,R,Mt,ot,M,lt,U,Tt,ct,qt,ut,at,dt,b,Ut,k,u,be,fe,v,y,A,B,St,O,w,z,Gt,G,Z,j,K,Zt,pt,J,Dt,V,E,jt,Q,Bt,Kt,o,De,ue,_t,ke,Ae,Be,Oe,L,me,Xe,Jt,ge,Ve,He,Ct,Ye,ye,ae,Ce;class Vt extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,xt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,it,new S.CSSProperty(this,"--reverse",!1));s(this,$,new S.CSSProperty(this,"--direction",0));s(this,W,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,F,new S.CSSProperty(this,"--split",!1));s(this,q,new S.CSSProperty(this,"--sectional",!1));s(this,rt,new S.CSSProperty(this,"--tween-easing",!1));s(this,nt,new S.CSSProperty(this,"--tween-duration",!1));s(this,N,new S.CSSProperty(this,"--auto-size",!1));s(this,ht,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,zt,new S.CSSProperty(this,"--drag-inertion",1));s(this,D,new S.CSSProperty(this,"--sections-in-view",1));s(this,P,new S.CSSProperty(this,"--loop",!1));s(this,Lt,new S.CSSProperty(this,"--damping",20));s(this,It,new S.CSSProperty(this,"--mass",0));s(this,kt,new S.CSSProperty(this,"--stiffness",0));s(this,At,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Nt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,Rt,new S.CSSProperty(this,"--start-section",0));s(this,R,new S.CSSProperty(this,"--autoplay",0));s(this,Mt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ot,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,M,new S.CSSProperty(this,"--classes",!1));s(this,lt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,U,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Tt,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ct,new S.CSSProperty(this,"--focus-delay",0));s(this,qt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ut,new S.CSSProperty(this,"--disabled",!1));s(this,at,new S.CSSProperty(this,"--hibernate",!1));s(this,dt,null);s(this,b,null);s(this,Ut,null);s(this,k,[]);s(this,u,[]);s(this,be,0);s(this,fe,0);s(this,v,0);s(this,y,0);s(this,A,0);s(this,B,null);s(this,St,null);s(this,O,null);s(this,w,null);s(this,z,new as.Store(0));s(this,Gt,0);s(this,G,0);s(this,Z,!1);s(this,j,!0);s(this,K,!0);s(this,Zt);s(this,pt);s(this,J,new bs.Tweened);s(this,Dt,!1);s(this,V,null);s(this,E,!1);s(this,jt,null);s(this,Q,[]);s(this,Bt,!1);s(this,Kt);s(this,L,e=>{if(e&&t(this,Bt)){h(this,Bt,!1);return}this.resize()});s(this,me,()=>{if(!t(this,Z)||t(this,K)||t(this,j))return;const e=this.currentScrollValue;if(h(this,Gt,Math.max(0,e-t(this,y))),t(this,u).length){for(let i=0;i<t(this,k).length;i++)t(this,k)[i].transform();t(this,z).current=c(this,o,ae).call(this)}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ye).call(this),vt.scrollEntries.update(this,t(this,x).current,e)});s(this,Jt,(e,i)=>{t(this,xt).current&&(c(this,o,Ve).call(this,Math.sign(i)||1),t(this,ge).call(this,e,i))});s(this,ge,(e,i)=>{if(t(this,$).current){if(t(this,$).current<0&&i>0)return;if(t(this,$).current>0&&i<0)return}if(t(this,pt)||t(this,J).unlistenAnimationFrame(),!t(this,R).current&&t(this,ct).current&&(clearInterval(t(this,Zt)),h(this,Zt,setTimeout(()=>{const r=t(this,u)[c(this,o,ae).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,qt).current,easing:ds.easeInOutExpo}})},t(this,ct).current))),!(e.includes("drag")&&!fs.device.isTouch&&!t(this,At).current)){if(t(this,q).current&&e!=="drag"){const r=Math.sign(i);if(t(this,u).length){const l={tween:t(this,rt).current||t(this,nt).current?{easing:t(this,rt).current||"easeInOutCubic",duration:t(this,nt).current||500}:void 0};t(this,Dt)?this.scrollToSection(c(this,o,ae).call(this,!0),l):this.shiftSections(r,l)}else t(this,d).shift(r*t(this,v))}else t(this,d).shift(i);h(this,Dt,e==="drag")}});s(this,ye,qe.debounce(()=>{const e=t(this,Q).reduce((i,r)=>{const l=this.vertical?r.width:r.height;return l>i?l:i},0);clearTimeout(t(this,Kt)),h(this,Bt,!0),this.style.setProperty("--max-section-size",""),h(this,Kt,setTimeout(()=>{h(this,Bt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,Ce,()=>{h(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,Oe).call(this)});if(T.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Cs];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,dt,document.createElement("div")),t(this,dt).className="content-wrapper",h(this,b,document.createElement("div")),t(this,b).className="content",h(this,Ut,document.createElement("slot")),t(this,b).appendChild(t(this,Ut)),t(this,dt).appendChild(t(this,b)),e.appendChild(t(this,dt)),h(this,jt,new MutationObserver(qe.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,xt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,it)}get directionCSSProperty(){return t(this,$)}get pagesCSSProperty(){return t(this,W)}get splitCSSProperty(){return t(this,F)}get sectionalCSSProperty(){return t(this,q)}get easingCSSProperty(){return t(this,rt)}get durationCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,N)}get wheelMaxDeltaCSSProperty(){return t(this,ht)}get dragInertionCSSProperty(){return t(this,zt)}get sectionsInViewCSSProperty(){return t(this,D)}get loopCSSProperty(){return t(this,P)}get dampingCSSProperty(){return t(this,Lt)}get massCSSProperty(){return t(this,It)}get stiffnessCSSProperty(){return t(this,kt)}get mouseDragCSSProperty(){return t(this,At)}get sectionDistanceScaleCSSProperty(){return t(this,Nt)}get startSectionCSSProperty(){return t(this,Rt)}get autoplayCSSProperty(){return t(this,R)}get autoplayPauseDurationCSSProperty(){return t(this,Mt)}get autoplayUserDirectionCSSProperty(){return t(this,ot)}get classesCSSProperty(){return t(this,M)}get currentIndexStartOffsetCSSProperty(){return t(this,lt)}get currentIndexEndOffsetCSSProperty(){return t(this,U)}get shiftSectionPositionCSSProperty(){return t(this,Tt)}get focusDelayCSSProperty(){return t(this,ct)}get focusDurationCSSProperty(){return t(this,qt)}get disabledCSSProperty(){return t(this,ut)}get hibernatedCSSProperty(){return t(this,at)}get currentScrollValue(){return c(this,o,He).call(this,"current")}get targetScrollValue(){return c(this,o,He).call(this,"target")}get contentWrapperElement(){return t(this,dt)}get contentElement(){return t(this,b)}get sections(){return t(this,k)}get visibleSections(){return t(this,u)}get position(){return t(this,be)}get contentPosition(){return t(this,fe)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,y)}get gap(){return t(this,A)}get counter(){return t(this,z)}get limit(){return Math.ceil(t(this,u).length-t(this,D).current)}get distance(){return t(this,G)}get loopDistance(){return t(this,P).current?t(this,G)+t(this,A):t(this,G)}get hasOverflow(){return t(this,Z)}get overscroll(){return t(this,Gt)}get scrollLine(){return t(this,V)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,K)&&(t(this,P).current||t(this,F).current||t(this,P).current||t(this,N).current||t(this,q).current)&&c(this,o,ue).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress<l?0:this.currentProgress>f?1:(this.currentProgress-l)/(f-l)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress>=l&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,u).length)return;const r=t(this,z).current,l=c(this,o,Xe).call(this,e),f=t(this,u)[r],m=t(this,u)[l];if(f&&m){let g=0;const yt=c(this,o,ae).call(this),Ht=t(this,u)[yt];let oe=Ht?this.targetScrollValue-Ht.position:0;t(this,P).current?l===0&&r===t(this,u).length-1?(g=t(this,y)+t(this,v)-f.position+t(this,A),t(this,Dt)||(oe=0)):l===t(this,u).length-1&&r===0?g=m.position-(t(this,y)+t(this,v)+t(this,A)):g=m.position-f.position:g=m.position-f.position,this.shiftPosition(g-oe,i)}}shiftSections(e,i){t(this,u).length&&this.scrollToSection(t(this,z).current+e,i)}setPosition(e,i){c(this,o,Ve).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,pt)||(t(this,J).set(t(this,d).current,{equalize:!0}),t(this,J).set(e,Ne({},i.tween)),h(this,pt,setTimeout(()=>{h(this,pt,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}resize(){if(t(this,at).current)return;h(this,u,t(this,k).filter(r=>Ss.isElementVisible(r.element))),this.style.setProperty("--sections",t(this,u).length.toString()),t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,z).current;if(h(this,be,this.vertical?$t.getCumulativeOffsetTop(this):$t.getCumulativeOffsetLeft(this)),h(this,fe,this.vertical?$t.getCumulativeOffsetTop(t(this,b)):$t.getCumulativeOffsetLeft(t(this,b))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,A,Ze.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):h(this,A,Ze.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,N).current&&t(this,u).length){const r=t(this,D).current,l=(t(this,v)-t(this,A)*(r-1))/r;t(this,u).forEach(f=>{f.setSize(l)})}else t(this,u).forEach(r=>{r.setSize()});if(t(this,u).forEach(r=>{r.resize()}),t(this,W).current){h(this,y,t(this,v)*t(this,W).current);const r=t(this,y)+t(this,v);this.vertical?(t(this,b).style.width=r+"px",t(this,b).style.height="100%"):(t(this,b).style.height=r+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",h(this,y,t(this,b).offsetHeight-t(this,v))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",h(this,y,t(this,b).offsetWidth-t(this,v)));if(!t(this,P).current){const r=getComputedStyle(this),l=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,y,t(this,y)+l),t(this,d).max=t(this,y)}if(t(this,P).current&&t(this,u).length){const r=t(this,u)[t(this,u).length-1],l=r.position+r.size-t(this,v),f=t(this,y)-l;h(this,G,r.position+r.size+f)}else h(this,G,t(this,y));if(t(this,q).current&&t(this,u).length){const r=t(this,u)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0});h(this,Z,(this.vertical?t(this,b).offsetHeight:t(this,b).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,Z)),t(this,Z)?t(this,ut).current||c(this,o,Ae).call(this):c(this,o,ke).call(this),t(this,ye).call(this),le.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){vt.scrollEntries.register(this),h(this,d,new ps.Damped(0,{damping:.01,min:0,order:Ie.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,B,new Le.WheelControls({element:t(this,b)})),t(this,B).changeEvent.subscribe(t(this,Jt)),h(this,St,new Le.KeyboardControls({element:this})),t(this,St).changeEvent.subscribe(t(this,Jt)),h(this,O,new Le.DragControls({element:t(this,b),rootElement:this})),t(this,O).changeEvent.subscribe(t(this,Jt)),h(this,w,new Le.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ge)),t(this,x).subscribe(()=>{c(this,o,De).call(this)}),t(this,it).subscribe(()=>{c(this,o,De).call(this)}),t(this,ht).subscribe(e=>{t(this,B).axis=e.current?"max":t(this,x).current}),t(this,zt).subscribe(e=>{t(this,O).inertion=typeof e.current=="number"?e.current:1}),t(this,W).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,F).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,ue).call(this):c(this,o,_t).call(this))}),t(this,q).subscribe(e=>{t(this,B).debounce=e.current,t(this,O).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,u).length?c(this,o,ue).call(this):!e.current&&e.previous&&t(this,u).length&&c(this,o,_t).call(this))}),t(this,N).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,u).length?c(this,o,ue).call(this):!e.current&&e.previous&&t(this,u).length&&c(this,o,_t).call(this))}),t(this,D).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,Ct).call(this))}),t(this,P).subscribe(e=>{e.current?(t(this,E)&&(t(this,u).length||(t(this,F).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Gt,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Lt).subscribe(e=>{t(this,d).damping=e.current}),t(this,It).subscribe(e=>{t(this,d).mass=e.current}),t(this,kt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,R).subscribe(e=>{t(this,w).speed=e.current,!t(this,j)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,ot).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,M).subscribe(e=>{t(this,E)&&c(this,o,Ct).call(this)}),t(this,lt).subscribe(e=>{t(this,E)&&t(this,M).current&&c(this,o,Ct).call(this)}),t(this,U).subscribe(e=>{t(this,E)&&t(this,M).current&&c(this,o,Ct).call(this)}),t(this,Tt).subscribe(e=>{t(this,E)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,z).subscribe(e=>{t(this,u).length&&c(this,o,Ct).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,J).subscribe(e=>{t(this,J).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ke).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Ae).call(this))}),t(this,at).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Be).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Oe).call(this))}),t(this,xt).observe(),t(this,x).observe(),t(this,it).observe(),t(this,$).observe(),t(this,W).observe(),t(this,F).observe(),t(this,q).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,N).observe(),t(this,ht).observe(),t(this,zt).observe(),t(this,D).observe(),t(this,P).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,kt).observe(),t(this,At).observe(),t(this,Nt).observe(),t(this,Rt).observe(),t(this,R).observe(),t(this,R).observe(),t(this,Mt).observe(),t(this,ot).observe(),t(this,M).observe(),t(this,lt).observe(),t(this,U).observe(),t(this,Tt).observe(),t(this,ct).observe(),t(this,qt).observe(),t(this,ut).observe(),t(this,at).observe(),Wt.windowResizer.subscribe(t(this,Ce),Ie.RESIZE_ORDER.LAST),de.elementResizer.subscribe(this,t(this,L)),t(this,jt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,xt).unobserve(),t(this,x).unobserve(),t(this,it).unobserve(),t(this,$).unobserve(),t(this,W).unobserve(),t(this,F).unobserve(),t(this,q).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,N).unobserve(),t(this,ht).unobserve(),t(this,zt).unobserve(),t(this,D).unobserve(),t(this,P).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,kt).unobserve(),t(this,At).unobserve(),t(this,Nt).unobserve(),t(this,Rt).unobserve(),t(this,R).unobserve(),t(this,Mt).unobserve(),t(this,ot).unobserve(),t(this,M).unobserve(),t(this,lt).unobserve(),t(this,U).unobserve(),t(this,Tt).unobserve(),t(this,ct).unobserve(),t(this,qt).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),Wt.windowResizer.unsubscribe(t(this,Ce)),de.elementResizer.unsubscribe(t(this,L)),c(this,o,Be).call(this),t(this,jt).disconnect()}}d=new WeakMap,xt=new WeakMap,x=new WeakMap,it=new WeakMap,$=new WeakMap,W=new WeakMap,F=new WeakMap,q=new WeakMap,rt=new WeakMap,nt=new WeakMap,N=new WeakMap,ht=new WeakMap,zt=new WeakMap,D=new WeakMap,P=new WeakMap,Lt=new WeakMap,It=new WeakMap,kt=new WeakMap,At=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,R=new WeakMap,Mt=new WeakMap,ot=new WeakMap,M=new WeakMap,lt=new WeakMap,U=new WeakMap,Tt=new WeakMap,ct=new WeakMap,qt=new WeakMap,ut=new WeakMap,at=new WeakMap,dt=new WeakMap,b=new WeakMap,Ut=new WeakMap,k=new WeakMap,u=new WeakMap,be=new WeakMap,fe=new WeakMap,v=new WeakMap,y=new WeakMap,A=new WeakMap,B=new WeakMap,St=new WeakMap,O=new WeakMap,w=new WeakMap,z=new WeakMap,Gt=new WeakMap,G=new WeakMap,Z=new WeakMap,j=new WeakMap,K=new WeakMap,Zt=new WeakMap,pt=new WeakMap,J=new WeakMap,Dt=new WeakMap,V=new WeakMap,E=new WeakMap,jt=new WeakMap,Q=new WeakMap,Bt=new WeakMap,Kt=new WeakMap,o=new WeakSet,De=function(){const e=t(this,x).current,i=t(this,it).current?"-reverse":"";t(this,b).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,B).axis=t(this,ht).current?"max":e,t(this,St).dimension=e==="x"?"width":"height",t(this,O).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},ue=function(){c(this,o,_t).call(this),t(this,Ut).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,k).push(new ys(e,i,this))}),h(this,u,[...t(this,k)]),t(this,b).style.transform="",le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,Ct).call(this)},_t=function(){t(this,k).forEach(e=>{e.destroy()}),h(this,k,[]),h(this,u,[]),t(this,z).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ke=function(){t(this,j)||(h(this,j,!0),t(this,d).unsubscribe(t(this,me)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Zt)),clearInterval(t(this,pt)),t(this,J).unlistenAnimationFrame(),t(this,B).disconnect(),t(this,St).disconnect(),t(this,O).disconnect(),t(this,w).disconnect(),t(this,Z)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Ae=function(){t(this,j)&&(h(this,j,!1),t(this,d).subscribe(t(this,me),-1e4),t(this,d).notify(),t(this,B).connect(),t(this,St).connect(),t(this,O).connect(),t(this,R).current&&t(this,w).connect())},Be=function(){t(this,K)||(h(this,K,!0),clearTimeout(t(this,Kt)),Wt.windowResizer.unsubscribe(t(this,L)),c(this,o,ke).call(this),t(this,b).style.transform="",t(this,b).style.height="",t(this,b).style.width="",this.classList.remove("has-overflow","start","end"),t(this,k).length?c(this,o,_t).call(this):(t(this,z).reset(),t(this,d).reset()),vt.scrollEntries.unregister(this))},Oe=function(){t(this,K)&&(h(this,K,!1),vt.scrollEntries.register(this),this.tryResplit(),c(this,o,Ae).call(this),this.scrollToSection(t(this,Rt).current,{behaviour:"instant"}),Wt.windowResizer.subscribe(t(this,L),Ie.RESIZE_ORDER.SCROLL))},L=new WeakMap,me=new WeakMap,Xe=function(e){let i=t(this,z).current;return t(this,P).current?i=Je.loopNumber(e,t(this,u).length):i=Ke.clamp(e,0,this.limit),i},Jt=new WeakMap,ge=new WeakMap,Ve=function(e=1){t(this,ot).current&&(t(this,w).direction=e),t(this,R).current&&t(this,w).pauseAndContinue(t(this,Mt).current,this.sectionalCSSProperty.current)},He=function(e="current"){if(t(this,P).current&&t(this,u).length){const i=t(this,d)[e]%Math.round(t(this,y)+t(this,v)+t(this,A));return i<0?t(this,y)+i+t(this,v)+t(this,A):i}else return t(this,d)[e]},Ct=function(){if(t(this,u).length){const e=t(this,z).current+t(this,lt).current;if(e===0?h(this,V,"start"):e===this.limit?h(this,V,"end"):h(this,V,null),le.dispatchEvent(this,"scrollLine",{detail:{line:t(this,V)}}),t(this,M).current){this.classList.remove("end","start"),t(this,V)&&this.classList.add(t(this,V));const i=t(this,D).current+t(this,U).current;h(this,Q,[]),t(this,u).forEach((r,l)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,U).current,m=e+i,g=this.sections.length-m;l>=e&&l<m||l<=f?(r.setMark("current"),t(this,Q).push(r)):l>=m&&l<m+g/2||l<=f+i?r.setMark("next"):r.setMark("previous")}),t(this,ye).call(this)}}},Ye=function(){if(t(this,M).current){const e=Math.floor(t(this,Q).length/2);t(this,Q).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,Q).forEach((i,r)=>{const l=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(l),i.setCurrentIndexArcAbs(Math.abs(l)),i.setMiddle(r===e)})}},ye=new WeakMap,ae=function(e=!1){let i=this.targetScrollValue,r=1/0,l=0;const f=t(this,d).direction;for(let m=0;m<t(this,u).length;m++){const g=t(this,u)[m];let yt=t(this,Dt)?g.size*f*-1*.4:0,Ht=g.position;this.overscroll&&Ht===0&&e&&(Ht=t(this,G));let oe=Math.abs(Ht+yt-i);oe<=r&&(r=oe,l=m)}return l},Ce=new WeakMap;T.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Vt);var ve;class Me extends HTMLElement{constructor(){super(...arguments);s(this,ve,null)}get scrollElement(){return t(this,ve)}connectedCallback(){const e=Qe.findParentElement(this,Vt);e instanceof Vt?h(this,ve,e):console.error(this,"e-scroll not found")}}ve=new WeakMap;var bt,I,X,Y,Qt,Xt,ft,Yt,Pe,Ee;class ts extends Me{constructor(){super();s(this,bt,null);s(this,I,null);s(this,X,!1);s(this,Y,0);s(this,Qt,0);s(this,Xt,0);s(this,ft,()=>{h(this,X,this.offsetWidth>this.offsetHeight);const e=t(this,X)?this.offsetWidth:this.offsetHeight;h(this,Y,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Y,Math.max(t(this,Y),30)),t(this,X)?(t(this,I).style.width=t(this,Y)+"px",t(this,I).style.height="100%"):(t(this,I).style.width="100%",t(this,I).style.height=t(this,Y)+"px"),h(this,Qt,e-t(this,Y)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Yt).call(this)});s(this,Yt,()=>{h(this,Xt,this.scrollElement.currentProgress*t(this,Qt)),t(this,X)?t(this,I).style.transform=`translate3d(${t(this,Xt)}px, 0px, 0px)`:t(this,I).style.transform=`translate3d(0px, ${t(this,Xt)}px, 0px)`});s(this,Pe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ee,e=>{document.documentElement.classList.add("grabbing"),ms.setupDrag(l=>{const f=t(this,X)?l.x:l.y,m=this.scrollElement.distance/t(this,Qt),g=(f-r)*m;this.scrollElement.setPosition(i+g)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,X)?e.x:e.y});if(T.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[je.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,bt,document.createElement("slot")),t(this,bt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,bt))}}get thumbElement(){return t(this,I)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,bt).assignedElements()[0]||t(this,bt).firstElementChild;h(this,I,e),t(this,I).addEventListener("pointerdown",t(this,Ee)),Wt.windowResizer.subscribe(t(this,ft),Ie.RESIZE_ORDER.SCROLL),de.elementResizer.subscribe(this,t(this,ft)),de.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Yt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Pe))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,I).removeEventListener("pointerdown",t(this,Ee)),Wt.windowResizer.unsubscribe(t(this,ft)),de.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Yt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Pe))}}bt=new WeakMap,I=new WeakMap,X=new WeakMap,Y=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,ft=new WeakMap,Yt=new WeakMap,Pe=new WeakMap,Ee=new WeakMap;T.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",ts);var te,ee,se;class es extends Me{constructor(){super();s(this,te,new S.CSSProperty(this,"--behaviour","smooth"));s(this,ee,new S.CSSProperty(this,"--tween-easing",!1));s(this,se,new S.CSSProperty(this,"--tween-duration",0));T.isBrowser&&this.addEventListener("click",()=>{const e=t(this,te).current,i=t(this,ee).current,r=t(this,se).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,te).observe(),t(this,ee).observe(),t(this,se).observe()}disconnectedCallback(){t(this,te).close(),t(this,ee).close(),t(this,se).close()}}te=new WeakMap,ee=new WeakMap,se=new WeakMap;var ie;class ss extends es{constructor(){super(...arguments);s(this,ie,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ie).current,e)}connectedCallback(){super.connectedCallback(),t(this,ie).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ie).close()}}ie=new WeakMap;T.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ss);var tt,re;class is extends es{constructor(){super(...arguments);s(this,tt,new S.CSSProperty(this,"--step",1));s(this,re,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,tt).current>0&&this.scrollElement.scrollLine==="end"||t(this,tt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,tt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,tt).subscribe(()=>{t(this,re).call(this)}),t(this,tt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,re)),t(this,re).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,tt).close(),this.removeAttribute("disabled")}}tt=new WeakMap,re=new WeakMap;T.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",is);var H,mt,ne,we,xe,he;class vs{constructor(n,e,i){s(this,H,null);s(this,mt,null);s(this,ne,null);s(this,we,null);s(this,xe,()=>{t(this,mt).scrollToSection(t(this,ne),{behaviour:t(this,we)})});s(this,he,()=>{t(this,H).classList.toggle("current",t(this,mt).counter.current===t(this,ne))});T.isBrowser&&(h(this,H,document.createElement("button")),t(this,H).setAttribute("aria-label",`Go to section ${e+1}`),h(this,mt,n),h(this,we,i),h(this,ne,e),t(this,H).addEventListener("click",t(this,xe)),t(this,mt).counter.subscribe(t(this,he)),t(this,he).call(this))}get element(){return t(this,H)}destroy(){t(this,H).removeEventListener("click",t(this,xe)),t(this,mt).counter.unsubscribe(t(this,he)),t(this,H).remove()}}H=new WeakMap,mt=new WeakMap,ne=new WeakMap,we=new WeakMap,xe=new WeakMap,he=new WeakMap;var Ot,gt,et;class rs extends Me{constructor(){super(...arguments);s(this,Ot,null);s(this,gt,[]);s(this,et,qe.debounce(()=>{t(this,gt).forEach(i=>i.destroy()),h(this,gt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new vs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Ot).appendChild(r.element),t(this,gt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",this.scrollElement.addEventListener("scrollSectionsChange",t(this,et)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,et)),this.scrollElement.loopCSSProperty.subscribe(t(this,et)),h(this,Ot,document.createElement("div")),this.appendChild(t(this,Ot))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,et)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,et)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,et)),t(this,gt).forEach(e=>e.destroy()),h(this,gt,[]),t(this,Ot).remove()}}Ot=new WeakMap,gt=new WeakMap,et=new WeakMap;T.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",rs);class ns extends gs.ScrollSegmentElement{connectedCallback(){const n=Qe.findParentElement(this,Vt);n instanceof Vt?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Vt&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}T.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ns);var ze;const _e=class _e extends Me{constructor(){super(...arguments);s(this,ze,()=>{this.textContent=`${this.scrollElement.counter.current+1}`})}connectedCallback(){return Ge(this,null,function*(){Ue(_e.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,ze))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,ze))}};ze=new WeakMap;let Re=_e;T.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Re);exports.ScrollBulletButtonsElement=rs;exports.ScrollCounterElement=Re;exports.ScrollElement=Vt;exports.ScrollSegmentElement=ns;exports.ScrollSetButtonElement=ss;exports.ScrollStepButtonElement=is;exports.ScrollbarElement=ts;
1
+ "use strict";var hs=Object.defineProperty;var We=Object.getOwnPropertySymbols,os=Object.getPrototypeOf,ls=Object.prototype.hasOwnProperty,cs=Object.prototype.propertyIsEnumerable,us=Reflect.get;var Fe=a=>{throw TypeError(a)};var _e=(a,n,e)=>n in a?hs(a,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[n]=e,Ne=(a,n)=>{for(var e in n||(n={}))ls.call(n,e)&&_e(a,e,n[e]);if(We)for(var e of We(n))cs.call(n,e)&&_e(a,e,n[e]);return a};var Te=(a,n,e)=>n.has(a)||Fe("Cannot "+e);var t=(a,n,e)=>(Te(a,n,"read from private field"),e?e.call(a):n.get(a)),s=(a,n,e)=>n.has(a)?Fe("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,e),h=(a,n,e,i)=>(Te(a,n,"write to private field"),i?i.call(a,e):n.set(a,e),e),c=(a,n,e)=>(Te(a,n,"access private method"),e);var Ue=(a,n,e)=>us(os(a),e,n);var Ge=(a,n,e)=>new Promise((i,r)=>{var l=g=>{try{m(e.next(g))}catch(yt){r(yt)}},f=g=>{try{m(e.throw(g))}catch(yt){r(yt)}},m=g=>g.done?i(g.value):Promise.resolve(g.value).then(l,f);m((e=e.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const as=require("../Store-Cd1GlEmZ.cjs"),T=require("../index-DekP7OZe.cjs"),ds=require("../easings-GegIwET5.cjs"),Ss=require("../element-yhcBhsho.cjs"),le=require("../events-KVanG9sR.cjs"),qe=require("../function-MthRj-GJ.cjs"),Wt=require("../layout-Ctc2p3uz.cjs"),Ke=require("../math-GDWEqu7y.cjs"),je=require("../number-DyefJ5a1.cjs"),Je=require("../stylesheet-HWF2a3nr.cjs");require("../ticker/index.cjs");const Ie=require("../order/index.cjs"),ps=require("../Damped-BD1OQ1fH.cjs"),bs=require("../Tweened-B-AHx93m.cjs"),Le=require("../DragControls-D8BXtKVu.cjs"),_t=require("../window-resizer/index.cjs"),vt=require("../scroll-entries/index.cjs"),Ze=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),fs=require("../Viewport-DB0qAZPJ.cjs");require("construct-style-sheets-polyfill");const de=require("../element-resizer/index.cjs"),ms=require("../gestures-C7gbKx11.cjs"),Qe=require("../dom-JBOkFLTh.cjs"),gs=require("../ScrollSegmentElement-DtMMAirz.cjs");var p,Ft,C,Se,pe,Pt,H,st,Et,wt,ce;class ys{constructor(n,e,i){s(this,wt);s(this,p);s(this,Ft);s(this,C);s(this,Se,0);s(this,pe,0);s(this,Pt,0);s(this,H,0);s(this,st,null);s(this,Et,0);h(this,p,n),h(this,Ft,e),h(this,C,i),vt.scrollEntries.register(t(this,p)),this.setIndex(t(this,Ft))}get element(){return t(this,p)}get index(){return t(this,Ft)}get size(){return t(this,Pt)}get width(){return t(this,Se)}get height(){return t(this,pe)}get position(){return t(this,H)}get transformPosition(){return t(this,Et)}destroy(){vt.scrollEntries.unregister(t(this,p)),this.unsetTransform()}unsetTransform(){t(this,p).style.transform="",this.setMark(null),this.setIndex(null),this.setCurrentIndex(null),this.setCurrentIndexArc(null),this.setCurrentIndexArcAbs(null),this.setMiddle(!1),this.setSize()}setSize(n){n?(t(this,p).style.setProperty("--size",n+"px"),t(this,C).axisCSSProperty.current==="x"?(t(this,p).style.width=n+"px",t(this,p).style.height=""):(t(this,p).style.height=n+"px",t(this,p).style.width="")):(t(this,p).style.width="",t(this,p).style.height="",t(this,p).style.removeProperty("--size"))}resize(){h(this,Se,t(this,p).offsetWidth),h(this,pe,t(this,p).offsetHeight),h(this,Pt,t(this,C).vertical?t(this,p).offsetHeight:t(this,p).offsetWidth),h(this,H,t(this,C).vertical?Wt.getCumulativeOffsetTop(t(this,p)):Wt.getCumulativeOffsetLeft(t(this,p))),h(this,H,t(this,H)-t(this,C).contentPosition)}transform(){const n=t(this,C).shiftSectionPositionCSSProperty.current;let e=n;const i=t(this,C).viewportSize*t(this,C).sectionDistanceScaleCSSProperty.current;t(this,C).loopCSSProperty.current&&t(this,H)+t(this,Pt)<=t(this,C).currentScrollValue-n/2&&(e=(t(this,C).distance-n)*-1-t(this,C).gap),vt.scrollEntries.update(t(this,p),t(this,C).axisCSSProperty.current,e);const r=t(this,C).currentScrollValue+e,l=t(this,H)-t(this,C).viewportSize-i,f=t(this,H)+t(this,Pt)+i,m=je.preciseNumber(Ke.clamp(r,l,f),3);h(this,Et,m*-1),t(this,C).vertical?t(this,p).style.transform=`translate3d(0px, ${t(this,Et)}px, 0px)`:t(this,p).style.transform=`translate3d(${t(this,Et)}px, 0px, 0px)`}setMark(n){t(this,st)!==n&&(t(this,st)&&t(this,p).classList.remove(t(this,st)),n&&t(this,p).classList.add(n),h(this,st,n),le.dispatchEvent(t(this,p),"scrollSectionMarkChange",{composed:!0,detail:{mark:t(this,st)},custom:!0}))}setMiddle(n){t(this,p).classList.toggle("middle",n)}setIndex(n){c(this,wt,ce).call(this,"index",n)}setCurrentIndex(n){c(this,wt,ce).call(this,"current-index",n)}setCurrentIndexArc(n){c(this,wt,ce).call(this,"current-index-arc",n)}setCurrentIndexArcAbs(n){c(this,wt,ce).call(this,"current-index-arc-abs",n)}}p=new WeakMap,Ft=new WeakMap,C=new WeakMap,Se=new WeakMap,pe=new WeakMap,Pt=new WeakMap,H=new WeakMap,st=new WeakMap,Et=new WeakMap,wt=new WeakSet,ce=function(n,e){e!==null?(t(this,p).style.setProperty(`--${n}`,e.toString()),t(this,p).setAttribute(`data-${n}`,e.toString())):(t(this,p).style.removeProperty(`--${n}`),t(this,p).removeAttribute(`data-${n}`))};const Cs=Je.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},".static":{position:"var(--static-position, absolute)",top:"var(--static-top, 0)",left:"var(--static-left, 0)",width:"var(--static-width, 100%)",height:"var(--static-height, 100%)"},".content-wrapper":{width:"var(--content-wrapper-width, 100%)",height:"var(--content-wrapper-height, 100%)",overflow:"var(--overflow, initial)",borderRadius:"var(--border-radius, unset)"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)",willChange:"var(--will-change, transform)"},":host(.hibernated) .content-wrapper":{display:"contents"},":host(.hibernated) .content":{display:"contents"},"::slotted(*)":{flexShrink:"0"}});var d,xt,x,it,W,_,F,q,rt,nt,N,ht,zt,D,P,Lt,It,kt,At,Nt,Rt,R,Mt,ot,M,lt,U,Tt,ct,qt,ut,at,dt,b,Ut,k,u,be,fe,v,y,A,B,St,V,w,z,Gt,G,Z,K,j,Zt,pt,J,Dt,O,E,Kt,Q,Bt,jt,o,De,ue,Ht,ke,Ae,Be,Ve,L,me,Xe,Jt,ge,Oe,$e,Ct,Ye,ye,ae,Ce;class Ot extends HTMLElement{constructor(){super();s(this,o);s(this,d,null);s(this,xt,new S.CSSProperty(this,"--controls",!0));s(this,x,new S.CSSProperty(this,"--axis","y"));s(this,it,new S.CSSProperty(this,"--reverse",!1));s(this,W,new S.CSSProperty(this,"--direction",0));s(this,_,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)}));s(this,F,new S.CSSProperty(this,"--split",!1));s(this,q,new S.CSSProperty(this,"--sectional",!1));s(this,rt,new S.CSSProperty(this,"--tween-easing",!1));s(this,nt,new S.CSSProperty(this,"--tween-duration",!1));s(this,N,new S.CSSProperty(this,"--auto-size",!1));s(this,ht,new S.CSSProperty(this,"--wheel-max-delta",!1));s(this,zt,new S.CSSProperty(this,"--drag-inertion",1));s(this,D,new S.CSSProperty(this,"--sections-in-view",1));s(this,P,new S.CSSProperty(this,"--loop",!1));s(this,Lt,new S.CSSProperty(this,"--damping",20));s(this,It,new S.CSSProperty(this,"--mass",0));s(this,kt,new S.CSSProperty(this,"--stiffness",0));s(this,At,new S.CSSProperty(this,"--mouse-drag",!1));s(this,Nt,new S.CSSProperty(this,"--section-distance-scale",.5));s(this,Rt,new S.CSSProperty(this,"--start-section",0));s(this,R,new S.CSSProperty(this,"--autoplay",0));s(this,Mt,new S.CSSProperty(this,"--autoplay-pause-duration",0));s(this,ot,new S.CSSProperty(this,"--autoplay-user-direction",!1));s(this,M,new S.CSSProperty(this,"--classes",!1));s(this,lt,new S.CSSProperty(this,"--current-index-start-offset",0));s(this,U,new S.CSSProperty(this,"--current-index-end-offset",0));s(this,Tt,new S.CSSProperty(this,"--shift-section-position",0,{rawValueCheck:!1}));s(this,ct,new S.CSSProperty(this,"--focus-delay",0));s(this,qt,new S.CSSProperty(this,"--focus-duration",3e3));s(this,ut,new S.CSSProperty(this,"--disabled",!1));s(this,at,new S.CSSProperty(this,"--hibernate",!1));s(this,dt,null);s(this,b,null);s(this,Ut,null);s(this,k,[]);s(this,u,[]);s(this,be,0);s(this,fe,0);s(this,v,0);s(this,y,0);s(this,A,0);s(this,B,null);s(this,St,null);s(this,V,null);s(this,w,null);s(this,z,new as.Store(0));s(this,Gt,0);s(this,G,0);s(this,Z,!1);s(this,K,!0);s(this,j,!0);s(this,Zt);s(this,pt);s(this,J,new bs.Tweened);s(this,Dt,!1);s(this,O,null);s(this,E,!1);s(this,Kt,null);s(this,Q,[]);s(this,Bt,!1);s(this,jt);s(this,L,e=>{if(e&&t(this,Bt)){h(this,Bt,!1);return}this.resize()});s(this,me,()=>{if(!t(this,Z)||t(this,j)||t(this,K))return;const e=this.currentScrollValue;if(h(this,Gt,Math.max(0,e-t(this,y))),t(this,u).length){for(let i=0;i<t(this,k).length;i++)t(this,k)[i].transform();t(this,z).current=c(this,o,ae).call(this)}else this.vertical?t(this,b).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:t(this,b).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;c(this,o,Ye).call(this),vt.scrollEntries.update(this,t(this,x).current,e)});s(this,Jt,(e,i)=>{t(this,xt).current&&(c(this,o,Oe).call(this,Math.sign(i)||1),t(this,ge).call(this,e,i))});s(this,ge,(e,i)=>{if(t(this,W).current){if(t(this,W).current<0&&i>0)return;if(t(this,W).current>0&&i<0)return}if(t(this,pt)||t(this,J).unlistenAnimationFrame(),!t(this,R).current&&t(this,ct).current&&(clearInterval(t(this,Zt)),h(this,Zt,setTimeout(()=>{const r=t(this,u)[c(this,o,ae).call(this)];r&&this.scrollToSection(r.index,{tween:{duration:t(this,qt).current,easing:ds.easeInOutExpo}})},t(this,ct).current))),!(e.includes("drag")&&!fs.device.isTouch&&!t(this,At).current)){if(t(this,q).current&&e!=="drag"){const r=Math.sign(i);if(t(this,u).length){const l={tween:t(this,rt).current||t(this,nt).current?{easing:t(this,rt).current||"easeInOutCubic",duration:t(this,nt).current||500}:void 0};t(this,Dt)?this.scrollToSection(c(this,o,ae).call(this,!0),l):this.shiftSections(r,l)}else t(this,d).shift(r*t(this,v))}else t(this,d).shift(i);h(this,Dt,e==="drag")}});s(this,ye,qe.debounce(()=>{const e=t(this,Q).reduce((i,r)=>{const l=this.vertical?r.width:r.height;return l>i?l:i},0);clearTimeout(t(this,jt)),h(this,Bt,!0),this.style.setProperty("--max-section-size",""),h(this,jt,setTimeout(()=>{h(this,Bt,!0),this.style.setProperty("--max-section-size",e+"px")},10))},20));s(this,Ce,()=>{h(this,E,!0),this.hibernatedCSSProperty.current||c(this,o,Ve).call(this)});if(T.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Cs];const i=document.createElement("div");i.className="static",i.innerHTML='<slot name="static"></slot>',e.appendChild(i),h(this,dt,document.createElement("div")),t(this,dt).className="content-wrapper",h(this,b,document.createElement("div")),t(this,b).className="content",h(this,Ut,document.createElement("slot")),t(this,b).appendChild(t(this,Ut)),t(this,dt).appendChild(t(this,b)),e.appendChild(t(this,dt)),h(this,Kt,new MutationObserver(qe.debounce(()=>{this.tryResplit()},10)))}}get damped(){return t(this,d)}get controlsCSSProperty(){return t(this,xt)}get axisCSSProperty(){return t(this,x)}get reverseCSSProperty(){return t(this,it)}get directionCSSProperty(){return t(this,W)}get pagesCSSProperty(){return t(this,_)}get splitCSSProperty(){return t(this,F)}get sectionalCSSProperty(){return t(this,q)}get easingCSSProperty(){return t(this,rt)}get durationCSSProperty(){return t(this,nt)}get autoSizeCSSProperty(){return t(this,N)}get wheelMaxDeltaCSSProperty(){return t(this,ht)}get dragInertionCSSProperty(){return t(this,zt)}get sectionsInViewCSSProperty(){return t(this,D)}get loopCSSProperty(){return t(this,P)}get dampingCSSProperty(){return t(this,Lt)}get massCSSProperty(){return t(this,It)}get stiffnessCSSProperty(){return t(this,kt)}get mouseDragCSSProperty(){return t(this,At)}get sectionDistanceScaleCSSProperty(){return t(this,Nt)}get startSectionCSSProperty(){return t(this,Rt)}get autoplayCSSProperty(){return t(this,R)}get autoplayPauseDurationCSSProperty(){return t(this,Mt)}get autoplayUserDirectionCSSProperty(){return t(this,ot)}get classesCSSProperty(){return t(this,M)}get currentIndexStartOffsetCSSProperty(){return t(this,lt)}get currentIndexEndOffsetCSSProperty(){return t(this,U)}get shiftSectionPositionCSSProperty(){return t(this,Tt)}get focusDelayCSSProperty(){return t(this,ct)}get focusDurationCSSProperty(){return t(this,qt)}get disabledCSSProperty(){return t(this,ut)}get hibernatedCSSProperty(){return t(this,at)}get currentScrollValue(){return c(this,o,$e).call(this,"current")}get targetScrollValue(){return c(this,o,$e).call(this,"target")}get contentWrapperElement(){return t(this,dt)}get contentElement(){return t(this,b)}get sections(){return t(this,k)}get visibleSections(){return t(this,u)}get position(){return t(this,be)}get contentPosition(){return t(this,fe)}get viewportSize(){return t(this,v)}get scrollSize(){return t(this,y)}get gap(){return t(this,A)}get counter(){return t(this,z)}get limit(){return Math.ceil(t(this,u).length-t(this,D).current)}get distance(){return t(this,G)}get loopDistance(){return t(this,P).current?t(this,G)+t(this,A):t(this,G)}get hasOverflow(){return t(this,Z)}get overscroll(){return t(this,Gt)}get scrollLine(){return t(this,O)}get vertical(){return t(this,x).current==="y"}get currentProgress(){return this.currentScrollValue/this.loopDistance||0}get targetProgress(){return this.targetScrollValue/this.loopDistance||0}get scrollWidth(){return t(this,x).current==="y"?0:t(this,d).distance}get scrollHeight(){return t(this,x).current==="x"?0:t(this,d).distance}tryResplit(){!t(this,j)&&(t(this,P).current||t(this,F).current||t(this,P).current||t(this,N).current||t(this,q).current)&&c(this,o,ue).call(this)}onScroll(...e){return t(this,d).subscribe(...e)}offScroll(...e){t(this,d).unsubscribe(...e)}range(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress<l?0:this.currentProgress>f?1:(this.currentProgress-l)/(f-l)}curve(e,i,r=0){return Math.sin(this.range(e,i,r)*Math.PI)}visible(e,i,r=0){const l=e-r,f=l+i+r*2;return this.currentProgress>=l&&this.currentProgress<=f}scrollToSection(e,i){if(!t(this,u).length)return;const r=t(this,z).current,l=c(this,o,Xe).call(this,e),f=t(this,u)[r],m=t(this,u)[l];if(f&&m){let g=0;const yt=c(this,o,ae).call(this),$t=t(this,u)[yt];let oe=$t?this.targetScrollValue-$t.position:0;t(this,P).current?l===0&&r===t(this,u).length-1?(g=t(this,y)+t(this,v)-f.position+t(this,A),t(this,Dt)||(oe=0)):l===t(this,u).length-1&&r===0?g=m.position-(t(this,y)+t(this,v)+t(this,A)):g=m.position-f.position:g=m.position-f.position,this.shiftPosition(g-oe,i)}}shiftSections(e,i){t(this,u).length&&this.scrollToSection(t(this,z).current+e,i)}setPosition(e,i){c(this,o,Oe).call(this,Math.sign(e)||1),i!=null&&i.tween?t(this,pt)||(t(this,J).set(t(this,d).current,{equalize:!0}),t(this,J).set(e,Ne({},i.tween)),h(this,pt,setTimeout(()=>{h(this,pt,void 0)},i.tween.duration||0))):t(this,d).set(e,{equalize:(i==null?void 0:i.behaviour)==="instant"})}shiftPosition(e,i){this.setPosition(t(this,d).target+e,i)}resize(){if(t(this,at).current)return;h(this,u,t(this,k).filter(r=>Ss.isElementVisible(r.element))),this.style.setProperty("--sections",t(this,u).length.toString()),t(this,d).unlistenAnimationFrame();const e=this.currentScrollValue/t(this,y)||0,i=t(this,z).current;if(h(this,be,this.vertical?Wt.getCumulativeOffsetTop(this):Wt.getCumulativeOffsetLeft(this)),h(this,fe,this.vertical?Wt.getCumulativeOffsetTop(t(this,b)):Wt.getCumulativeOffsetLeft(t(this,b))),h(this,v,this.vertical?this.offsetHeight:this.offsetWidth),this.vertical?h(this,A,Ze.cssUnitParser.parse(getComputedStyle(t(this,b)).rowGap)):h(this,A,Ze.cssUnitParser.parse(getComputedStyle(t(this,b)).columnGap)),t(this,N).current&&t(this,u).length){const r=t(this,D).current,l=(t(this,v)-t(this,A)*(r-1))/r;t(this,u).forEach(f=>{f.setSize(l)})}else t(this,u).forEach(r=>{r.setSize()});if(t(this,u).forEach(r=>{r.resize()}),t(this,_).current){h(this,y,t(this,v)*t(this,_).current);const r=t(this,y)+t(this,v);this.vertical?(t(this,b).style.width=r+"px",t(this,b).style.height="100%"):(t(this,b).style.height=r+"px",t(this,b).style.width="100%")}else this.vertical?(t(this,b).style.width="100%",t(this,b).style.height="max-content",h(this,y,t(this,b).offsetHeight-t(this,v))):(t(this,b).style.width="max-content",t(this,b).style.height="100%",h(this,y,t(this,b).offsetWidth-t(this,v)));if(!t(this,P).current){const r=getComputedStyle(this),l=this.vertical?parseFloat(r.paddingBlockStart)+parseFloat(r.paddingBlockEnd):parseFloat(r.paddingInlineStart)+parseFloat(r.paddingInlineEnd);h(this,y,t(this,y)+l),t(this,d).max=t(this,y)}if(t(this,P).current&&t(this,u).length){const r=t(this,u)[t(this,u).length-1],l=r.position+r.size-t(this,v),f=t(this,y)-l;h(this,G,r.position+r.size+f)}else h(this,G,t(this,y));if(t(this,q).current&&t(this,u).length){const r=t(this,u)[i];t(this,d).set(r.position,{equalize:!0})}else t(this,d).set(e*t(this,y),{equalize:!0});h(this,Z,(this.vertical?t(this,b).offsetHeight:t(this,b).offsetWidth)>t(this,v)),this.classList.toggle("has-overflow",t(this,Z)),t(this,Z)?t(this,ut).current||c(this,o,Ae).call(this):c(this,o,ke).call(this),t(this,ye).call(this),le.dispatchEvent(this,"scrollResize",{custom:!0}),t(this,d).notify()}connectedCallback(){vt.scrollEntries.register(this),h(this,d,new ps.Damped(0,{damping:.01,min:0,order:Ie.TICK_ORDER.SCROLL})),this.setAttribute("tabindex","0"),h(this,B,new Le.WheelControls({element:t(this,b)})),t(this,B).changeEvent.subscribe(t(this,Jt)),h(this,St,new Le.KeyboardControls({element:this})),t(this,St).changeEvent.subscribe(t(this,Jt)),h(this,V,new Le.DragControls({element:t(this,b),rootElement:this})),t(this,V).changeEvent.subscribe(t(this,Jt)),h(this,w,new Le.AutoplayControls({culling:this})),t(this,w).changeEvent.subscribe(t(this,ge)),t(this,x).subscribe(()=>{c(this,o,De).call(this)}),t(this,it).subscribe(()=>{c(this,o,De).call(this)}),t(this,ht).subscribe(e=>{t(this,B).axis=e.current?"max":t(this,x).current}),t(this,zt).subscribe(e=>{t(this,V).inertion=typeof e.current=="number"?e.current:1}),t(this,_).subscribe(()=>{t(this,E)&&t(this,L).call(this)}),t(this,F).subscribe(({current:e})=>{t(this,E)&&(e?c(this,o,ue).call(this):c(this,o,Ht).call(this))}),t(this,q).subscribe(e=>{t(this,B).debounce=e.current,t(this,V).swipe=e.current,t(this,w).interval=e.current,t(this,E)&&(e.current&&!e.previous&&!t(this,u).length?c(this,o,ue).call(this):!e.current&&e.previous&&t(this,u).length&&c(this,o,Ht).call(this))}),t(this,N).subscribe(e=>{t(this,E)&&(t(this,L).call(this),e.current&&!e.previous&&!t(this,u).length?c(this,o,ue).call(this):!e.current&&e.previous&&t(this,u).length&&c(this,o,Ht).call(this))}),t(this,D).subscribe(e=>{t(this,E)&&(t(this,L).call(this),c(this,o,Ct).call(this))}),t(this,P).subscribe(e=>{e.current?(t(this,E)&&(t(this,u).length||(t(this,F).current=!0)),t(this,d).max=1/0,t(this,d).min=-1/0):(h(this,Gt,0),t(this,d).max=t(this,y),t(this,d).min=0)}),t(this,Lt).subscribe(e=>{t(this,d).damping=e.current}),t(this,It).subscribe(e=>{t(this,d).mass=e.current}),t(this,kt).subscribe(e=>{t(this,d).stiffness=e.current}),t(this,R).subscribe(e=>{t(this,w).speed=e.current,!t(this,K)&&e.current&&!e.previous?t(this,w).connect():!e.current&&e.previous&&t(this,w).disconnect()}),t(this,ot).subscribe(e=>{e.current||(t(this,w).direction=1)}),t(this,M).subscribe(e=>{t(this,E)&&c(this,o,Ct).call(this)}),t(this,lt).subscribe(e=>{t(this,E)&&t(this,M).current&&c(this,o,Ct).call(this)}),t(this,U).subscribe(e=>{t(this,E)&&t(this,M).current&&c(this,o,Ct).call(this)}),t(this,Tt).subscribe(e=>{t(this,E)&&t(this,d).notify()}),t(this,d).isRunning.subscribe(e=>{this.classList.toggle("active",e.current)}),t(this,z).subscribe(e=>{t(this,u).length&&c(this,o,Ct).call(this),this.style.setProperty("--counter",e.current+"")}),t(this,J).subscribe(e=>{t(this,J).isRunning.current&&t(this,d).set(e.current,{equalize:!0})}),t(this,ut).subscribe(e=>{e.current&&!e.previous?(this.classList.add("disabled"),c(this,o,ke).call(this)):!e.current&&e.previous&&(this.classList.remove("disabled"),c(this,o,Ae).call(this))}),t(this,at).subscribe(e=>{e.current&&!e.previous?(this.classList.add("hibernated"),c(this,o,Be).call(this)):!e.current&&e.previous&&(this.classList.remove("hibernated"),c(this,o,Ve).call(this))}),t(this,xt).observe(),t(this,x).observe(),t(this,it).observe(),t(this,W).observe(),t(this,_).observe(),t(this,F).observe(),t(this,q).observe(),t(this,rt).observe(),t(this,nt).observe(),t(this,N).observe(),t(this,ht).observe(),t(this,zt).observe(),t(this,D).observe(),t(this,P).observe(),t(this,Lt).observe(),t(this,It).observe(),t(this,kt).observe(),t(this,At).observe(),t(this,Nt).observe(),t(this,Rt).observe(),t(this,R).observe(),t(this,R).observe(),t(this,Mt).observe(),t(this,ot).observe(),t(this,M).observe(),t(this,lt).observe(),t(this,U).observe(),t(this,Tt).observe(),t(this,ct).observe(),t(this,qt).observe(),t(this,ut).observe(),t(this,at).observe(),_t.windowResizer.subscribe(t(this,Ce),Ie.RESIZE_ORDER.LAST),de.elementResizer.subscribe(this,t(this,L)),t(this,Kt).observe(this,{childList:!0})}disconnectedCallback(){this.removeAttribute("tabindex"),this.classList.remove("disabled"),this.classList.remove("hibernated"),t(this,xt).unobserve(),t(this,x).unobserve(),t(this,it).unobserve(),t(this,W).unobserve(),t(this,_).unobserve(),t(this,F).unobserve(),t(this,q).unobserve(),t(this,rt).unobserve(),t(this,nt).unobserve(),t(this,N).unobserve(),t(this,ht).unobserve(),t(this,zt).unobserve(),t(this,D).unobserve(),t(this,P).unobserve(),t(this,Lt).unobserve(),t(this,It).unobserve(),t(this,kt).unobserve(),t(this,At).unobserve(),t(this,Nt).unobserve(),t(this,Rt).unobserve(),t(this,R).unobserve(),t(this,Mt).unobserve(),t(this,ot).unobserve(),t(this,M).unobserve(),t(this,lt).unobserve(),t(this,U).unobserve(),t(this,Tt).unobserve(),t(this,ct).unobserve(),t(this,qt).unobserve(),t(this,ut).unobserve(),t(this,at).unobserve(),_t.windowResizer.unsubscribe(t(this,Ce)),de.elementResizer.unsubscribe(t(this,L)),c(this,o,Be).call(this),t(this,Kt).disconnect()}}d=new WeakMap,xt=new WeakMap,x=new WeakMap,it=new WeakMap,W=new WeakMap,_=new WeakMap,F=new WeakMap,q=new WeakMap,rt=new WeakMap,nt=new WeakMap,N=new WeakMap,ht=new WeakMap,zt=new WeakMap,D=new WeakMap,P=new WeakMap,Lt=new WeakMap,It=new WeakMap,kt=new WeakMap,At=new WeakMap,Nt=new WeakMap,Rt=new WeakMap,R=new WeakMap,Mt=new WeakMap,ot=new WeakMap,M=new WeakMap,lt=new WeakMap,U=new WeakMap,Tt=new WeakMap,ct=new WeakMap,qt=new WeakMap,ut=new WeakMap,at=new WeakMap,dt=new WeakMap,b=new WeakMap,Ut=new WeakMap,k=new WeakMap,u=new WeakMap,be=new WeakMap,fe=new WeakMap,v=new WeakMap,y=new WeakMap,A=new WeakMap,B=new WeakMap,St=new WeakMap,V=new WeakMap,w=new WeakMap,z=new WeakMap,Gt=new WeakMap,G=new WeakMap,Z=new WeakMap,K=new WeakMap,j=new WeakMap,Zt=new WeakMap,pt=new WeakMap,J=new WeakMap,Dt=new WeakMap,O=new WeakMap,E=new WeakMap,Kt=new WeakMap,Q=new WeakMap,Bt=new WeakMap,jt=new WeakMap,o=new WeakSet,De=function(){const e=t(this,x).current,i=t(this,it).current?"-reverse":"";t(this,b).style.flexDirection=e==="x"?`row${i}`:`column${i}`,t(this,B).axis=t(this,ht).current?"max":e,t(this,St).dimension=e==="x"?"width":"height",t(this,V).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),t(this,E)&&t(this,L).call(this)},ue=function(){c(this,o,Ht).call(this),t(this,Ut).assignedElements().forEach((e,i)=>{e instanceof HTMLElement&&e.tagName!=="SCRIPT"&&t(this,k).push(new ys(e,i,this))}),h(this,u,[...t(this,k)]),t(this,b).style.transform="",le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0}),t(this,L).call(this),c(this,o,Ct).call(this)},Ht=function(){t(this,k).forEach(e=>{e.destroy()}),h(this,k,[]),h(this,u,[]),t(this,z).reset(),t(this,d).reset(),this.style.removeProperty("--max-section-size"),le.dispatchEvent(this,"scrollSectionsChange",{custom:!0,composed:!0})},ke=function(){t(this,K)||(h(this,K,!0),t(this,d).unsubscribe(t(this,me)),t(this,d).unlistenAnimationFrame(),clearInterval(t(this,Zt)),clearInterval(t(this,pt)),t(this,J).unlistenAnimationFrame(),t(this,B).disconnect(),t(this,St).disconnect(),t(this,V).disconnect(),t(this,w).disconnect(),t(this,Z)||(this.sections.forEach(e=>{e.unsetTransform()}),t(this,L).call(this)))},Ae=function(){t(this,K)&&(h(this,K,!1),t(this,d).subscribe(t(this,me),-1e4),t(this,d).notify(),t(this,B).connect(),t(this,St).connect(),t(this,V).connect(),t(this,R).current&&t(this,w).connect())},Be=function(){t(this,j)||(h(this,j,!0),clearTimeout(t(this,jt)),_t.windowResizer.unsubscribe(t(this,L)),c(this,o,ke).call(this),t(this,b).style.transform="",t(this,b).style.height="",t(this,b).style.width="",this.classList.remove("has-overflow","start","end"),t(this,k).length?c(this,o,Ht).call(this):(t(this,z).reset(),t(this,d).reset()),vt.scrollEntries.unregister(this))},Ve=function(){t(this,j)&&(h(this,j,!1),vt.scrollEntries.register(this),this.tryResplit(),c(this,o,Ae).call(this),this.scrollToSection(t(this,Rt).current,{behaviour:"instant"}),_t.windowResizer.subscribe(t(this,L),Ie.RESIZE_ORDER.SCROLL))},L=new WeakMap,me=new WeakMap,Xe=function(e){let i=t(this,z).current;return t(this,P).current?i=je.loopNumber(e,t(this,u).length):i=Ke.clamp(e,0,this.limit),i},Jt=new WeakMap,ge=new WeakMap,Oe=function(e=1){t(this,ot).current&&(t(this,w).direction=e),t(this,R).current&&t(this,w).pauseAndContinue(t(this,Mt).current,this.sectionalCSSProperty.current)},$e=function(e="current"){if(t(this,P).current&&t(this,u).length){const i=t(this,d)[e]%Math.round(t(this,y)+t(this,v)+t(this,A));return i<0?t(this,y)+i+t(this,v)+t(this,A):i}else return t(this,d)[e]},Ct=function(){if(t(this,u).length){const e=t(this,z).current+t(this,lt).current;if(e===0?h(this,O,"start"):e===this.limit?h(this,O,"end"):h(this,O,null),le.dispatchEvent(this,"scrollLine",{detail:{line:t(this,O)}}),t(this,M).current){this.classList.remove("end","start"),t(this,O)&&this.classList.add(t(this,O));const i=t(this,D).current+t(this,U).current;h(this,Q,[]),t(this,u).forEach((r,l)=>{r.setCurrentIndex(null),r.setCurrentIndexArc(null),r.setCurrentIndexArcAbs(null),r.setMiddle(!1);const f=e-this.limit-1+t(this,U).current,m=e+i,g=this.sections.length-m;l>=e&&l<m||l<=f?(r.setMark("current"),t(this,Q).push(r)):l>=m&&l<m+g/2||l<=f+i?r.setMark("next"):r.setMark("previous")}),t(this,ye).call(this)}}},Ye=function(){if(t(this,M).current){const e=Math.floor(t(this,Q).length/2);t(this,Q).sort((i,r)=>i.element.getBoundingClientRect().left-r.element.getBoundingClientRect().left),t(this,Q).forEach((i,r)=>{const l=r-e;i.setCurrentIndex(r),i.setCurrentIndexArc(l),i.setCurrentIndexArcAbs(Math.abs(l)),i.setMiddle(r===e)})}},ye=new WeakMap,ae=function(e=!1){let i=this.targetScrollValue,r=1/0,l=0;const f=t(this,d).direction;for(let m=0;m<t(this,u).length;m++){const g=t(this,u)[m];let yt=t(this,Dt)?g.size*f*-1*.4:0,$t=g.position;this.overscroll&&$t===0&&e&&($t=t(this,G));let oe=Math.abs($t+yt-i);oe<=r&&(r=oe,l=m)}return l},Ce=new WeakMap;T.isBrowser&&!customElements.get("e-scroll")&&customElements.define("e-scroll",Ot);var ve;class Me extends HTMLElement{constructor(){super(...arguments);s(this,ve,null)}get scrollElement(){return t(this,ve)}connectedCallback(){const e=Qe.findParentElement(this,Ot);e instanceof Ot?h(this,ve,e):console.error(this,"e-scroll not found")}}ve=new WeakMap;var bt,I,X,Y,Qt,Xt,ft,Yt,Pe,Ee;class ts extends Me{constructor(){super();s(this,bt,null);s(this,I,null);s(this,X,!1);s(this,Y,0);s(this,Qt,0);s(this,Xt,0);s(this,ft,()=>{h(this,X,this.offsetWidth>this.offsetHeight);const e=t(this,X)?this.offsetWidth:this.offsetHeight;h(this,Y,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),h(this,Y,Math.max(t(this,Y),30)),t(this,X)?(t(this,I).style.width=t(this,Y)+"px",t(this,I).style.height="100%"):(t(this,I).style.width="100%",t(this,I).style.height=t(this,Y)+"px"),h(this,Qt,e-t(this,Y)),this.scrollElement.scrollSize<=0?this.style.display="none":this.style.display="",t(this,Yt).call(this)});s(this,Yt,()=>{h(this,Xt,this.scrollElement.currentProgress*t(this,Qt)),t(this,X)?t(this,I).style.transform=`translate3d(${t(this,Xt)}px, 0px, 0px)`:t(this,I).style.transform=`translate3d(0px, ${t(this,Xt)}px, 0px)`});s(this,Pe,()=>{this.setAttribute("axis",this.scrollElement.axisCSSProperty.current)});s(this,Ee,e=>{document.documentElement.classList.add("grabbing"),ms.setupDrag(l=>{const f=t(this,X)?l.x:l.y,m=this.scrollElement.distance/t(this,Qt),g=(f-r)*m;this.scrollElement.setPosition(i+g)},()=>{document.documentElement.classList.remove("grabbing")});const i=this.scrollElement.damped.target,r=t(this,X)?e.x:e.y});if(T.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[Je.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:"#ebebeb"},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:"var(--thumb-color, black)",borderRadius:"var(--thumb-radius, 0px)",touchAction:"none"},"::slotted(*)":{touchAction:"none"}})],h(this,bt,document.createElement("slot")),t(this,bt).innerHTML='<div class="default-thumb"></div>',e.appendChild(t(this,bt))}}get thumbElement(){return t(this,I)}connectedCallback(){super.connectedCallback(),this.setAttribute("drag-dead-zone","");const e=t(this,bt).assignedElements()[0]||t(this,bt).firstElementChild;h(this,I,e),t(this,I).addEventListener("pointerdown",t(this,Ee)),_t.windowResizer.subscribe(t(this,ft),Ie.RESIZE_ORDER.SCROLL),de.elementResizer.subscribe(this,t(this,ft)),de.elementResizer.subscribe(this.scrollElement,t(this,ft)),this.scrollElement.onScroll(t(this,Yt)),this.scrollElement.axisCSSProperty.subscribe(t(this,Pe))}disconnectedCallback(){this.removeAttribute("drag-dead-zone"),this.style.display="",t(this,I).removeEventListener("pointerdown",t(this,Ee)),_t.windowResizer.unsubscribe(t(this,ft)),de.elementResizer.unsubscribe(t(this,ft)),this.scrollElement.offScroll(t(this,Yt)),this.scrollElement.axisCSSProperty.unsubscribe(t(this,Pe))}}bt=new WeakMap,I=new WeakMap,X=new WeakMap,Y=new WeakMap,Qt=new WeakMap,Xt=new WeakMap,ft=new WeakMap,Yt=new WeakMap,Pe=new WeakMap,Ee=new WeakMap;T.isBrowser&&!customElements.get("e-scrollbar")&&customElements.define("e-scrollbar",ts);var te,ee,se;class es extends Me{constructor(){super();s(this,te,new S.CSSProperty(this,"--behaviour","smooth"));s(this,ee,new S.CSSProperty(this,"--tween-easing",!1));s(this,se,new S.CSSProperty(this,"--tween-duration",0));T.isBrowser&&this.addEventListener("click",()=>{const e=t(this,te).current,i=t(this,ee).current,r=t(this,se).current;this.handleClick({behaviour:e,tween:i||r?{easing:i,duration:r}:void 0})})}connectedCallback(){super.connectedCallback(),t(this,te).observe(),t(this,ee).observe(),t(this,se).observe()}disconnectedCallback(){t(this,te).close(),t(this,ee).close(),t(this,se).close()}}te=new WeakMap,ee=new WeakMap,se=new WeakMap;var ie;class ss extends es{constructor(){super(...arguments);s(this,ie,new S.CSSProperty(this,"--set",1))}handleClick(e){this.scrollElement.scrollToSection(t(this,ie).current,e)}connectedCallback(){super.connectedCallback(),t(this,ie).observe()}disconnectedCallback(){super.disconnectedCallback(),t(this,ie).close()}}ie=new WeakMap;T.isBrowser&&!customElements.get("e-scroll-set-button")&&customElements.define("e-scroll-set-button",ss);var tt,re;class is extends es{constructor(){super(...arguments);s(this,tt,new S.CSSProperty(this,"--step",1));s(this,re,()=>{this.scrollElement.loopCSSProperty.current?this.removeAttribute("disabled"):t(this,tt).current>0&&this.scrollElement.scrollLine==="end"||t(this,tt).current<0&&this.scrollElement.scrollLine==="start"?this.setAttribute("disabled",""):this.removeAttribute("disabled")})}handleClick(e){this.scrollElement.shiftSections(t(this,tt).current,e)}connectedCallback(){super.connectedCallback(),this.scrollElement&&(t(this,tt).subscribe(()=>{t(this,re).call(this)}),t(this,tt).observe(),this.scrollElement.addEventListener("scrollLine",t(this,re)),t(this,re).call(this))}disconnectedCallback(){super.disconnectedCallback(),t(this,tt).close(),this.removeAttribute("disabled")}}tt=new WeakMap,re=new WeakMap;T.isBrowser&&!customElements.get("e-scroll-step-button")&&customElements.define("e-scroll-step-button",is);var $,mt,ne,we,xe,he;class vs{constructor(n,e,i){s(this,$,null);s(this,mt,null);s(this,ne,null);s(this,we,null);s(this,xe,()=>{t(this,mt).scrollToSection(t(this,ne),{behaviour:t(this,we)})});s(this,he,()=>{t(this,$).classList.toggle("current",t(this,mt).counter.current===t(this,ne))});T.isBrowser&&(h(this,$,document.createElement("button")),t(this,$).setAttribute("aria-label",`Go to section ${e+1}`),h(this,mt,n),h(this,we,i),h(this,ne,e),t(this,$).addEventListener("click",t(this,xe)),t(this,mt).counter.subscribe(t(this,he)),t(this,he).call(this))}get element(){return t(this,$)}destroy(){t(this,$).removeEventListener("click",t(this,xe)),t(this,mt).counter.unsubscribe(t(this,he)),t(this,$).remove()}}$=new WeakMap,mt=new WeakMap,ne=new WeakMap,we=new WeakMap,xe=new WeakMap,he=new WeakMap;var Vt,gt,et;class rs extends Me{constructor(){super(...arguments);s(this,Vt,null);s(this,gt,[]);s(this,et,qe.debounce(()=>{t(this,gt).forEach(i=>i.destroy()),h(this,gt,[]);let e=0;this.scrollElement.loopCSSProperty.current?e=this.scrollElement.visibleSections.length:e=this.scrollElement.visibleSections.length-Math.max(this.scrollElement.sectionsInViewCSSProperty.current-1,0);for(let i=0;i<e;i++){const r=new vs(this.scrollElement,i,this.getAttribute("behaviour")||"smooth");t(this,Vt).appendChild(r.element),t(this,gt).push(r)}},0))}connectedCallback(){super.connectedCallback(),this.innerHTML="",this.scrollElement.addEventListener("scrollSectionsChange",t(this,et)),this.scrollElement.sectionsInViewCSSProperty.subscribe(t(this,et)),this.scrollElement.loopCSSProperty.subscribe(t(this,et)),h(this,Vt,document.createElement("div")),this.appendChild(t(this,Vt))}disconnectedCallback(){this.scrollElement.removeEventListener("scrollSectionsChange",t(this,et)),this.scrollElement.sectionsInViewCSSProperty.unsubscribe(t(this,et)),this.scrollElement.loopCSSProperty.unsubscribe(t(this,et)),t(this,gt).forEach(e=>e.destroy()),h(this,gt,[]),t(this,Vt).remove()}}Vt=new WeakMap,gt=new WeakMap,et=new WeakMap;T.isBrowser&&!customElements.get("e-scroll-bullet-buttons")&&customElements.define("e-scroll-bullet-buttons",rs);class ns extends gs.ScrollSegmentElement{connectedCallback(){const n=Qe.findParentElement(this,Ot);n instanceof Ot?(this.scrollContainer=n,this.scrollContainer.addEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.addEventListener("scrollResize",this.resize),this.resize()):console.error(this,"e-scroll not found")}disconnectedCallback(){super.disconnectedCallback(),this.scrollContainer instanceof Ot&&(this.scrollContainer.removeEventListener("scrollSectionsChange",this.findAnotherScrollEntries),this.scrollContainer.removeEventListener("scrollResize",this.resize))}}T.isBrowser&&!customElements.get("e-scroll-segment")&&customElements.define("e-scroll-segment",ns);var ze;const He=class He extends Me{constructor(){super(...arguments);s(this,ze,()=>{this.textContent=`${this.scrollElement.counter.current+1}`})}connectedCallback(){return Ge(this,null,function*(){Ue(He.prototype,this,"connectedCallback").call(this),this.scrollElement.counter.subscribe(t(this,ze))})}disconnectedCallback(){this.scrollElement.counter.unsubscribe(t(this,ze))}};ze=new WeakMap;let Re=He;T.isBrowser&&!customElements.get("e-scroll-counter")&&customElements.define("e-scroll-counter",Re);exports.ScrollBulletButtonsElement=rs;exports.ScrollCounterElement=Re;exports.ScrollElement=Ot;exports.ScrollSegmentElement=ns;exports.ScrollSetButtonElement=ss;exports.ScrollStepButtonElement=is;exports.ScrollbarElement=ts;