aptechka 0.5.25 → 0.5.27

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 (109) hide show
  1. package/lib/Damped-DxwUBxOC.cjs +1 -0
  2. package/lib/{Damped-BJgyFENo.js → Damped-QZAoXO5Z.js} +31 -32
  3. package/lib/{Derived-BZtlW0bB.cjs → Derived-B-g8dYgh.cjs} +1 -1
  4. package/lib/{Derived-DH-ouLBq.js → Derived-kPJs5JC5.js} +1 -1
  5. package/lib/{SourceManager-DmXmmA6z.js → SourceManager-Q-PB-Rkh.js} +3 -4
  6. package/lib/SourceManager-vSlsMKUE.cjs +1 -0
  7. package/lib/{Store-Cd-E5W1z.js → Store-BQXXikps.js} +7 -8
  8. package/lib/Store-C-1ruEIm.cjs +1 -0
  9. package/lib/{Viewport-CCDNxaDg.js → Viewport-CFFhFKqX.js} +5 -6
  10. package/lib/Viewport-DMB0dO-s.cjs +1 -0
  11. package/lib/accordion/index.cjs +1 -1
  12. package/lib/accordion/index.js +8 -9
  13. package/lib/animation/index.cjs +1 -1
  14. package/lib/animation/index.js +13 -14
  15. package/lib/attribute/index.cjs +1 -1
  16. package/lib/attribute/index.js +15 -16
  17. package/lib/canvas/index.cjs +1 -1
  18. package/lib/canvas/index.js +3 -4
  19. package/lib/checkbox/index.cjs +1 -1
  20. package/lib/checkbox/index.js +3 -4
  21. package/lib/class-linked-status/index.cjs +1 -1
  22. package/lib/class-linked-status/index.js +28 -29
  23. package/lib/controls/index.cjs +1 -1
  24. package/lib/controls/index.js +52 -53
  25. package/lib/{createStylesheet-C8aQQ4hd.cjs → createStylesheet-CqHU9_qv.cjs} +1 -1
  26. package/lib/{createStylesheet-KMRQhSa-.js → createStylesheet-DBCEbDjI.js} +1 -1
  27. package/lib/createTheme-CHnsCgAr.js +15 -0
  28. package/lib/createTheme-Cfaw9UmV.cjs +1 -0
  29. package/lib/css-property/index.cjs +1 -1
  30. package/lib/css-property/index.js +9 -10
  31. package/lib/custom-element/index.cjs +1 -1
  32. package/lib/custom-element/index.js +15 -16
  33. package/lib/dev/index.cjs +1 -1
  34. package/lib/dev/index.js +6 -7
  35. package/lib/device/index.cjs +1 -1
  36. package/lib/device/index.js +1 -1
  37. package/lib/element-constructor/index.cjs +1 -1
  38. package/lib/element-constructor/index.js +3 -3
  39. package/lib/element-resizer/index.cjs +1 -1
  40. package/lib/element-resizer/index.js +22 -23
  41. package/lib/en3/index.cjs +1 -1
  42. package/lib/en3/index.js +20 -21
  43. package/lib/image/index.cjs +1 -1
  44. package/lib/image/index.js +7 -8
  45. package/lib/index-BAHHdcp3.js +301 -0
  46. package/lib/index-D2XtQX56.cjs +9 -0
  47. package/lib/intersector/index.cjs +1 -1
  48. package/lib/intersector/index.js +6 -7
  49. package/lib/ladder/index.cjs +1 -1
  50. package/lib/ladder/index.js +3 -4
  51. package/lib/layout-box/index.cjs +1 -1
  52. package/lib/layout-box/index.js +2 -3
  53. package/lib/loading/index.cjs +1 -1
  54. package/lib/loading/index.js +15 -16
  55. package/lib/media/index.cjs +1 -1
  56. package/lib/media/index.js +5 -6
  57. package/lib/modal/index.cjs +1 -1
  58. package/lib/modal/index.js +3 -4
  59. package/lib/morph/index.cjs +1 -1
  60. package/lib/morph/index.js +2 -3
  61. package/lib/pointer/index.cjs +1 -1
  62. package/lib/pointer/index.js +2 -3
  63. package/lib/popover/index.cjs +1 -1
  64. package/lib/popover/index.js +46 -54
  65. package/lib/resized/index.cjs +1 -1
  66. package/lib/resized/index.js +7 -8
  67. package/lib/router/index.cjs +1 -1
  68. package/lib/router/index.js +7 -8
  69. package/lib/scroll/index.cjs +1 -1
  70. package/lib/scroll/index.js +6 -7
  71. package/lib/select/index.cjs +1 -1
  72. package/lib/select/index.js +1 -1
  73. package/lib/sequence/index.cjs +1 -1
  74. package/lib/sequence/index.js +1 -2
  75. package/lib/slicer/index.cjs +2 -2
  76. package/lib/slicer/index.js +3 -4
  77. package/lib/source/index.cjs +1 -1
  78. package/lib/source/index.js +29 -30
  79. package/lib/store/index.cjs +1 -1
  80. package/lib/store/index.js +12 -13
  81. package/lib/svg-path-data/index.cjs +3 -0
  82. package/lib/{utils/svg.d.ts → svg-path-data/index.d.ts} +1 -1
  83. package/lib/{path-data-polyfill-DgeDWYeI.js → svg-path-data/index.js} +201 -162
  84. package/lib/{tags-BoPv9fDr.js → tags-CMPg9ETZ.js} +233 -234
  85. package/lib/tags-Djb6mb1o.cjs +1 -0
  86. package/lib/theme/index.cjs +1 -1
  87. package/lib/theme/index.js +3 -4
  88. package/lib/ticker/index.cjs +1 -1
  89. package/lib/ticker/index.js +12 -13
  90. package/lib/tweaker/index.cjs +1 -1
  91. package/lib/tweaker/index.js +5 -6
  92. package/lib/utils/index.cjs +1 -1
  93. package/lib/utils/index.d.ts +0 -1
  94. package/lib/utils/index.js +125 -163
  95. package/lib/video/index.cjs +1 -1
  96. package/lib/video/index.js +4 -5
  97. package/lib/window-resizer/index.cjs +1 -1
  98. package/lib/window-resizer/index.js +6 -7
  99. package/package.json +9 -1
  100. package/lib/Damped-CbWlWAbx.cjs +0 -1
  101. package/lib/SourceManager-BFSCX4Q8.cjs +0 -1
  102. package/lib/Store-BQGNOHlY.cjs +0 -1
  103. package/lib/Viewport-DhKPH5nw.cjs +0 -1
  104. package/lib/createTheme-BSreUYge.cjs +0 -1
  105. package/lib/createTheme-u3NsrEV6.js +0 -16
  106. package/lib/index-CSo_PnUP.js +0 -314
  107. package/lib/index-pPxbZLWQ.cjs +0 -9
  108. package/lib/path-data-polyfill-CXsOR7Oc.cjs +0 -3
  109. package/lib/tags-CueX-JLX.cjs +0 -1
