aptechka 0.83.0 → 0.84.0

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 (276) hide show
  1. package/lib/Animation-BAiM6_n1.js +111 -0
  2. package/lib/Animation-DMWabSR0.cjs +1 -0
  3. package/lib/Composed-B0fvCtZz.cjs +1 -0
  4. package/lib/Composed-CgA9lLWA.js +75 -0
  5. package/lib/Damped-BLo-OAVb.cjs +1 -0
  6. package/lib/Damped-Dcz5UdMH.js +57 -0
  7. package/lib/DerivedArray-DFhxap_z.js +63 -0
  8. package/lib/DerivedArray-DYtWMW0n.cjs +1 -0
  9. package/lib/DragControls-BPHsDeH6.cjs +1 -0
  10. package/lib/DragControls-D2a1Cifp.js +234 -0
  11. package/lib/LocalLinks-BWFJYhGX.cjs +1 -0
  12. package/lib/LocalLinks-Dwgf3No6.js +65 -0
  13. package/lib/PageAnnouncerElement-DPMlVJZG.cjs +1 -0
  14. package/lib/PageAnnouncerElement-DV9pm_od.js +28 -0
  15. package/lib/PageScroll-BAatKJx6.cjs +1 -0
  16. package/lib/PageScroll-m3TsHnzR.js +65 -0
  17. package/lib/SourceElement-941MrYpq.js +265 -0
  18. package/lib/SourceElement-DBLZ7b5k.cjs +5 -0
  19. package/lib/Store-BCW70G3Z.cjs +1 -0
  20. package/lib/Store-uLDYY9ed.js +158 -0
  21. package/lib/Tweened-BvtjLCa3.js +48 -0
  22. package/lib/Tweened-DdXm1dbF.cjs +1 -0
  23. package/lib/Viewport-BiDoiU8M.js +113 -0
  24. package/lib/Viewport-CXGKUyDy.cjs +1 -0
  25. package/lib/accordion/index.cjs +1 -1
  26. package/lib/accordion/index.js +97 -93
  27. package/lib/animation/index.cjs +1 -1
  28. package/lib/animation/index.js +6 -6
  29. package/lib/api-fetcher/index.cjs +1 -1
  30. package/lib/api-fetcher/index.js +67 -66
  31. package/lib/attribute/index.cjs +1 -1
  32. package/lib/attribute/index.js +37 -34
  33. package/lib/attributes-BADnRZpK.cjs +1 -0
  34. package/lib/attributes-FObgMNCf.js +36 -0
  35. package/lib/billboard/index.cjs +1 -1
  36. package/lib/billboard/index.js +240 -232
  37. package/lib/cache/index.cjs +1 -1
  38. package/lib/cache/index.js +26 -23
  39. package/lib/canvas/index.cjs +1 -1
  40. package/lib/canvas/index.js +62 -59
  41. package/lib/canvas-BP1ceie3.cjs +1 -0
  42. package/lib/canvas-DsglKco1.js +40 -0
  43. package/lib/connector/index.cjs +1 -1
  44. package/lib/connector/index.js +44 -41
  45. package/lib/controls/index.cjs +1 -1
  46. package/lib/controls/index.js +6 -6
  47. package/lib/coordinates--JG1U6kQ.js +29 -0
  48. package/lib/coordinates-DQ9XV9M1.cjs +1 -0
  49. package/lib/css-property/index.cjs +1 -1
  50. package/lib/css-property/index.d.ts +1 -1
  51. package/lib/css-property/index.js +40 -37
  52. package/lib/css-unit-parser/index.cjs +2 -2
  53. package/lib/css-unit-parser/index.js +22 -19
  54. package/lib/css-value-parser/index.cjs +1 -1
  55. package/lib/css-value-parser/index.js +13 -11
  56. package/lib/custom-elements-BfZCJde6.cjs +1 -0
  57. package/lib/custom-elements-HEMuF7yH.js +27 -0
  58. package/lib/dev/index.cjs +2 -1
  59. package/lib/dev/index.d.ts +1 -0
  60. package/lib/dev/index.js +25 -10
  61. package/lib/device/index.cjs +1 -1
  62. package/lib/device/index.js +5 -5
  63. package/lib/dom-B40i6NXw.cjs +1 -0
  64. package/lib/dom-D8D-_9ty.js +108 -0
  65. package/lib/easings-BSGJFMAo.js +40 -0
  66. package/lib/easings-BWq0pPLq.cjs +1 -0
  67. package/lib/element-CqD0jqBJ.cjs +1 -0
  68. package/lib/element-DKw5H-Tu.js +10 -0
  69. package/lib/element-linked-store/index.cjs +1 -1
  70. package/lib/element-linked-store/index.js +53 -52
  71. package/lib/element-resizer/index.cjs +1 -1
  72. package/lib/element-resizer/index.js +47 -44
  73. package/lib/en3/index.cjs +4 -4
  74. package/lib/en3/index.js +192 -185
  75. package/lib/events-Ds-TuvYW.js +9 -0
  76. package/lib/events-UlGk63iC.cjs +1 -0
  77. package/lib/file-DwQs6bB6.js +28 -0
  78. package/lib/file-RHfA3OS-.cjs +1 -0
  79. package/lib/function-H4b_gTg6.cjs +1 -0
  80. package/lib/function-UmbPrOHm.js +19 -0
  81. package/lib/gestures-DmKKNnh4.js +14 -0
  82. package/lib/gestures-DtYbQr49.cjs +1 -0
  83. package/lib/history/index.cjs +1 -1
  84. package/lib/history/index.js +24 -21
  85. package/lib/iframe/index.cjs +1 -1
  86. package/lib/iframe/index.js +27 -24
  87. package/lib/image/index.cjs +1 -1
  88. package/lib/image/index.js +17 -13
  89. package/lib/index-BpO2RJ__.cjs +1 -0
  90. package/lib/index-DpKsHe97.js +68 -0
  91. package/lib/intersector/index.cjs +1 -1
  92. package/lib/intersector/index.js +3 -3
  93. package/lib/jsx/ComponentElement.d.ts +4 -0
  94. package/lib/jsx/h.d.ts +8 -2
  95. package/lib/jsx/hooks/component/useStylesheet.d.ts +1 -1
  96. package/lib/jsx/hooks/cssProperty.d.ts +6 -0
  97. package/lib/jsx/hooks/resize.d.ts +4 -0
  98. package/lib/jsx/hooks/store.d.ts +1 -2
  99. package/lib/jsx/hooks/ticker.d.ts +5 -0
  100. package/lib/jsx/index.cjs +1 -1
  101. package/lib/jsx/index.d.ts +5 -2
  102. package/lib/jsx/index.js +171 -124
  103. package/lib/jsx/plugins/vite/index.cjs +49 -0
  104. package/lib/jsx/plugins/vite/index.d.ts +38 -0
  105. package/lib/jsx/plugins/vite/index.js +104 -0
  106. package/lib/jsx/render.d.ts +3 -1
  107. package/lib/jsx/type.d.ts +13 -6
  108. package/lib/jsx/utils/children/createElement.d.ts +1 -0
  109. package/lib/jsx/utils/children/hydrateTextNode.d.ts +1 -0
  110. package/lib/ladder/index.cjs +1 -1
  111. package/lib/ladder/index.js +86 -84
  112. package/lib/layout-C26zkY7D.js +35 -0
  113. package/lib/layout-CnGLl7oe.cjs +1 -0
  114. package/lib/layout-box/index.cjs +1 -1
  115. package/lib/layout-box/index.js +221 -217
  116. package/lib/loading/index.cjs +1 -1
  117. package/lib/loading/index.js +48 -45
  118. package/lib/local-links/index.cjs +1 -1
  119. package/lib/local-links/index.js +2 -2
  120. package/lib/masonry-layout/index.cjs +1 -1
  121. package/lib/masonry-layout/index.js +48 -45
  122. package/lib/math-C-knY2TL.cjs +1 -0
  123. package/lib/math-r8V23YFe.js +57 -0
  124. package/lib/media/index.cjs +1 -1
  125. package/lib/media/index.js +28 -25
  126. package/lib/metadata-BNdkmeeD.js +15 -0
  127. package/lib/metadata-BrHUfpV9.cjs +1 -0
  128. package/lib/morph/index.cjs +1 -1
  129. package/lib/morph/index.js +561 -556
  130. package/lib/morph-BtgB1YQP.js +256 -0
  131. package/lib/morph-Buhxq-X0.cjs +1 -0
  132. package/lib/need_redo_tweaker/index.cjs +4 -4
  133. package/lib/need_redo_tweaker/index.js +862 -834
  134. package/lib/notifier/index.cjs +1 -1
  135. package/lib/notifier/index.js +29 -26
  136. package/lib/number-Bu4sGvW7.cjs +1 -0
  137. package/lib/number-DiVt2xnh.js +47 -0
  138. package/lib/object-CiIdEmJx.js +98 -0
  139. package/lib/object-DTY_W6xG.cjs +1 -0
  140. package/lib/order/index.cjs +1 -1
  141. package/lib/order/index.js +3 -3
  142. package/lib/page-announcer/index.cjs +1 -1
  143. package/lib/page-announcer/index.js +2 -2
  144. package/lib/page-scroll/index.cjs +1 -1
  145. package/lib/page-scroll/index.js +2 -2
  146. package/lib/pixel-perfect/index.cjs +4 -4
  147. package/lib/pixel-perfect/index.js +43 -40
  148. package/lib/pointer/index.cjs +1 -1
  149. package/lib/pointer/index.js +125 -122
  150. package/lib/polyfills-CG1XJNia.js +28 -0
  151. package/lib/polyfills-DZCuDBkA.cjs +1 -0
  152. package/lib/popover/index.cjs +1 -1
  153. package/lib/popover/index.js +249 -245
  154. package/lib/radio/index.cjs +1 -1
  155. package/lib/radio/index.js +58 -55
  156. package/lib/render-DLcWVnuH.js +355 -0
  157. package/lib/render-DdomypCo.cjs +1 -0
  158. package/lib/router/index.cjs +1 -1
  159. package/lib/router/index.js +196 -194
  160. package/lib/scroll/index.cjs +1 -1
  161. package/lib/scroll/index.js +890 -877
  162. package/lib/scroll-BvIWh1xB.js +41 -0
  163. package/lib/scroll-CT0lpyRZ.cjs +1 -0
  164. package/lib/scroll-entries/index.cjs +1 -1
  165. package/lib/scroll-entries/index.js +37 -34
  166. package/lib/scroll-kit/index.cjs +1 -1
  167. package/lib/scroll-kit/index.js +214 -209
  168. package/lib/sequence/index.cjs +1 -1
  169. package/lib/sequence/index.js +102 -98
  170. package/lib/size-element/index.cjs +1 -1
  171. package/lib/size-element/index.js +29 -26
  172. package/lib/slicer/index.cjs +1 -1
  173. package/lib/slicer/index.js +118 -113
  174. package/lib/source/index.cjs +1 -1
  175. package/lib/source/index.js +5 -5
  176. package/lib/spa/index.cjs +1 -1
  177. package/lib/spa/index.js +94 -94
  178. package/lib/store/index.cjs +1 -1
  179. package/lib/store/index.d.ts +2 -2
  180. package/lib/store/index.js +11 -10
  181. package/lib/string-B3lm2b7v.js +84 -0
  182. package/lib/string-CbRNzmd9.cjs +1 -0
  183. package/lib/style-DBoQWK0d.js +14 -0
  184. package/lib/style-IDJ6db6n.cjs +1 -0
  185. package/lib/stylesheet-CHvuef16.js +28 -0
  186. package/lib/stylesheet-CQdBaIAA.cjs +1 -0
  187. package/lib/ticker/index.cjs +1 -1
  188. package/lib/ticker/index.js +96 -92
  189. package/lib/url-CPCO10Sy.cjs +1 -0
  190. package/lib/url-CWCY_qe_.js +124 -0
  191. package/lib/utils/attributes.d.ts +2 -0
  192. package/lib/utils/dom.d.ts +1 -0
  193. package/lib/utils/index.cjs +1 -1
  194. package/lib/utils/index.js +245 -226
  195. package/lib/video/index.cjs +1 -1
  196. package/lib/video/index.js +36 -33
  197. package/lib/window-resizer/index.cjs +1 -1
  198. package/lib/window-resizer/index.js +27 -24
  199. package/lib/youtube/index.cjs +1 -1
  200. package/lib/youtube/index.js +56 -54
  201. package/package.json +15 -3
  202. package/lib/Animation-BzTjZIE-.js +0 -108
  203. package/lib/Animation-C39Ah-LM.cjs +0 -1
  204. package/lib/Composed-C-mnUGX6.js +0 -70
  205. package/lib/Composed-RFcm2x5c.cjs +0 -1
  206. package/lib/Damped-CRusiRIV.js +0 -56
  207. package/lib/Damped-Prr0iKu1.cjs +0 -1
  208. package/lib/DerivedArray-DdCR-Oy7.cjs +0 -1
  209. package/lib/DerivedArray-opbeygTL.js +0 -59
  210. package/lib/DragControls-8rNZwQrs.cjs +0 -1
  211. package/lib/DragControls-DBNdMBA4.js +0 -228
  212. package/lib/LocalLinks-BxhSFv_Q.cjs +0 -1
  213. package/lib/LocalLinks-DRAQ-fxE.js +0 -62
  214. package/lib/PageAnnouncerElement-0LxZjtVH.js +0 -24
  215. package/lib/PageAnnouncerElement-AQ0Ja6HM.cjs +0 -1
  216. package/lib/PageScroll-0LxFblry.js +0 -62
  217. package/lib/PageScroll-BXJUQwG7.cjs +0 -1
  218. package/lib/SourceElement-BHqPFbna.cjs +0 -5
  219. package/lib/SourceElement-DjbHjynf.js +0 -260
  220. package/lib/Store-Blf4msDz.cjs +0 -1
  221. package/lib/Store-ZThXYBQd.js +0 -152
  222. package/lib/Tweened-Bw1Cn1PJ.js +0 -47
  223. package/lib/Tweened-DWtk9E-O.cjs +0 -1
  224. package/lib/Viewport-BxCr0GlB.cjs +0 -1
  225. package/lib/Viewport-Dt-d9DPi.js +0 -109
  226. package/lib/attributes-69we3byR.js +0 -10
  227. package/lib/attributes-Bf2svn4j.cjs +0 -1
  228. package/lib/canvas-CU5Xjahf.cjs +0 -1
  229. package/lib/canvas-DeZ0SLUJ.js +0 -34
  230. package/lib/coordinates-CgdGoSYs.js +0 -24
  231. package/lib/coordinates-D8Np3cPD.cjs +0 -1
  232. package/lib/custom-elements-DBnCK7Zx.js +0 -24
  233. package/lib/custom-elements-Dh4TWRDJ.cjs +0 -1
  234. package/lib/dom-BETkVSSZ.js +0 -82
  235. package/lib/dom-CBLlqORw.cjs +0 -1
  236. package/lib/easings-BEmRlrDd.js +0 -38
  237. package/lib/easings-GegIwET5.cjs +0 -1
  238. package/lib/element-CGVl1jA-.js +0 -7
  239. package/lib/element-yhcBhsho.cjs +0 -1
  240. package/lib/events-CsVF98U6.js +0 -6
  241. package/lib/events-KVanG9sR.cjs +0 -1
  242. package/lib/file-DSpfWdd9.cjs +0 -1
  243. package/lib/file-GHShUlue.js +0 -24
  244. package/lib/function-C10DGppn.js +0 -17
  245. package/lib/function-MthRj-GJ.cjs +0 -1
  246. package/lib/gestures-C7gbKx11.cjs +0 -1
  247. package/lib/gestures-CcXV6fCp.js +0 -11
  248. package/lib/index-OE2INULi.cjs +0 -1
  249. package/lib/index-e9eDuagL.js +0 -65
  250. package/lib/jsx/plugins/hmr.d.ts +0 -13
  251. package/lib/layout-BSMtwCga.js +0 -29
  252. package/lib/layout-Ctc2p3uz.cjs +0 -1
  253. package/lib/math-BOBiC4TN.js +0 -45
  254. package/lib/math-GDWEqu7y.cjs +0 -1
  255. package/lib/metadata-BcYZ5w3T.cjs +0 -1
  256. package/lib/metadata-jfowcCyz.js +0 -12
  257. package/lib/morph-B6sGhLCi.cjs +0 -1
  258. package/lib/morph-D_ybmXWR.js +0 -242
  259. package/lib/number-ChAm68cm.cjs +0 -1
  260. package/lib/number-CumqY64S.js +0 -40
  261. package/lib/object-CcMK4y_r.js +0 -87
  262. package/lib/object-baN9pgbU.cjs +0 -1
  263. package/lib/polyfills-DJrTJQky.js +0 -24
  264. package/lib/polyfills-Df4r-ETT.cjs +0 -1
  265. package/lib/render-1u700s93.js +0 -212
  266. package/lib/render-BIOfUddT.cjs +0 -1
  267. package/lib/scroll-BA2WnUrb.cjs +0 -1
  268. package/lib/scroll-DY5senkF.js +0 -37
  269. package/lib/string-BlMQbe8b.js +0 -70
  270. package/lib/string-DUXXtU8v.cjs +0 -1
  271. package/lib/style-At6aDoqG.cjs +0 -1
  272. package/lib/style-j2TwriJ_.js +0 -10
  273. package/lib/stylesheet-5_o7PFzM.cjs +0 -1
  274. package/lib/stylesheet-DdBzowZY.js +0 -24
  275. package/lib/url-CHgcNwJ1.cjs +0 -1
  276. package/lib/url-CYgo5vrG.js +0 -113
