aptechka 0.1.1 → 0.1.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 (300) hide show
  1. package/lib/Damped-DdPj4Sho.cjs +1 -0
  2. package/lib/Damped-H3PuZwKV.js +152 -0
  3. package/lib/SourceManager-tmQlXkSD.cjs +1 -0
  4. package/lib/SourceManager-vXInLlh_.js +108 -0
  5. package/lib/Store-qq7IjRLE.js +136 -0
  6. package/lib/Store-txkR3wXU.cjs +1 -0
  7. package/lib/WheelControls-9ZQKSYYq.js +83 -0
  8. package/lib/WheelControls-TYhGU6oA.cjs +1 -0
  9. package/lib/accordion/AccordionElement.d.ts +7 -0
  10. package/lib/accordion/index.d.ts +1 -0
  11. package/lib/animation/Animated.d.ts +41 -0
  12. package/lib/animation/Damped.d.ts +11 -0
  13. package/lib/animation/Tweened.d.ts +16 -0
  14. package/lib/animation/index.cjs +1 -0
  15. package/lib/animation/index.d.ts +3 -0
  16. package/lib/animation/index.js +56 -0
  17. package/lib/attribute/index.cjs +1 -0
  18. package/lib/attribute/index.d.ts +8 -0
  19. package/lib/attribute/index.js +47 -0
  20. package/lib/attributes-_2U65GDl.cjs +1 -0
  21. package/lib/attributes-w0u-KiIb.js +10 -0
  22. package/lib/browser-QbF6EW-w.cjs +1 -0
  23. package/lib/browser-S4eq8AeN.js +4 -0
  24. package/lib/canvas-2d/index.cjs +5 -0
  25. package/lib/canvas-2d/index.d.ts +30 -0
  26. package/lib/canvas-2d/index.js +90 -0
  27. package/lib/controls/Controls.d.ts +9 -0
  28. package/lib/controls/KeyboardControls.d.ts +10 -0
  29. package/lib/controls/LinearControls.d.ts +11 -0
  30. package/lib/controls/WheelControls.d.ts +17 -0
  31. package/lib/controls/index.cjs +1 -0
  32. package/lib/controls/index.d.ts +4 -0
  33. package/lib/controls/index.js +42 -0
  34. package/lib/css-unit-parser/index.cjs +8 -0
  35. package/lib/css-unit-parser/index.d.ts +6 -0
  36. package/lib/css-unit-parser/index.js +36 -0
  37. package/lib/custom-element/index.cjs +1 -0
  38. package/lib/custom-element/index.d.ts +8 -0
  39. package/lib/custom-element/index.js +16 -0
  40. package/lib/device/Device.d.ts +17 -0
  41. package/lib/device/Viewport.d.ts +27 -0
  42. package/lib/device/index.cjs +1 -0
  43. package/lib/device/index.d.ts +2 -0
  44. package/lib/device/index.js +123 -0
  45. package/lib/dom-QhWsdQS2.cjs +1 -0
  46. package/lib/dom-bHEwc_xV.js +24 -0
  47. package/lib/easings-_wFs9ZWc.cjs +1 -0
  48. package/lib/easings-uF-tgahf.js +19 -0
  49. package/lib/element-constructor/ElementConstructor.d.ts +76 -0
  50. package/lib/element-constructor/htmlTags.d.ts +113 -0
  51. package/lib/element-constructor/index.cjs +1 -0
  52. package/lib/element-constructor/index.d.ts +4 -0
  53. package/lib/element-constructor/index.js +1390 -0
  54. package/lib/element-constructor/specialObjects.d.ts +2 -0
  55. package/lib/element-constructor/svgTags.d.ts +64 -0
  56. package/lib/en3/attachments/En3SourceManager.d.ts +30 -0
  57. package/lib/en3/core/en3.d.ts +55 -0
  58. package/lib/en3/index.cjs +28 -0
  59. package/lib/en3/index.d.ts +18 -0
  60. package/lib/en3/index.js +3249 -0
  61. package/lib/en3/instances/en3LazyLoader.d.ts +7 -0
  62. package/lib/en3/libs/MeshoptDecoder.d.ts +1 -0
  63. package/lib/en3/loaders/en3GLTFLoader.d.ts +16 -0
  64. package/lib/en3/loaders/en3TextureLoader.d.ts +2 -0
  65. package/lib/en3/objects/En3Clip.d.ts +10 -0
  66. package/lib/en3/objects/En3ClipHelpers.d.ts +5 -0
  67. package/lib/en3/objects/En3GLTF.d.ts +9 -0
  68. package/lib/en3/objects/En3Image.d.ts +7 -0
  69. package/lib/en3/objects/En3ImageLike.d.ts +22 -0
  70. package/{src/packages/en3/objects/En3SourceConsumer.ts → lib/en3/objects/En3SourceConsumer.d.ts} +2 -3
  71. package/lib/en3/objects/En3Video.d.ts +12 -0
  72. package/lib/en3/test/En3HTML.d.ts +9 -0
  73. package/lib/en3/test/En3ModifiedMaterial.d.ts +32 -0
  74. package/lib/en3/test/En3Raycaster.d.ts +19 -0
  75. package/lib/en3/utils/coverTexture.d.ts +6 -0
  76. package/lib/en3/utils/dispose.d.ts +2 -0
  77. package/lib/en3/utils/traverseMaterials.d.ts +2 -0
  78. package/lib/en3/utils/traverseMeshes.d.ts +2 -0
  79. package/lib/function-QP7IreXR.cjs +1 -0
  80. package/lib/function-zwSFehNd.js +17 -0
  81. package/lib/image/index.cjs +1 -0
  82. package/lib/image/index.d.ts +10 -0
  83. package/lib/image/index.js +30 -0
  84. package/lib/intersector/index.cjs +1 -0
  85. package/lib/intersector/index.d.ts +8 -0
  86. package/lib/intersector/index.js +55 -0
  87. package/lib/ladder/index.cjs +1 -0
  88. package/lib/ladder/index.d.ts +21 -0
  89. package/lib/ladder/index.js +97 -0
  90. package/lib/layout-5SJlcXTY.js +12 -0
  91. package/lib/layout-box/index.cjs +1 -0
  92. package/lib/layout-box/index.d.ts +78 -0
  93. package/lib/layout-box/index.js +235 -0
  94. package/lib/layout-rZzbsLPd.cjs +1 -0
  95. package/lib/loading/index.cjs +1 -0
  96. package/lib/loading/index.d.ts +38 -0
  97. package/lib/loading/index.js +99 -0
  98. package/lib/math-FNUBmQPK.cjs +1 -0
  99. package/lib/math-_a3IpKOc.js +45 -0
  100. package/lib/measurer/CumulativeOffsetLeft.d.ts +4 -0
  101. package/lib/measurer/CumulativeOffsetTop.d.ts +4 -0
  102. package/lib/measurer/Meaurer.d.ts +8 -0
  103. package/lib/measurer/index.cjs +1 -0
  104. package/lib/measurer/index.d.ts +3 -0
  105. package/lib/measurer/index.js +48 -0
  106. package/lib/media/index.cjs +1 -0
  107. package/lib/media/index.d.ts +11 -0
  108. package/lib/media/index.js +33 -0
  109. package/lib/morph/Link.d.ts +6 -0
  110. package/lib/morph/Morph.d.ts +26 -0
  111. package/lib/morph/index.cjs +1 -0
  112. package/lib/morph/index.d.ts +1 -0
  113. package/lib/morph/index.js +182 -0
  114. package/lib/notifier/index.cjs +1 -0
  115. package/lib/notifier/index.d.ts +8 -0
  116. package/lib/notifier/index.js +38 -0
  117. package/lib/number-2bR0KBcX.cjs +1 -0
  118. package/lib/number-bCHB2GAD.js +31 -0
  119. package/lib/order/index.cjs +1 -0
  120. package/lib/order/index.d.ts +13 -0
  121. package/lib/order/index.js +5 -0
  122. package/lib/resizer/index.cjs +1 -0
  123. package/lib/resizer/index.d.ts +10 -0
  124. package/lib/resizer/index.js +45 -0
  125. package/lib/router/Link.d.ts +6 -0
  126. package/lib/router/Route.d.ts +15 -0
  127. package/lib/router/RouteElement.d.ts +14 -0
  128. package/lib/router/Router.d.ts +33 -0
  129. package/lib/router/index.cjs +1 -0
  130. package/lib/router/index.d.ts +3 -0
  131. package/lib/router/index.js +266 -0
  132. package/lib/scroll/ScrollElement.d.ts +40 -0
  133. package/lib/scroll/ScrollUserElement.d.ts +7 -0
  134. package/lib/scroll/ScrollbarElement.d.ts +13 -0
  135. package/lib/scroll/index.cjs +71 -0
  136. package/lib/scroll/index.d.ts +2 -0
  137. package/lib/scroll/index.js +444 -0
  138. package/lib/scroll-entries/index.cjs +1 -0
  139. package/lib/scroll-entries/index.d.ts +17 -0
  140. package/lib/scroll-entries/index.js +56 -0
  141. package/lib/source/SourceClass.d.ts +11 -0
  142. package/lib/source/SourceElement.d.ts +16 -0
  143. package/lib/source/SourceManager.d.ts +13 -0
  144. package/lib/source/SourceSet.d.ts +8 -0
  145. package/lib/source/index.cjs +5 -0
  146. package/lib/source/index.d.ts +4 -0
  147. package/lib/source/index.js +95 -0
  148. package/lib/store/Composed.d.ts +7 -0
  149. package/lib/store/CumulativeResource.d.ts +12 -0
  150. package/lib/store/Derived.d.ts +7 -0
  151. package/lib/store/DerivedArray.d.ts +7 -0
  152. package/lib/store/Resource.d.ts +14 -0
  153. package/lib/store/Store.d.ts +33 -0
  154. package/lib/store/StoreRegistry.d.ts +22 -0
  155. package/lib/store/index.cjs +1 -0
  156. package/lib/store/index.d.ts +6 -0
  157. package/lib/store/index.js +99 -0
  158. package/lib/string-GmxZA5Nq.js +31 -0
  159. package/lib/string-WmNOGq16.cjs +1 -0
  160. package/lib/studio/StudioElement.d.ts +9 -0
  161. package/lib/studio/index.d.ts +1 -0
  162. package/lib/ticker/index.cjs +1 -0
  163. package/lib/ticker/index.d.ts +19 -0
  164. package/lib/ticker/index.js +107 -0
  165. package/lib/utils/array.d.ts +1 -0
  166. package/lib/utils/attributes.d.ts +2 -0
  167. package/lib/utils/browser.d.ts +1 -0
  168. package/lib/utils/canvas.d.ts +6 -0
  169. package/lib/utils/collisions.d.ts +3 -0
  170. package/lib/utils/coordinates.d.ts +13 -0
  171. package/lib/utils/decoding.d.ts +2 -0
  172. package/lib/utils/dev.d.ts +3 -0
  173. package/lib/utils/dom.d.ts +4 -0
  174. package/lib/utils/easings.d.ts +17 -0
  175. package/lib/utils/file.d.ts +1 -0
  176. package/lib/utils/function.d.ts +2 -0
  177. package/lib/utils/index.cjs +1 -0
  178. package/lib/utils/index.d.ts +19 -0
  179. package/lib/utils/index.js +203 -0
  180. package/lib/utils/layout.d.ts +3 -0
  181. package/lib/utils/math.d.ts +11 -0
  182. package/lib/utils/number.d.ts +3 -0
  183. package/lib/utils/object.d.ts +7 -0
  184. package/lib/utils/string.d.ts +5 -0
  185. package/lib/utils/ts-shape.d.ts +19 -0
  186. package/lib/utils/ts-utility.d.ts +19 -0
  187. package/lib/video/index.cjs +1 -0
  188. package/lib/video/index.d.ts +11 -0
  189. package/lib/video/index.js +37 -0
  190. package/package.json +7 -7
  191. package/.github/workflows/publish.yml +0 -20
  192. package/.prettierignore +0 -16
  193. package/.prettierrc +0 -9
  194. package/index.html +0 -32
  195. package/public/vite.svg +0 -1
  196. package/src/packages/animation/Animated.ts +0 -189
  197. package/src/packages/animation/Damped.ts +0 -39
  198. package/src/packages/animation/Tweened.ts +0 -51
  199. package/src/packages/animation/index.ts +0 -10
  200. package/src/packages/attribute/index.ts +0 -59
  201. package/src/packages/canvas-2d/index.ts +0 -137
  202. package/src/packages/controls/Controls.ts +0 -15
  203. package/src/packages/controls/KeyboardControls.ts +0 -63
  204. package/src/packages/controls/LinearControls.ts +0 -27
  205. package/src/packages/controls/User.ts +0 -20
  206. package/src/packages/controls/WheelControls.ts +0 -92
  207. package/src/packages/controls/index.ts +0 -5
  208. package/src/packages/css-unit-parser/index.ts +0 -32
  209. package/src/packages/custom-element/index.ts +0 -19
  210. package/src/packages/device/Device.ts +0 -113
  211. package/src/packages/device/Viewport.ts +0 -67
  212. package/src/packages/device/index.ts +0 -2
  213. package/src/packages/element-constructor/ElementConstructor.ts +0 -577
  214. package/src/packages/element-constructor/htmlTags.ts +0 -679
  215. package/src/packages/element-constructor/index.ts +0 -4
  216. package/src/packages/element-constructor/specialObjects.ts +0 -8
  217. package/src/packages/element-constructor/svgTags.ts +0 -588
  218. package/src/packages/en3/attachments/En3SourceManager.ts +0 -116
  219. package/src/packages/en3/core/en3.ts +0 -306
  220. package/src/packages/en3/index.ts +0 -52
  221. package/src/packages/en3/instances/en3LazyLoader.ts +0 -22
  222. package/src/packages/en3/libs/MeshoptDecoder.js +0 -138
  223. package/src/packages/en3/loaders/en3GLTFLoader.ts +0 -54
  224. package/src/packages/en3/loaders/en3TextureLoader.ts +0 -3
  225. package/src/packages/en3/objects/En3Clip.ts +0 -53
  226. package/src/packages/en3/objects/En3ClipHelpers.ts +0 -12
  227. package/src/packages/en3/objects/En3GLTF.ts +0 -35
  228. package/src/packages/en3/objects/En3Image.ts +0 -18
  229. package/src/packages/en3/objects/En3ImageLike.ts +0 -101
  230. package/src/packages/en3/objects/En3Video.ts +0 -88
  231. package/src/packages/en3/test/En3HTML.ts +0 -55
  232. package/src/packages/en3/test/En3ModifiedMaterial.ts +0 -221
  233. package/src/packages/en3/test/En3Raycaster.ts +0 -187
  234. package/src/packages/en3/utils/coverTexture.ts +0 -29
  235. package/src/packages/en3/utils/dispose.ts +0 -27
  236. package/src/packages/en3/utils/traverseMaterials.ts +0 -10
  237. package/src/packages/en3/utils/traverseMeshes.ts +0 -9
  238. package/src/packages/image/index.ts +0 -19
  239. package/src/packages/intersector/index.ts +0 -83
  240. package/src/packages/ladder/index.ts +0 -112
  241. package/src/packages/layout-box/index.ts +0 -417
  242. package/src/packages/loading/index.ts +0 -131
  243. package/src/packages/measurer/CumulativeOffsetLeft.ts +0 -8
  244. package/src/packages/measurer/CumulativeOffsetTop.ts +0 -8
  245. package/src/packages/measurer/Meaurer.ts +0 -38
  246. package/src/packages/measurer/index.ts +0 -3
  247. package/src/packages/media/index.ts +0 -38
  248. package/src/packages/morph/Link.ts +0 -32
  249. package/src/packages/morph/Morph.ts +0 -246
  250. package/src/packages/morph/index.ts +0 -10
  251. package/src/packages/notifier/index.ts +0 -41
  252. package/src/packages/order/index.ts +0 -14
  253. package/src/packages/resizer/index.ts +0 -55
  254. package/src/packages/router/Link.ts +0 -33
  255. package/src/packages/router/Route.ts +0 -152
  256. package/src/packages/router/RouteElement.ts +0 -34
  257. package/src/packages/router/Router.ts +0 -190
  258. package/src/packages/router/index.ts +0 -13
  259. package/src/packages/scroll/ScrollElement.ts +0 -618
  260. package/src/packages/scroll/ScrollUserElement.ts +0 -21
  261. package/src/packages/scroll/ScrollbarElement.ts +0 -170
  262. package/src/packages/scroll/index.ts +0 -2
  263. package/src/packages/scroll-entries/index.ts +0 -74
  264. package/src/packages/source/SourceClass.ts +0 -77
  265. package/src/packages/source/SourceElement.ts +0 -177
  266. package/src/packages/source/SourceManager.ts +0 -61
  267. package/src/packages/source/SourceSet.ts +0 -52
  268. package/src/packages/source/index.ts +0 -8
  269. package/src/packages/store/Composed.ts +0 -33
  270. package/src/packages/store/Derived.ts +0 -24
  271. package/src/packages/store/DerivedArray.ts +0 -36
  272. package/src/packages/store/Resource.ts +0 -38
  273. package/src/packages/store/Store.ts +0 -144
  274. package/src/packages/store/StoreRegistry.ts +0 -105
  275. package/src/packages/store/index.ts +0 -23
  276. package/src/packages/ticker/index.ts +0 -173
  277. package/src/packages/utils/array.ts +0 -3
  278. package/src/packages/utils/attributes.ts +0 -19
  279. package/src/packages/utils/browser.ts +0 -2
  280. package/src/packages/utils/canvas.ts +0 -46
  281. package/src/packages/utils/collisions.ts +0 -12
  282. package/src/packages/utils/coordinates.ts +0 -40
  283. package/src/packages/utils/decoding.ts +0 -11
  284. package/src/packages/utils/dev.ts +0 -5
  285. package/src/packages/utils/dom.ts +0 -48
  286. package/src/packages/utils/easings.ts +0 -69
  287. package/src/packages/utils/file.ts +0 -17
  288. package/src/packages/utils/function.ts +0 -29
  289. package/src/packages/utils/index.ts +0 -61
  290. package/src/packages/utils/layout.ts +0 -22
  291. package/src/packages/utils/math.ts +0 -74
  292. package/src/packages/utils/number.ts +0 -26
  293. package/src/packages/utils/object.ts +0 -108
  294. package/src/packages/utils/string.ts +0 -49
  295. package/src/packages/utils/ts-shape.ts +0 -25
  296. package/src/packages/utils/ts-utility.ts +0 -47
  297. package/src/packages/video/index.ts +0 -39
  298. package/src/playground/index.ts +0 -0
  299. package/tsconfig.json +0 -31
  300. package/vite.config.ts +0 -78
