@instockng/storefront-ui 1.0.44 → 1.0.45
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.
- package/dist/components/RecommendedProducts.d.ts.map +1 -1
- package/dist/index100.mjs +26 -19
- package/dist/index101.mjs +11 -58
- package/dist/index102.mjs +210 -13
- package/dist/index103.mjs +173 -32
- package/dist/index104.mjs +13 -15
- package/dist/index105.mjs +16 -27
- package/dist/index106.mjs +26 -20
- package/dist/index107.mjs +151 -14
- package/dist/index108.mjs +13 -14
- package/dist/index109.mjs +23 -39
- package/dist/index110.mjs +76 -15
- package/dist/index111.mjs +33 -263
- package/dist/index112.mjs +138 -63
- package/dist/index113.mjs +54 -7
- package/dist/index114.mjs +23 -2
- package/dist/index115.mjs +27 -2
- package/dist/index116.mjs +19 -29
- package/dist/index117.mjs +25 -2
- package/dist/index118.mjs +18 -232
- package/dist/index119.mjs +21 -5
- package/dist/index120.mjs +17 -130
- package/dist/index121.mjs +64 -67
- package/dist/index122.mjs +16 -85
- package/dist/index123.mjs +38 -28
- package/dist/index124.mjs +23 -8
- package/dist/index125.mjs +31 -72
- package/dist/index126.mjs +26 -3
- package/dist/index127.mjs +19 -2
- package/dist/index128.mjs +19 -81
- package/dist/index129.mjs +46 -53
- package/dist/index130.mjs +22 -5
- package/dist/index131.mjs +267 -4
- package/dist/index132.mjs +62 -171
- package/dist/index133.mjs +8 -53
- package/dist/index134.mjs +2 -69
- package/dist/index135.mjs +2 -2
- package/dist/index136.mjs +33 -34
- package/dist/index137.mjs +2 -43
- package/dist/index142.mjs +1 -1
- package/dist/index143.mjs +1 -1
- package/dist/index145.mjs +1 -1
- package/dist/index146.mjs +1 -1
- package/dist/index151.mjs +3 -3
- package/dist/index152.mjs +1 -1
- package/dist/index157.mjs +2 -2
- package/dist/index159.mjs +1 -1
- package/dist/index161.mjs +2 -2
- package/dist/index162.mjs +5 -5
- package/dist/index168.mjs +1 -1
- package/dist/index171.mjs +3 -3
- package/dist/index172.mjs +1 -1
- package/dist/index176.mjs +2 -2
- package/dist/index178.mjs +2 -2
- package/dist/index182.mjs +1 -1
- package/dist/index184.mjs +2 -2
- package/dist/index193.mjs +2 -2
- package/dist/index195.mjs +1 -1
- package/dist/index196.mjs +1 -1
- package/dist/index197.mjs +1 -1
- package/dist/index198.mjs +1 -1
- package/dist/index199.mjs +5 -5
- package/dist/index201.mjs +2 -2
- package/dist/index203.mjs +2 -2
- package/dist/index205.mjs +1 -1
- package/dist/index207.mjs +4 -4
- package/dist/index208.mjs +3 -3
- package/dist/index213.mjs +108 -2
- package/dist/index214.mjs +2 -108
- package/dist/index215.mjs +2 -2
- package/dist/index216.mjs +2 -2
- package/dist/index217.mjs +2 -37
- package/dist/index218.mjs +2 -2
- package/dist/index219.mjs +2 -244
- package/dist/index220.mjs +37 -2
- package/dist/index221.mjs +2 -33
- package/dist/index222.mjs +2 -65
- package/dist/index223.mjs +243 -24
- package/dist/index224.mjs +2 -2
- package/dist/index225.mjs +33 -2
- package/dist/index226.mjs +65 -2
- package/dist/index227.mjs +25 -2
- package/dist/index229.mjs +2 -2
- package/dist/index231.mjs +2 -2
- package/dist/index233.mjs +2 -2
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +2 -2
- package/dist/index236.mjs +2 -2
- package/dist/index237.mjs +4 -2
- package/dist/index238.mjs +2 -2
- package/dist/index239.mjs +2 -4
- package/dist/index240.mjs +1 -1
- package/dist/index241.mjs +3 -3
- package/dist/index246.mjs +1 -1
- package/dist/index248.mjs +1 -1
- package/dist/index249.mjs +3 -3
- package/dist/index250.mjs +3 -3
- package/dist/index268.mjs +1 -1
- package/dist/index38.mjs +1 -1
- package/dist/index40.mjs +1 -1
- package/dist/index41.mjs +53 -56
- package/dist/index46.mjs +1 -1
- package/dist/index51.mjs +17 -17
- package/dist/index52.mjs +2 -2
- package/dist/index65.mjs +2 -153
- package/dist/index66.mjs +23 -2
- package/dist/index67.mjs +149 -19
- package/dist/index70.mjs +1 -1
- package/dist/index74.mjs +35 -35
- package/dist/index75.mjs +1 -1
- package/dist/index76.mjs +2 -2
- package/dist/index77.mjs +2 -2
- package/dist/index79.mjs +2 -2
- package/dist/index80.mjs +232 -25
- package/dist/index81.mjs +5 -17
- package/dist/index82.mjs +125 -206
- package/dist/index83.mjs +67 -179
- package/dist/index84.mjs +85 -20
- package/dist/index85.mjs +28 -22
- package/dist/index86.mjs +8 -32
- package/dist/index87.mjs +71 -152
- package/dist/index88.mjs +3 -19
- package/dist/index89.mjs +2 -31
- package/dist/index90.mjs +81 -82
- package/dist/index91.mjs +53 -37
- package/dist/index92.mjs +5 -144
- package/dist/index93.mjs +4 -54
- package/dist/index94.mjs +177 -21
- package/dist/index95.mjs +52 -26
- package/dist/index96.mjs +69 -23
- package/dist/index97.mjs +34 -25
- package/dist/index98.mjs +42 -20
- package/dist/index99.mjs +2 -22
- package/package.json +1 -1
- package/src/components/RecommendedProducts.tsx +17 -25
package/dist/index136.mjs
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
}, s = (i, t, e) => (t = encodeURIComponent(t), a(i, t, e));
|
|
2
|
+
import { __exports as r } from "./index138.mjs";
|
|
3
|
+
var c;
|
|
4
|
+
function b() {
|
|
5
|
+
return c ? r : (c = 1, function(n) {
|
|
6
|
+
Object.defineProperty(n, "__esModule", {
|
|
7
|
+
value: !0
|
|
8
|
+
});
|
|
9
|
+
function u(e, t) {
|
|
10
|
+
for (var i in t) Object.defineProperty(e, i, {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: t[i]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
u(n, {
|
|
16
|
+
getObjectClassLabel: function() {
|
|
17
|
+
return o;
|
|
18
|
+
},
|
|
19
|
+
isPlainObject: function() {
|
|
20
|
+
return s;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function o(e) {
|
|
24
|
+
return Object.prototype.toString.call(e);
|
|
25
|
+
}
|
|
26
|
+
function s(e) {
|
|
27
|
+
if (o(e) !== "[object Object]")
|
|
28
|
+
return !1;
|
|
29
|
+
const t = Object.getPrototypeOf(e);
|
|
30
|
+
return t === null || t.hasOwnProperty("isPrototypeOf");
|
|
31
|
+
}
|
|
32
|
+
}(r), r);
|
|
33
|
+
}
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
b as __require
|
|
37
36
|
};
|
package/dist/index137.mjs
CHANGED
|
@@ -1,46 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
var
|
|
3
|
-
for (const [n, t] of Object.entries(r)) {
|
|
4
|
-
const c = new RegExp("/:" + n + "(?:{[^/]+})?\\??");
|
|
5
|
-
e = e.replace(c, t ? `/${t}` : "");
|
|
6
|
-
}
|
|
7
|
-
return e;
|
|
8
|
-
}, f = (e) => {
|
|
9
|
-
const r = new URLSearchParams();
|
|
10
|
-
for (const [n, t] of Object.entries(e))
|
|
11
|
-
if (t !== void 0)
|
|
12
|
-
if (Array.isArray(t))
|
|
13
|
-
for (const c of t)
|
|
14
|
-
r.append(n, c);
|
|
15
|
-
else
|
|
16
|
-
r.set(n, t);
|
|
17
|
-
return r;
|
|
18
|
-
}, i = (e, r) => {
|
|
19
|
-
switch (r) {
|
|
20
|
-
case "ws":
|
|
21
|
-
return e.replace(/^http/, "ws");
|
|
22
|
-
case "http":
|
|
23
|
-
return e.replace(/^ws/, "http");
|
|
24
|
-
}
|
|
25
|
-
}, l = (e) => /^https?:\/\/[^\/]+?\/index(?=\?|$)/.test(e) ? e.replace(/\/index(?=\?|$)/, "/") : e.replace(/\/index(?=\?|$)/, "");
|
|
26
|
-
function a(e) {
|
|
27
|
-
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
28
|
-
}
|
|
29
|
-
function o(e, r) {
|
|
30
|
-
if (!a(e) && !a(r))
|
|
31
|
-
return r;
|
|
32
|
-
const n = { ...e };
|
|
33
|
-
for (const t in r) {
|
|
34
|
-
const c = r[t];
|
|
35
|
-
a(n[t]) && a(c) ? n[t] = o(n[t], c) : n[t] = c;
|
|
36
|
-
}
|
|
37
|
-
return n;
|
|
38
|
-
}
|
|
2
|
+
var e = { exports: {} };
|
|
39
3
|
export {
|
|
40
|
-
|
|
41
|
-
o as deepMerge,
|
|
42
|
-
s as mergePath,
|
|
43
|
-
l as removeIndexString,
|
|
44
|
-
p as replaceUrlParam,
|
|
45
|
-
i as replaceUrlProtocol
|
|
4
|
+
e as __module
|
|
46
5
|
};
|
package/dist/index142.mjs
CHANGED
package/dist/index143.mjs
CHANGED
package/dist/index145.mjs
CHANGED
package/dist/index146.mjs
CHANGED
package/dist/index151.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as e } from "./
|
|
3
|
-
import { __require as f } from "./
|
|
4
|
-
import { __require as _ } from "./
|
|
2
|
+
import { __exports as e } from "./index212.mjs";
|
|
3
|
+
import { __require as f } from "./index213.mjs";
|
|
4
|
+
import { __require as _ } from "./index108.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function R() {
|
|
7
7
|
return i ? e : (i = 1, function(r) {
|
package/dist/index152.mjs
CHANGED
package/dist/index157.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as u } from "./
|
|
3
|
-
import { __require as d } from "./
|
|
2
|
+
import { __exports as u } from "./index219.mjs";
|
|
3
|
+
import { __require as d } from "./index220.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function h() {
|
|
6
6
|
return a ? u : (a = 1, function(c) {
|
package/dist/index159.mjs
CHANGED
package/dist/index161.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as n } from "./
|
|
3
|
-
import { __require as d } from "./
|
|
2
|
+
import { __exports as n } from "./index222.mjs";
|
|
3
|
+
import { __require as d } from "./index223.mjs";
|
|
4
4
|
var o;
|
|
5
5
|
function p() {
|
|
6
6
|
return o ? n : (o = 1, function(i) {
|
package/dist/index162.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as A } from "./
|
|
3
|
-
import { __require as T } from "./
|
|
2
|
+
import { __exports as A } from "./index224.mjs";
|
|
3
|
+
import { __require as T } from "./index223.mjs";
|
|
4
4
|
import { __require as L } from "./index165.mjs";
|
|
5
|
-
import { __require as N } from "./
|
|
5
|
+
import { __require as N } from "./index225.mjs";
|
|
6
6
|
import { __require as U } from "./index157.mjs";
|
|
7
|
-
import { __require as j } from "./
|
|
8
|
-
import { __require as v } from "./
|
|
7
|
+
import { __require as j } from "./index226.mjs";
|
|
8
|
+
import { __require as v } from "./index227.mjs";
|
|
9
9
|
var S;
|
|
10
10
|
function W() {
|
|
11
11
|
return S ? A : (S = 1, function(R) {
|
package/dist/index168.mjs
CHANGED
package/dist/index171.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __module as t } from "./
|
|
3
|
-
import { __require as _ } from "./
|
|
4
|
-
import { __require as d } from "./
|
|
2
|
+
import { __module as t } from "./index229.mjs";
|
|
3
|
+
import { __require as _ } from "./index101.mjs";
|
|
4
|
+
import { __require as d } from "./index115.mjs";
|
|
5
5
|
var u;
|
|
6
6
|
function S() {
|
|
7
7
|
return u ? t.exports : (u = 1, function(s, e) {
|
package/dist/index172.mjs
CHANGED
package/dist/index176.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as r } from "./
|
|
3
|
-
import { __require as o } from "./
|
|
2
|
+
import { __exports as r } from "./index232.mjs";
|
|
3
|
+
import { __require as o } from "./index115.mjs";
|
|
4
4
|
var i;
|
|
5
5
|
function _() {
|
|
6
6
|
return i ? r : (i = 1, function(t) {
|
package/dist/index178.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as e } from "./
|
|
3
|
-
import { __require as f } from "./
|
|
2
|
+
import { __exports as e } from "./index231.mjs";
|
|
3
|
+
import { __require as f } from "./index115.mjs";
|
|
4
4
|
var n;
|
|
5
5
|
function p() {
|
|
6
6
|
return n ? e : (n = 1, function(r) {
|
package/dist/index182.mjs
CHANGED
package/dist/index184.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as r } from "./
|
|
3
|
-
import { __require as s } from "./
|
|
2
|
+
import { __exports as r } from "./index234.mjs";
|
|
3
|
+
import { __require as s } from "./index115.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function _() {
|
|
6
6
|
return a ? r : (a = 1, function(t) {
|
package/dist/index193.mjs
CHANGED
package/dist/index195.mjs
CHANGED
package/dist/index196.mjs
CHANGED
package/dist/index197.mjs
CHANGED
package/dist/index198.mjs
CHANGED
package/dist/index199.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import r from "./index241.mjs";
|
|
3
|
-
import p from "./
|
|
4
|
-
import l from "./
|
|
5
|
-
import m from "./
|
|
6
|
-
import a from "./
|
|
7
|
-
import o from "./
|
|
3
|
+
import p from "./index88.mjs";
|
|
4
|
+
import l from "./index84.mjs";
|
|
5
|
+
import m from "./index86.mjs";
|
|
6
|
+
import a from "./index94.mjs";
|
|
7
|
+
import o from "./index95.mjs";
|
|
8
8
|
function d(e) {
|
|
9
9
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
10
10
|
throw new m(null, e);
|
package/dist/index201.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { VERSION as w } from "./
|
|
3
|
-
import s from "./
|
|
2
|
+
import { VERSION as w } from "./index89.mjs";
|
|
3
|
+
import s from "./index91.mjs";
|
|
4
4
|
const l = {};
|
|
5
5
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, t) => {
|
|
6
6
|
l[n] = function(o) {
|
package/dist/index203.mjs
CHANGED
package/dist/index205.mjs
CHANGED
package/dist/index207.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import H from "./
|
|
2
|
+
import H from "./index80.mjs";
|
|
3
3
|
import D from "./index246.mjs";
|
|
4
4
|
import L from "./index202.mjs";
|
|
5
|
-
import n from "./
|
|
6
|
-
import y from "./
|
|
5
|
+
import n from "./index91.mjs";
|
|
6
|
+
import y from "./index86.mjs";
|
|
7
7
|
import O from "./index247.mjs";
|
|
8
8
|
import U from "./index204.mjs";
|
|
9
|
-
import q from "./
|
|
9
|
+
import q from "./index94.mjs";
|
|
10
10
|
import { progressEventReducer as A } from "./index248.mjs";
|
|
11
11
|
import v from "./index249.mjs";
|
|
12
12
|
const N = typeof XMLHttpRequest < "u", Q = N && function(s) {
|
package/dist/index208.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import K from "./index204.mjs";
|
|
3
|
-
import t from "./
|
|
4
|
-
import b from "./
|
|
3
|
+
import t from "./index80.mjs";
|
|
4
|
+
import b from "./index91.mjs";
|
|
5
5
|
import ee from "./index250.mjs";
|
|
6
6
|
import { trackStream as z } from "./index251.mjs";
|
|
7
|
-
import te from "./
|
|
7
|
+
import te from "./index94.mjs";
|
|
8
8
|
import { progressEventDecorator as I, progressEventReducer as M, asyncDecorator as j } from "./index248.mjs";
|
|
9
9
|
import se from "./index249.mjs";
|
|
10
10
|
import re from "./index246.mjs";
|
package/dist/index213.mjs
CHANGED
|
@@ -1,5 +1,111 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
import { __exports as m } from "./index252.mjs";
|
|
3
|
+
var p;
|
|
4
|
+
function S() {
|
|
5
|
+
return p ? m : (p = 1, function(d) {
|
|
6
|
+
Object.defineProperty(d, "__esModule", {
|
|
7
|
+
value: !0
|
|
8
|
+
});
|
|
9
|
+
function g(o, e) {
|
|
10
|
+
for (var r in e) Object.defineProperty(o, r, {
|
|
11
|
+
enumerable: !0,
|
|
12
|
+
get: e[r]
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
g(d, {
|
|
16
|
+
getSortedRouteObjects: function() {
|
|
17
|
+
return w;
|
|
18
|
+
},
|
|
19
|
+
getSortedRoutes: function() {
|
|
20
|
+
return f;
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
class h {
|
|
24
|
+
insert(e) {
|
|
25
|
+
this._insert(e.split("/").filter(Boolean), [], !1);
|
|
26
|
+
}
|
|
27
|
+
smoosh() {
|
|
28
|
+
return this._smoosh();
|
|
29
|
+
}
|
|
30
|
+
_smoosh(e) {
|
|
31
|
+
e === void 0 && (e = "/");
|
|
32
|
+
const r = [
|
|
33
|
+
...this.children.keys()
|
|
34
|
+
].sort();
|
|
35
|
+
this.slugName !== null && r.splice(r.indexOf("[]"), 1), this.restSlugName !== null && r.splice(r.indexOf("[...]"), 1), this.optionalRestSlugName !== null && r.splice(r.indexOf("[[...]]"), 1);
|
|
36
|
+
const n = r.map((s) => this.children.get(s)._smoosh("" + e + s + "/")).reduce((s, t) => [
|
|
37
|
+
...s,
|
|
38
|
+
...t
|
|
39
|
+
], []);
|
|
40
|
+
if (this.slugName !== null && n.push(...this.children.get("[]")._smoosh(e + "[" + this.slugName + "]/")), !this.placeholder) {
|
|
41
|
+
const s = e === "/" ? "/" : e.slice(0, -1);
|
|
42
|
+
if (this.optionalRestSlugName != null)
|
|
43
|
+
throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + s + '" and "' + s + "[[..." + this.optionalRestSlugName + ']]").');
|
|
44
|
+
n.unshift(s);
|
|
45
|
+
}
|
|
46
|
+
return this.restSlugName !== null && n.push(...this.children.get("[...]")._smoosh(e + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && n.push(...this.children.get("[[...]]")._smoosh(e + "[[..." + this.optionalRestSlugName + "]]/")), n;
|
|
47
|
+
}
|
|
48
|
+
_insert(e, r, n) {
|
|
49
|
+
if (e.length === 0) {
|
|
50
|
+
this.placeholder = !1;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (n)
|
|
54
|
+
throw new Error("Catch-all must be the last part of the URL.");
|
|
55
|
+
let s = e[0];
|
|
56
|
+
if (s.startsWith("[") && s.endsWith("]")) {
|
|
57
|
+
let l = function(u, a) {
|
|
58
|
+
if (u !== null && u !== a)
|
|
59
|
+
throw new Error("You cannot use different slug names for the same dynamic path ('" + u + "' !== '" + a + "').");
|
|
60
|
+
r.forEach((c) => {
|
|
61
|
+
if (c === a)
|
|
62
|
+
throw new Error('You cannot have the same slug name "' + a + '" repeat within a single dynamic path');
|
|
63
|
+
if (c.replace(/\W/g, "") === s.replace(/\W/g, ""))
|
|
64
|
+
throw new Error('You cannot have the slug names "' + c + '" and "' + a + '" differ only by non-word symbols within a single dynamic path');
|
|
65
|
+
}), r.push(a);
|
|
66
|
+
}, t = s.slice(1, -1), i = !1;
|
|
67
|
+
if (t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1), i = !0), t.startsWith("…"))
|
|
68
|
+
throw new Error("Detected a three-dot character ('…') at ('" + t + "'). Did you mean ('...')?");
|
|
69
|
+
if (t.startsWith("...") && (t = t.substring(3), n = !0), t.startsWith("[") || t.endsWith("]"))
|
|
70
|
+
throw new Error("Segment names may not start or end with extra brackets ('" + t + "').");
|
|
71
|
+
if (t.startsWith("."))
|
|
72
|
+
throw new Error("Segment names may not start with erroneous periods ('" + t + "').");
|
|
73
|
+
if (n)
|
|
74
|
+
if (i) {
|
|
75
|
+
if (this.restSlugName != null)
|
|
76
|
+
throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + e[0] + '" ).');
|
|
77
|
+
l(this.optionalRestSlugName, t), this.optionalRestSlugName = t, s = "[[...]]";
|
|
78
|
+
} else {
|
|
79
|
+
if (this.optionalRestSlugName != null)
|
|
80
|
+
throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + e[0] + '").');
|
|
81
|
+
l(this.restSlugName, t), this.restSlugName = t, s = "[...]";
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
if (i)
|
|
85
|
+
throw new Error('Optional route parameters are not yet supported ("' + e[0] + '").');
|
|
86
|
+
l(this.slugName, t), this.slugName = t, s = "[]";
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
this.children.has(s) || this.children.set(s, new h()), this.children.get(s)._insert(e.slice(1), r, n);
|
|
90
|
+
}
|
|
91
|
+
constructor() {
|
|
92
|
+
this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
function f(o) {
|
|
96
|
+
const e = new h();
|
|
97
|
+
return o.forEach((r) => e.insert(r)), e.smoosh();
|
|
98
|
+
}
|
|
99
|
+
function w(o, e) {
|
|
100
|
+
const r = {}, n = [];
|
|
101
|
+
for (let t = 0; t < o.length; t++) {
|
|
102
|
+
const i = e(o[t]);
|
|
103
|
+
r[i] = t, n[t] = i;
|
|
104
|
+
}
|
|
105
|
+
return f(n).map((t) => o[r[t]]);
|
|
106
|
+
}
|
|
107
|
+
}(m), m);
|
|
108
|
+
}
|
|
3
109
|
export {
|
|
4
|
-
|
|
110
|
+
S as __require
|
|
5
111
|
};
|
package/dist/index214.mjs
CHANGED
|
@@ -1,111 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
var p;
|
|
4
|
-
function S() {
|
|
5
|
-
return p ? m : (p = 1, function(d) {
|
|
6
|
-
Object.defineProperty(d, "__esModule", {
|
|
7
|
-
value: !0
|
|
8
|
-
});
|
|
9
|
-
function g(o, e) {
|
|
10
|
-
for (var r in e) Object.defineProperty(o, r, {
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
get: e[r]
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
g(d, {
|
|
16
|
-
getSortedRouteObjects: function() {
|
|
17
|
-
return w;
|
|
18
|
-
},
|
|
19
|
-
getSortedRoutes: function() {
|
|
20
|
-
return f;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
class h {
|
|
24
|
-
insert(e) {
|
|
25
|
-
this._insert(e.split("/").filter(Boolean), [], !1);
|
|
26
|
-
}
|
|
27
|
-
smoosh() {
|
|
28
|
-
return this._smoosh();
|
|
29
|
-
}
|
|
30
|
-
_smoosh(e) {
|
|
31
|
-
e === void 0 && (e = "/");
|
|
32
|
-
const r = [
|
|
33
|
-
...this.children.keys()
|
|
34
|
-
].sort();
|
|
35
|
-
this.slugName !== null && r.splice(r.indexOf("[]"), 1), this.restSlugName !== null && r.splice(r.indexOf("[...]"), 1), this.optionalRestSlugName !== null && r.splice(r.indexOf("[[...]]"), 1);
|
|
36
|
-
const n = r.map((s) => this.children.get(s)._smoosh("" + e + s + "/")).reduce((s, t) => [
|
|
37
|
-
...s,
|
|
38
|
-
...t
|
|
39
|
-
], []);
|
|
40
|
-
if (this.slugName !== null && n.push(...this.children.get("[]")._smoosh(e + "[" + this.slugName + "]/")), !this.placeholder) {
|
|
41
|
-
const s = e === "/" ? "/" : e.slice(0, -1);
|
|
42
|
-
if (this.optionalRestSlugName != null)
|
|
43
|
-
throw new Error('You cannot define a route with the same specificity as a optional catch-all route ("' + s + '" and "' + s + "[[..." + this.optionalRestSlugName + ']]").');
|
|
44
|
-
n.unshift(s);
|
|
45
|
-
}
|
|
46
|
-
return this.restSlugName !== null && n.push(...this.children.get("[...]")._smoosh(e + "[..." + this.restSlugName + "]/")), this.optionalRestSlugName !== null && n.push(...this.children.get("[[...]]")._smoosh(e + "[[..." + this.optionalRestSlugName + "]]/")), n;
|
|
47
|
-
}
|
|
48
|
-
_insert(e, r, n) {
|
|
49
|
-
if (e.length === 0) {
|
|
50
|
-
this.placeholder = !1;
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
if (n)
|
|
54
|
-
throw new Error("Catch-all must be the last part of the URL.");
|
|
55
|
-
let s = e[0];
|
|
56
|
-
if (s.startsWith("[") && s.endsWith("]")) {
|
|
57
|
-
let l = function(u, a) {
|
|
58
|
-
if (u !== null && u !== a)
|
|
59
|
-
throw new Error("You cannot use different slug names for the same dynamic path ('" + u + "' !== '" + a + "').");
|
|
60
|
-
r.forEach((c) => {
|
|
61
|
-
if (c === a)
|
|
62
|
-
throw new Error('You cannot have the same slug name "' + a + '" repeat within a single dynamic path');
|
|
63
|
-
if (c.replace(/\W/g, "") === s.replace(/\W/g, ""))
|
|
64
|
-
throw new Error('You cannot have the slug names "' + c + '" and "' + a + '" differ only by non-word symbols within a single dynamic path');
|
|
65
|
-
}), r.push(a);
|
|
66
|
-
}, t = s.slice(1, -1), i = !1;
|
|
67
|
-
if (t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1), i = !0), t.startsWith("…"))
|
|
68
|
-
throw new Error("Detected a three-dot character ('…') at ('" + t + "'). Did you mean ('...')?");
|
|
69
|
-
if (t.startsWith("...") && (t = t.substring(3), n = !0), t.startsWith("[") || t.endsWith("]"))
|
|
70
|
-
throw new Error("Segment names may not start or end with extra brackets ('" + t + "').");
|
|
71
|
-
if (t.startsWith("."))
|
|
72
|
-
throw new Error("Segment names may not start with erroneous periods ('" + t + "').");
|
|
73
|
-
if (n)
|
|
74
|
-
if (i) {
|
|
75
|
-
if (this.restSlugName != null)
|
|
76
|
-
throw new Error('You cannot use both an required and optional catch-all route at the same level ("[...' + this.restSlugName + ']" and "' + e[0] + '" ).');
|
|
77
|
-
l(this.optionalRestSlugName, t), this.optionalRestSlugName = t, s = "[[...]]";
|
|
78
|
-
} else {
|
|
79
|
-
if (this.optionalRestSlugName != null)
|
|
80
|
-
throw new Error('You cannot use both an optional and required catch-all route at the same level ("[[...' + this.optionalRestSlugName + ']]" and "' + e[0] + '").');
|
|
81
|
-
l(this.restSlugName, t), this.restSlugName = t, s = "[...]";
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
if (i)
|
|
85
|
-
throw new Error('Optional route parameters are not yet supported ("' + e[0] + '").');
|
|
86
|
-
l(this.slugName, t), this.slugName = t, s = "[]";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
this.children.has(s) || this.children.set(s, new h()), this.children.get(s)._insert(e.slice(1), r, n);
|
|
90
|
-
}
|
|
91
|
-
constructor() {
|
|
92
|
-
this.placeholder = !0, this.children = /* @__PURE__ */ new Map(), this.slugName = null, this.restSlugName = null, this.optionalRestSlugName = null;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function f(o) {
|
|
96
|
-
const e = new h();
|
|
97
|
-
return o.forEach((r) => e.insert(r)), e.smoosh();
|
|
98
|
-
}
|
|
99
|
-
function w(o, e) {
|
|
100
|
-
const r = {}, n = [];
|
|
101
|
-
for (let t = 0; t < o.length; t++) {
|
|
102
|
-
const i = e(o[t]);
|
|
103
|
-
r[i] = t, n[t] = i;
|
|
104
|
-
}
|
|
105
|
-
return f(n).map((t) => o[r[t]]);
|
|
106
|
-
}
|
|
107
|
-
}(m), m);
|
|
108
|
-
}
|
|
2
|
+
var a = {};
|
|
109
3
|
export {
|
|
110
|
-
|
|
4
|
+
a as __exports
|
|
111
5
|
};
|
package/dist/index215.mjs
CHANGED