@ogcio/design-system-react 1.24.0 → 1.25.1
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/README.md +5 -5
- package/dist/autocomplete/autocomplete.js +105 -101
- package/dist/autocomplete/use-autocomplete-controller.js +60 -58
- package/dist/browser-support/browser-support.d.ts +6 -0
- package/dist/browser-support/browser-support.js +2202 -0
- package/dist/browser-support/index.d.ts +1 -0
- package/dist/browser-support/index.js +4 -0
- package/dist/combo-box/dropdown-item.js +2 -1
- package/dist/constants.d.ts +43 -0
- package/dist/constants.js +46 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +193 -190
- package/dist/pagination/pagination.js +305 -565
- package/dist/side-nav/index.d.ts +2 -0
- package/dist/side-nav/index.js +6 -0
- package/dist/side-nav/side-nav.d.ts +2 -1
- package/dist/side-nav/side-nav.js +119 -98
- package/dist/side-nav/types.d.ts +4 -0
- package/dist/styles.css +1 -1
- package/dist/useTranslation-BmIU4GBA.js +272 -0
- package/package.json +7 -10
- package/dist/browser-support/runtime.d.ts +0 -43
- package/dist/browser-support/runtime.js +0 -282
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import
|
|
4
|
-
import { Button as
|
|
5
|
-
import { useBreakpoint as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { getDisplayPages as
|
|
8
|
-
import {
|
|
9
|
-
import { k as
|
|
10
|
-
import { g as
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { jsxs as D, jsx as V } from "react/jsx-runtime";
|
|
3
|
+
import Z, { createElement as I, isValidElement as W, cloneElement as ee, Children as oe, Fragment as le, useContext as ce, useState as ue, useEffect as pe } from "react";
|
|
4
|
+
import { Button as M } from "../button/button.js";
|
|
5
|
+
import { useBreakpoint as fe, Breakpoint as Y } from "../hooks/use-breakpoint.js";
|
|
6
|
+
import { Icon as G } from "../icon/icon.js";
|
|
7
|
+
import { getDisplayPages as Q } from "../utils/utilities.js";
|
|
8
|
+
import { w as te, i as z, a as q, b as S, I as me, u as de } from "../useTranslation-BmIU4GBA.js";
|
|
9
|
+
import { k as he } from "../i18next-B_GQfCrJ.js";
|
|
10
|
+
import { g as ge } from "../_commonjsHelpers-DaMA6jEr.js";
|
|
11
|
+
import { g as ne, b as ye } from "../i18nInstance-D_96ADqd.js";
|
|
12
|
+
var J, K;
|
|
13
|
+
function be() {
|
|
14
|
+
return K || (K = 1, J = {
|
|
14
15
|
area: !0,
|
|
15
16
|
base: !0,
|
|
16
17
|
br: !0,
|
|
@@ -25,675 +26,414 @@ function $e() {
|
|
|
25
26
|
source: !0,
|
|
26
27
|
track: !0,
|
|
27
28
|
wbr: !0
|
|
28
|
-
}),
|
|
29
|
+
}), J;
|
|
29
30
|
}
|
|
30
|
-
var
|
|
31
|
-
const
|
|
32
|
-
var
|
|
33
|
-
function
|
|
31
|
+
var ve = be();
|
|
32
|
+
const xe = /* @__PURE__ */ ge(ve);
|
|
33
|
+
var Ne = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
|
|
34
|
+
function P(e) {
|
|
34
35
|
var t = { type: "tag", name: "", voidElement: !1, attrs: {}, children: [] }, n = e.match(/<\/?([^\s]+?)[/\s>]/);
|
|
35
|
-
if (n && (t.name = n[1], (
|
|
36
|
-
var
|
|
37
|
-
return { type: "comment", comment:
|
|
36
|
+
if (n && (t.name = n[1], (xe[n[1]] || e.charAt(e.length - 2) === "/") && (t.voidElement = !0), t.name.startsWith("!--"))) {
|
|
37
|
+
var r = e.indexOf("-->");
|
|
38
|
+
return { type: "comment", comment: r !== -1 ? e.slice(4, r) : "" };
|
|
38
39
|
}
|
|
39
|
-
for (var
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
} else
|
|
40
|
+
for (var a = new RegExp(Ne), s = null; (s = a.exec(e)) !== null; ) if (s[0].trim()) if (s[1]) {
|
|
41
|
+
var o = s[1].trim(), c = [o, ""];
|
|
42
|
+
o.indexOf("=") > -1 && (c = o.split("=")), t.attrs[c[0]] = c[1], a.lastIndex--;
|
|
43
|
+
} else s[2] && (t.attrs[s[2]] = s[3].trim().substring(1, s[3].length - 1));
|
|
43
44
|
return t;
|
|
44
45
|
}
|
|
45
|
-
var
|
|
46
|
-
function
|
|
46
|
+
var Ae = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, $e = /^\s*$/, Ee = /* @__PURE__ */ Object.create(null);
|
|
47
|
+
function re(e, t) {
|
|
47
48
|
switch (t.type) {
|
|
48
49
|
case "text":
|
|
49
50
|
return e + t.content;
|
|
50
51
|
case "tag":
|
|
51
52
|
return e += "<" + t.name + (t.attrs ? function(n) {
|
|
52
|
-
var
|
|
53
|
-
for (var
|
|
54
|
-
return
|
|
55
|
-
}(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(
|
|
53
|
+
var r = [];
|
|
54
|
+
for (var a in n) r.push(a + '="' + n[a] + '"');
|
|
55
|
+
return r.length ? " " + r.join(" ") : "";
|
|
56
|
+
}(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(re, "") + "</" + t.name + ">";
|
|
56
57
|
case "comment":
|
|
57
58
|
return e + "<!--" + t.comment + "-->";
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
|
-
var
|
|
61
|
-
t || (t = {}), t.components || (t.components =
|
|
62
|
-
var n,
|
|
61
|
+
var Te = { parse: function(e, t) {
|
|
62
|
+
t || (t = {}), t.components || (t.components = Ee);
|
|
63
|
+
var n, r = [], a = [], s = -1, o = !1;
|
|
63
64
|
if (e.indexOf("<") !== 0) {
|
|
64
|
-
var
|
|
65
|
-
|
|
65
|
+
var c = e.indexOf("<");
|
|
66
|
+
r.push({ type: "text", content: c === -1 ? e : e.substring(0, c) });
|
|
66
67
|
}
|
|
67
|
-
return e.replace(
|
|
68
|
-
if (
|
|
69
|
-
if (
|
|
70
|
-
|
|
68
|
+
return e.replace(Ae, function(p, f) {
|
|
69
|
+
if (o) {
|
|
70
|
+
if (p !== "</" + n.name + ">") return;
|
|
71
|
+
o = !1;
|
|
71
72
|
}
|
|
72
|
-
var
|
|
73
|
-
if (
|
|
74
|
-
var
|
|
75
|
-
return
|
|
73
|
+
var u, b = p.charAt(1) !== "/", A = p.startsWith("<!--"), g = f + p.length, l = e.charAt(g);
|
|
74
|
+
if (A) {
|
|
75
|
+
var T = P(p);
|
|
76
|
+
return s < 0 ? (r.push(T), r) : ((u = a[s]).children.push(T), r);
|
|
76
77
|
}
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
var
|
|
80
|
-
|
|
78
|
+
if (b && (s++, (n = P(p)).type === "tag" && t.components[n.name] && (n.type = "component", o = !0), n.voidElement || o || !l || l === "<" || n.children.push({ type: "text", content: e.slice(g, e.indexOf("<", g)) }), s === 0 && r.push(n), (u = a[s - 1]) && u.children.push(n), a[s] = n), (!b || n.voidElement) && (s > -1 && (n.voidElement || n.name === p.slice(2, -1)) && (s--, n = s === -1 ? r : a[s]), !o && l !== "<" && l)) {
|
|
79
|
+
u = s === -1 ? r : a[s].children;
|
|
80
|
+
var m = e.indexOf("<", g), N = e.slice(g, m === -1 ? void 0 : m);
|
|
81
|
+
$e.test(N) && (N = " "), (m > -1 && s + u.length >= 0 || N !== " ") && u.push({ type: "text", content: N });
|
|
81
82
|
}
|
|
82
|
-
}),
|
|
83
|
+
}), r;
|
|
83
84
|
}, stringify: function(e) {
|
|
84
85
|
return e.reduce(function(t, n) {
|
|
85
|
-
return t +
|
|
86
|
+
return t + re("", n);
|
|
86
87
|
}, "");
|
|
87
88
|
} };
|
|
88
|
-
const
|
|
89
|
-
var r
|
|
90
|
-
const s = [n, {
|
|
91
|
-
code: t,
|
|
92
|
-
...a || {}
|
|
93
|
-
}];
|
|
94
|
-
if ((i = (r = e == null ? void 0 : e.services) == null ? void 0 : r.logger) != null && i.forward)
|
|
95
|
-
return e.services.logger.forward(s, "warn", "react-i18next::", !0);
|
|
96
|
-
$(s[0]) && (s[0] = `react-i18next:: ${s[0]}`), (d = (u = e == null ? void 0 : e.services) == null ? void 0 : u.logger) != null && d.warn ? e.services.logger.warn(...s) : console != null && console.warn && console.warn(...s);
|
|
97
|
-
}, le = {}, P = (e, t, n, a) => {
|
|
98
|
-
$(n) && le[n] || ($(n) && (le[n] = /* @__PURE__ */ new Date()), M(e, t, n, a));
|
|
99
|
-
}, Ee = (e, t) => () => {
|
|
100
|
-
if (e.isInitialized)
|
|
101
|
-
t();
|
|
102
|
-
else {
|
|
103
|
-
const n = () => {
|
|
104
|
-
setTimeout(() => {
|
|
105
|
-
e.off("initialized", n);
|
|
106
|
-
}, 0), t();
|
|
107
|
-
};
|
|
108
|
-
e.on("initialized", n);
|
|
109
|
-
}
|
|
110
|
-
}, ne = (e, t, n) => {
|
|
111
|
-
e.loadNamespaces(t, Ee(e, n));
|
|
112
|
-
}, ue = (e, t, n, a) => {
|
|
113
|
-
if ($(n) && (n = [n]), e.options.preload && e.options.preload.indexOf(t) > -1) return ne(e, n, a);
|
|
114
|
-
n.forEach((s) => {
|
|
115
|
-
e.options.ns.indexOf(s) < 0 && e.options.ns.push(s);
|
|
116
|
-
}), e.loadLanguages(t, Ee(e, a));
|
|
117
|
-
}, Be = (e, t, n = {}) => !t.languages || !t.languages.length ? (P(t, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
118
|
-
languages: t.languages
|
|
119
|
-
}), !0) : t.hasLoadedNamespace(e, {
|
|
120
|
-
lng: n.lng,
|
|
121
|
-
precheck: (a, s) => {
|
|
122
|
-
if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && a.services.backendConnector.backend && a.isLanguageChangingTo && !s(a.isLanguageChangingTo, e)) return !1;
|
|
123
|
-
}
|
|
124
|
-
}), $ = (e) => typeof e == "string", V = (e) => typeof e == "object" && e !== null, J = (e, t) => {
|
|
125
|
-
var a;
|
|
89
|
+
const X = (e, t) => {
|
|
90
|
+
var r;
|
|
126
91
|
if (!e) return !1;
|
|
127
|
-
const n = ((
|
|
92
|
+
const n = ((r = e.props) == null ? void 0 : r.children) ?? e.children;
|
|
128
93
|
return t ? n.length > 0 : !!n;
|
|
129
|
-
},
|
|
130
|
-
var n,
|
|
94
|
+
}, U = (e) => {
|
|
95
|
+
var n, r;
|
|
131
96
|
if (!e) return [];
|
|
132
97
|
const t = ((n = e.props) == null ? void 0 : n.children) ?? e.children;
|
|
133
|
-
return (
|
|
134
|
-
},
|
|
98
|
+
return (r = e.props) != null && r.i18nIsDynamicList ? L(t) : t;
|
|
99
|
+
}, ke = (e) => Array.isArray(e) && e.every(W), L = (e) => Array.isArray(e) ? e : [e], Ce = (e, t) => {
|
|
135
100
|
const n = {
|
|
136
101
|
...t
|
|
137
102
|
};
|
|
138
103
|
return n.props = Object.assign(e.props, t.props), n;
|
|
139
|
-
},
|
|
104
|
+
}, se = (e, t, n, r) => {
|
|
140
105
|
if (!e) return "";
|
|
141
|
-
let
|
|
142
|
-
const
|
|
143
|
-
return
|
|
144
|
-
if (
|
|
145
|
-
|
|
106
|
+
let a = "";
|
|
107
|
+
const s = L(e), o = t != null && t.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
|
|
108
|
+
return s.forEach((c, p) => {
|
|
109
|
+
if (z(c)) {
|
|
110
|
+
a += `${c}`;
|
|
146
111
|
return;
|
|
147
112
|
}
|
|
148
|
-
if (
|
|
113
|
+
if (W(c)) {
|
|
149
114
|
const {
|
|
150
115
|
props: f,
|
|
151
|
-
type:
|
|
152
|
-
} =
|
|
153
|
-
if (!
|
|
154
|
-
|
|
116
|
+
type: u
|
|
117
|
+
} = c, b = Object.keys(f).length, A = o.indexOf(u) > -1, g = f.children;
|
|
118
|
+
if (!g && A && !b) {
|
|
119
|
+
a += `<${u}/>`;
|
|
155
120
|
return;
|
|
156
121
|
}
|
|
157
|
-
if (!
|
|
158
|
-
|
|
122
|
+
if (!g && (!A || b) || f.i18nIsDynamicList) {
|
|
123
|
+
a += `<${p}></${p}>`;
|
|
159
124
|
return;
|
|
160
125
|
}
|
|
161
|
-
if (
|
|
162
|
-
|
|
126
|
+
if (A && b === 1 && z(g)) {
|
|
127
|
+
a += `<${u}>${g}</${u}>`;
|
|
163
128
|
return;
|
|
164
129
|
}
|
|
165
|
-
const
|
|
166
|
-
|
|
130
|
+
const l = se(g, t, n, r);
|
|
131
|
+
a += `<${p}>${l}</${p}>`;
|
|
167
132
|
return;
|
|
168
133
|
}
|
|
169
|
-
if (
|
|
170
|
-
|
|
171
|
-
i18nKey:
|
|
134
|
+
if (c === null) {
|
|
135
|
+
q(n, "TRANS_NULL_VALUE", "Passed in a null value as child", {
|
|
136
|
+
i18nKey: r
|
|
172
137
|
});
|
|
173
138
|
return;
|
|
174
139
|
}
|
|
175
|
-
if (
|
|
140
|
+
if (S(c)) {
|
|
176
141
|
const {
|
|
177
142
|
format: f,
|
|
178
|
-
...
|
|
179
|
-
} =
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
|
|
143
|
+
...u
|
|
144
|
+
} = c, b = Object.keys(u);
|
|
145
|
+
if (b.length === 1) {
|
|
146
|
+
const A = f ? `${b[0]}, ${f}` : b[0];
|
|
147
|
+
a += `{{${A}}}`;
|
|
183
148
|
return;
|
|
184
149
|
}
|
|
185
|
-
|
|
186
|
-
i18nKey:
|
|
187
|
-
child:
|
|
150
|
+
q(n, "TRANS_INVALID_OBJ", "Invalid child - Object should only have keys {{ value, format }} (format is optional).", {
|
|
151
|
+
i18nKey: r,
|
|
152
|
+
child: c
|
|
188
153
|
});
|
|
189
154
|
return;
|
|
190
155
|
}
|
|
191
|
-
|
|
192
|
-
i18nKey:
|
|
193
|
-
child:
|
|
156
|
+
q(n, "TRANS_INVALID_VAR", "Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.", {
|
|
157
|
+
i18nKey: r,
|
|
158
|
+
child: c
|
|
194
159
|
});
|
|
195
|
-
}),
|
|
196
|
-
},
|
|
160
|
+
}), a;
|
|
161
|
+
}, Ve = (e, t = [], n = {}) => {
|
|
197
162
|
if (!e) return e;
|
|
198
|
-
const
|
|
199
|
-
let
|
|
200
|
-
for (;
|
|
201
|
-
if (e[
|
|
202
|
-
let
|
|
203
|
-
const
|
|
204
|
-
if (
|
|
205
|
-
const f =
|
|
206
|
-
(/^\d+$/.test(f) ||
|
|
163
|
+
const r = Object.keys(n), a = [...t, ...r];
|
|
164
|
+
let s = "", o = 0;
|
|
165
|
+
for (; o < e.length; )
|
|
166
|
+
if (e[o] === "<") {
|
|
167
|
+
let c = !1;
|
|
168
|
+
const p = e.slice(o).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9-]*)>/);
|
|
169
|
+
if (p) {
|
|
170
|
+
const f = p[1];
|
|
171
|
+
(/^\d+$/.test(f) || a.includes(f)) && (c = !0, s += p[0], o += p[0].length);
|
|
207
172
|
}
|
|
208
|
-
if (!
|
|
209
|
-
const f = e.slice(
|
|
173
|
+
if (!c) {
|
|
174
|
+
const f = e.slice(o).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);
|
|
210
175
|
if (f) {
|
|
211
|
-
const
|
|
212
|
-
(/^\d+$/.test(
|
|
176
|
+
const u = f[1];
|
|
177
|
+
(/^\d+$/.test(u) || a.includes(u)) && (c = !0, s += f[0], o += f[0].length);
|
|
213
178
|
}
|
|
214
179
|
}
|
|
215
|
-
|
|
180
|
+
c || (s += "<", o += 1);
|
|
216
181
|
} else
|
|
217
|
-
|
|
218
|
-
return
|
|
219
|
-
},
|
|
182
|
+
s += e[o], o += 1;
|
|
183
|
+
return s;
|
|
184
|
+
}, je = (e, t, n, r, a, s, o) => {
|
|
220
185
|
if (n === "") return [];
|
|
221
|
-
const
|
|
222
|
-
if (!e && !t && !
|
|
223
|
-
const f = t ?? {},
|
|
224
|
-
|
|
225
|
-
|
|
186
|
+
const c = a.transKeepBasicHtmlNodesFor || [], p = n && new RegExp(c.map((y) => `<${y}`).join("|")).test(n);
|
|
187
|
+
if (!e && !t && !p && !o) return [n];
|
|
188
|
+
const f = t ?? {}, u = (y) => {
|
|
189
|
+
L(y).forEach((h) => {
|
|
190
|
+
z(h) || (X(h) ? u(U(h)) : S(h) && !W(h) && Object.assign(f, h));
|
|
226
191
|
});
|
|
227
192
|
};
|
|
228
|
-
|
|
229
|
-
const
|
|
193
|
+
u(e);
|
|
194
|
+
const b = Ve(n, c, f), A = Te.parse(`<0>${b}</0>`), g = {
|
|
230
195
|
...f,
|
|
231
|
-
...
|
|
232
|
-
},
|
|
233
|
-
var
|
|
234
|
-
const
|
|
235
|
-
return
|
|
236
|
-
},
|
|
237
|
-
|
|
238
|
-
key:
|
|
239
|
-
},
|
|
240
|
-
const
|
|
241
|
-
...
|
|
196
|
+
...s
|
|
197
|
+
}, l = (y, $, h) => {
|
|
198
|
+
var d;
|
|
199
|
+
const E = U(y), j = m(E, $.children, h);
|
|
200
|
+
return ke(E) && j.length === 0 || (d = y.props) != null && d.i18nIsDynamicList ? E : j;
|
|
201
|
+
}, T = (y, $, h, E, j) => {
|
|
202
|
+
y.dummy ? (y.children = $, h.push(ee(y, {
|
|
203
|
+
key: E
|
|
204
|
+
}, j ? void 0 : $))) : h.push(...oe.map([y], (d) => {
|
|
205
|
+
const i = {
|
|
206
|
+
...d.props
|
|
242
207
|
};
|
|
243
|
-
return delete
|
|
244
|
-
...
|
|
245
|
-
key:
|
|
246
|
-
ref:
|
|
247
|
-
},
|
|
208
|
+
return delete i.i18nIsDynamicList, I(d.type, {
|
|
209
|
+
...i,
|
|
210
|
+
key: E,
|
|
211
|
+
ref: d.props.ref ?? d.ref
|
|
212
|
+
}, j ? null : $);
|
|
248
213
|
}));
|
|
249
|
-
},
|
|
250
|
-
const
|
|
251
|
-
return
|
|
252
|
-
var
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
255
|
-
let
|
|
256
|
-
!
|
|
257
|
-
const
|
|
258
|
-
props:
|
|
259
|
-
},
|
|
260
|
-
if (
|
|
261
|
-
const
|
|
262
|
-
|
|
263
|
-
} else if (
|
|
264
|
-
const
|
|
265
|
-
v
|
|
266
|
-
} else if (
|
|
267
|
-
const
|
|
268
|
-
v
|
|
269
|
-
} else if (Number.isNaN(parseFloat(
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
v
|
|
273
|
-
} else if (
|
|
274
|
-
if (
|
|
275
|
-
|
|
276
|
-
key: `${
|
|
214
|
+
}, m = (y, $, h) => {
|
|
215
|
+
const E = L(y);
|
|
216
|
+
return L($).reduce((d, i, C) => {
|
|
217
|
+
var w, F;
|
|
218
|
+
const O = ((F = (w = i.children) == null ? void 0 : w[0]) == null ? void 0 : F.content) && r.services.interpolator.interpolate(i.children[0].content, g, r.language);
|
|
219
|
+
if (i.type === "tag") {
|
|
220
|
+
let k = E[parseInt(i.name, 10)];
|
|
221
|
+
!k && t && (k = t[i.name]), h.length === 1 && !k && (k = h[0][i.name]), k || (k = {});
|
|
222
|
+
const v = Object.keys(i.attrs).length !== 0 ? Ce({
|
|
223
|
+
props: i.attrs
|
|
224
|
+
}, k) : k, _ = W(v), B = _ && X(i, !0) && !i.voidElement, R = p && S(v) && v.dummy && !_, H = S(t) && Object.hasOwnProperty.call(t, i.name);
|
|
225
|
+
if (z(v)) {
|
|
226
|
+
const x = r.services.interpolator.interpolate(v, g, r.language);
|
|
227
|
+
d.push(x);
|
|
228
|
+
} else if (X(v) || B) {
|
|
229
|
+
const x = l(v, i, h);
|
|
230
|
+
T(v, x, d, C);
|
|
231
|
+
} else if (R) {
|
|
232
|
+
const x = m(E, i.children, h);
|
|
233
|
+
T(v, x, d, C);
|
|
234
|
+
} else if (Number.isNaN(parseFloat(i.name)))
|
|
235
|
+
if (H) {
|
|
236
|
+
const x = l(v, i, h);
|
|
237
|
+
T(v, x, d, C, i.voidElement);
|
|
238
|
+
} else if (a.transSupportBasicHtmlNodes && c.indexOf(i.name) > -1)
|
|
239
|
+
if (i.voidElement)
|
|
240
|
+
d.push(I(i.name, {
|
|
241
|
+
key: `${i.name}-${C}`
|
|
277
242
|
}));
|
|
278
243
|
else {
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
key: `${
|
|
282
|
-
},
|
|
244
|
+
const x = m(E, i.children, h);
|
|
245
|
+
d.push(I(i.name, {
|
|
246
|
+
key: `${i.name}-${C}`
|
|
247
|
+
}, x));
|
|
283
248
|
}
|
|
284
|
-
else if (
|
|
285
|
-
|
|
249
|
+
else if (i.voidElement)
|
|
250
|
+
d.push(`<${i.name} />`);
|
|
286
251
|
else {
|
|
287
|
-
const
|
|
288
|
-
|
|
252
|
+
const x = m(E, i.children, h);
|
|
253
|
+
d.push(`<${i.name}>${x}</${i.name}>`);
|
|
289
254
|
}
|
|
290
|
-
else if (
|
|
291
|
-
const
|
|
292
|
-
|
|
255
|
+
else if (S(v) && !_) {
|
|
256
|
+
const x = i.children[0] ? O : null;
|
|
257
|
+
x && d.push(x);
|
|
293
258
|
} else
|
|
294
|
-
v
|
|
295
|
-
} else if (
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
key: `${
|
|
299
|
-
},
|
|
259
|
+
T(v, O, d, C, i.children.length !== 1 || !O);
|
|
260
|
+
} else if (i.type === "text") {
|
|
261
|
+
const k = a.transWrapTextNodes, v = o ? a.unescape(r.services.interpolator.interpolate(i.content, g, r.language)) : r.services.interpolator.interpolate(i.content, g, r.language);
|
|
262
|
+
k ? d.push(I(k, {
|
|
263
|
+
key: `${i.name}-${C}`
|
|
264
|
+
}, v)) : d.push(v);
|
|
300
265
|
}
|
|
301
|
-
return
|
|
266
|
+
return d;
|
|
302
267
|
}, []);
|
|
303
|
-
},
|
|
268
|
+
}, N = m([{
|
|
304
269
|
dummy: !0,
|
|
305
270
|
children: e || []
|
|
306
|
-
}],
|
|
307
|
-
return
|
|
308
|
-
},
|
|
309
|
-
const
|
|
310
|
-
key:
|
|
271
|
+
}], A, L(e || []));
|
|
272
|
+
return U(N[0]);
|
|
273
|
+
}, ae = (e, t, n) => {
|
|
274
|
+
const r = e.key || t, a = ee(e, {
|
|
275
|
+
key: r
|
|
311
276
|
});
|
|
312
|
-
if (!
|
|
313
|
-
return
|
|
314
|
-
function
|
|
315
|
-
return
|
|
277
|
+
if (!a.props || !a.props.children || n.indexOf(`${t}/>`) < 0 && n.indexOf(`${t} />`) < 0)
|
|
278
|
+
return a;
|
|
279
|
+
function s() {
|
|
280
|
+
return I(le, null, a);
|
|
316
281
|
}
|
|
317
|
-
return
|
|
318
|
-
key:
|
|
282
|
+
return I(s, {
|
|
283
|
+
key: r
|
|
319
284
|
});
|
|
320
|
-
},
|
|
285
|
+
}, Ie = (e, t) => e.map((n, r) => ae(n, r, t)), Se = (e, t) => {
|
|
321
286
|
const n = {};
|
|
322
|
-
return Object.keys(e).forEach((
|
|
287
|
+
return Object.keys(e).forEach((r) => {
|
|
323
288
|
Object.assign(n, {
|
|
324
|
-
[
|
|
289
|
+
[r]: ae(e[r], r, t)
|
|
325
290
|
});
|
|
326
291
|
}), n;
|
|
327
|
-
},
|
|
328
|
-
i18nKey:
|
|
329
|
-
}), null) : null,
|
|
330
|
-
function
|
|
292
|
+
}, Oe = (e, t, n, r) => e ? Array.isArray(e) ? Ie(e, t) : S(e) ? Se(e, t) : (te(n, "TRANS_INVALID_COMPONENTS", '<Trans /> "components" prop expects an object or array', {
|
|
293
|
+
i18nKey: r
|
|
294
|
+
}), null) : null, _e = (e) => !S(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((t, n) => t && Number.isNaN(Number.parseFloat(n)), !0);
|
|
295
|
+
function Le({
|
|
331
296
|
children: e,
|
|
332
297
|
count: t,
|
|
333
298
|
parent: n,
|
|
334
|
-
i18nKey:
|
|
335
|
-
context:
|
|
336
|
-
tOptions:
|
|
337
|
-
values:
|
|
338
|
-
defaults:
|
|
339
|
-
components:
|
|
299
|
+
i18nKey: r,
|
|
300
|
+
context: a,
|
|
301
|
+
tOptions: s = {},
|
|
302
|
+
values: o,
|
|
303
|
+
defaults: c,
|
|
304
|
+
components: p,
|
|
340
305
|
ns: f,
|
|
341
|
-
i18n:
|
|
342
|
-
t:
|
|
343
|
-
shouldUnescape:
|
|
344
|
-
...
|
|
306
|
+
i18n: u,
|
|
307
|
+
t: b,
|
|
308
|
+
shouldUnescape: A,
|
|
309
|
+
...g
|
|
345
310
|
}) {
|
|
346
|
-
var
|
|
347
|
-
const
|
|
348
|
-
if (!
|
|
349
|
-
return
|
|
350
|
-
i18nKey:
|
|
311
|
+
var v, _, B, R, H, x;
|
|
312
|
+
const l = u || ne();
|
|
313
|
+
if (!l)
|
|
314
|
+
return te(l, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", {
|
|
315
|
+
i18nKey: r
|
|
351
316
|
}), e;
|
|
352
|
-
const
|
|
353
|
-
...
|
|
354
|
-
...(
|
|
317
|
+
const T = b || l.t.bind(l) || ((ie) => ie), m = {
|
|
318
|
+
...ye(),
|
|
319
|
+
...(v = l.options) == null ? void 0 : v.react
|
|
355
320
|
};
|
|
356
|
-
let
|
|
357
|
-
|
|
358
|
-
const
|
|
359
|
-
hashTransKey:
|
|
360
|
-
} =
|
|
361
|
-
(
|
|
362
|
-
...
|
|
363
|
-
...
|
|
321
|
+
let N = f || T.ns || ((_ = l.options) == null ? void 0 : _.defaultNS);
|
|
322
|
+
N = z(N) ? [N] : N || ["translation"];
|
|
323
|
+
const y = se(e, m, l, r), $ = c || (s == null ? void 0 : s.defaultValue) || y || m.transEmptyNodeValue || (typeof r == "function" ? he(r) : r), {
|
|
324
|
+
hashTransKey: h
|
|
325
|
+
} = m, E = r || (h ? h(y || $) : y || $);
|
|
326
|
+
(R = (B = l.options) == null ? void 0 : B.interpolation) != null && R.defaultVariables && (o = o && Object.keys(o).length > 0 ? {
|
|
327
|
+
...o,
|
|
328
|
+
...l.options.interpolation.defaultVariables
|
|
364
329
|
} : {
|
|
365
|
-
...
|
|
330
|
+
...l.options.interpolation.defaultVariables
|
|
366
331
|
});
|
|
367
|
-
const
|
|
332
|
+
const j = o || t !== void 0 && !((x = (H = l.options) == null ? void 0 : H.interpolation) != null && x.alwaysFormat) || !e ? s.interpolation : {
|
|
368
333
|
interpolation: {
|
|
369
|
-
...
|
|
334
|
+
...s.interpolation,
|
|
370
335
|
prefix: "#$?",
|
|
371
336
|
suffix: "?$#"
|
|
372
337
|
}
|
|
373
|
-
},
|
|
374
|
-
...
|
|
375
|
-
context:
|
|
338
|
+
}, d = {
|
|
339
|
+
...s,
|
|
340
|
+
context: a || s.context,
|
|
376
341
|
count: t,
|
|
377
|
-
...
|
|
378
|
-
...
|
|
379
|
-
defaultValue:
|
|
380
|
-
ns:
|
|
342
|
+
...o,
|
|
343
|
+
...j,
|
|
344
|
+
defaultValue: $,
|
|
345
|
+
ns: N
|
|
381
346
|
};
|
|
382
|
-
let
|
|
383
|
-
|
|
384
|
-
const
|
|
385
|
-
let
|
|
386
|
-
|
|
387
|
-
const
|
|
388
|
-
return
|
|
347
|
+
let i = E ? T(E, d) : $;
|
|
348
|
+
i === E && $ && (i = $);
|
|
349
|
+
const C = Oe(p, i, l, r);
|
|
350
|
+
let O = C || e, w = null;
|
|
351
|
+
_e(C) && (w = C, O = e);
|
|
352
|
+
const F = je(O, w, i, l, m, d, A), k = n ?? m.defaultTransParent;
|
|
353
|
+
return k ? I(k, g, F) : F;
|
|
389
354
|
}
|
|
390
|
-
|
|
391
|
-
class Ke {
|
|
392
|
-
constructor() {
|
|
393
|
-
this.usedNamespaces = {};
|
|
394
|
-
}
|
|
395
|
-
addUsedNamespaces(t) {
|
|
396
|
-
t.forEach((n) => {
|
|
397
|
-
this.usedNamespaces[n] || (this.usedNamespaces[n] = !0);
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
getUsedNamespaces() {
|
|
401
|
-
return Object.keys(this.usedNamespaces);
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
function Xe({
|
|
355
|
+
function we({
|
|
405
356
|
children: e,
|
|
406
357
|
count: t,
|
|
407
358
|
parent: n,
|
|
408
|
-
i18nKey:
|
|
409
|
-
context:
|
|
410
|
-
tOptions:
|
|
411
|
-
values:
|
|
412
|
-
defaults:
|
|
413
|
-
components:
|
|
359
|
+
i18nKey: r,
|
|
360
|
+
context: a,
|
|
361
|
+
tOptions: s = {},
|
|
362
|
+
values: o,
|
|
363
|
+
defaults: c,
|
|
364
|
+
components: p,
|
|
414
365
|
ns: f,
|
|
415
|
-
i18n:
|
|
416
|
-
t:
|
|
417
|
-
shouldUnescape:
|
|
418
|
-
...
|
|
366
|
+
i18n: u,
|
|
367
|
+
t: b,
|
|
368
|
+
shouldUnescape: A,
|
|
369
|
+
...g
|
|
419
370
|
}) {
|
|
420
|
-
var
|
|
371
|
+
var y;
|
|
421
372
|
const {
|
|
422
|
-
i18n:
|
|
423
|
-
defaultNS:
|
|
424
|
-
} =
|
|
425
|
-
return
|
|
373
|
+
i18n: l,
|
|
374
|
+
defaultNS: T
|
|
375
|
+
} = ce(me) || {}, m = u || l || ne(), N = b || (m == null ? void 0 : m.t.bind(m));
|
|
376
|
+
return Le({
|
|
426
377
|
children: e,
|
|
427
378
|
count: t,
|
|
428
379
|
parent: n,
|
|
429
|
-
i18nKey:
|
|
430
|
-
context:
|
|
431
|
-
tOptions:
|
|
432
|
-
values:
|
|
433
|
-
defaults:
|
|
434
|
-
components:
|
|
435
|
-
ns: f || (
|
|
436
|
-
i18n:
|
|
437
|
-
t:
|
|
438
|
-
shouldUnescape:
|
|
439
|
-
...
|
|
380
|
+
i18nKey: r,
|
|
381
|
+
context: a,
|
|
382
|
+
tOptions: s,
|
|
383
|
+
values: o,
|
|
384
|
+
defaults: c,
|
|
385
|
+
components: p,
|
|
386
|
+
ns: f || (N == null ? void 0 : N.ns) || T || ((y = m == null ? void 0 : m.options) == null ? void 0 : y.defaultNS),
|
|
387
|
+
i18n: m,
|
|
388
|
+
t: b,
|
|
389
|
+
shouldUnescape: A,
|
|
390
|
+
...g
|
|
440
391
|
});
|
|
441
392
|
}
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* @license React
|
|
445
|
-
* use-sync-external-store-shim.production.js
|
|
446
|
-
*
|
|
447
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
448
|
-
*
|
|
449
|
-
* This source code is licensed under the MIT license found in the
|
|
450
|
-
* LICENSE file in the root directory of this source tree.
|
|
451
|
-
*/
|
|
452
|
-
var fe;
|
|
453
|
-
function Ye() {
|
|
454
|
-
if (fe) return ee;
|
|
455
|
-
fe = 1;
|
|
456
|
-
var e = B;
|
|
457
|
-
function t(m, y) {
|
|
458
|
-
return m === y && (m !== 0 || 1 / m === 1 / y) || m !== m && y !== y;
|
|
459
|
-
}
|
|
460
|
-
var n = typeof Object.is == "function" ? Object.is : t, a = e.useState, s = e.useEffect, r = e.useLayoutEffect, i = e.useDebugValue;
|
|
461
|
-
function u(m, y) {
|
|
462
|
-
var c = y(), o = a({ inst: { value: c, getSnapshot: y } }), v = o[0].inst, g = o[1];
|
|
463
|
-
return r(
|
|
464
|
-
function() {
|
|
465
|
-
v.value = c, v.getSnapshot = y, d(v) && g({ inst: v });
|
|
466
|
-
},
|
|
467
|
-
[m, c, y]
|
|
468
|
-
), s(
|
|
469
|
-
function() {
|
|
470
|
-
return d(v) && g({ inst: v }), m(function() {
|
|
471
|
-
d(v) && g({ inst: v });
|
|
472
|
-
});
|
|
473
|
-
},
|
|
474
|
-
[m]
|
|
475
|
-
), i(c), c;
|
|
476
|
-
}
|
|
477
|
-
function d(m) {
|
|
478
|
-
var y = m.getSnapshot;
|
|
479
|
-
m = m.value;
|
|
480
|
-
try {
|
|
481
|
-
var c = y();
|
|
482
|
-
return !n(m, c);
|
|
483
|
-
} catch {
|
|
484
|
-
return !0;
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
function f(m, y) {
|
|
488
|
-
return y();
|
|
489
|
-
}
|
|
490
|
-
var h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : u;
|
|
491
|
-
return ee.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : h, ee;
|
|
492
|
-
}
|
|
493
|
-
var te = {};
|
|
494
|
-
/**
|
|
495
|
-
* @license React
|
|
496
|
-
* use-sync-external-store-shim.development.js
|
|
497
|
-
*
|
|
498
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
499
|
-
*
|
|
500
|
-
* This source code is licensed under the MIT license found in the
|
|
501
|
-
* LICENSE file in the root directory of this source tree.
|
|
502
|
-
*/
|
|
503
|
-
var pe;
|
|
504
|
-
function Je() {
|
|
505
|
-
return pe || (pe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
506
|
-
function e(c, o) {
|
|
507
|
-
return c === o && (c !== 0 || 1 / c === 1 / o) || c !== c && o !== o;
|
|
508
|
-
}
|
|
509
|
-
function t(c, o) {
|
|
510
|
-
h || s.startTransition === void 0 || (h = !0, console.error(
|
|
511
|
-
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
512
|
-
));
|
|
513
|
-
var v = o();
|
|
514
|
-
if (!m) {
|
|
515
|
-
var g = o();
|
|
516
|
-
r(v, g) || (console.error(
|
|
517
|
-
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
518
|
-
), m = !0);
|
|
519
|
-
}
|
|
520
|
-
g = i({
|
|
521
|
-
inst: { value: v, getSnapshot: o }
|
|
522
|
-
});
|
|
523
|
-
var S = g[0].inst, b = g[1];
|
|
524
|
-
return d(
|
|
525
|
-
function() {
|
|
526
|
-
S.value = v, S.getSnapshot = o, n(S) && b({ inst: S });
|
|
527
|
-
},
|
|
528
|
-
[c, v, o]
|
|
529
|
-
), u(
|
|
530
|
-
function() {
|
|
531
|
-
return n(S) && b({ inst: S }), c(function() {
|
|
532
|
-
n(S) && b({ inst: S });
|
|
533
|
-
});
|
|
534
|
-
},
|
|
535
|
-
[c]
|
|
536
|
-
), f(v), v;
|
|
537
|
-
}
|
|
538
|
-
function n(c) {
|
|
539
|
-
var o = c.getSnapshot;
|
|
540
|
-
c = c.value;
|
|
541
|
-
try {
|
|
542
|
-
var v = o();
|
|
543
|
-
return !r(c, v);
|
|
544
|
-
} catch {
|
|
545
|
-
return !0;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
function a(c, o) {
|
|
549
|
-
return o();
|
|
550
|
-
}
|
|
551
|
-
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
552
|
-
var s = B, r = typeof Object.is == "function" ? Object.is : e, i = s.useState, u = s.useEffect, d = s.useLayoutEffect, f = s.useDebugValue, h = !1, m = !1, y = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
|
|
553
|
-
te.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : y, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
554
|
-
}()), te;
|
|
555
|
-
}
|
|
556
|
-
var de;
|
|
557
|
-
function Qe() {
|
|
558
|
-
return de || (de = 1, process.env.NODE_ENV === "production" ? W.exports = Ye() : W.exports = Je()), W.exports;
|
|
559
|
-
}
|
|
560
|
-
var et = Qe();
|
|
561
|
-
const tt = (e, t) => $(t) ? t : V(t) && $(t.defaultValue) ? t.defaultValue : Array.isArray(e) ? e[e.length - 1] : e, nt = {
|
|
562
|
-
t: tt,
|
|
563
|
-
ready: !1
|
|
564
|
-
}, rt = () => () => {
|
|
565
|
-
}, at = (e, t = {}) => {
|
|
566
|
-
var _, l;
|
|
567
|
-
const {
|
|
568
|
-
i18n: n
|
|
569
|
-
} = t, {
|
|
570
|
-
i18n: a,
|
|
571
|
-
defaultNS: s
|
|
572
|
-
} = ge(xe) || {}, r = n || a || re();
|
|
573
|
-
r && !r.reportNamespaces && (r.reportNamespaces = new Ke()), r || P(r, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
574
|
-
const i = Z(() => {
|
|
575
|
-
var p;
|
|
576
|
-
return {
|
|
577
|
-
...ve(),
|
|
578
|
-
...(p = r == null ? void 0 : r.options) == null ? void 0 : p.react,
|
|
579
|
-
...t
|
|
580
|
-
};
|
|
581
|
-
}, [r, t]), {
|
|
582
|
-
useSuspense: u,
|
|
583
|
-
keyPrefix: d
|
|
584
|
-
} = i, f = Z(() => {
|
|
585
|
-
var E;
|
|
586
|
-
const p = s || ((E = r == null ? void 0 : r.options) == null ? void 0 : E.defaultNS);
|
|
587
|
-
return $(p) ? [p] : p || ["translation"];
|
|
588
|
-
}, [e, s, r]);
|
|
589
|
-
(l = (_ = r == null ? void 0 : r.reportNamespaces) == null ? void 0 : _.addUsedNamespaces) == null || l.call(_, f);
|
|
590
|
-
const h = H(0), m = ae((p) => {
|
|
591
|
-
if (!r) return rt;
|
|
592
|
-
const {
|
|
593
|
-
bindI18n: E,
|
|
594
|
-
bindI18nStore: N
|
|
595
|
-
} = i, O = () => {
|
|
596
|
-
h.current += 1, p();
|
|
597
|
-
};
|
|
598
|
-
return E && r.on(E, O), N && r.store.on(N, O), () => {
|
|
599
|
-
E && E.split(" ").forEach((L) => r.off(L, O)), N && N.split(" ").forEach((L) => r.store.off(L, O));
|
|
600
|
-
};
|
|
601
|
-
}, [r, i]), y = H(), c = ae(() => {
|
|
602
|
-
if (!r)
|
|
603
|
-
return nt;
|
|
604
|
-
const p = !!(r.isInitialized || r.initializedStoreOnce) && f.every((j) => Be(j, r, i)), E = t.lng || r.language, N = h.current, O = y.current;
|
|
605
|
-
if (O && O.ready === p && O.lng === E && O.keyPrefix === d && O.revision === N)
|
|
606
|
-
return O;
|
|
607
|
-
const T = {
|
|
608
|
-
t: r.getFixedT(E, i.nsMode === "fallback" ? f : f[0], d),
|
|
609
|
-
ready: p,
|
|
610
|
-
lng: E,
|
|
611
|
-
keyPrefix: d,
|
|
612
|
-
revision: N
|
|
613
|
-
};
|
|
614
|
-
return y.current = T, T;
|
|
615
|
-
}, [r, f, d, i, t.lng]), [o, v] = he(0), {
|
|
616
|
-
t: g,
|
|
617
|
-
ready: S
|
|
618
|
-
} = et.useSyncExternalStore(m, c, c);
|
|
619
|
-
ye(() => {
|
|
620
|
-
if (r && !S && !u) {
|
|
621
|
-
const p = () => v((E) => E + 1);
|
|
622
|
-
t.lng ? ue(r, t.lng, f, p) : ne(r, f, p);
|
|
623
|
-
}
|
|
624
|
-
}, [r, t.lng, f, S, u, o]);
|
|
625
|
-
const b = r || {}, A = H(null), x = H(), w = (p) => {
|
|
626
|
-
const E = Object.getOwnPropertyDescriptors(p);
|
|
627
|
-
E.__original && delete E.__original;
|
|
628
|
-
const N = Object.create(Object.getPrototypeOf(p), E);
|
|
629
|
-
if (!Object.prototype.hasOwnProperty.call(N, "__original"))
|
|
630
|
-
try {
|
|
631
|
-
Object.defineProperty(N, "__original", {
|
|
632
|
-
value: p,
|
|
633
|
-
writable: !1,
|
|
634
|
-
enumerable: !1,
|
|
635
|
-
configurable: !1
|
|
636
|
-
});
|
|
637
|
-
} catch {
|
|
638
|
-
}
|
|
639
|
-
return N;
|
|
640
|
-
}, k = Z(() => {
|
|
641
|
-
const p = b, E = p == null ? void 0 : p.language;
|
|
642
|
-
let N = p;
|
|
643
|
-
p && (A.current && A.current.__original === p ? x.current !== E ? (N = w(p), A.current = N, x.current = E) : N = A.current : (N = w(p), A.current = N, x.current = E));
|
|
644
|
-
const O = [g, N, S];
|
|
645
|
-
return O.t = g, O.i18n = N, O.ready = S, O;
|
|
646
|
-
}, [g, b, S, b.resolvedLanguage, b.language, b.languages]);
|
|
647
|
-
if (r && u && !S)
|
|
648
|
-
throw new Promise((p) => {
|
|
649
|
-
const E = () => p();
|
|
650
|
-
t.lng ? ue(r, t.lng, f, E) : ne(r, f, E);
|
|
651
|
-
});
|
|
652
|
-
return k;
|
|
653
|
-
}, mt = ({
|
|
393
|
+
const qe = ({
|
|
654
394
|
currentPage: e,
|
|
655
395
|
totalPages: t,
|
|
656
396
|
onPageChange: n,
|
|
657
|
-
dataTestid:
|
|
397
|
+
dataTestid: r
|
|
658
398
|
}) => {
|
|
659
|
-
const { t:
|
|
399
|
+
const { t: a } = de();
|
|
660
400
|
if (t === 0)
|
|
661
401
|
return null;
|
|
662
|
-
const { breakpoint:
|
|
663
|
-
|
|
664
|
-
|
|
402
|
+
const { breakpoint: s, width: o } = fe(), [c, p] = ue(!1);
|
|
403
|
+
pe(() => {
|
|
404
|
+
p(!0);
|
|
665
405
|
}, []);
|
|
666
|
-
const f =
|
|
667
|
-
(
|
|
668
|
-
|
|
406
|
+
const f = c && s === Y.ExtraSmall, u = c && o !== null && o < 639, b = () => (c && s ? Q(e, t, s) : Q(e, t, Y.Large)).map(
|
|
407
|
+
(l, T) => l === -1 || l === -2 ? /* @__PURE__ */ V(Z.Fragment, { children: /* @__PURE__ */ V(
|
|
408
|
+
G,
|
|
669
409
|
{
|
|
670
410
|
role: "presentation",
|
|
671
411
|
className: "gi-text-gray-700",
|
|
672
412
|
icon: "more_horiz"
|
|
673
413
|
}
|
|
674
|
-
) }, `ellipsis-${
|
|
675
|
-
|
|
414
|
+
) }, `ellipsis-${T}`) : /* @__PURE__ */ V(
|
|
415
|
+
M,
|
|
676
416
|
{
|
|
677
|
-
variant:
|
|
417
|
+
variant: l === e ? "primary" : "flat",
|
|
678
418
|
size: "large",
|
|
679
419
|
appearance: "dark",
|
|
680
|
-
onClick: () => n(
|
|
681
|
-
"aria-label":
|
|
682
|
-
page:
|
|
683
|
-
defaultValue: `Go to page ${
|
|
420
|
+
onClick: () => n(l),
|
|
421
|
+
"aria-label": a("pagination.goToPage", {
|
|
422
|
+
page: l,
|
|
423
|
+
defaultValue: `Go to page ${l}`
|
|
684
424
|
}),
|
|
685
|
-
children:
|
|
425
|
+
children: l
|
|
686
426
|
},
|
|
687
|
-
|
|
427
|
+
l
|
|
688
428
|
)
|
|
689
|
-
),
|
|
690
|
-
|
|
429
|
+
), A = () => /* @__PURE__ */ V("span", { className: "gi-text-md gi-leading-6", "aria-live": "polite", children: /* @__PURE__ */ D(
|
|
430
|
+
we,
|
|
691
431
|
{
|
|
692
432
|
i18nKey: "pagination.page",
|
|
693
433
|
values: { currentPage: e, totalPages: t },
|
|
694
|
-
components: { bold: /* @__PURE__ */
|
|
434
|
+
components: { bold: /* @__PURE__ */ V("span", { className: "gi-font-bold" }) },
|
|
695
435
|
children: [
|
|
696
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ D("span", { className: "gi-font-bold", children: [
|
|
697
437
|
"Page ",
|
|
698
438
|
e
|
|
699
439
|
] }),
|
|
@@ -702,52 +442,52 @@ const tt = (e, t) => $(t) ? t : V(t) && $(t.defaultValue) ? t.defaultValue : Arr
|
|
|
702
442
|
]
|
|
703
443
|
}
|
|
704
444
|
) });
|
|
705
|
-
return /* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ D(
|
|
706
446
|
"div",
|
|
707
447
|
{
|
|
708
448
|
className: "gi-pagination",
|
|
709
449
|
role: "navigation",
|
|
710
|
-
"aria-label":
|
|
450
|
+
"aria-label": a("pagination.page", {
|
|
711
451
|
currentPage: e,
|
|
712
452
|
totalPages: t,
|
|
713
453
|
defaultValue: `Page ${e} of ${t}`
|
|
714
454
|
}),
|
|
715
|
-
"data-testid":
|
|
455
|
+
"data-testid": r,
|
|
716
456
|
children: [
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
|
|
457
|
+
/* @__PURE__ */ D(
|
|
458
|
+
M,
|
|
719
459
|
{
|
|
720
460
|
variant: "flat",
|
|
721
461
|
size: "large",
|
|
722
462
|
appearance: "dark",
|
|
723
463
|
disabled: e === 1,
|
|
724
464
|
onClick: () => n(e - 1),
|
|
725
|
-
"aria-label":
|
|
465
|
+
"aria-label": a("pagination.goToPrevious", {
|
|
726
466
|
defaultValue: "Go to previous"
|
|
727
467
|
}),
|
|
728
|
-
className:
|
|
468
|
+
className: u ? "gi-icon-btn-large" : "",
|
|
729
469
|
dataTestid: "govie-pagination-prev-btn",
|
|
730
470
|
children: [
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
!
|
|
471
|
+
/* @__PURE__ */ V(Z.Fragment, { children: /* @__PURE__ */ V(G, { icon: "arrow_left_alt" }) }, "previous-btn-pagination"),
|
|
472
|
+
!u && a("pagination.previous", { defaultValue: "Previous" })
|
|
733
473
|
]
|
|
734
474
|
}
|
|
735
475
|
),
|
|
736
|
-
f ?
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
|
|
476
|
+
f ? A() : b(),
|
|
477
|
+
/* @__PURE__ */ D(
|
|
478
|
+
M,
|
|
739
479
|
{
|
|
740
480
|
disabled: e === t,
|
|
741
481
|
variant: "flat",
|
|
742
482
|
size: "large",
|
|
743
483
|
appearance: "dark",
|
|
744
484
|
onClick: () => n(e + 1),
|
|
745
|
-
"aria-label":
|
|
746
|
-
className:
|
|
485
|
+
"aria-label": a("pagination.goToNext", { defaultValue: "Go to next" }),
|
|
486
|
+
className: u ? "gi-icon-btn-large" : "",
|
|
747
487
|
dataTestid: "govie-pagination-next-btn",
|
|
748
488
|
children: [
|
|
749
|
-
!
|
|
750
|
-
/* @__PURE__ */
|
|
489
|
+
!u && a("pagination.next", { defaultValue: "Next" }),
|
|
490
|
+
/* @__PURE__ */ V(Z.Fragment, { children: /* @__PURE__ */ V(G, { icon: "arrow_right_alt" }) }, "next-btn-pagination")
|
|
751
491
|
]
|
|
752
492
|
}
|
|
753
493
|
)
|
|
@@ -756,5 +496,5 @@ const tt = (e, t) => $(t) ? t : V(t) && $(t.defaultValue) ? t.defaultValue : Arr
|
|
|
756
496
|
);
|
|
757
497
|
};
|
|
758
498
|
export {
|
|
759
|
-
|
|
499
|
+
qe as Pagination
|
|
760
500
|
};
|