@@ -8,10 +8,9 @@ var r = (n, t, s) => (m(n, t, "read from private field"), s ? s.call(n) : t.get(
8
8
  t instanceof WeakSet ? t.add(n) : t.set(n, s);
9
9
  }, l = (n, t, s, e) => (m(n, t, "write to private field"), e ? e.call(n, s) : t.set(n, s), s);
10
10
  import { i as y } from "../browser-0zX67oeU.js";
11
- import { g as p } from "../dom-0S_WDL4g.js";
12
- import "../path-data-polyfill-DgeDWYeI.js";
11
+ import { g } from "../dom-0S_WDL4g.js";
13
12
  var i, b, u;
14
- class g {
13
+ class p {
15
14
  constructor() {
16
15
  f(this, i, []);
17
16
  f(this, b, null);
@@ -28,7 +27,7 @@ class g {
28
27
  ));
29
28
  }
30
29
  subscribe(t, s) {
31
- const e = p(t);
30
+ const e = g(t);
32
31
  if (!e)
33
32
  return () => {
34
33
  };
@@ -61,8 +60,8 @@ class g {
61
60
  }
62
61
  }
63
62
  i = new WeakMap(), b = new WeakMap(), u = new WeakMap();
64
- const E = new g();
63
+ const d = new p();
65
64
  export {
66
- g as Intersector,
67
- E as intersector
65
+ p as Intersector,
66
+ d as intersector
68
67
  };
@@ -1 +1 @@
1
- "use strict";var k=Object.defineProperty;var f=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var p=(s,t,e)=>t in s?k(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,b=(s,t)=>{for(var e in t||(t={}))S.call(t,e)&&p(s,e,t[e]);if(f)for(var e of f(t))g.call(t,e)&&p(s,e,t[e]);return s};var y=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var c=(s,t,e)=>(y(s,t,"read from private field"),e?e.call(s):t.get(s)),h=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},d=(s,t,e,o)=>(y(s,t,"write to private field"),o?o.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../Store-BQGNOHlY.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var u,l,a;class q extends v.Store{constructor(e){super(e,{equalityCheck:()=>!1});h(this,u,void 0);h(this,l,void 0);h(this,a,void 0);d(this,u,b({},e)),d(this,l,new Map),d(this,a,new Set)}get base(){return c(this,u)}get steps(){return c(this,l)}close(){super.close(),c(this,a).clear(),c(this,l).clear()}bind(e){c(this,a).add(e)}unbind(e){c(this,a).delete(e)}deleteStep(e){this.steps.delete(e)}getStepValue(e){return this.steps.get(e)[1]}setStep(e,o,n){const i={};for(const r in this.current)i[r]=n[r]||0;this.steps.set(e,[o,i])}calculate(){const e={};for(const o in this.base)e[o]=this.base[o];for(const o of this.steps){const n=o[1];if(n[0]==="+")for(const i in this.base){const r=n[1][i];e[i]+=r}else if(n[0]==="*")for(const i in this.base){const r=n[1][i];e[i]*=r}else if(n[0]==="/")for(const i in this.base){const r=n[1][i];e[i]/=r}else if(n[0]==="-")for(const i in this.base){const r=n[1][i];e[i]-=r}}for(const o of c(this,a))for(const n in e)o[n]=e[n];this.current=e}}u=new WeakMap,l=new WeakMap,a=new WeakMap;exports.Ladder=q;
1
+ "use strict";var k=Object.defineProperty;var f=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var p=(s,t,e)=>t in s?k(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,b=(s,t)=>{for(var e in t||(t={}))S.call(t,e)&&p(s,e,t[e]);if(f)for(var e of f(t))g.call(t,e)&&p(s,e,t[e]);return s};var y=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var c=(s,t,e)=>(y(s,t,"read from private field"),e?e.call(s):t.get(s)),u=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},d=(s,t,e,o)=>(y(s,t,"write to private field"),o?o.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../Store-C-1ruEIm.cjs");var h,l,a;class m extends v.Store{constructor(e){super(e,{equalityCheck:()=>!1});u(this,h,void 0);u(this,l,void 0);u(this,a,void 0);d(this,h,b({},e)),d(this,l,new Map),d(this,a,new Set)}get base(){return c(this,h)}get steps(){return c(this,l)}close(){super.close(),c(this,a).clear(),c(this,l).clear()}bind(e){c(this,a).add(e)}unbind(e){c(this,a).delete(e)}deleteStep(e){this.steps.delete(e)}getStepValue(e){return this.steps.get(e)[1]}setStep(e,o,n){const i={};for(const r in this.current)i[r]=n[r]||0;this.steps.set(e,[o,i])}calculate(){const e={};for(const o in this.base)e[o]=this.base[o];for(const o of this.steps){const n=o[1];if(n[0]==="+")for(const i in this.base){const r=n[1][i];e[i]+=r}else if(n[0]==="*")for(const i in this.base){const r=n[1][i];e[i]*=r}else if(n[0]==="/")for(const i in this.base){const r=n[1][i];e[i]/=r}else if(n[0]==="-")for(const i in this.base){const r=n[1][i];e[i]-=r}}for(const o of c(this,a))for(const n in e)o[n]=e[n];this.current=e}}h=new WeakMap,l=new WeakMap,a=new WeakMap;exports.Ladder=m;
@@ -18,10 +18,9 @@ var c = (t, s, e) => (y(t, s, "read from private field"), e ? e.call(t) : s.get(
18
18
  throw TypeError("Cannot add the same private member more than once");
19
19
  s instanceof WeakSet ? s.add(t) : s.set(t, e);
20
20
  }, f = (t, s, e, o) => (y(t, s, "write to private field"), o ? o.call(t, e) : s.set(t, e), e);
21
- import { S as m } from "../Store-Cd-E5W1z.js";
22
- import "../path-data-polyfill-DgeDWYeI.js";
21
+ import { S as v } from "../Store-BQXXikps.js";
23
22
  var l, h, a;
24
- class V extends m {
23
+ class x extends v {
25
24
  constructor(e) {
26
25
  super(e, {
27
26
  equalityCheck: () => !1
@@ -93,5 +92,5 @@ class V extends m {
93
92
  }
94
93
  l = new WeakMap(), h = new WeakMap(), a = new WeakMap();
95
94
  export {
96
- V as Ladder
95
+ x as Ladder
97
96
  };
@@ -1 +1 @@
1
- "use strict";var G=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(G(i,e,"read from private field"),s?s.call(i):e.get(i)),h=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},r=(i,e,s,n)=>(G(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s);var L=(i,e,s)=>(G(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const dt=require("../css-unit-parser/index.cjs"),J=require("../ladder/index.cjs"),j=require("../order/index.cjs"),N=require("../scroll-entries/index.cjs"),tt=require("../ticker/index.cjs"),et=require("../browser-CpzFX2xg.cjs"),st=require("../dom-JBOkFLTh.cjs"),P=require("../layout-8ryRAMGJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const it=require("../element-resizer/index.cjs"),ht=require("../window-resizer/index.cjs");function rt(i){const e=Math.sqrt(i.m11*i.m11+i.m12*i.m12+i.m13*i.m13),s=Math.sqrt(i.m21*i.m21+i.m22*i.m22+i.m23*i.m23),n=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),y=Math.atan2(i.m32,i.m33),B=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),F=Math.atan2(i.m21,i.m11),u=i.m41,q=i.m42*-1,O=i.m43;return{scaleX:e,scaleY:s,scaleZ:n,rotationX:y,rotationY:B,rotationZ:F,translationX:u,translationY:q,translationZ:O}}var a,p,m,v,V,T,w,C,A,W,b,_,X,S,d,R,Y,H,k,f,g,z,o,l,c,x,M,U,Q,I,nt,K,lt,$,ct,E,D,Z;class ft{constructor(e,s){h(this,U);h(this,I);h(this,K);h(this,$);h(this,a,null);h(this,p,null);h(this,m,[]);h(this,v,"auto");h(this,V,"top");h(this,T,!1);h(this,w,!0);h(this,C,!0);h(this,A,!0);h(this,W,!0);h(this,b,0);h(this,_,0);h(this,X,0);h(this,S,0);h(this,d,0);h(this,R,0);h(this,Y,0);h(this,H,0);h(this,k,0);h(this,f,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,z,{x:1,y:1,z:1});h(this,o,new J.Ladder({x:0,y:0,z:0}));h(this,l,new J.Ladder({x:0,y:0,z:0}));h(this,c,new J.Ladder({x:0,y:0,z:0}));h(this,x,{x:0,y:0,z:0});h(this,M,new Map);h(this,E,()=>{et.isBrowser&&L(this,K,lt).call(this)});h(this,D,()=>{L(this,$,ct).call(this),L(this,U,Q).call(this)});h(this,Z,()=>{const e=N.scrollEntries.getAll(this.element);t(this,M).forEach((s,n)=>{e.includes(n)||(this.deleteScrollStep(s),t(this,M).delete(n))}),e.forEach(s=>{if(!t(this,M).has(s)){const n=()=>s;t(this,M).set(s,n),this.setScrollStep(n)}})});et.isBrowser&&(r(this,a,st.getElement(e)||document.body),r(this,p,st.getElement(s==null?void 0:s.containerElement)||document.body),r(this,v,(s==null?void 0:s.scrollAxis)||"auto"),r(this,V,(s==null?void 0:s.frontSide)||"top"),r(this,T,(s==null?void 0:s.cartesian)||!1),r(this,w,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),r(this,C,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),r(this,A,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),r(this,W,(s==null?void 0:s.scrollStep)!==void 0?s.scrollStep:!0),t(this,c).setStep("_size","+",{x:1,y:1,z:1}),t(this,l).setStep("_position","+",{x:0,y:0,z:0}),t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}),t(this,W)&&(N.scrollEntries.notifier.subscribe(t(this,Z)),t(this,Z).call(this)),it.elementResizer.subscribe(this.element,t(this,E)),ht.windowResizer.subscribe(t(this,E),j.RESIZE_ORDER.LAYOUT_BOX),tt.ticker.subscribe(t(this,D),{order:j.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}))}get element(){return t(this,a)}get containerElement(){return t(this,p)}get position(){return t(this,l).current}get rotation(){return t(this,o).current}get scale(){return t(this,c).current}get scrollValue(){return t(this,x)}get left(){return t(this,d)}get top(){return t(this,S)}get CSSTranslation(){return t(this,f)}get CSSRotation(){return t(this,g)}get CSSScale(){return t(this,z)}get front(){return t(this,R)}get width(){return t(this,b)}get height(){return t(this,_)}get depth(){return t(this,X)}destroy(){tt.ticker.unsubscribe(t(this,D)),it.elementResizer.unsubscribe(t(this,E)),ht.windowResizer.unsubscribe(t(this,E)),N.scrollEntries.notifier.unsubscribe(t(this,Z)),t(this,M).clear(),t(this,l).close(),t(this,o).close(),t(this,c).close()}bindObject(e){e.position&&t(this,l).bind(e.position),e.rotation&&t(this,o).bind(e.rotation),e.scale&&t(this,c).bind(e.scale)}unbindObject(e){e.position&&t(this,l).unbind(e.position),e.rotation&&t(this,o).unbind(e.rotation),e.scale&&t(this,c).unbind(e.scale)}setScrollStep(e){return t(this,m).includes(e)||t(this,m).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){r(this,m,t(this,m).filter(s=>s!==e))}setPositionStep(...e){t(this,l).setStep(...e)}getPositionStep(...e){return t(this,l).getStepValue(...e)}setRotationStep(...e){t(this,o).setStep(...e)}getRotationStep(...e){return t(this,o).getStepValue(...e)}setScaleStep(...e){t(this,c).setStep(...e)}getScaleStep(...e){return t(this,c).getStepValue(...e)}deletePositionStep(...e){t(this,l).deleteStep(...e)}deleteRotationStep(...e){t(this,o).deleteStep(...e)}deleteScaleStep(...e){t(this,c).deleteStep(...e)}onPosition(...e){return t(this,l).subscribe(...e)}offPosition(...e){t(this,l).unsubscribe(...e)}onScale(...e){return t(this,c).subscribe(...e)}offScale(...e){t(this,c).unsubscribe(...e)}onRotation(...e){return t(this,o).subscribe(...e)}offRotation(...e){t(this,o).unsubscribe(...e)}}a=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,V=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap,A=new WeakMap,W=new WeakMap,b=new WeakMap,_=new WeakMap,X=new WeakMap,S=new WeakMap,d=new WeakMap,R=new WeakMap,Y=new WeakMap,H=new WeakMap,k=new WeakMap,f=new WeakMap,g=new WeakMap,z=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,x=new WeakMap,M=new WeakMap,U=new WeakSet,Q=function(){t(this,c).calculate(),t(this,l).calculate(),t(this,o).calculate()},I=new WeakSet,nt=function(){t(this,c).setStep("_size","+",{x:t(this,w)?t(this,b):1,y:t(this,w)?t(this,_):1,z:t(this,w)?t(this,X):1});const e=t(this,C)?t(this,Y):0,s=t(this,C)?t(this,H):0,n=t(this,C)?t(this,k):0;t(this,l).setStep("_position","+",{x:e,y:s,z:n}),t(this,A)?(t(this,c).setStep("_scale","*",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,l).setStep("_translation","+",{x:t(this,f).x,y:t(this,f).y,z:t(this,f).z}),t(this,o).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}))},K=new WeakSet,lt=function(){const e=getComputedStyle(t(this,a));r(this,b,Math.max(t(this,a).clientWidth,1)),r(this,_,Math.max(t(this,a).clientHeight,1)),r(this,X,Math.max(dt.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=P.getCumulativeOffsetLeft(t(this,p)),n=P.getCumulativeOffsetTop(t(this,p)),y=t(this,p).clientWidth,B=t(this,p).clientHeight;if(r(this,d,P.getCumulativeOffsetLeft(t(this,a))-s),r(this,S,P.getCumulativeOffsetTop(t(this,a))-n),t(this,v)==="z"){const q=t(this,d)/y,O=t(this,S)/B;r(this,d,(q-Math.floor(q))*y),r(this,S,(O-Math.floor(O))*B),t(this,V)==="left"?r(this,R,P.getCumulativeOffsetLeft(t(this,a))-s-t(this,d)):r(this,R,P.getCumulativeOffsetTop(t(this,a))-n-t(this,S))}if(r(this,d,t(this,d)+t(this,a).clientLeft),r(this,S,t(this,S)+t(this,a).clientTop),t(this,T)){const q=Math.round(y/2),O=Math.round(B/2),ot=t(this,b)?Math.round(t(this,b)/2):0,at=t(this,_)?Math.round(t(this,_)/2):0,ut=t(this,d)-q+ot,St=(t(this,S)-O+at)*-1;r(this,Y,ut),r(this,H,St)}else r(this,Y,t(this,d)),r(this,H,t(this,S));r(this,k,t(this,R)*-1);const F=new WebKitCSSMatrix(e.transform),u=rt(F);t(this,f).x=u.translationX,t(this,f).y=u.translationY,t(this,f).z=u.translationZ,t(this,z).x=u.scaleX,t(this,z).y=u.scaleY,t(this,z).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,L(this,I,nt).call(this),L(this,U,Q).call(this)},$=new WeakSet,ct=function(){t(this,x).x=0,t(this,x).y=0,t(this,x).z=0;for(let e=0;e<t(this,m).length;e++){const s=t(this,m)[e]();let n=s.axis;t(this,v)!=="auto"&&(n=t(this,v));const y=s.value*(n==="x"?-1:t(this,T)?1:-1);t(this,x)[n]+=y,t(this,l).setStep(`_scroll_${e}`,"+",{[n]:y})}},E=new WeakMap,D=new WeakMap,Z=new WeakMap;exports.LayoutBox=ft;exports.decomposeCSSMatrix=rt;
1
+ "use strict";var G=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(G(i,e,"read from private field"),s?s.call(i):e.get(i)),h=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},r=(i,e,s,n)=>(G(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s);var L=(i,e,s)=>(G(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const dt=require("../css-unit-parser/index.cjs"),J=require("../ladder/index.cjs"),j=require("../order/index.cjs"),N=require("../scroll-entries/index.cjs"),tt=require("../ticker/index.cjs"),et=require("../browser-CpzFX2xg.cjs"),st=require("../dom-JBOkFLTh.cjs"),P=require("../layout-8ryRAMGJ.cjs"),it=require("../element-resizer/index.cjs"),ht=require("../window-resizer/index.cjs");function rt(i){const e=Math.sqrt(i.m11*i.m11+i.m12*i.m12+i.m13*i.m13),s=Math.sqrt(i.m21*i.m21+i.m22*i.m22+i.m23*i.m23),n=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),y=Math.atan2(i.m32,i.m33),B=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),F=Math.atan2(i.m21,i.m11),u=i.m41,O=i.m42*-1,q=i.m43;return{scaleX:e,scaleY:s,scaleZ:n,rotationX:y,rotationY:B,rotationZ:F,translationX:u,translationY:O,translationZ:q}}var a,p,m,v,V,T,w,C,A,W,b,_,X,S,d,R,Y,H,k,f,g,z,o,l,c,x,M,U,Q,I,nt,K,lt,$,ct,E,D,Z;class ft{constructor(e,s){h(this,U);h(this,I);h(this,K);h(this,$);h(this,a,null);h(this,p,null);h(this,m,[]);h(this,v,"auto");h(this,V,"top");h(this,T,!1);h(this,w,!0);h(this,C,!0);h(this,A,!0);h(this,W,!0);h(this,b,0);h(this,_,0);h(this,X,0);h(this,S,0);h(this,d,0);h(this,R,0);h(this,Y,0);h(this,H,0);h(this,k,0);h(this,f,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,z,{x:1,y:1,z:1});h(this,o,new J.Ladder({x:0,y:0,z:0}));h(this,l,new J.Ladder({x:0,y:0,z:0}));h(this,c,new J.Ladder({x:0,y:0,z:0}));h(this,x,{x:0,y:0,z:0});h(this,M,new Map);h(this,E,()=>{et.isBrowser&&L(this,K,lt).call(this)});h(this,D,()=>{L(this,$,ct).call(this),L(this,U,Q).call(this)});h(this,Z,()=>{const e=N.scrollEntries.getAll(this.element);t(this,M).forEach((s,n)=>{e.includes(n)||(this.deleteScrollStep(s),t(this,M).delete(n))}),e.forEach(s=>{if(!t(this,M).has(s)){const n=()=>s;t(this,M).set(s,n),this.setScrollStep(n)}})});et.isBrowser&&(r(this,a,st.getElement(e)||document.body),r(this,p,st.getElement(s==null?void 0:s.containerElement)||document.body),r(this,v,(s==null?void 0:s.scrollAxis)||"auto"),r(this,V,(s==null?void 0:s.frontSide)||"top"),r(this,T,(s==null?void 0:s.cartesian)||!1),r(this,w,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),r(this,C,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),r(this,A,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),r(this,W,(s==null?void 0:s.scrollStep)!==void 0?s.scrollStep:!0),t(this,c).setStep("_size","+",{x:1,y:1,z:1}),t(this,l).setStep("_position","+",{x:0,y:0,z:0}),t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}),t(this,W)&&(N.scrollEntries.notifier.subscribe(t(this,Z)),t(this,Z).call(this)),it.elementResizer.subscribe(this.element,t(this,E)),ht.windowResizer.subscribe(t(this,E),j.RESIZE_ORDER.LAYOUT_BOX),tt.ticker.subscribe(t(this,D),{order:j.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}))}get element(){return t(this,a)}get containerElement(){return t(this,p)}get position(){return t(this,l).current}get rotation(){return t(this,o).current}get scale(){return t(this,c).current}get scrollValue(){return t(this,x)}get left(){return t(this,d)}get top(){return t(this,S)}get CSSTranslation(){return t(this,f)}get CSSRotation(){return t(this,g)}get CSSScale(){return t(this,z)}get front(){return t(this,R)}get width(){return t(this,b)}get height(){return t(this,_)}get depth(){return t(this,X)}destroy(){tt.ticker.unsubscribe(t(this,D)),it.elementResizer.unsubscribe(t(this,E)),ht.windowResizer.unsubscribe(t(this,E)),N.scrollEntries.notifier.unsubscribe(t(this,Z)),t(this,M).clear(),t(this,l).close(),t(this,o).close(),t(this,c).close()}bindObject(e){e.position&&t(this,l).bind(e.position),e.rotation&&t(this,o).bind(e.rotation),e.scale&&t(this,c).bind(e.scale)}unbindObject(e){e.position&&t(this,l).unbind(e.position),e.rotation&&t(this,o).unbind(e.rotation),e.scale&&t(this,c).unbind(e.scale)}setScrollStep(e){return t(this,m).includes(e)||t(this,m).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){r(this,m,t(this,m).filter(s=>s!==e))}setPositionStep(...e){t(this,l).setStep(...e)}getPositionStep(...e){return t(this,l).getStepValue(...e)}setRotationStep(...e){t(this,o).setStep(...e)}getRotationStep(...e){return t(this,o).getStepValue(...e)}setScaleStep(...e){t(this,c).setStep(...e)}getScaleStep(...e){return t(this,c).getStepValue(...e)}deletePositionStep(...e){t(this,l).deleteStep(...e)}deleteRotationStep(...e){t(this,o).deleteStep(...e)}deleteScaleStep(...e){t(this,c).deleteStep(...e)}onPosition(...e){return t(this,l).subscribe(...e)}offPosition(...e){t(this,l).unsubscribe(...e)}onScale(...e){return t(this,c).subscribe(...e)}offScale(...e){t(this,c).unsubscribe(...e)}onRotation(...e){return t(this,o).subscribe(...e)}offRotation(...e){t(this,o).unsubscribe(...e)}}a=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,V=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap,A=new WeakMap,W=new WeakMap,b=new WeakMap,_=new WeakMap,X=new WeakMap,S=new WeakMap,d=new WeakMap,R=new WeakMap,Y=new WeakMap,H=new WeakMap,k=new WeakMap,f=new WeakMap,g=new WeakMap,z=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,x=new WeakMap,M=new WeakMap,U=new WeakSet,Q=function(){t(this,c).calculate(),t(this,l).calculate(),t(this,o).calculate()},I=new WeakSet,nt=function(){t(this,c).setStep("_size","+",{x:t(this,w)?t(this,b):1,y:t(this,w)?t(this,_):1,z:t(this,w)?t(this,X):1});const e=t(this,C)?t(this,Y):0,s=t(this,C)?t(this,H):0,n=t(this,C)?t(this,k):0;t(this,l).setStep("_position","+",{x:e,y:s,z:n}),t(this,A)?(t(this,c).setStep("_scale","*",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,l).setStep("_translation","+",{x:t(this,f).x,y:t(this,f).y,z:t(this,f).z}),t(this,o).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}))},K=new WeakSet,lt=function(){const e=getComputedStyle(t(this,a));r(this,b,Math.max(t(this,a).clientWidth,1)),r(this,_,Math.max(t(this,a).clientHeight,1)),r(this,X,Math.max(dt.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=P.getCumulativeOffsetLeft(t(this,p)),n=P.getCumulativeOffsetTop(t(this,p)),y=t(this,p).clientWidth,B=t(this,p).clientHeight;if(r(this,d,P.getCumulativeOffsetLeft(t(this,a))-s),r(this,S,P.getCumulativeOffsetTop(t(this,a))-n),t(this,v)==="z"){const O=t(this,d)/y,q=t(this,S)/B;r(this,d,(O-Math.floor(O))*y),r(this,S,(q-Math.floor(q))*B),t(this,V)==="left"?r(this,R,P.getCumulativeOffsetLeft(t(this,a))-s-t(this,d)):r(this,R,P.getCumulativeOffsetTop(t(this,a))-n-t(this,S))}if(r(this,d,t(this,d)+t(this,a).clientLeft),r(this,S,t(this,S)+t(this,a).clientTop),t(this,T)){const O=Math.round(y/2),q=Math.round(B/2),ot=t(this,b)?Math.round(t(this,b)/2):0,at=t(this,_)?Math.round(t(this,_)/2):0,ut=t(this,d)-O+ot,St=(t(this,S)-q+at)*-1;r(this,Y,ut),r(this,H,St)}else r(this,Y,t(this,d)),r(this,H,t(this,S));r(this,k,t(this,R)*-1);const F=new WebKitCSSMatrix(e.transform),u=rt(F);t(this,f).x=u.translationX,t(this,f).y=u.translationY,t(this,f).z=u.translationZ,t(this,z).x=u.scaleX,t(this,z).y=u.scaleY,t(this,z).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,L(this,I,nt).call(this),L(this,U,Q).call(this)},$=new WeakSet,ct=function(){t(this,x).x=0,t(this,x).y=0,t(this,x).z=0;for(let e=0;e<t(this,m).length;e++){const s=t(this,m)[e]();let n=s.axis;t(this,v)!=="auto"&&(n=t(this,v));const y=s.value*(n==="x"?-1:t(this,T)?1:-1);t(this,x)[n]+=y,t(this,l).setStep(`_scroll_${e}`,"+",{[n]:y})}},E=new WeakMap,D=new WeakMap,Z=new WeakMap;exports.LayoutBox=ft;exports.decomposeCSSMatrix=rt;
@@ -16,7 +16,6 @@ import { ticker as tt } from "../ticker/index.js";
16
16
  import { i as st } from "../browser-0zX67oeU.js";
17
17
  import { g as et } from "../dom-0S_WDL4g.js";
18
18
  import { g as N, a as Q } from "../layout-HoBT_Da2.js";
19
- import "../path-data-polyfill-DgeDWYeI.js";
20
19
  import { elementResizer as it } from "../element-resizer/index.js";
21
20
  import { windowResizer as ht } from "../window-resizer/index.js";
22
21
  function mt(i) {
@@ -43,7 +42,7 @@ function mt(i) {
43
42
  };
44
43
  }
45
44
  var c, g, z, v, A, X, R, C, W, q, y, M, Y, S, f, E, H, T, B, d, m, p, a, l, o, _, x, D, j, k, rt, I, nt, K, lt, w, U, Z;
46
- class wt {
45
+ class Et {
47
46
  constructor(s, e) {
48
47
  h(this, D);
49
48
  h(this, k);
@@ -296,6 +295,6 @@ c = new WeakMap(), g = new WeakMap(), z = new WeakMap(), v = new WeakMap(), A =
296
295
  }
297
296
  }, w = new WeakMap(), U = new WeakMap(), Z = new WeakMap();
298
297
  export {
299
- wt as LayoutBox,
298
+ Et as LayoutBox,
300
299
  mt as decomposeCSSMatrix
301
300
  };
@@ -1 +1 @@
1
- "use strict";var p=Object.defineProperty,b=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable;var S=(r,t,e)=>t in r?p(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,f=(r,t)=>{for(var e in t||(t={}))C.call(t,e)&&S(r,e,t[e]);if(E)for(var e of E(t))L.call(t,e)&&S(r,e,t[e]);return r},c=(r,t)=>b(r,q(t));var w=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var s=(r,t,e)=>(w(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)},v=(r,t,e,i)=>(w(r,t,"write to private field"),i?i.call(r,e):t.set(r,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../notifier/index.cjs"),N=require("../function-MthRj-GJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var o,h,a,d,n,u,g;class _{constructor(){l(this,o,new Map);l(this,h,new y.Notifier);l(this,a,new y.Notifier);l(this,d,new y.Notifier);l(this,n,!1);l(this,u,t=>{const{loaded:e,total:i}=this.getStats();s(this,h).notify({progress:e/i,loaded:e,total:i,namespace:t}),s(this,g).call(this)});l(this,g,N.debounce(()=>{const{loaded:t,total:e}=this.getStats();if(t===e){v(this,n,!0);const{total:i}=this.getStats();s(this,a).notify({total:i})}},150))}get progressEvent(){return s(this,h)}get completeEvent(){return s(this,a)}get errorEvent(){return s(this,d)}get _counter(){return s(this,o)}get isComplete(){return s(this,n)}reset(){v(this,n,!1),s(this,o).clear()}setTotal(t,e=1){s(this,n)||s(this,o).set(t,{loaded:0,total:e})}setLoaded(t,e=1){if(!s(this,n)&&s(this,o).has(t)){const i=s(this,o).get(t);i.loaded!==e&&(s(this,o).set(t,c(f({},i),{loaded:e})),s(this,u).call(this,t))}}setError(t,e){if(!s(this,n)&&s(this,o).has(t)){const i=s(this,o).get(t);s(this,o).set(t,c(f({},i),{total:i.total-1})),s(this,d).notify({namespace:t,url:e})}}getStats(){return Array.from(s(this,o)).reduce((t,e)=>({loaded:t.loaded+e[1].loaded,total:t.total+e[1].total}),{loaded:0,total:0})}}o=new WeakMap,h=new WeakMap,a=new WeakMap,d=new WeakMap,n=new WeakMap,u=new WeakMap,g=new WeakMap;const M=new _;exports.loading=M;
1
+ "use strict";var p=Object.defineProperty,b=Object.defineProperties;var C=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var L=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var S=(s,t,e)=>t in s?p(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,f=(s,t)=>{for(var e in t||(t={}))L.call(t,e)&&S(s,e,t[e]);if(E)for(var e of E(t))N.call(t,e)&&S(s,e,t[e]);return s},c=(s,t)=>b(s,C(t));var w=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var r=(s,t,e)=>(w(s,t,"read from private field"),e?e.call(s):t.get(s)),l=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},v=(s,t,e,o)=>(w(s,t,"write to private field"),o?o.call(s,e):t.set(s,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../notifier/index.cjs"),_=require("../function-MthRj-GJ.cjs");var i,h,a,d,n,u,g;class q{constructor(){l(this,i,new Map);l(this,h,new y.Notifier);l(this,a,new y.Notifier);l(this,d,new y.Notifier);l(this,n,!1);l(this,u,t=>{const{loaded:e,total:o}=this.getStats();r(this,h).notify({progress:e/o,loaded:e,total:o,namespace:t}),r(this,g).call(this)});l(this,g,_.debounce(()=>{const{loaded:t,total:e}=this.getStats();if(t===e){v(this,n,!0);const{total:o}=this.getStats();r(this,a).notify({total:o})}},150))}get progressEvent(){return r(this,h)}get completeEvent(){return r(this,a)}get errorEvent(){return r(this,d)}get _counter(){return r(this,i)}get isComplete(){return r(this,n)}reset(){v(this,n,!1),r(this,i).clear()}setTotal(t,e=1){r(this,n)||r(this,i).set(t,{loaded:0,total:e})}setLoaded(t,e=1){if(!r(this,n)&&r(this,i).has(t)){const o=r(this,i).get(t);o.loaded!==e&&(r(this,i).set(t,c(f({},o),{loaded:e})),r(this,u).call(this,t))}}setError(t,e){if(!r(this,n)&&r(this,i).has(t)){const o=r(this,i).get(t);r(this,i).set(t,c(f({},o),{total:o.total-1})),r(this,d).notify({namespace:t,url:e})}}getStats(){return Array.from(r(this,i)).reduce((t,e)=>({loaded:t.loaded+e[1].loaded,total:t.total+e[1].total}),{loaded:0,total:0})}}i=new WeakMap,h=new WeakMap,a=new WeakMap,d=new WeakMap,n=new WeakMap,u=new WeakMap,g=new WeakMap;const M=new q;exports.loading=M;
@@ -1,34 +1,33 @@
1
- var y = Object.defineProperty, S = Object.defineProperties;
1
+ var m = Object.defineProperty, S = Object.defineProperties;
2
2
  var C = Object.getOwnPropertyDescriptors;
3
3
  var v = Object.getOwnPropertySymbols;
4
4
  var L = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
5
- var m = (s, t, e) => t in s ? y(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, u = (s, t) => {
5
+ var w = (s, t, e) => t in s ? m(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e, u = (s, t) => {
6
6
  for (var e in t || (t = {}))
7
- L.call(t, e) && m(s, e, t[e]);
7
+ L.call(t, e) && w(s, e, t[e]);
8
8
  if (v)
9
9
  for (var e of v(t))
10
- b.call(t, e) && m(s, e, t[e]);
10
+ b.call(t, e) && w(s, e, t[e]);
11
11
  return s;
12
12
  }, c = (s, t) => S(s, C(t));
13
- var w = (s, t, e) => {
13
+ var y = (s, t, e) => {
14
14
  if (!t.has(s))
15
15
  throw TypeError("Cannot " + e);
16
16
  };
17
- var r = (s, t, e) => (w(s, t, "read from private field"), e ? e.call(s) : t.get(s)), h = (s, t, e) => {
17
+ var r = (s, t, e) => (y(s, t, "read from private field"), e ? e.call(s) : t.get(s)), h = (s, t, e) => {
18
18
  if (t.has(s))
19
19
  throw TypeError("Cannot add the same private member more than once");
20
20
  t instanceof WeakSet ? t.add(s) : t.set(s, e);
21
- }, p = (s, t, e, o) => (w(s, t, "write to private field"), o ? o.call(s, e) : t.set(s, e), e);
22
- import { Notifier as E } from "../notifier/index.js";
21
+ }, E = (s, t, e, o) => (y(s, t, "write to private field"), o ? o.call(s, e) : t.set(s, e), e);
22
+ import { Notifier as p } from "../notifier/index.js";
23
23
  import { d as x } from "../function-C10DGppn.js";
24
- import "../path-data-polyfill-DgeDWYeI.js";
25
24
  var i, l, a, d, n, g, f;
26
25
  class A {
27
26
  constructor() {
28
27
  h(this, i, /* @__PURE__ */ new Map());
29
- h(this, l, new E());
30
- h(this, a, new E());
31
- h(this, d, new E());
28
+ h(this, l, new p());
29
+ h(this, a, new p());
30
+ h(this, d, new p());
32
31
  h(this, n, !1);
33
32
  h(this, g, (t) => {
34
33
  const { loaded: e, total: o } = this.getStats();
@@ -42,7 +41,7 @@ class A {
42
41
  h(this, f, x(() => {
43
42
  const { loaded: t, total: e } = this.getStats();
44
43
  if (t === e) {
45
- p(this, n, !0);
44
+ E(this, n, !0);
46
45
  const { total: o } = this.getStats();
47
46
  r(this, a).notify({
48
47
  total: o
@@ -66,7 +65,7 @@ class A {
66
65
  return r(this, n);
67
66
  }
68
67
  reset() {
69
- p(this, n, !1), r(this, i).clear();
68
+ E(this, n, !1), r(this, i).clear();
70
69
  }
71
70
  setTotal(t, e = 1) {
72
71
  r(this, n) || r(this, i).set(t, { loaded: 0, total: e });
@@ -94,7 +93,7 @@ class A {
94
93
  }
95
94
  }
96
95
  i = new WeakMap(), l = new WeakMap(), a = new WeakMap(), d = new WeakMap(), n = new WeakMap(), g = new WeakMap(), f = new WeakMap();
97
- const j = new A();
96
+ const _ = new A();
98
97
  export {
99
- j as loading
98
+ _ as loading
100
99
  };
@@ -1 +1 @@
1
- "use strict";var d=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var o=(e,r,s)=>(d(e,r,"read from private field"),s?s.call(e):r.get(e)),u=(e,r,s)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,s)},c=(e,r,s,n)=>(d(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../order/index.cjs"),l=require("../window-resizer/index.cjs"),h=require("../Store-BQGNOHlY.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var i,t;class b extends h.Store{constructor(s){super(!1);u(this,i,void 0);u(this,t,void 0);c(this,i,s),c(this,t,l.windowResizer.subscribe(()=>{matchMedia(o(this,i)).matches?this.current=!0:this.current=!1},a.RESIZE_ORDER.MEDIA))}close(){super.close(),o(this,t).call(this)}}i=new WeakMap,t=new WeakMap;exports.Media=b;
1
+ "use strict";var d=(e,r,s)=>{if(!r.has(e))throw TypeError("Cannot "+s)};var o=(e,r,s)=>(d(e,r,"read from private field"),s?s.call(e):r.get(e)),c=(e,r,s)=>{if(r.has(e))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(e):r.set(e,s)},u=(e,r,s,n)=>(d(e,r,"write to private field"),n?n.call(e,s):r.set(e,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../order/index.cjs"),l=require("../window-resizer/index.cjs"),h=require("../Store-C-1ruEIm.cjs");var i,t;class b extends h.Store{constructor(s){super(!1);c(this,i,void 0);c(this,t,void 0);u(this,i,s),u(this,t,l.windowResizer.subscribe(()=>{matchMedia(o(this,i)).matches?this.current=!0:this.current=!1},a.RESIZE_ORDER.MEDIA))}close(){super.close(),o(this,t).call(this)}}i=new WeakMap,t=new WeakMap;exports.Media=b;
@@ -6,18 +6,17 @@ var o = (e, s, r) => (a(e, s, "read from private field"), r ? r.call(e) : s.get(
6
6
  if (s.has(e))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  s instanceof WeakSet ? s.add(e) : s.set(e, r);
9
- }, m = (e, s, r, u) => (a(e, s, "write to private field"), u ? u.call(e, r) : s.set(e, r), r);
9
+ }, u = (e, s, r, m) => (a(e, s, "write to private field"), m ? m.call(e, r) : s.set(e, r), r);
10
10
  import { RESIZE_ORDER as h } from "../order/index.js";
11
11
  import { windowResizer as n } from "../window-resizer/index.js";
12
- import { S as p } from "../Store-Cd-E5W1z.js";
13
- import "../path-data-polyfill-DgeDWYeI.js";
12
+ import { S as f } from "../Store-BQXXikps.js";
14
13
  var t, i;
15
- class w extends p {
14
+ class b extends f {
16
15
  constructor(r) {
17
16
  super(!1);
18
17
  c(this, t, void 0);
19
18
  c(this, i, void 0);
20
- m(this, t, r), m(this, i, n.subscribe(() => {
19
+ u(this, t, r), u(this, i, n.subscribe(() => {
21
20
  matchMedia(o(this, t)).matches ? this.current = !0 : this.current = !1;
22
21
  }, h.MEDIA));
23
22
  }
@@ -27,5 +26,5 @@ class w extends p {
27
26
  }
28
27
  t = new WeakMap(), i = new WeakMap();
29
28
  export {
30
- w as Media
29
+ b as Media
31
30
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-BQGNOHlY.cjs");const b=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const s=require("../tags-CueX-JLX.cjs"),m=require("../createStylesheet-C8aQQ4hd.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",lightChildren:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-Djb6mb1o.cjs"),m=require("../createStylesheet-CqHU9_qv.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",lightChildren:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
@@ -1,9 +1,8 @@
1
1
  import { define as g } from "../custom-element/index.js";
2
- import "../Store-Cd-E5W1z.js";
2
+ import "../Store-BQXXikps.js";
3
3
  import { i as w } from "../browser-0zX67oeU.js";
4
- import "../path-data-polyfill-DgeDWYeI.js";
5
- import { e as d, D as f, ay as u, aB as _ } from "../tags-BoPv9fDr.js";
6
- import { c as y } from "../createStylesheet-KMRQhSa-.js";
4
+ import { e as d, D as f, ay as u, aB as _ } from "../tags-CMPg9ETZ.js";
5
+ import { c as y } from "../createStylesheet-DBCEbDjI.js";
7
6
  import { PopoverElement as C } from "../popover/index.js";
8
7
  import { aptechkaTheme as h } from "../theme/index.js";
9
8
  var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, z = (t, e, o, r) => {
@@ -1 +1 @@
1
- "use strict";var at=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r);var Q=(r,t,s)=>{if(!t.has(r))throw TypeError("Cannot "+s)};var e=(r,t,s)=>(Q(r,t,"read from private field"),s?s.call(r):t.get(r)),a=(r,t,s)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,s)},l=(r,t,s,n)=>(Q(r,t,"write to private field"),n?n.call(r,s):t.set(r,s),s);var p=(r,t,s)=>(Q(r,t,"access private method"),s);var H=(r,t,s)=>new Promise((n,i)=>{var c=d=>{try{u(s.next(d))}catch(m){i(m)}},f=d=>{try{u(s.throw(d))}catch(m){i(m)}},u=d=>d.done?n(d.value):Promise.resolve(d.value).then(c,f);u((s=s.apply(r,t)).next())});var ht=(r,t,s)=>(t=r[at("asyncIterator")])?t.call(r):(r=r[at("iterator")](),t={},s=(n,i)=>(i=r[n])&&(t[n]=c=>new Promise((f,u,d)=>(c=i.call(r,c),d=c.done,Promise.resolve(c.value).then(m=>f({value:m,done:d}),u)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ot=require("../notifier/index.cjs"),pt=require("../browser-CpzFX2xg.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");var y,o,g,S,A,k,M;class gt{constructor(t,s){a(this,y,void 0);a(this,o,void 0);a(this,g,void 0);a(this,S,void 0);a(this,A,void 0);a(this,k,t=>{t.preventDefault(),e(this,y).links.forEach(s=>{var n;e(this,g)===e(s,g)||(n=e(s,A))!=null&&n.includes(e(this,g))?e(s,o).classList.add("clicked"):e(s,o).classList.remove("clicked")}),e(this,y).navigate(e(this,g),e(this,S))});a(this,M,()=>{e(this,y).prefetch(e(this,g)),e(this,o).removeEventListener("pointerenter",e(this,M))});var c,f;l(this,y,s),l(this,o,t),l(this,g,e(this,o).getAttribute("href")||"/"),l(this,S,e(this,o).getAttribute("data-history-action")||"push"),e(this,o).addEventListener("click",e(this,k));const n=s.normalizePath(e(this,g)),i=s.normalizePath(location.pathname);l(this,A,(c=e(this,o).getAttribute("data-match-paths"))==null?void 0:c.split(",").map(u=>s.normalizePath(u.trim()).pathname)),e(this,o).hasAttribute("data-include")?i.pathname.includes(n.pathname)&&e(this,o).classList.add("current"):n.pathname===i.pathname||(f=e(this,A))!=null&&f.includes(i.pathname)?(e(this,o).classList.add("current"),e(this,o).classList.add("clicked")):e(this,o).classList.remove("clicked"),e(this,o).hasAttribute("data-prefetch")&&e(this,o).addEventListener("pointerenter",e(this,M))}destroy(){e(this,o).removeEventListener("click",e(this,k)),e(this,o).removeEventListener("pointerenter",e(this,M)),e(this,o).classList.remove("current")}}y=new WeakMap,o=new WeakMap,g=new WeakMap,S=new WeakMap,A=new WeakMap,k=new WeakMap,M=new WeakMap;var E,C,z,W,N,B,P,L,w,q,x,D,U,R,V,F,X,K,ct,I,Z,Y;class Et{constructor(t){a(this,D);a(this,R);a(this,F);a(this,K);a(this,I);a(this,E,null);a(this,C,null);a(this,z,null);a(this,W,null);a(this,N,[]);a(this,B,new DOMParser);a(this,P,new Map);a(this,L,void 0);a(this,w,null);a(this,q,new ot.Notifier);a(this,x,new ot.Notifier);a(this,Y,t=>{t.state&&this.navigate(t.state,"none")});pt.isBrowser&&(l(this,E,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(l(this,E,t.base),t.base.endsWith("/")||l(this,E,e(this,E)+"/")):l(this,E,"/"),l(this,C,(t==null?void 0:t.waitForHeadToLoad)!==!1),l(this,z,(t==null?void 0:t.cachePages)!==!1),l(this,W,p(this,F,X).call(this,document.body)),l(this,w,this.normalizePath(location.pathname).pathname),document.documentElement.setAttribute("data-current-pathname",e(this,w)),p(this,R,V).call(this),addEventListener("popstate",e(this,Y)))}get currentPathname(){return e(this,w)}get links(){return e(this,N)}normalizePath(t){t=t.replace(e(this,E),""),t.startsWith("/")&&(t=t.slice(1));const s=t.split("#"),n=s[0].split("?"),i=n[0].endsWith("/")?n[0].slice(0,-1):n[0],c=e(this,E)+i,f=n==null?void 0:n[1],u=s==null?void 0:s[1];return{leaf:i,pathname:c,parameters:f,hash:u}}beforeNavigationEvent(t){return e(this,q).subscribe(t)}afterNavigationEvent(t){return e(this,x).subscribe(t)}prefetch(t){return H(this,null,function*(){const s=this.normalizePath(t);return p(this,D,U).call(this,s.pathname)})}navigate(t,s="push"){return H(this,null,function*(){var d;const n=this.normalizePath(t);let{pathname:i,hash:c,parameters:f}=n;if(e(this,L)===i||e(this,w)===i)return;l(this,L,i);const u=e(this,P).has(i);try{let m=!0;if(e(this,q).notify({pathname:i,isCached:u}),this.preprocessor)try{yield new Promise((h,b)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:i,resolve:h,reject:b,isCached:u})})}catch(h){h?console.error(h):console.log("Route change canceled"),m=!1}if(!m||e(this,L)!==i)return;const tt=e(this,P).get(i)||(yield p(this,D,U).call(this,i));if(e(this,L)!==i)return;const et=Array.from(document.head.children),st=Array.from(tt.head.cloneNode(!0).children),it=p(this,K,ct).call(this,et,st),lt=p(this,I,Z).call(this,et,it),O=p(this,I,Z).call(this,st,it);O.forEach((h,b)=>{if(h.tagName==="SCRIPT"&&h.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=h.getAttribute("src"),O[b]=v}}),O.forEach(h=>{document.head.appendChild(h)});const _=O.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");e(this,C)&&_.length&&(yield new Promise(h=>H(this,null,function*(){let b=0;try{for(var v=ht(_),mt,G,j;mt=!(G=yield v.next()).done;mt=!1){const T=G.value;T.onload=()=>{b++,b===_.length&&h()}}}catch(G){j=[G]}finally{try{mt&&(G=v.return)&&(yield G.call(v))}finally{if(j)throw j[0]}}}))),lt.forEach(h=>{h.hasAttribute("data-permanent")||h.remove()}),l(this,w,i);const $=f||location.search,ut=c?c.startsWith("#")?c:"#"+c:"",dt=$?$.startsWith("?")?$:"?"+$:"",nt=`${i}${ut}${dt}`;s==="push"?history.pushState(i,"",nt):s==="replace"&&history.replaceState(i,"",nt);const ft=p(this,F,X).call(this,tt.body.cloneNode(!0));e(this,W).forEach((h,b)=>{const v=ft[b];let mt=[...h.childNodes],G=[...v.childNodes];mt.forEach(j=>{if(j instanceof HTMLElement){const T=j.getAttribute("data-remain");let rt;G=G.filter(J=>J instanceof HTMLElement&&T&&J.getAttribute("data-remain")===T?(rt=J,!1):!0),T&&rt||j.remove()}else j.remove()}),h.append(...G)}),p(this,R,V).call(this),document.documentElement.setAttribute("data-current-pathname",i),(d=this.postprocessor)==null||d.call(this,{pathname:i,isCached:u}),e(this,x).notify({pathname:i,isCached:u})}catch(m){console.error(m)}l(this,L,void 0)})}}E=new WeakMap,C=new WeakMap,z=new WeakMap,W=new WeakMap,N=new WeakMap,B=new WeakMap,P=new WeakMap,L=new WeakMap,w=new WeakMap,q=new WeakMap,x=new WeakMap,D=new WeakSet,U=function(t){return H(this,null,function*(){const s=e(this,P).get(t);if(s)return s;const i=yield(yield fetch(t)).text(),c=e(this,B).parseFromString(i,"text/html");return e(this,z)&&e(this,P).set(t,c),c})},R=new WeakSet,V=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(s=>{var n;return(n=s.getAttribute("href"))==null?void 0:n.startsWith("/")});e(this,N).forEach(s=>s.destroy()),l(this,N,t.map(s=>new gt(s,this)))},F=new WeakSet,X=function(t){return[...t.querySelectorAll("[data-morph]")]},K=new WeakSet,ct=function(t,s){return t.filter(n=>s.find(i=>i.outerHTML===n.outerHTML))},I=new WeakSet,Z=function(t,s){return t.filter(n=>!s.find(i=>i.outerHTML===n.outerHTML))},Y=new WeakMap;exports.Morph=Et;
1
+ "use strict";var at=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r);var Q=(r,t,s)=>{if(!t.has(r))throw TypeError("Cannot "+s)};var e=(r,t,s)=>(Q(r,t,"read from private field"),s?s.call(r):t.get(r)),a=(r,t,s)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,s)},l=(r,t,s,n)=>(Q(r,t,"write to private field"),n?n.call(r,s):t.set(r,s),s);var p=(r,t,s)=>(Q(r,t,"access private method"),s);var H=(r,t,s)=>new Promise((n,i)=>{var c=d=>{try{u(s.next(d))}catch(m){i(m)}},f=d=>{try{u(s.throw(d))}catch(m){i(m)}},u=d=>d.done?n(d.value):Promise.resolve(d.value).then(c,f);u((s=s.apply(r,t)).next())});var ht=(r,t,s)=>(t=r[at("asyncIterator")])?t.call(r):(r=r[at("iterator")](),t={},s=(n,i)=>(i=r[n])&&(t[n]=c=>new Promise((f,u,d)=>(c=i.call(r,c),d=c.done,Promise.resolve(c.value).then(m=>f({value:m,done:d}),u)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ot=require("../notifier/index.cjs"),pt=require("../browser-CpzFX2xg.cjs");var y,o,g,S,A,k,M;class gt{constructor(t,s){a(this,y,void 0);a(this,o,void 0);a(this,g,void 0);a(this,S,void 0);a(this,A,void 0);a(this,k,t=>{t.preventDefault(),e(this,y).links.forEach(s=>{var n;e(this,g)===e(s,g)||(n=e(s,A))!=null&&n.includes(e(this,g))?e(s,o).classList.add("clicked"):e(s,o).classList.remove("clicked")}),e(this,y).navigate(e(this,g),e(this,S))});a(this,M,()=>{e(this,y).prefetch(e(this,g)),e(this,o).removeEventListener("pointerenter",e(this,M))});var c,f;l(this,y,s),l(this,o,t),l(this,g,e(this,o).getAttribute("href")||"/"),l(this,S,e(this,o).getAttribute("data-history-action")||"push"),e(this,o).addEventListener("click",e(this,k));const n=s.normalizePath(e(this,g)),i=s.normalizePath(location.pathname);l(this,A,(c=e(this,o).getAttribute("data-match-paths"))==null?void 0:c.split(",").map(u=>s.normalizePath(u.trim()).pathname)),e(this,o).hasAttribute("data-include")?i.pathname.includes(n.pathname)&&e(this,o).classList.add("current"):n.pathname===i.pathname||(f=e(this,A))!=null&&f.includes(i.pathname)?(e(this,o).classList.add("current"),e(this,o).classList.add("clicked")):e(this,o).classList.remove("clicked"),e(this,o).hasAttribute("data-prefetch")&&e(this,o).addEventListener("pointerenter",e(this,M))}destroy(){e(this,o).removeEventListener("click",e(this,k)),e(this,o).removeEventListener("pointerenter",e(this,M)),e(this,o).classList.remove("current")}}y=new WeakMap,o=new WeakMap,g=new WeakMap,S=new WeakMap,A=new WeakMap,k=new WeakMap,M=new WeakMap;var E,C,z,W,N,B,P,L,w,x,D,R,U,q,V,F,X,K,ct,I,Z,Y;class Et{constructor(t){a(this,R);a(this,q);a(this,F);a(this,K);a(this,I);a(this,E,null);a(this,C,null);a(this,z,null);a(this,W,null);a(this,N,[]);a(this,B,new DOMParser);a(this,P,new Map);a(this,L,void 0);a(this,w,null);a(this,x,new ot.Notifier);a(this,D,new ot.Notifier);a(this,Y,t=>{t.state&&this.navigate(t.state,"none")});pt.isBrowser&&(l(this,E,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(l(this,E,t.base),t.base.endsWith("/")||l(this,E,e(this,E)+"/")):l(this,E,"/"),l(this,C,(t==null?void 0:t.waitForHeadToLoad)!==!1),l(this,z,(t==null?void 0:t.cachePages)!==!1),l(this,W,p(this,F,X).call(this,document.body)),l(this,w,this.normalizePath(location.pathname).pathname),document.documentElement.setAttribute("data-current-pathname",e(this,w)),p(this,q,V).call(this),addEventListener("popstate",e(this,Y)))}get currentPathname(){return e(this,w)}get links(){return e(this,N)}normalizePath(t){t=t.replace(e(this,E),""),t.startsWith("/")&&(t=t.slice(1));const s=t.split("#"),n=s[0].split("?"),i=n[0].endsWith("/")?n[0].slice(0,-1):n[0],c=e(this,E)+i,f=n==null?void 0:n[1],u=s==null?void 0:s[1];return{leaf:i,pathname:c,parameters:f,hash:u}}beforeNavigationEvent(t){return e(this,x).subscribe(t)}afterNavigationEvent(t){return e(this,D).subscribe(t)}prefetch(t){return H(this,null,function*(){const s=this.normalizePath(t);return p(this,R,U).call(this,s.pathname)})}navigate(t,s="push"){return H(this,null,function*(){var d;const n=this.normalizePath(t);let{pathname:i,hash:c,parameters:f}=n;if(e(this,L)===i||e(this,w)===i)return;l(this,L,i);const u=e(this,P).has(i);try{let m=!0;if(e(this,x).notify({pathname:i,isCached:u}),this.preprocessor)try{yield new Promise((h,b)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:i,resolve:h,reject:b,isCached:u})})}catch(h){h?console.error(h):console.log("Route change canceled"),m=!1}if(!m||e(this,L)!==i)return;const tt=e(this,P).get(i)||(yield p(this,R,U).call(this,i));if(e(this,L)!==i)return;const et=Array.from(document.head.children),st=Array.from(tt.head.cloneNode(!0).children),it=p(this,K,ct).call(this,et,st),lt=p(this,I,Z).call(this,et,it),O=p(this,I,Z).call(this,st,it);O.forEach((h,b)=>{if(h.tagName==="SCRIPT"&&h.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=h.getAttribute("src"),O[b]=v}}),O.forEach(h=>{document.head.appendChild(h)});const _=O.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");e(this,C)&&_.length&&(yield new Promise(h=>H(this,null,function*(){let b=0;try{for(var v=ht(_),mt,G,j;mt=!(G=yield v.next()).done;mt=!1){const T=G.value;T.onload=()=>{b++,b===_.length&&h()}}}catch(G){j=[G]}finally{try{mt&&(G=v.return)&&(yield G.call(v))}finally{if(j)throw j[0]}}}))),lt.forEach(h=>{h.hasAttribute("data-permanent")||h.remove()}),l(this,w,i);const $=f||location.search,ut=c?c.startsWith("#")?c:"#"+c:"",dt=$?$.startsWith("?")?$:"?"+$:"",nt=`${i}${ut}${dt}`;s==="push"?history.pushState(i,"",nt):s==="replace"&&history.replaceState(i,"",nt);const ft=p(this,F,X).call(this,tt.body.cloneNode(!0));e(this,W).forEach((h,b)=>{const v=ft[b];let mt=[...h.childNodes],G=[...v.childNodes];mt.forEach(j=>{if(j instanceof HTMLElement){const T=j.getAttribute("data-remain");let rt;G=G.filter(J=>J instanceof HTMLElement&&T&&J.getAttribute("data-remain")===T?(rt=J,!1):!0),T&&rt||j.remove()}else j.remove()}),h.append(...G)}),p(this,q,V).call(this),document.documentElement.setAttribute("data-current-pathname",i),(d=this.postprocessor)==null||d.call(this,{pathname:i,isCached:u}),e(this,D).notify({pathname:i,isCached:u})}catch(m){console.error(m)}l(this,L,void 0)})}}E=new WeakMap,C=new WeakMap,z=new WeakMap,W=new WeakMap,N=new WeakMap,B=new WeakMap,P=new WeakMap,L=new WeakMap,w=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,U=function(t){return H(this,null,function*(){const s=e(this,P).get(t);if(s)return s;const i=yield(yield fetch(t)).text(),c=e(this,B).parseFromString(i,"text/html");return e(this,z)&&e(this,P).set(t,c),c})},q=new WeakSet,V=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(s=>{var n;return(n=s.getAttribute("href"))==null?void 0:n.startsWith("/")});e(this,N).forEach(s=>s.destroy()),l(this,N,t.map(s=>new gt(s,this)))},F=new WeakSet,X=function(t){return[...t.querySelectorAll("[data-morph]")]},K=new WeakSet,ct=function(t,s){return t.filter(n=>s.find(i=>i.outerHTML===n.outerHTML))},I=new WeakSet,Z=function(t,s){return t.filter(n=>!s.find(i=>i.outerHTML===n.outerHTML))},Y=new WeakMap;exports.Morph=Et;
@@ -28,7 +28,6 @@ var T = (r, t, s) => new Promise((n, i) => {
28
28
  var ht = (r, t, s) => (t = r[at("asyncIterator")]) ? t.call(r) : (r = r[at("iterator")](), t = {}, s = (n, i) => (i = r[n]) && (t[n] = (c) => new Promise((f, u, d) => (c = i.call(r, c), d = c.done, Promise.resolve(c.value).then((m) => f({ value: m, done: d }), u)))), s("next"), s("return"), t);
29
29
  import { Notifier as ot } from "../notifier/index.js";
30
30
  import { i as pt } from "../browser-0zX67oeU.js";
31
- import "../path-data-polyfill-DgeDWYeI.js";
32
31
  var y, o, g, k, A, C, M;
33
32
  class gt {
34
33
  constructor(t, s) {
@@ -59,7 +58,7 @@ class gt {
59
58
  }
60
59
  y = new WeakMap(), o = new WeakMap(), g = new WeakMap(), k = new WeakMap(), A = new WeakMap(), C = new WeakMap(), M = new WeakMap();
61
60
  var E, S, z, W, H, K, P, b, w, x, D, R, V, F, X, I, Z, Y, ct, $, _, j;
62
- class wt {
61
+ class bt {
63
62
  constructor(t) {
64
63
  a(this, R);
65
64
  a(this, F);
@@ -233,5 +232,5 @@ E = new WeakMap(), S = new WeakMap(), z = new WeakMap(), W = new WeakMap(), H =
233
232
  );
234
233
  }, j = new WeakMap();
235
234
  export {
236
- wt as Morph
235
+ bt as Morph
237
236
  };
@@ -1 +1 @@
1
- "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-BQGNOHlY.cjs");const L=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");require("../ticker/index.cjs");const M=require("../Damped-CbWlWAbx.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=L.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=L.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=L.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,q;p>=0;p--)(q=i[p])&&(n=(o?q(e,s,n):q(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
1
+ "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-DxwUBxOC.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
@@ -18,13 +18,12 @@ var s = (e, t, i) => (T(e, t, "read from private field"), i ? i.call(e) : t.get(
18
18
  throw TypeError("Cannot add the same private member more than once");
19
19
  t instanceof WeakSet ? t.add(e) : t.set(e, i);
20
20
  }, p = (e, t, i, o) => (T(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
21
- import "../Store-Cd-E5W1z.js";
21
+ import "../Store-BQXXikps.js";
22
22
  import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
23
23
  import { g as U } from "../dom-0S_WDL4g.js";
24
24
  import { c as A } from "../math-BOBiC4TN.js";
25
- import "../path-data-polyfill-DgeDWYeI.js";
26
25
  import "../ticker/index.js";
27
- import { D as W } from "../Damped-BJgyFENo.js";
26
+ import { D as W } from "../Damped-QZAoXO5Z.js";
28
27
  import { elementResizer as B } from "../element-resizer/index.js";
29
28
  import { windowResizer as G } from "../window-resizer/index.js";
30
29
  import { CustomElement as V, define as X } from "../custom-element/index.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attribute/index.cjs"),W=require("../custom-element/index.cjs"),I=require("../Store-BQGNOHlY.cjs"),N=require("../style-At6aDoqG.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const G=require("../browser-CpzFX2xg.cjs"),T=require("../tags-CueX-JLX.cjs"),H=require("../createStylesheet-C8aQQ4hd.cjs");var R=Object.defineProperty,U=Object.getOwnPropertyDescriptor,z=(s,e,t,o)=>{for(var a=o>1?void 0:o?U(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(o?d(e,t,a):d(a))||a);return o&&a&&R(e,t,a),a},A=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},i=(s,e,t)=>(A(s,e,"read from private field"),t?t.call(s):e.get(s)),h=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},O=(s,e,t,o)=>(A(s,e,"write to private field"),o?o.call(s,t):e.set(s,t),t),x=(s,e,t)=>(A(s,e,"access private method"),t),M,p,g,l,v,f,$,B,u,m,w,y,L,q,E;exports.PopoverElement=class extends W.CustomElement{constructor(){super(...arguments),h(this,$),h(this,u),h(this,L),h(this,M,-1),h(this,p,new I.Store(!1)),h(this,g,void 0),h(this,l,new b.Attribute(this,"history",!1)),h(this,v,new b.Attribute(this,"single",!1)),h(this,f,!1),this.open=(e=!0)=>{if(i(this,p).current)return;i(this,p).current=!0,i(this,v).current&&(exports.PopoverElement.__opened.forEach(o=>o.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),O(this,M,exports.PopoverElement.__opened.length-1),i(this,l).current&&i(this,f)&&history.pushState("","",i(this,$,B)),clearTimeout(i(this,g)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const t=()=>{addEventListener("click",i(this,w)),addEventListener("keydown",i(this,y)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};e?setTimeout(t):t()},this.close=()=>{if(i(this,p).current){if(i(this,p).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,l).current){const e=new URL(location.href);e.searchParams.delete(i(this,u,m)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",i(this,w)),removeEventListener("keydown",i(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},N.getElementTransitionDurationMS(this))}},h(this,w,e=>{x(this,L,q).call(this,()=>{const t=e.composedPath();!t.find(o=>o===this)&&!t.find(o=>o instanceof HTMLElement&&o.closest("e-popover-button"))&&t[0]instanceof HTMLElement&&!t[0].closest("[data-outside]")&&this.close()})}),h(this,y,e=>{x(this,L,q).call(this,()=>{e.code==="Escape"&&this.close()})}),h(this,E,()=>{O(this,f,!1),i(this,p).current&&i(this,l).current&&!location.search.includes(i(this,u,m))?this.close():!i(this,p).current&&i(this,l).current&&location.search.includes(i(this,u,m))&&this.open(),O(this,f,!0)})}get history(){return i(this,l)}get single(){return i(this,v)}get opened(){return i(this,p)}connectedCallback(){i(this,l).observe(),i(this,v).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,E)),setTimeout(()=>{i(this,E).call(this)},0)}disconnectedCallback(){i(this,l).unobserve(),i(this,v).unobserve(),exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),clearTimeout(i(this,g)),removeEventListener("popstate",i(this,E))}};M=new WeakMap;p=new WeakMap;g=new WeakMap;l=new WeakMap;v=new WeakMap;f=new WeakMap;$=new WeakSet;B=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${i(this,u,m)}`};u=new WeakSet;m=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;L=new WeakSet;q=function(s){(exports.PopoverElement.__opened[i(this,M)-1]||exports.PopoverElement.__opened.length===1)&&s()};E=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=z([W.define("e-popover")],exports.PopoverElement);var F=Object.defineProperty,J=Object.getOwnPropertyDescriptor,K=(s,e,t,o)=>{for(var a=o>1?void 0:o?J(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(o?d(e,t,a):d(a))||a);return o&&a&&F(e,t,a),a},D=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},r=(s,e,t)=>(D(s,e,"read from private field"),t?t.call(s):e.get(s)),_=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},Q=(s,e,t,o)=>(D(s,e,"write to private field"),o?o.call(s,t):e.set(s,t),t),n,P,C,k,S;const V=H.createStylesheet({button:{all:"inherit"}});exports.PopoverButtonElement=class extends W.CustomElement{constructor(){super(),_(this,n,void 0),_(this,P,()=>{this.classList.add("triggered")}),_(this,C,()=>{this.classList.add("opened")}),_(this,k,()=>{this.classList.remove("opened")}),_(this,S,()=>{this.classList.remove("triggered")}),this.openShadow(V),G.isBrowser&&T.element(this,{children:[T.button({onClick:()=>{if(r(this,n)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!r(this,n).opened.current?r(this,n).open():(e==="close"||e==="toggle"&&r(this,n).opened.current)&&r(this,n).close()}},children:[T.slot()]})]})}get popoverElement(){return r(this,n)}connectedCallback(){const e=this.getAttribute("target");if(e){const t=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);t?(Q(this,n,t),r(this,n).addEventListener("popoverTriggered",r(this,P)),r(this,n).addEventListener("popoverOpened",r(this,C)),r(this,n).addEventListener("popoverClosing",r(this,k)),r(this,n).addEventListener("popoverClosed",r(this,S))):console.warn(this,`target ${e} not found`)}}disconnectedCallback(){r(this,n)&&(r(this,n).removeEventListener("popoverTriggered",r(this,P)),r(this,n).removeEventListener("popoverOpened",r(this,C)),r(this,n).removeEventListener("popoverClosing",r(this,k)),r(this,n).removeEventListener("popoverClosed",r(this,S)))}};n=new WeakMap;P=new WeakMap;C=new WeakMap;k=new WeakMap;S=new WeakMap;exports.PopoverButtonElement=K([W.define("e-popover-button")],exports.PopoverButtonElement);
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../attribute/index.cjs"),W=require("../custom-element/index.cjs"),D=require("../Store-C-1ruEIm.cjs"),I=require("../style-At6aDoqG.cjs"),N=require("../browser-CpzFX2xg.cjs"),G=require("../tags-Djb6mb1o.cjs");var H=Object.defineProperty,R=Object.getOwnPropertyDescriptor,K=(s,e,t,n)=>{for(var a=n>1?void 0:n?R(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(n?d(e,t,a):d(a))||a);return n&&a&&H(e,t,a),a},q=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},i=(s,e,t)=>(q(s,e,"read from private field"),t?t.call(s):e.get(s)),h=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},S=(s,e,t,n)=>(q(s,e,"write to private field"),n?n.call(s,t):e.set(s,t),t),x=(s,e,t)=>(q(s,e,"access private method"),t),T,p,g,l,v,f,O,b,u,m,w,y,L,$,E;exports.PopoverElement=class extends W.CustomElement{constructor(){super(...arguments),h(this,O),h(this,u),h(this,L),h(this,T,-1),h(this,p,new D.Store(!1)),h(this,g,void 0),h(this,l,new A.Attribute(this,"history",!1)),h(this,v,new A.Attribute(this,"single",!1)),h(this,f,!1),this.open=(e=!0)=>{if(i(this,p).current)return;i(this,p).current=!0,i(this,v).current&&(exports.PopoverElement.__opened.forEach(n=>n.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),S(this,T,exports.PopoverElement.__opened.length-1),i(this,l).current&&i(this,f)&&history.pushState("","",i(this,O,b)),clearTimeout(i(this,g)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const t=()=>{addEventListener("click",i(this,w)),addEventListener("keydown",i(this,y)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};e?setTimeout(t):t()},this.close=()=>{if(i(this,p).current){if(i(this,p).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),i(this,l).current){const e=new URL(location.href);e.searchParams.delete(i(this,u,m)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",i(this,w)),removeEventListener("keydown",i(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},I.getElementTransitionDurationMS(this))}},h(this,w,e=>{x(this,L,$).call(this,()=>{const t=e.composedPath();!t.find(n=>n===this)&&!t.find(n=>n instanceof HTMLElement&&n.closest("e-popover-button"))&&t[0]instanceof HTMLElement&&!t[0].closest("[data-outside]")&&this.close()})}),h(this,y,e=>{x(this,L,$).call(this,()=>{e.code==="Escape"&&this.close()})}),h(this,E,()=>{S(this,f,!1),i(this,p).current&&i(this,l).current&&!location.search.includes(i(this,u,m))?this.close():!i(this,p).current&&i(this,l).current&&location.search.includes(i(this,u,m))&&this.open(),S(this,f,!0)})}get history(){return i(this,l)}get single(){return i(this,v)}get opened(){return i(this,p)}connectedCallback(){i(this,l).observe(),i(this,v).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",i(this,E)),setTimeout(()=>{i(this,E).call(this)},0)}disconnectedCallback(){i(this,l).unobserve(),i(this,v).unobserve(),exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),clearTimeout(i(this,g)),removeEventListener("popstate",i(this,E))}};T=new WeakMap;p=new WeakMap;g=new WeakMap;l=new WeakMap;v=new WeakMap;f=new WeakMap;O=new WeakSet;b=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${i(this,u,m)}`};u=new WeakSet;m=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;L=new WeakSet;$=function(s){(exports.PopoverElement.__opened[i(this,T)-1]||exports.PopoverElement.__opened.length===1)&&s()};E=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=K([W.define("e-popover")],exports.PopoverElement);var U=Object.defineProperty,z=Object.getOwnPropertyDescriptor,F=(s,e,t,n)=>{for(var a=n>1?void 0:n?z(e,t):e,c=s.length-1,d;c>=0;c--)(d=s[c])&&(a=(n?d(e,t,a):d(a))||a);return n&&a&&U(e,t,a),a},B=(s,e,t)=>{if(!e.has(s))throw TypeError("Cannot "+t)},r=(s,e,t)=>(B(s,e,"read from private field"),t?t.call(s):e.get(s)),_=(s,e,t)=>{if(e.has(s))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(s):e.set(s,t)},J=(s,e,t,n)=>(B(s,e,"write to private field"),n?n.call(s,t):e.set(s,t),t),o,P,C,k,M;exports.PopoverButtonElement=class extends W.CustomElement{constructor(){super(),_(this,o,void 0),_(this,P,()=>{this.classList.add("triggered")}),_(this,C,()=>{this.classList.add("opened")}),_(this,k,()=>{this.classList.remove("opened")}),_(this,M,()=>{this.classList.remove("triggered")}),N.isBrowser&&G.element(this,{tabindex:this.getAttribute("tabindex")||"0",onClick:()=>{if(r(this,o)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!r(this,o).opened.current?r(this,o).open():(e==="close"||e==="toggle"&&r(this,o).opened.current)&&r(this,o).close()}},onKeydown:e=>{e.code==="Space"&&e.currentTarget.click()}})}get popoverElement(){return r(this,o)}connectedCallback(){const e=this.getAttribute("target");if(e){const t=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);t?(J(this,o,t),r(this,o).addEventListener("popoverTriggered",r(this,P)),r(this,o).addEventListener("popoverOpened",r(this,C)),r(this,o).addEventListener("popoverClosing",r(this,k)),r(this,o).addEventListener("popoverClosed",r(this,M))):console.warn(this,`target ${e} not found`)}}disconnectedCallback(){r(this,o)&&(r(this,o).removeEventListener("popoverTriggered",r(this,P)),r(this,o).removeEventListener("popoverOpened",r(this,C)),r(this,o).removeEventListener("popoverClosing",r(this,k)),r(this,o).removeEventListener("popoverClosed",r(this,M)))}};o=new WeakMap;P=new WeakMap;C=new WeakMap;k=new WeakMap;M=new WeakMap;exports.PopoverButtonElement=F([W.define("e-popover-button")],exports.PopoverButtonElement);