@@ -0,0 +1,182 @@
1
+ var st = Object.defineProperty;
2
+ var V = (i, t) => (t = Symbol[i]) ? t : Symbol.for("Symbol." + i);
3
+ var ot = (i, t, e) => t in i ? st(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
4
+ var j = (i, t, e) => (ot(i, typeof t != "symbol" ? t + "" : t, e), e), z = (i, t, e) => {
5
+ if (!t.has(i))
6
+ throw TypeError("Cannot " + e);
7
+ };
8
+ var s = (i, t, e) => (z(i, t, "read from private field"), e ? e.call(i) : t.get(i)), o = (i, t, e) => {
9
+ if (t.has(i))
10
+ throw TypeError("Cannot add the same private member more than once");
11
+ t instanceof WeakSet ? t.add(i) : t.set(i, e);
12
+ }, r = (i, t, e, n) => (z(i, t, "write to private field"), n ? n.call(i, e) : t.set(i, e), e);
13
+ var d = (i, t, e) => (z(i, t, "access private method"), e);
14
+ var F = (i, t, e) => new Promise((n, h) => {
15
+ var u = (l) => {
16
+ try {
17
+ g(e.next(l));
18
+ } catch (w) {
19
+ h(w);
20
+ }
21
+ }, L = (l) => {
22
+ try {
23
+ g(e.throw(l));
24
+ } catch (w) {
25
+ h(w);
26
+ }
27
+ }, g = (l) => l.done ? n(l.value) : Promise.resolve(l.value).then(u, L);
28
+ g((e = e.apply(i, t)).next());
29
+ });
30
+ var X = (i, t, e) => (t = i[V("asyncIterator")]) ? t.call(i) : (i = i[V("iterator")](), t = {}, e = (n, h) => (h = i[n]) && (t[n] = (u) => new Promise((L, g, l) => (u = h.call(i, u), l = u.done, Promise.resolve(u.value).then((w) => L({ value: w, done: l }), g)))), e("next"), e("return"), t);
31
+ import { Notifier as Z } from "../notifier/index.js";
32
+ import { i as nt } from "../browser-S4eq8AeN.js";
33
+ var M, f, y, T, N;
34
+ class rt {
35
+ constructor(t, e) {
36
+ o(this, M, void 0);
37
+ o(this, f, void 0);
38
+ o(this, y, void 0);
39
+ o(this, T, void 0);
40
+ o(this, N, (t) => {
41
+ t.preventDefault(), s(this, M).navigate(s(this, y), s(this, T));
42
+ });
43
+ r(this, M, e), r(this, f, t), r(this, y, s(this, f).getAttribute("href") || "/"), r(this, T, s(this, f).getAttribute("data-history-action") || "push"), s(this, f).addEventListener("click", s(this, N)), s(this, y) === location.pathname && s(this, f).classList.add("current");
44
+ }
45
+ destroy() {
46
+ s(this, f).removeEventListener("click", s(this, N)), s(this, f).classList.remove("current");
47
+ }
48
+ }
49
+ M = new WeakMap(), f = new WeakMap(), y = new WeakMap(), T = new WeakMap(), N = new WeakMap();
50
+ var a, P, S, k, C, q, b, E, H, A, x, I, _, O, $, D, G, m, J, B, p, R, Q, K;
51
+ class ut {
52
+ constructor(t) {
53
+ o(this, I);
54
+ o(this, O);
55
+ o(this, D);
56
+ o(this, m);
57
+ o(this, B);
58
+ o(this, R);
59
+ o(this, a, null);
60
+ o(this, P, null);
61
+ o(this, S, null);
62
+ o(this, k, null);
63
+ o(this, C, []);
64
+ o(this, q, new DOMParser());
65
+ o(this, b, /* @__PURE__ */ new Map());
66
+ o(this, E, void 0);
67
+ o(this, H, null);
68
+ j(this, "preprocessor");
69
+ j(this, "postprocessor");
70
+ o(this, A, new Z());
71
+ o(this, x, new Z());
72
+ o(this, K, (t) => {
73
+ t.state && this.navigate(t.state, "none");
74
+ });
75
+ nt && (r(this, a, (t == null ? void 0 : t.base) || "/"), t != null && t.base ? (r(this, a, t.base), t.base.endsWith("/") || r(this, a, s(this, a) + "/")) : r(this, a, "/"), r(this, P, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), r(this, S, (t == null ? void 0 : t.cachePages) !== !1), r(this, k, d(this, m, J).call(this, document)), r(this, H, location.pathname), d(this, D, G).call(this), addEventListener("popstate", s(this, K)));
76
+ }
77
+ beforeNavigationEvent(t) {
78
+ return s(this, A).subscribe(t);
79
+ }
80
+ afterNavigationEvent(t) {
81
+ return s(this, x).subscribe(t);
82
+ }
83
+ navigate(t, e = "push") {
84
+ return F(this, null, function* () {
85
+ var h;
86
+ if (t = d(this, O, $).call(this, t), s(this, E) === t || s(this, H) === t)
87
+ return;
88
+ r(this, E, t);
89
+ const n = s(this, b).has(t);
90
+ try {
91
+ let u = !0;
92
+ if (this.preprocessor)
93
+ try {
94
+ yield new Promise((c, v) => {
95
+ var W;
96
+ (W = this.preprocessor) == null || W.call(this, { pathname: t, resolve: c, reject: v, isCached: n });
97
+ });
98
+ } catch (c) {
99
+ c ? console.error(c) : console.log("Route change canceled"), u = !1;
100
+ }
101
+ if (s(this, A).notify({
102
+ pathname: t,
103
+ isCached: n
104
+ }), !u || s(this, E) !== t)
105
+ return;
106
+ const L = yield d(this, I, _).call(this, t);
107
+ if (s(this, S) && s(this, b).set(t, L), s(this, E) !== t)
108
+ return;
109
+ const g = Array.from(document.head.children), l = Array.from(L.head.cloneNode(!0).children), w = d(this, B, p).call(this, g, l), tt = d(this, R, Q).call(this, g, w), U = d(this, R, Q).call(this, l, w);
110
+ tt.forEach((c) => c.remove()), U.forEach((c) => document.head.appendChild(c));
111
+ const Y = U.filter(
112
+ (c) => c.tagName === "STYLE" || c.tagName === "SCRIPT" || c.tagName === "LINK"
113
+ );
114
+ s(this, P) && Y.length && (yield new Promise((c) => F(this, null, function* () {
115
+ let v = 0;
116
+ try {
117
+ for (var W = X(Y), at, gt, wt; at = !(gt = yield W.next()).done; at = !1) {
118
+ const it = gt.value;
119
+ it.onload = () => {
120
+ v++, v === Y.length && c();
121
+ };
122
+ }
123
+ } catch (gt) {
124
+ wt = [gt];
125
+ } finally {
126
+ try {
127
+ at && (gt = W.return) && (yield gt.call(W));
128
+ } finally {
129
+ if (wt)
130
+ throw wt[0];
131
+ }
132
+ }
133
+ })));
134
+ const et = d(this, m, J).call(this, L);
135
+ s(this, k).forEach((c, v) => {
136
+ const W = et[v];
137
+ c.innerHTML = W.innerHTML;
138
+ }), r(this, H, t), e === "push" ? history.pushState(t, "", t + location.search) : e === "replace" && history.replaceState(t, "", t + location.search), d(this, D, G).call(this), (h = this.postprocessor) == null || h.call(this, { pathname: t, isCached: n }), s(this, x).notify({ pathname: t, isCached: n });
139
+ } catch (u) {
140
+ console.error(u);
141
+ }
142
+ r(this, E, void 0);
143
+ });
144
+ }
145
+ }
146
+ a = new WeakMap(), P = new WeakMap(), S = new WeakMap(), k = new WeakMap(), C = new WeakMap(), q = new WeakMap(), b = new WeakMap(), E = new WeakMap(), H = new WeakMap(), A = new WeakMap(), x = new WeakMap(), I = new WeakSet(), _ = function(t) {
147
+ return F(this, null, function* () {
148
+ const e = s(this, b).get(t);
149
+ if (e)
150
+ return e;
151
+ const h = yield (yield fetch(t)).text();
152
+ return s(this, q).parseFromString(h, "text/html");
153
+ });
154
+ }, O = new WeakSet(), $ = function(t) {
155
+ return t = t.replace(s(this, a), ""), t.startsWith("/") && (t = t.slice(1)), s(this, a) + t;
156
+ }, D = new WeakSet(), G = function() {
157
+ const t = [...document.documentElement.querySelectorAll("a")].filter(
158
+ (e) => {
159
+ var n;
160
+ return (n = e.getAttribute("href")) == null ? void 0 : n.startsWith("/");
161
+ }
162
+ );
163
+ s(this, C).forEach((e) => e.destroy()), r(this, C, t.map((e) => new rt(e, this)));
164
+ }, m = new WeakSet(), J = function(t) {
165
+ const e = t.querySelectorAll("[data-morph]");
166
+ return e.length ? [...e] : [t.body];
167
+ }, B = new WeakSet(), p = function(t, e) {
168
+ return t.filter(
169
+ (n) => e.find(
170
+ (h) => h.outerHTML === n.outerHTML
171
+ )
172
+ );
173
+ }, R = new WeakSet(), Q = function(t, e) {
174
+ return t.filter(
175
+ (n) => !e.find(
176
+ (h) => h.outerHTML === n.outerHTML
177
+ )
178
+ );
179
+ }, K = new WeakMap();
180
+ export {
181
+ ut as Morph
182
+ };
@@ -0,0 +1 @@
1
+ "use strict";var u=(r,s,i)=>{if(!s.has(r))throw TypeError("Cannot "+i)};var o=(r,s,i)=>(u(r,s,"read from private field"),i?i.call(r):s.get(r)),c=(r,s,i)=>{if(s.has(r))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(r):s.set(r,i)},b=(r,s,i,e)=>(u(r,s,"write to private field"),e?e.call(r,i):s.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t;class f{constructor(){c(this,t,[])}close(){b(this,t,[])}subscribe(s,i=0){return o(this,t).find(e=>e.callback===s)?()=>{}:(o(this,t).push({callback:s,order:i}),b(this,t,o(this,t).sort((e,h)=>e.order-h.order)),()=>{this.unsubscribe(s)})}unsubscribe(s){b(this,t,o(this,t).filter(i=>i.callback!==s))}notify(...s){for(const i of o(this,t))i.callback(...s)}}t=new WeakMap;exports.Notifier=f;
@@ -0,0 +1,8 @@
1
+ export type ProviderCallback = (...args: any[]) => void;
2
+ export declare class Notifier<Callback extends ProviderCallback = ProviderCallback> {
3
+ #private;
4
+ close(): void;
5
+ subscribe(callback: Callback, order?: number): () => void;
6
+ unsubscribe(callback: Callback): void;
7
+ notify(...parameters: Parameters<Callback>): void;
8
+ }
@@ -0,0 +1,38 @@
1
+ var h = (r, s, i) => {
2
+ if (!s.has(r))
3
+ throw TypeError("Cannot " + i);
4
+ };
5
+ var b = (r, s, i) => (h(r, s, "read from private field"), i ? i.call(r) : s.get(r)), o = (r, s, i) => {
6
+ if (s.has(r))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ s instanceof WeakSet ? s.add(r) : s.set(r, i);
9
+ }, c = (r, s, i, e) => (h(r, s, "write to private field"), e ? e.call(r, i) : s.set(r, i), i);
10
+ var t;
11
+ class n {
12
+ constructor() {
13
+ o(this, t, []);
14
+ }
15
+ close() {
16
+ c(this, t, []);
17
+ }
18
+ subscribe(s, i = 0) {
19
+ return b(this, t).find((e) => e.callback === s) ? () => {
20
+ } : (b(this, t).push({
21
+ callback: s,
22
+ order: i
23
+ }), c(this, t, b(this, t).sort((e, u) => e.order - u.order)), () => {
24
+ this.unsubscribe(s);
25
+ });
26
+ }
27
+ unsubscribe(s) {
28
+ c(this, t, b(this, t).filter((i) => i.callback !== s));
29
+ }
30
+ notify(...s) {
31
+ for (const i of b(this, t))
32
+ i.callback(...s);
33
+ }
34
+ }
35
+ t = new WeakMap();
36
+ export {
37
+ n as Notifier
38
+ };
@@ -0,0 +1 @@
1
+ "use strict";const o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10];function i(n,e=5){return(.5+n*o[e]<<0)/o[e]}function a(n,e){return Math.round(n/e)*e}function d(n,e="abcdefghijklmnopqrstuvwxyz0123456789"){const u=e.length,c=crypto.getRandomValues(new Uint8Array(n));let r="";for(let t=0;t<n;t++)r+=e.charAt(c[t]%u);return r}exports.fix=i;exports.generateId=d;exports.roundTo=a;
@@ -0,0 +1,31 @@
1
+ const o = [
2
+ 1,
3
+ 10,
4
+ 100,
5
+ 1e3,
6
+ 1e4,
7
+ 1e5,
8
+ 1e6,
9
+ 1e7,
10
+ 1e8,
11
+ 1e9,
12
+ 1e10
13
+ ];
14
+ function u(n, e = 5) {
15
+ return (0.5 + n * o[e] << 0) / o[e];
16
+ }
17
+ function i(n, e) {
18
+ return Math.round(n / e) * e;
19
+ }
20
+ function s(n, e = "abcdefghijklmnopqrstuvwxyz0123456789") {
21
+ const a = e.length, c = crypto.getRandomValues(new Uint8Array(n));
22
+ let r = "";
23
+ for (let t = 0; t < n; t++)
24
+ r += e.charAt(c[t] % a);
25
+ return r;
26
+ }
27
+ export {
28
+ u as f,
29
+ s as g,
30
+ i as r
31
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var L=(e=>(e[e.DEVICE=-1e5]="DEVICE",e[e.MEDIA=-99999]="MEDIA",e[e.SOURCE_MANAGER=-99998]="SOURCE_MANAGER",e[e.SCROLL=-99997]="SCROLL",e[e.LAYOUT_BOX=-99996]="LAYOUT_BOX",e[e.EN3=1e5]="EN3",e))(L||{}),r=(e=>(e[e.SCROLL=-1e5]="SCROLL",e[e.LAYOUT_BOX=-99999]="LAYOUT_BOX",e[e.EN3=1e5]="EN3",e))(r||{});exports.RESIZE_ORDER=L;exports.TICK_ORDER=r;
@@ -0,0 +1,13 @@
1
+ export declare enum RESIZE_ORDER {
2
+ DEVICE = -100000,
3
+ MEDIA = -99999,
4
+ SOURCE_MANAGER = -99998,
5
+ SCROLL = -99997,
6
+ LAYOUT_BOX = -99996,
7
+ EN3 = 100000
8
+ }
9
+ export declare enum TICK_ORDER {
10
+ SCROLL = -100000,
11
+ LAYOUT_BOX = -99999,
12
+ EN3 = 100000
13
+ }
@@ -0,0 +1,5 @@
1
+ var A = /* @__PURE__ */ ((L) => (L[L.DEVICE = -1e5] = "DEVICE", L[L.MEDIA = -99999] = "MEDIA", L[L.SOURCE_MANAGER = -99998] = "SOURCE_MANAGER", L[L.SCROLL = -99997] = "SCROLL", L[L.LAYOUT_BOX = -99996] = "LAYOUT_BOX", L[L.EN3 = 1e5] = "EN3", L))(A || {}), e = /* @__PURE__ */ ((L) => (L[L.SCROLL = -1e5] = "SCROLL", L[L.LAYOUT_BOX = -99999] = "LAYOUT_BOX", L[L.EN3 = 1e5] = "EN3", L))(e || {});
2
+ export {
3
+ A as RESIZE_ORDER,
4
+ e as TICK_ORDER
5
+ };
@@ -0,0 +1 @@
1
+ "use strict";var h=(e,s,i)=>{if(!s.has(e))throw TypeError("Cannot "+i)};var r=(e,s,i)=>(h(e,s,"read from private field"),i?i.call(e):s.get(e)),u=(e,s,i)=>{if(s.has(e))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(e):s.set(e,i)},d=(e,s,i,o)=>(h(e,s,"write to private field"),o?o.call(e,i):s.set(e,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../notifier/index.cjs"),w=require("../browser-QbF6EW-w.cjs"),f=require("../function-QP7IreXR.cjs"),a=f.debounce(e=>{e?window.dispatchEvent(new CustomEvent("resize",{detail:{cause:e}})):window.dispatchEvent(new Event("resize"))},0);var t,n,c;class v extends b.Notifier{constructor(){super();u(this,t,!1);u(this,n,()=>{r(this,t)||(d(this,t,!0),r(this,c).call(this))});u(this,c,f.debounce(()=>{this.notify(),d(this,t,!1)},0));w.isBrowser&&(addEventListener("resize",r(this,n)),r(this,n).call(this))}subscribe(i,o){const z=super.subscribe(i,o);return r(this,t)||i(),z}}t=new WeakMap,n=new WeakMap,c=new WeakMap;const l=new v;exports.dispatchResizeEvent=a;exports.resizer=l;
@@ -0,0 +1,10 @@
1
+ import { Notifier } from '../notifier';
2
+ export type ResizerCallback = () => void;
3
+ export declare const dispatchResizeEvent: (cause?: any) => void;
4
+ declare class Resizer extends Notifier<ResizerCallback> {
5
+ #private;
6
+ constructor();
7
+ subscribe(callback: ResizerCallback, order?: number): () => void;
8
+ }
9
+ export declare const resizer: Resizer;
10
+ export {};
@@ -0,0 +1,45 @@
1
+ var u = (e, s, i) => {
2
+ if (!s.has(e))
3
+ throw TypeError("Cannot " + i);
4
+ };
5
+ var r = (e, s, i) => (u(e, s, "read from private field"), i ? i.call(e) : s.get(e)), d = (e, s, i) => {
6
+ if (s.has(e))
7
+ throw TypeError("Cannot add the same private member more than once");
8
+ s instanceof WeakSet ? s.add(e) : s.set(e, i);
9
+ }, f = (e, s, i, o) => (u(e, s, "write to private field"), o ? o.call(e, i) : s.set(e, i), i);
10
+ import { Notifier as z } from "../notifier/index.js";
11
+ import { i as w } from "../browser-S4eq8AeN.js";
12
+ import { d as c } from "../function-zwSFehNd.js";
13
+ const l = c((e) => {
14
+ e ? window.dispatchEvent(
15
+ new CustomEvent("resize", {
16
+ detail: {
17
+ cause: e
18
+ }
19
+ })
20
+ ) : window.dispatchEvent(new Event("resize"));
21
+ }, 0);
22
+ var t, n, h;
23
+ class a extends z {
24
+ constructor() {
25
+ super();
26
+ d(this, t, !1);
27
+ d(this, n, () => {
28
+ r(this, t) || (f(this, t, !0), r(this, h).call(this));
29
+ });
30
+ d(this, h, c(() => {
31
+ this.notify(), f(this, t, !1);
32
+ }, 0));
33
+ w && (addEventListener("resize", r(this, n)), r(this, n).call(this));
34
+ }
35
+ subscribe(i, o) {
36
+ const p = super.subscribe(i, o);
37
+ return r(this, t) || i(), p;
38
+ }
39
+ }
40
+ t = new WeakMap(), n = new WeakMap(), h = new WeakMap();
41
+ const R = new a();
42
+ export {
43
+ l as dispatchResizeEvent,
44
+ R as resizer
45
+ };
@@ -0,0 +1,6 @@
1
+ import { Router } from './Router';
2
+ export declare class Link {
3
+ #private;
4
+ constructor(router: Router, element: HTMLElement);
5
+ destroy(): void;
6
+ }
@@ -0,0 +1,15 @@
1
+ import { RouteElement } from './RouteElement';
2
+ export type RouteModule = () => Promise<any>;
3
+ export declare class Route {
4
+ #private;
5
+ constructor(pattern: string, module: RouteModule);
6
+ get pattern(): string;
7
+ get urlPattern(): URLPattern;
8
+ get isActive(): boolean;
9
+ get element(): RouteElement<string, string> | null;
10
+ get outlet(): HTMLElement | ShadowRoot | null;
11
+ testPathname(pathname: string): boolean;
12
+ render(containerElement: HTMLElement | ShadowRoot, pathname: string): Promise<void>;
13
+ close(): void;
14
+ getAnchorElements(): HTMLAnchorElement[];
15
+ }
@@ -0,0 +1,14 @@
1
+ import { CustomElement } from '../custom-element';
2
+ export type RouteURLParams<T extends string = string> = Partial<{
3
+ [key in T]: string;
4
+ }>;
5
+ export type RouteParameters<PathnameParams extends string = string, SearchParams extends string = string> = {
6
+ pathnameParams: RouteURLParams<PathnameParams>;
7
+ searchParams: RouteURLParams<SearchParams>;
8
+ };
9
+ export declare class RouteElement<PathnameParams extends string = string, SearchParams extends string = string> extends CustomElement {
10
+ #private;
11
+ constructor(parameters: RouteParameters<PathnameParams, SearchParams>);
12
+ get pathnameParams(): Partial<{ [key in PathnameParams]: string; }>;
13
+ get searchParams(): Partial<{ [key in SearchParams]: string; }>;
14
+ }
@@ -0,0 +1,33 @@
1
+ import { Route, RouteModule } from './Route';
2
+ export interface RouterPreprocessorEntry {
3
+ pathname: string;
4
+ resolve: () => void;
5
+ reject: () => void;
6
+ }
7
+ export type RouterPreprocessor = (entry: RouterPreprocessorEntry) => void;
8
+ export interface RouterPostprocessorEntry {
9
+ pathname: string;
10
+ }
11
+ export type RouterPostprocessor = (entry: RouterPostprocessorEntry) => void;
12
+ export interface RouterAfterNavigationEntry {
13
+ pathname: string;
14
+ }
15
+ export type RouterAfterNavigationCallback = (entry: RouterAfterNavigationEntry) => void;
16
+ export type RouterHistoryAction = 'push' | 'replace' | 'none';
17
+ export interface RouterParameters {
18
+ rootElement?: HTMLElement;
19
+ base?: string;
20
+ }
21
+ export declare class Router {
22
+ #private;
23
+ static active: Router;
24
+ preprocessor?: RouterPreprocessor;
25
+ postprocessor?: RouterPostprocessor;
26
+ constructor(parameters?: RouterParameters);
27
+ get currentPathname(): string;
28
+ get candidatePathname(): string | undefined;
29
+ get routes(): Route[];
30
+ navigationEvent(callback: RouterAfterNavigationCallback): () => void;
31
+ defineRoute(pattern: string, module: RouteModule): void;
32
+ navigate(pathname: string, action?: RouterHistoryAction): Promise<void>;
33
+ }
@@ -0,0 +1 @@
1
+ "use strict";var it=Object.defineProperty;var $=(i,t)=>(t=Symbol[i])?t:Symbol.for("Symbol."+i);var rt=(i,t,s)=>t in i?it(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var K=(i,t,s)=>(rt(i,typeof t!="symbol"?t+"":t,s),s),J=(i,t,s)=>{if(!t.has(i))throw TypeError("Cannot "+s)};var e=(i,t,s)=>(J(i,t,"read from private field"),s?s.call(i):t.get(i)),n=(i,t,s)=>{if(t.has(i))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(i):t.set(i,s)},o=(i,t,s,r)=>(J(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s);var Q=(i,t,s)=>(J(i,t,"access private method"),s);var W=(i,t,s)=>new Promise((r,l)=>{var a=d=>{try{f(s.next(d))}catch(T){l(T)}},u=d=>{try{f(s.throw(d))}catch(T){l(T)}},f=d=>d.done?r(d.value):Promise.resolve(d.value).then(a,u);f((s=s.apply(i,t)).next())});var V=(i,t,s)=>(t=i[$("asyncIterator")])?t.call(i):(i=i[$("iterator")](),t={},s=(r,l)=>(l=i[r])&&(t[r]=a=>new Promise((u,f,d)=>(a=l.call(i,a),d=a.done,Promise.resolve(a.value).then(T=>u({value:T,done:d}),f)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const nt=require("urlpattern-polyfill"),ot=require("../notifier/index.cjs"),tt=require("../browser-QbF6EW-w.cjs"),at=require("../function-QP7IreXR.cjs"),ht=require("../custom-element/index.cjs");var R,x,b,m,c,P,S,w,v,E,Y,et;class ct{constructor(t,s){n(this,Y);n(this,R,void 0);n(this,x,void 0);n(this,b,void 0);n(this,m,void 0);n(this,c,void 0);n(this,P,void 0);n(this,S,void 0);n(this,w,null);n(this,v,[]);n(this,E,[]);o(this,R,t),o(this,x,s),o(this,b,new URLPattern({pathname:e(this,R)})),o(this,m,null),o(this,c,null),o(this,P,!1),o(this,S,null),tt.isBrowser&&o(this,w,new MutationObserver(r=>{r[0].addedNodes.forEach(a=>{e(this,m)?e(this,E).push(a):e(this,v).push(a)})}))}get pattern(){return e(this,R)}get urlPattern(){return e(this,b)}get isActive(){return e(this,P)}get element(){return e(this,c)}get outlet(){return e(this,S)}testPathname(t){return this.urlPattern.test({pathname:t})}render(t,s){return W(this,null,function*(){var r,l;if(e(this,w).observe(document.head,{childList:!0,subtree:!0}),e(this,m))e(this,v).forEach(a=>{document.head.appendChild(a)});else{const a=yield e(this,x).call(this);o(this,E,[...e(this,v)]),typeof a.default=="function"&&(o(this,m,a.default),customElements.define("e-"+((r=e(this,m))==null?void 0:r.name.toLowerCase()),a.default))}if(yield Q(this,Y,et).call(this),e(this,m)){const a=e(this,b).exec({pathname:s}),u=(a==null?void 0:a.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),d={pathnameParams:u,searchParams:f};o(this,c,new(e(this,m))(d)),t.appendChild(e(this,c)),o(this,S,e(this,c).querySelector("[data-outlet]")||((l=e(this,c).shadowRoot)==null?void 0:l.querySelector("[data-outlet]"))||e(this,c).shadowRoot||e(this,c)),o(this,P,!0)}e(this,w).disconnect()})}close(){var t;e(this,w).disconnect(),(t=e(this,c))==null||t.remove(),o(this,P,!1),e(this,E).forEach(s=>document.head.removeChild(s)),o(this,E,[])}getAnchorElements(){var s;let t=[];return e(this,c)&&(t=[...e(this,c).querySelectorAll("a")]),(s=e(this,c))!=null&&s.shadowRoot&&(t=[...t,...e(this,c).shadowRoot.querySelectorAll("a")]),t}}R=new WeakMap,x=new WeakMap,b=new WeakMap,m=new WeakMap,c=new WeakMap,P=new WeakMap,S=new WeakMap,w=new WeakMap,v=new WeakMap,E=new WeakMap,Y=new WeakSet,et=function(){return W(this,null,function*(){const t=e(this,v).filter(u=>u instanceof HTMLElement?u.tagName==="STYLE"||u.tagName==="SCRIPT"||u.tagName==="LINK":!1);try{for(var s=V(t),r,l,a;r=!(l=yield s.next()).done;r=!1){const u=l.value;yield new Promise(f=>{u.onload=()=>{f()}})}}catch(l){a=[l]}finally{try{r&&(l=s.return)&&(yield l.call(s))}finally{if(a)throw a[0]}}})};var H,g,A,U,M;class lt{constructor(t,s){n(this,H,void 0);n(this,g,void 0);n(this,A,void 0);n(this,U,void 0);n(this,M,t=>{t.preventDefault(),e(this,H).navigate(e(this,A),e(this,U))});o(this,H,t),o(this,g,s),o(this,A,e(this,g).getAttribute("href")||"/"),o(this,U,e(this,g).getAttribute("data-history-action")||"push"),e(this,g).addEventListener("click",e(this,M)),location.pathname===e(this,A)&&e(this,g).classList.add("current")}destroy(){e(this,g).removeEventListener("click",e(this,M)),e(this,g).classList.remove("current")}}H=new WeakMap,g=new WeakMap,A=new WeakMap,U=new WeakMap,M=new WeakMap;globalThis.URLPattern=nt.URLPattern;var k,q,p,N,j,y,C,B,z,F,st,G;const O=class O{constructor(t){n(this,F);n(this,k,null);n(this,q,void 0);n(this,p,[]);n(this,N,null);n(this,j,[]);n(this,y,void 0);n(this,C,null);n(this,B,new ot.Notifier);K(this,"preprocessor");K(this,"postprocessor");n(this,z,at.debounce(()=>{const t=s=>s.split("/").length;o(this,p,e(this,p).sort((s,r)=>t(s.pattern)-t(r.pattern))),this.navigate(location.pathname.replace(e(this,q),""))},0));n(this,G,t=>{t.state&&this.navigate(t.state,"none")});o(this,q,(t==null?void 0:t.base)||""),O.active=this,tt.isBrowser&&(o(this,k,(t==null?void 0:t.rootElement)||document.body),addEventListener("popstate",e(this,G)))}get currentPathname(){return e(this,C)}get candidatePathname(){return e(this,y)}get routes(){return e(this,p)}navigationEvent(t){return e(this,B).subscribe(t)}defineRoute(t,s){const r=new ct(t,s);e(this,p).push(r),e(this,z).call(this)}navigate(t,s="push"){return W(this,null,function*(){var d,Z;if(e(this,y)===t||e(this,C)===t)return;O.active=this,o(this,y,t);const r=e(this,p).filter(h=>h.isActive),l=e(this,p).filter(h=>!r.includes(h)&&h.testPathname(t)),a=r.filter(h=>!h.testPathname(t)),u=r.filter(h=>h.testPathname(t));let f=!0;if(this.preprocessor)try{yield new Promise((h,L)=>{var _;(_=this.preprocessor)==null||_.call(this,{pathname:t,resolve:h,reject:L})})}catch(h){h?console.error(h):console.log("Route change canceled"),f=!1}if(f&&e(this,y)===t){o(this,N,u[u.length-1]),a.forEach(L=>{L.close()}),o(this,C,t);try{for(var T=V(l),mt,gt,pt;mt=!(gt=yield T.next()).done;mt=!1){const L=gt.value;yield L.render(((d=e(this,N))==null?void 0:d.outlet)||e(this,k),t),o(this,N,L)}}catch(gt){pt=[gt]}finally{try{mt&&(gt=T.return)&&(yield gt.call(T))}finally{if(pt)throw pt[0]}}const h=e(this,q)+t+location.search;s==="push"?history.pushState(h,"",h):s==="replace"&&history.replaceState(h,"",h),Q(this,F,st).call(this),(Z=this.postprocessor)==null||Z.call(this,{pathname:t}),e(this,B).notify({pathname:t})}})}};k=new WeakMap,q=new WeakMap,p=new WeakMap,N=new WeakMap,j=new WeakMap,y=new WeakMap,C=new WeakMap,B=new WeakMap,z=new WeakMap,F=new WeakSet,st=function(){const t=e(this,p).filter(r=>r.isActive),s=Array.from(new Set([...e(this,k).querySelectorAll("a"),...t.map(r=>r.getAnchorElements()).flat()].filter(r=>{var l;return(l=r.getAttribute("href"))==null?void 0:l.startsWith("/")})));e(this,j).forEach(r=>{r.destroy()}),o(this,j,s.map(r=>new lt(this,r)))},G=new WeakMap,K(O,"active");let X=O;var I,D;class ut extends ht.CustomElement{constructor(s){super();n(this,I,void 0);n(this,D,void 0);o(this,I,s.pathnameParams),o(this,D,s.searchParams)}get pathnameParams(){return e(this,I)}get searchParams(){return e(this,D)}}I=new WeakMap,D=new WeakMap;exports.RouteElement=ut;exports.Router=X;
@@ -0,0 +1,3 @@
1
+ export { Router, type RouterPreprocessorEntry, type RouterPreprocessor, type RouterPostprocessor, type RouterAfterNavigationCallback, type RouterHistoryAction, type RouterParameters, } from './Router';
2
+ export { RouteElement, type RouteParameters, type RouteURLParams } from './RouteElement';
3
+ export { type RouteModule } from './Route';