@@ -1,70 +0,0 @@
1
- function f(e, t = !1) {
2
- let n = "";
3
- return e.split("-").forEach((r, a) => {
4
- if (a === 0 && !t)
5
- n += r;
6
- else {
7
- const i = r[0], u = r.slice(1), l = i.toUpperCase() + u;
8
- n += l;
9
- }
10
- }), n;
11
- }
12
- function p(e) {
13
- return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
14
- }
15
- function d(e) {
16
- return e.split("_").join(".");
17
- }
18
- function z(e) {
19
- return /^[a-z\d]+$/i.test(e) ? e.charAt(0).toUpperCase() + e.slice(1) : e.replace(
20
- /([a-z\d])([a-z\d]*)/gi,
21
- (t, n, r) => n.toUpperCase() + r.toLowerCase()
22
- ).replace(/[^a-z\d]/gi, "");
23
- }
24
- function o(e, t) {
25
- return e.slice(0, 1)[t]() + e.slice(1);
26
- }
27
- function c(e, t = !1, n) {
28
- return t ? e.split(" ").map((r) => o(r, n)).join(" ") : o(e, n);
29
- }
30
- function C(e, t = !1) {
31
- return c(e, t, "toUpperCase");
32
- }
33
- function g(e, t = !1) {
34
- return c(e, t, "toLowerCase");
35
- }
36
- function L(e, t = "abcdefghijklmnopqrstuvwxyz0123456789") {
37
- const n = t.length, r = crypto.getRandomValues(new Uint8Array(e));
38
- let a = "";
39
- for (let i = 0; i < e; i++)
40
- a += t.charAt(r[i] % n);
41
- return a;
42
- }
43
- function y(e) {
44
- return new RegExp("^\\p{Lu}", "u").test(e);
45
- }
46
- let s;
47
- function m(e) {
48
- return s || (s = document.createElement("textarea")), s.innerHTML = e, s.value;
49
- }
50
- function A(e, t, n, r) {
51
- const a = typeof e == "string" ? parseInt(e) : e;
52
- if (a === 1)
53
- return t;
54
- if (a % 100 >= 11 && a % 100 <= 14)
55
- return r;
56
- const i = a % 10;
57
- return i === 1 ? t : i >= 2 && i <= 4 ? n : r;
58
- }
59
- export {
60
- C as a,
61
- A as b,
62
- p as c,
63
- m as d,
64
- L as g,
65
- y as i,
66
- f as k,
67
- d as s,
68
- z as t,
69
- g as u
70
- };
@@ -1 +0,0 @@
1
- "use strict";function f(e,t=!1){let n="";return e.split("-").forEach((a,r)=>{if(r===0&&!t)n+=a;else{const i=a[0],l=a.slice(1),u=i.toUpperCase()+l;n+=u}}),n}function p(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function d(e){return e.split("_").join(".")}function z(e){return/^[a-z\d]+$/i.test(e)?e.charAt(0).toUpperCase()+e.slice(1):e.replace(/([a-z\d])([a-z\d]*)/gi,(t,n,a)=>n.toUpperCase()+a.toLowerCase()).replace(/[^a-z\d]/gi,"")}function o(e,t){return e.slice(0,1)[t]()+e.slice(1)}function s(e,t=!1,n){return t?e.split(" ").map(a=>o(a,n)).join(" "):o(e,n)}function C(e,t=!1){return s(e,t,"toUpperCase")}function m(e,t=!1){return s(e,t,"toLowerCase")}function g(e,t="abcdefghijklmnopqrstuvwxyz0123456789"){const n=t.length,a=crypto.getRandomValues(new Uint8Array(e));let r="";for(let i=0;i<e;i++)r+=t.charAt(a[i]%n);return r}function L(e){return new RegExp("^\\p{Lu}","u").test(e)}let c;function b(e){return c||(c=document.createElement("textarea")),c.innerHTML=e,c.value}function y(e,t,n,a){const r=typeof e=="string"?parseInt(e):e;if(r===1)return t;if(r%100>=11&&r%100<=14)return a;const i=r%10;return i===1?t:i>=2&&i<=4?n:a}exports.camelToKebab=p;exports.capitalize=C;exports.declension=y;exports.decodeHtmlEntities=b;exports.generateId=g;exports.isUppercase=L;exports.kebabToCamel=f;exports.snakeToDotted=d;exports.toPascalCase=z;exports.uncapitalize=m;
@@ -1 +0,0 @@
1
- "use strict";function n(t){return parseFloat(getComputedStyle(t).transitionDuration||"")}function e(t){return n(t)*1e3}exports.getElementTransitionDurationMS=e;exports.getElementTransitionDurationS=n;
@@ -1,10 +0,0 @@
1
- function n(t) {
2
- return parseFloat(getComputedStyle(t).transitionDuration || "");
3
- }
4
- function e(t) {
5
- return n(t) * 1e3;
6
- }
7
- export {
8
- n as a,
9
- e as g
10
- };
@@ -1 +0,0 @@
1
- "use strict";require("construct-style-sheets-polyfill");const i=require("./index-OE2INULi.cjs"),o=require("./string-DUXXtU8v.cjs");function s(t){let e="";for(const r in t){const n=t[r];typeof n=="object"?(e+=`${r} {`,e+=s(n),e+="}"):e+=`${o.camelToKebab(r)}: ${n};`}return e}function c(t){if(i.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(typeof t=="string"?t:s(t)),e}return null}exports.createStylesheet=c;exports.styleToString=s;
@@ -1,24 +0,0 @@
1
- import "construct-style-sheets-polyfill";
2
- import { i as s } from "./index-e9eDuagL.js";
3
- import { c as i } from "./string-BlMQbe8b.js";
4
- function n(t) {
5
- let e = "";
6
- for (const r in t) {
7
- const o = t[r];
8
- typeof o == "object" ? (e += `${r} {`, e += n(o), e += "}") : e += `${i(r)}: ${o};`;
9
- }
10
- return e;
11
- }
12
- function y(t) {
13
- if (s) {
14
- const e = new CSSStyleSheet();
15
- return e.replaceSync(
16
- typeof t == "string" ? t : n(t)
17
- ), e;
18
- }
19
- return null;
20
- }
21
- export {
22
- y as c,
23
- n as s
24
- };
@@ -1 +0,0 @@
1
- "use strict";var U=Object.defineProperty,y=Object.defineProperties;var w=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var $=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var m=(t,e,r)=>e in t?U(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S=(t,e)=>{for(var r in e||(e={}))$.call(e,r)&&m(t,r,e[r]);if(p)for(var r of p(e))W.call(e,r)&&m(t,r,e[r]);return t},g=(t,e)=>y(t,w(e));function j(t,{base:e="",trailingSlash:r=!1,mergeParams:n,removeParams:s}={}){e=e.endsWith("/")?e.slice(0,-1):e,t=t.replace(e,""),t.startsWith("/")&&(t=t.slice(1));const i=t.split("#"),l=i[0].split("?");let a=l[0].startsWith("/")?l[0]:"/"+l[0];r?a=!a.endsWith("/")&&a!=="/"?a+"/":a:a=a.endsWith("/")&&a!=="/"?a.slice(0,-1):a;let c=l[1]||"";if(n){const o=new URLSearchParams(c),P=new URLSearchParams(n);for(const[h,R]of P)o.has(h)||o.set(h,R);s==null||s.split(",").forEach(h=>{o.has(h)&&o.delete(h)}),c=o.toString()}const u=e+a,f=i[1],L=`${u}${c?"?"+c:""}${f?"#"+f:""}`;return{leaf:a,pathname:u,parameters:c,hash:f,path:L}}function z(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function O(t){if(t.action==="none")return;const e=t==null?void 0:t.searchParameters,r=t.hash?t.hash.startsWith("#")?t.hash:"#"+t.hash:"",n=e?e.startsWith("?")?e:"?"+e:"",s=`${t.pathname}${n}${r}`,i=g(S({},t.state),{path:s});t.action==="push"?history.pushState(i,"",s):t.action==="replace"&&history.replaceState(i,"",s)}function A(t){const e=new URLSearchParams(t),r={};for(const[n,s]of e)r[n]=s;return r}function k(t,e){const r=new URL(location.href),n=(e==null?void 0:e.toString())||"";r.searchParams.set(t,n),history.replaceState(history.state,"",r.href)}function d(t,e,r){t.setAttribute(e,new URL(t.getAttribute(e),r).pathname)}function T(t,e){t.querySelectorAll('[href^="./"], [href^="../"]').forEach(r=>d(r,"href",e)),t.querySelectorAll('[src^="./"], [src^="../"]').forEach(r=>d(r,"src",e))}function E(t,{base:e="",trailingSlash:r=!1}={}){e=e.replace(/^\/|\/$/g,"");const n=typeof t=="string"?t.replace(/^\/|\/$/g,""):t.pathname.replace(/^\/|\/$/g,"");let s="";return n.includes(e)?s=`/${n}`:s=`${e}/${n}`,r&&!s.endsWith("/")&&(s+="/"),new URL(s,location.origin)}function q(t){try{const e=new URL(t);if(window.location.origin===e.origin)return e.pathname===window.location.pathname?!e.hash:!0}catch(e){}return!1}function B(t){if(!t)return"";const e=new URLSearchParams;for(const[r,n]of Object.entries(t))n!=null&&n!==!1&&n!==""&&e.append(r,String(n));return e.toString()}function H(t){const e={};for(const[r,n]of t.entries())n!=null&&(e[r]=n);return e}exports.changeHistory=O;exports.isLocalUrl=q;exports.normalizeBase=z;exports.normalizeRelativeURLs=T;exports.normalizeURL=E;exports.parseSearchParameters=A;exports.searchParamsObjectToString=B;exports.searchParamsToObject=H;exports.splitPath=j;exports.updateSearchParameter=k;
@@ -1,113 +0,0 @@
1
- var R = Object.defineProperty, U = Object.defineProperties;
2
- var $ = Object.getOwnPropertyDescriptors;
3
- var p = Object.getOwnPropertySymbols;
4
- var P = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
5
- var S = (t, e, n) => e in t ? R(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, g = (t, e) => {
6
- for (var n in e || (e = {}))
7
- P.call(e, n) && S(t, n, e[n]);
8
- if (p)
9
- for (var n of p(e))
10
- W.call(e, n) && S(t, n, e[n]);
11
- return t;
12
- }, d = (t, e) => U(t, $(e));
13
- function k(t, {
14
- base: e = "",
15
- trailingSlash: n = !1,
16
- mergeParams: s,
17
- removeParams: r
18
- } = {}) {
19
- e = e.endsWith("/") ? e.slice(0, -1) : e, t = t.replace(e, ""), t.startsWith("/") && (t = t.slice(1));
20
- const i = t.split("#"), f = i[0].split("?");
21
- let a = f[0].startsWith("/") ? f[0] : "/" + f[0];
22
- n ? a = !a.endsWith("/") && a !== "/" ? a + "/" : a : a = a.endsWith("/") && a !== "/" ? a.slice(0, -1) : a;
23
- let o = f[1] || "";
24
- if (s) {
25
- const c = new URLSearchParams(o), w = new URLSearchParams(s);
26
- for (const [h, L] of w)
27
- c.has(h) || c.set(h, L);
28
- r == null || r.split(",").forEach((h) => {
29
- c.has(h) && c.delete(h);
30
- }), o = c.toString();
31
- }
32
- const u = e + a, l = i[1], y = `${u}${o ? "?" + o : ""}${l ? "#" + l : ""}`;
33
- return {
34
- leaf: a,
35
- pathname: u,
36
- parameters: o,
37
- hash: l,
38
- path: y
39
- };
40
- }
41
- function O(t = "/") {
42
- return t.endsWith("/") || (t += "/"), t.startsWith("/") || (t += "/"), t;
43
- }
44
- function z(t) {
45
- if (t.action === "none")
46
- return;
47
- const e = t == null ? void 0 : t.searchParameters, n = t.hash ? t.hash.startsWith("#") ? t.hash : "#" + t.hash : "", s = e ? e.startsWith("?") ? e : "?" + e : "", r = `${t.pathname}${s}${n}`, i = d(g({}, t.state), { path: r });
48
- t.action === "push" ? history.pushState(i, "", r) : t.action === "replace" && history.replaceState(i, "", r);
49
- }
50
- function E(t) {
51
- const e = new URLSearchParams(t), n = {};
52
- for (const [s, r] of e)
53
- n[s] = r;
54
- return n;
55
- }
56
- function q(t, e) {
57
- const n = new URL(location.href), s = (e == null ? void 0 : e.toString()) || "";
58
- n.searchParams.set(t, s), history.replaceState(history.state, "", n.href);
59
- }
60
- function m(t, e, n) {
61
- t.setAttribute(e, new URL(t.getAttribute(e), n).pathname);
62
- }
63
- function x(t, e) {
64
- t.querySelectorAll('[href^="./"], [href^="../"]').forEach(
65
- (n) => m(n, "href", e)
66
- ), t.querySelectorAll('[src^="./"], [src^="../"]').forEach(
67
- (n) => m(n, "src", e)
68
- );
69
- }
70
- function T(t, {
71
- base: e = "",
72
- trailingSlash: n = !1
73
- } = {}) {
74
- e = e.replace(/^\/|\/$/g, "");
75
- const s = typeof t == "string" ? t.replace(/^\/|\/$/g, "") : t.pathname.replace(/^\/|\/$/g, "");
76
- let r = "";
77
- return s.includes(e) ? r = `/${s}` : r = `${e}/${s}`, n && !r.endsWith("/") && (r += "/"), new URL(r, location.origin);
78
- }
79
- function B(t) {
80
- try {
81
- const e = new URL(t);
82
- if (window.location.origin === e.origin)
83
- return e.pathname === window.location.pathname ? !e.hash : !0;
84
- } catch (e) {
85
- }
86
- return !1;
87
- }
88
- function H(t) {
89
- if (!t)
90
- return "";
91
- const e = new URLSearchParams();
92
- for (const [n, s] of Object.entries(t))
93
- s != null && s !== !1 && s !== "" && e.append(n, String(s));
94
- return e.toString();
95
- }
96
- function C(t) {
97
- const e = {};
98
- for (const [n, s] of t.entries())
99
- s != null && (e[n] = s);
100
- return e;
101
- }
102
- export {
103
- O as a,
104
- x as b,
105
- z as c,
106
- k as d,
107
- C as e,
108
- B as i,
109
- T as n,
110
- E as p,
111
- H as s,
112
- q as u
113
- };