@instockng/storefront-ui 1.0.30 → 1.0.31
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/index12.mjs +2 -2
- package/dist/index134.mjs +2 -2
- package/dist/index135.mjs +1 -1
- package/dist/index136.mjs +6 -6
- package/dist/index137.mjs +2 -2
- package/dist/index138.mjs +2 -2
- package/dist/index140.mjs +2 -2
- package/dist/index141.mjs +2 -2
- package/dist/index142.mjs +1 -1
- package/dist/index144.mjs +4 -4
- package/dist/index145.mjs +3 -3
- package/dist/index156.mjs +1 -1
- package/dist/index157.mjs +1 -1
- package/dist/index159.mjs +2 -2
- package/dist/index160.mjs +1 -1
- package/dist/index165.mjs +2 -2
- package/dist/index167.mjs +1 -1
- package/dist/index169.mjs +2 -2
- package/dist/index170.mjs +5 -5
- package/dist/index173.mjs +1 -1
- package/dist/index176.mjs +1 -1
- package/dist/index179.mjs +1 -1
- package/dist/index180.mjs +1 -1
- package/dist/index184.mjs +1 -1
- package/dist/index186.mjs +1 -1
- package/dist/index201.mjs +2 -2
- package/dist/index203.mjs +1 -1
- package/dist/index204.mjs +1 -1
- package/dist/index205.mjs +30 -12
- package/dist/index206.mjs +11 -7
- package/dist/index207.mjs +3 -30
- package/dist/index208.mjs +3 -10
- package/dist/index209.mjs +13 -4
- package/dist/index210.mjs +7 -4
- package/dist/index211.mjs +1 -1
- package/dist/index213.mjs +3 -3
- package/dist/index214.mjs +5 -5
- package/dist/index215.mjs +3 -3
- package/dist/index223.mjs +2 -108
- package/dist/index224.mjs +244 -2
- package/dist/index226.mjs +28 -32
- package/dist/index227.mjs +65 -2
- package/dist/index228.mjs +25 -2
- package/dist/index229.mjs +2 -2
- package/dist/index230.mjs +37 -2
- package/dist/index231.mjs +2 -2
- package/dist/index232.mjs +2 -244
- package/dist/index233.mjs +2 -2
- package/dist/index234.mjs +2 -33
- package/dist/index235.mjs +2 -65
- package/dist/index236.mjs +2 -25
- package/dist/index237.mjs +2 -2
- package/dist/index238.mjs +108 -2
- package/dist/index244.mjs +2 -2
- package/dist/index245.mjs +4 -2
- package/dist/index246.mjs +2 -2
- package/dist/index247.mjs +2 -4
- package/dist/index248.mjs +2 -3
- package/dist/index249.mjs +18 -2
- package/dist/index250.mjs +47 -2
- package/dist/index251.mjs +2 -17
- package/dist/index252.mjs +2 -13
- package/dist/index253.mjs +2 -6
- package/dist/index254.mjs +2 -30
- package/dist/index255.mjs +91 -2
- package/dist/index256.mjs +2 -18
- package/dist/index257.mjs +2 -47
- package/dist/index258.mjs +3 -2
- package/dist/index259.mjs +2 -2
- package/dist/index260.mjs +2 -2
- package/dist/index261.mjs +17 -2
- package/dist/index262.mjs +13 -2
- package/dist/index263.mjs +6 -91
- package/dist/index264.mjs +30 -2
- package/dist/index265.mjs +2 -2
- package/dist/index267.mjs +2 -2
- package/dist/index32.mjs +1 -1
- package/dist/index33.mjs +1 -1
- package/dist/index34.mjs +1 -1
- package/dist/index35.mjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index38.mjs +1 -1
- package/dist/index39.mjs +3 -3
- package/dist/index42.mjs +1 -1
- package/dist/index47.mjs +17 -17
- package/dist/index48.mjs +2 -2
- package/dist/index49.mjs +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.mjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.mjs +1 -1
- package/dist/index56.mjs +1 -1
- package/dist/index57.mjs +1 -1
- package/dist/index58.mjs +1 -1
- package/dist/index59.mjs +1 -1
- package/dist/index62.mjs +19 -149
- package/dist/index63.mjs +152 -4
- package/dist/index64.mjs +73 -21
- package/dist/index65.mjs +14 -74
- package/dist/index66.mjs +62 -14
- package/dist/index67.mjs +4 -62
- package/dist/index73.mjs +1 -1
- package/dist/index75.mjs +2 -235
- package/dist/index76.mjs +233 -4
- package/dist/index77.mjs +5 -133
- package/dist/index78.mjs +129 -63
- package/dist/index79.mjs +67 -86
- package/dist/index80.mjs +85 -27
- package/dist/index81.mjs +28 -8
- package/dist/index82.mjs +8 -74
- package/dist/index83.mjs +74 -3
- package/dist/index84.mjs +4 -2
- package/dist/index85.mjs +2 -83
- package/dist/index86.mjs +81 -52
- package/dist/index87.mjs +53 -5
- package/dist/index88.mjs +5 -4
- package/dist/index89.mjs +4 -178
- package/dist/index90.mjs +174 -48
- package/dist/index91.mjs +51 -67
- package/dist/index92.mjs +69 -34
- package/dist/index93.mjs +31 -40
- package/dist/index94.mjs +43 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/Checkout.tsx +2 -2
package/dist/index12.mjs
CHANGED
|
@@ -374,8 +374,8 @@ function rt({
|
|
|
374
374
|
y.noteTitle && y.noteContent && /* @__PURE__ */ e("div", { className: "bg-amber-50 border border-amber-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
|
375
375
|
/* @__PURE__ */ e(oe, { className: "h-5 w-5 text-amber-600 flex-shrink-0 mt-0.5" }),
|
|
376
376
|
/* @__PURE__ */ a("div", { className: "space-y-1", children: [
|
|
377
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900", children: y.noteTitle }),
|
|
378
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-amber-800", children: y.noteContent })
|
|
377
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-amber-900 whitespace-pre-wrap", children: y.noteTitle }),
|
|
378
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-amber-800 whitespace-pre-wrap", children: y.noteContent })
|
|
379
379
|
] })
|
|
380
380
|
] }) }),
|
|
381
381
|
!(y != null && y.allowCOD) && /* @__PURE__ */ e("div", { className: "bg-blue-50 border border-blue-200 rounded-lg p-4", children: /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
|
package/dist/index134.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import f from "./
|
|
3
|
-
import d from "./
|
|
2
|
+
import f from "./index76.mjs";
|
|
3
|
+
import d from "./index205.mjs";
|
|
4
4
|
function l(e) {
|
|
5
5
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
6
6
|
}
|
package/dist/index135.mjs
CHANGED
package/dist/index136.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import r from "./
|
|
3
|
-
import p from "./
|
|
4
|
-
import l from "./
|
|
5
|
-
import m from "./
|
|
6
|
-
import a from "./
|
|
7
|
-
import o from "./
|
|
2
|
+
import r from "./index206.mjs";
|
|
3
|
+
import p from "./index84.mjs";
|
|
4
|
+
import l from "./index80.mjs";
|
|
5
|
+
import m from "./index82.mjs";
|
|
6
|
+
import a from "./index90.mjs";
|
|
7
|
+
import o from "./index91.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/index137.mjs
CHANGED
package/dist/index138.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 "./index85.mjs";
|
|
3
|
+
import s from "./index87.mjs";
|
|
4
4
|
const l = {};
|
|
5
5
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((n, t) => {
|
|
6
6
|
l[n] = function(o) {
|
package/dist/index140.mjs
CHANGED
package/dist/index141.mjs
CHANGED
package/dist/index142.mjs
CHANGED
package/dist/index144.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import H from "./
|
|
2
|
+
import H from "./index76.mjs";
|
|
3
3
|
import D from "./index211.mjs";
|
|
4
4
|
import L from "./index139.mjs";
|
|
5
|
-
import n from "./
|
|
6
|
-
import y from "./
|
|
5
|
+
import n from "./index87.mjs";
|
|
6
|
+
import y from "./index82.mjs";
|
|
7
7
|
import O from "./index212.mjs";
|
|
8
8
|
import U from "./index141.mjs";
|
|
9
|
-
import q from "./
|
|
9
|
+
import q from "./index90.mjs";
|
|
10
10
|
import { progressEventReducer as A } from "./index213.mjs";
|
|
11
11
|
import v from "./index214.mjs";
|
|
12
12
|
const N = typeof XMLHttpRequest < "u", Q = N && function(s) {
|
package/dist/index145.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import K from "./index141.mjs";
|
|
3
|
-
import t from "./
|
|
4
|
-
import b from "./
|
|
3
|
+
import t from "./index76.mjs";
|
|
4
|
+
import b from "./index87.mjs";
|
|
5
5
|
import ee from "./index215.mjs";
|
|
6
6
|
import { trackStream as z } from "./index216.mjs";
|
|
7
|
-
import te from "./
|
|
7
|
+
import te from "./index90.mjs";
|
|
8
8
|
import { progressEventDecorator as I, progressEventReducer as M, asyncDecorator as j } from "./index213.mjs";
|
|
9
9
|
import se from "./index214.mjs";
|
|
10
10
|
import re from "./index211.mjs";
|
package/dist/index156.mjs
CHANGED
package/dist/index157.mjs
CHANGED
package/dist/index159.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 "./index237.mjs";
|
|
3
|
+
import { __require as f } from "./index238.mjs";
|
|
4
4
|
import { __require as _ } from "./index104.mjs";
|
|
5
5
|
var i;
|
|
6
6
|
function R() {
|
package/dist/index160.mjs
CHANGED
package/dist/index165.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 "./index229.mjs";
|
|
3
|
+
import { __require as d } from "./index230.mjs";
|
|
4
4
|
var a;
|
|
5
5
|
function h() {
|
|
6
6
|
return a ? u : (a = 1, function(c) {
|
package/dist/index167.mjs
CHANGED
package/dist/index169.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 "./index223.mjs";
|
|
3
|
+
import { __require as d } from "./index224.mjs";
|
|
4
4
|
var o;
|
|
5
5
|
function p() {
|
|
6
6
|
return o ? n : (o = 1, function(i) {
|
package/dist/index170.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 "./index225.mjs";
|
|
3
|
+
import { __require as T } from "./index224.mjs";
|
|
4
4
|
import { __require as L } from "./index173.mjs";
|
|
5
|
-
import { __require as N } from "./
|
|
5
|
+
import { __require as N } from "./index226.mjs";
|
|
6
6
|
import { __require as U } from "./index165.mjs";
|
|
7
|
-
import { __require as j } from "./
|
|
8
|
-
import { __require as v } from "./
|
|
7
|
+
import { __require as j } from "./index227.mjs";
|
|
8
|
+
import { __require as v } from "./index228.mjs";
|
|
9
9
|
var S;
|
|
10
10
|
function W() {
|
|
11
11
|
return S ? A : (S = 1, function(R) {
|
package/dist/index173.mjs
CHANGED
package/dist/index176.mjs
CHANGED
package/dist/index179.mjs
CHANGED
package/dist/index180.mjs
CHANGED
package/dist/index184.mjs
CHANGED
package/dist/index186.mjs
CHANGED
package/dist/index201.mjs
CHANGED
package/dist/index203.mjs
CHANGED
package/dist/index204.mjs
CHANGED
package/dist/index205.mjs
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import p from "./index86.mjs";
|
|
3
|
+
function i(n) {
|
|
4
|
+
const t = {
|
|
5
|
+
"!": "%21",
|
|
6
|
+
"'": "%27",
|
|
7
|
+
"(": "%28",
|
|
8
|
+
")": "%29",
|
|
9
|
+
"~": "%7E",
|
|
10
|
+
"%20": "+",
|
|
11
|
+
"%00": "\0"
|
|
12
|
+
};
|
|
13
|
+
return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
14
|
+
return t[r];
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function a(n, t) {
|
|
18
|
+
this._pairs = [], n && p(n, this, t);
|
|
19
|
+
}
|
|
20
|
+
const c = a.prototype;
|
|
21
|
+
c.append = function(t, o) {
|
|
22
|
+
this._pairs.push([t, o]);
|
|
23
|
+
};
|
|
24
|
+
c.toString = function(t) {
|
|
25
|
+
const o = t ? function(r) {
|
|
26
|
+
return t.call(this, r, i);
|
|
27
|
+
} : i;
|
|
28
|
+
return this._pairs.map(function(e) {
|
|
29
|
+
return o(e[0]) + "=" + o(e[1]);
|
|
30
|
+
}, "").join("&");
|
|
13
31
|
};
|
|
14
32
|
export {
|
|
15
|
-
|
|
33
|
+
a as default
|
|
16
34
|
};
|
package/dist/index206.mjs
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import i from "./index76.mjs";
|
|
3
|
+
import m from "./index80.mjs";
|
|
4
|
+
import s from "./index90.mjs";
|
|
5
|
+
function h(f, t) {
|
|
6
|
+
const o = this || m, r = t || o, n = s.from(r.headers);
|
|
7
|
+
let a = r.data;
|
|
8
|
+
return i.forEach(f, function(e) {
|
|
9
|
+
a = e.call(o, a, n.normalize(), t ? t.status : void 0);
|
|
10
|
+
}), n.normalize(), a;
|
|
11
|
+
}
|
|
4
12
|
export {
|
|
5
|
-
|
|
6
|
-
n as hasStandardBrowserEnv,
|
|
7
|
-
t as hasStandardBrowserWebWorkerEnv,
|
|
8
|
-
o as navigator,
|
|
9
|
-
r as origin
|
|
13
|
+
h as default
|
|
10
14
|
};
|
package/dist/index207.mjs
CHANGED
|
@@ -1,34 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const t = {
|
|
5
|
-
"!": "%21",
|
|
6
|
-
"'": "%27",
|
|
7
|
-
"(": "%28",
|
|
8
|
-
")": "%29",
|
|
9
|
-
"~": "%7E",
|
|
10
|
-
"%20": "+",
|
|
11
|
-
"%00": "\0"
|
|
12
|
-
};
|
|
13
|
-
return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
14
|
-
return t[r];
|
|
15
|
-
});
|
|
2
|
+
function e(t) {
|
|
3
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
16
4
|
}
|
|
17
|
-
function a(n, t) {
|
|
18
|
-
this._pairs = [], n && p(n, this, t);
|
|
19
|
-
}
|
|
20
|
-
const c = a.prototype;
|
|
21
|
-
c.append = function(t, o) {
|
|
22
|
-
this._pairs.push([t, o]);
|
|
23
|
-
};
|
|
24
|
-
c.toString = function(t) {
|
|
25
|
-
const o = t ? function(r) {
|
|
26
|
-
return t.call(this, r, i);
|
|
27
|
-
} : i;
|
|
28
|
-
return this._pairs.map(function(e) {
|
|
29
|
-
return o(e[0]) + "=" + o(e[1]);
|
|
30
|
-
}, "").join("&");
|
|
31
|
-
};
|
|
32
5
|
export {
|
|
33
|
-
|
|
6
|
+
e as default
|
|
34
7
|
};
|
package/dist/index208.mjs
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import s from "./index89.mjs";
|
|
5
|
-
function h(f, t) {
|
|
6
|
-
const o = this || m, r = t || o, n = s.from(r.headers);
|
|
7
|
-
let a = r.data;
|
|
8
|
-
return i.forEach(f, function(e) {
|
|
9
|
-
a = e.call(o, a, n.normalize(), t ? t.status : void 0);
|
|
10
|
-
}), n.normalize(), a;
|
|
2
|
+
function n(e, c) {
|
|
3
|
+
return c ? e.replace(/\/?\/$/, "") + "/" + c.replace(/^\/+/, "") : e;
|
|
11
4
|
}
|
|
12
5
|
export {
|
|
13
|
-
|
|
6
|
+
n as default
|
|
14
7
|
};
|
package/dist/index209.mjs
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import o from "./index258.mjs";
|
|
3
|
+
import r from "./index259.mjs";
|
|
4
|
+
import t from "./index260.mjs";
|
|
5
|
+
const l = {
|
|
6
|
+
isBrowser: !0,
|
|
7
|
+
classes: {
|
|
8
|
+
URLSearchParams: o,
|
|
9
|
+
FormData: r,
|
|
10
|
+
Blob: t
|
|
11
|
+
},
|
|
12
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
13
|
+
};
|
|
5
14
|
export {
|
|
6
|
-
|
|
15
|
+
l as default
|
|
7
16
|
};
|
package/dist/index210.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
const e = typeof window < "u" && typeof document < "u", o = typeof navigator == "object" && navigator || void 0, n = e && (!o || ["ReactNative", "NativeScript", "NS"].indexOf(o.product) < 0), t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
3
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", r = e && window.location.href || "http://localhost";
|
|
5
4
|
export {
|
|
6
|
-
|
|
5
|
+
e as hasBrowserEnv,
|
|
6
|
+
n as hasStandardBrowserEnv,
|
|
7
|
+
t as hasStandardBrowserWebWorkerEnv,
|
|
8
|
+
o as navigator,
|
|
9
|
+
r as origin
|
|
7
10
|
};
|
package/dist/index211.mjs
CHANGED
package/dist/index213.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import i from "./
|
|
3
|
-
import m from "./
|
|
4
|
-
import f from "./
|
|
2
|
+
import i from "./index261.mjs";
|
|
3
|
+
import m from "./index262.mjs";
|
|
4
|
+
import f from "./index76.mjs";
|
|
5
5
|
const h = (t, o, a = 3) => {
|
|
6
6
|
let r = 0;
|
|
7
7
|
const c = i(50, 250);
|
package/dist/index214.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import n from "./index141.mjs";
|
|
3
|
-
import m from "./
|
|
4
|
-
import c from "./
|
|
5
|
-
import h from "./
|
|
3
|
+
import m from "./index76.mjs";
|
|
4
|
+
import c from "./index263.mjs";
|
|
5
|
+
import h from "./index264.mjs";
|
|
6
6
|
import w from "./index137.mjs";
|
|
7
|
-
import b from "./
|
|
8
|
-
import C from "./
|
|
7
|
+
import b from "./index79.mjs";
|
|
8
|
+
import C from "./index90.mjs";
|
|
9
9
|
import g from "./index134.mjs";
|
|
10
10
|
const E = (a) => {
|
|
11
11
|
const e = b({}, a);
|
package/dist/index215.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import a from "./
|
|
3
|
-
import s from "./
|
|
4
|
-
import m from "./
|
|
2
|
+
import a from "./index82.mjs";
|
|
3
|
+
import s from "./index87.mjs";
|
|
4
|
+
import m from "./index76.mjs";
|
|
5
5
|
const h = (e, t) => {
|
|
6
6
|
const { length: l } = e = e ? e.filter(Boolean) : [];
|
|
7
7
|
if (t || l) {
|
package/dist/index223.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
|
};
|