@authagonal/login 0.3.7 → 0.3.8

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/index.js CHANGED
@@ -75,12 +75,12 @@ var v = (e, t, n, r) => {
75
75
  };
76
76
  }, M = () => A, N, ee = (e) => {
77
77
  N = e;
78
- }, te = () => N, P = {
78
+ }, P = () => N, F = {
79
79
  type: "3rdParty",
80
80
  init(e) {
81
81
  j(e.options.react), ee(e);
82
82
  }
83
- }, F = e(), ne = class {
83
+ }, te = e(), ne = class {
84
84
  constructor() {
85
85
  this.usedNamespaces = {};
86
86
  }
@@ -103,7 +103,7 @@ var v = (e, t, n, r) => {
103
103
  n,
104
104
  i
105
105
  ]), L = (e, t = {}) => {
106
- let { i18n: n } = t, { i18n: r, defaultNS: c } = i(F) || {}, l = n || r || te();
106
+ let { i18n: n } = t, { i18n: r, defaultNS: c } = i(te) || {}, l = n || r || P();
107
107
  if (l && !l.reportNamespaces && (l.reportNamespaces = new ne()), !l) {
108
108
  b(l, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
109
109
  let e = (e, t) => T(t) ? t : E(t) && T(t.defaultValue) ? t.defaultValue : Array.isArray(e) ? e[e.length - 1] : e, t = [
@@ -152,7 +152,7 @@ var v = (e, t, n, r) => {
152
152
  throw new Promise((e) => {
153
153
  t.lng ? C(l, t.lng, p, () => e()) : S(l, p, () => e());
154
154
  });
155
- }, ae = {
155
+ }, R = {
156
156
  appName: "Authagonal",
157
157
  logoUrl: null,
158
158
  primaryColor: "#2563eb",
@@ -164,161 +164,161 @@ var v = (e, t, n, r) => {
164
164
  welcomeSubtitle: null,
165
165
  languages: null
166
166
  };
167
- async function oe() {
167
+ async function ae() {
168
168
  try {
169
169
  let e = await fetch("/branding.json");
170
- if (!e.ok) return ae;
170
+ if (!e.ok) return R;
171
171
  let t = await e.json();
172
172
  return {
173
- ...ae,
173
+ ...R,
174
174
  ...t
175
175
  };
176
176
  } catch {
177
- return ae;
177
+ return R;
178
178
  }
179
179
  }
180
- var R = e(ae);
181
- function se() {
182
- return i(R);
180
+ var z = e(R);
181
+ function oe() {
182
+ return i(z);
183
183
  }
184
- function ce(e, t) {
184
+ function se(e, t) {
185
185
  return e == null ? null : typeof e == "string" ? e : e[t] ?? e[t.split("-")[0]] ?? Object.values(e)[0] ?? null;
186
186
  }
187
187
  //#endregion
188
188
  //#region src/hooks/useDarkMode.ts
189
- var le = "auth-theme";
190
- function ue() {
189
+ var ce = "auth-theme";
190
+ function le() {
191
191
  return window.matchMedia("(prefers-color-scheme: dark)").matches;
192
192
  }
193
- function de(e) {
194
- let t = e === "dark" || e === "system" && ue();
193
+ function ue(e) {
194
+ let t = e === "dark" || e === "system" && le();
195
195
  document.documentElement.classList.toggle("dark", t);
196
196
  }
197
- function fe() {
198
- let [e, t] = s(() => localStorage.getItem(le) ?? "system");
197
+ function de() {
198
+ let [e, t] = s(() => localStorage.getItem(ce) ?? "system");
199
199
  return a(() => {
200
- if (de(e), e === "system") {
201
- let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => de("system");
200
+ if (ue(e), e === "system") {
201
+ let e = window.matchMedia("(prefers-color-scheme: dark)"), t = () => ue("system");
202
202
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
203
203
  }
204
204
  }, [e]), {
205
205
  theme: e,
206
206
  setTheme: (e) => {
207
- localStorage.setItem(le, e), t(e);
207
+ localStorage.setItem(ce, e), t(e);
208
208
  }
209
209
  };
210
210
  }
211
211
  //#endregion
212
212
  //#region node_modules/clsx/dist/clsx.mjs
213
- function pe(e) {
213
+ function fe(e) {
214
214
  var t, n, r = "";
215
215
  if (typeof e == "string" || typeof e == "number") r += e;
216
216
  else if (typeof e == "object") if (Array.isArray(e)) {
217
217
  var i = e.length;
218
- for (t = 0; t < i; t++) e[t] && (n = pe(e[t])) && (r && (r += " "), r += n);
218
+ for (t = 0; t < i; t++) e[t] && (n = fe(e[t])) && (r && (r += " "), r += n);
219
219
  } else for (n in e) e[n] && (r && (r += " "), r += n);
220
220
  return r;
221
221
  }
222
- function me() {
223
- for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = pe(e)) && (r && (r += " "), r += t);
222
+ function pe() {
223
+ for (var e, t, n = 0, r = "", i = arguments.length; n < i; n++) (e = arguments[n]) && (t = fe(e)) && (r && (r += " "), r += t);
224
224
  return r;
225
225
  }
226
226
  //#endregion
227
227
  //#region node_modules/tailwind-merge/dist/bundle-mjs.mjs
228
- var he = (e, t) => {
228
+ var me = (e, t) => {
229
229
  let n = Array(e.length + t.length);
230
230
  for (let t = 0; t < e.length; t++) n[t] = e[t];
231
231
  for (let r = 0; r < t.length; r++) n[e.length + r] = t[r];
232
232
  return n;
233
- }, ge = (e, t) => ({
233
+ }, he = (e, t) => ({
234
234
  classGroupId: e,
235
235
  validator: t
236
- }), _e = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
236
+ }), ge = (e = /* @__PURE__ */ new Map(), t = null, n) => ({
237
237
  nextPart: e,
238
238
  validators: t,
239
239
  classGroupId: n
240
- }), ve = "-", ye = [], be = "arbitrary..", xe = (e) => {
241
- let t = we(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
240
+ }), _e = "-", ve = [], ye = "arbitrary..", be = (e) => {
241
+ let t = Ce(e), { conflictingClassGroups: n, conflictingClassGroupModifiers: r } = e;
242
242
  return {
243
243
  getClassGroupId: (e) => {
244
- if (e.startsWith("[") && e.endsWith("]")) return Ce(e);
245
- let n = e.split(ve);
246
- return Se(n, n[0] === "" && n.length > 1 ? 1 : 0, t);
244
+ if (e.startsWith("[") && e.endsWith("]")) return Se(e);
245
+ let n = e.split(_e);
246
+ return xe(n, n[0] === "" && n.length > 1 ? 1 : 0, t);
247
247
  },
248
248
  getConflictingClassGroupIds: (e, t) => {
249
249
  if (t) {
250
250
  let t = r[e], i = n[e];
251
- return t ? i ? he(i, t) : t : i || ye;
251
+ return t ? i ? me(i, t) : t : i || ve;
252
252
  }
253
- return n[e] || ye;
253
+ return n[e] || ve;
254
254
  }
255
255
  };
256
- }, Se = (e, t, n) => {
256
+ }, xe = (e, t, n) => {
257
257
  if (e.length - t === 0) return n.classGroupId;
258
258
  let r = e[t], i = n.nextPart.get(r);
259
259
  if (i) {
260
- let n = Se(e, t + 1, i);
260
+ let n = xe(e, t + 1, i);
261
261
  if (n) return n;
262
262
  }
263
263
  let a = n.validators;
264
264
  if (a === null) return;
265
- let o = t === 0 ? e.join(ve) : e.slice(t).join(ve), s = a.length;
265
+ let o = t === 0 ? e.join(_e) : e.slice(t).join(_e), s = a.length;
266
266
  for (let e = 0; e < s; e++) {
267
267
  let t = a[e];
268
268
  if (t.validator(o)) return t.classGroupId;
269
269
  }
270
- }, Ce = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
270
+ }, Se = (e) => e.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
271
271
  let t = e.slice(1, -1), n = t.indexOf(":"), r = t.slice(0, n);
272
- return r ? be + r : void 0;
273
- })(), we = (e) => {
272
+ return r ? ye + r : void 0;
273
+ })(), Ce = (e) => {
274
274
  let { theme: t, classGroups: n } = e;
275
- return Te(n, t);
276
- }, Te = (e, t) => {
277
- let n = _e();
275
+ return we(n, t);
276
+ }, we = (e, t) => {
277
+ let n = ge();
278
278
  for (let r in e) {
279
279
  let i = e[r];
280
- Ee(i, n, r, t);
280
+ Te(i, n, r, t);
281
281
  }
282
282
  return n;
283
- }, Ee = (e, t, n, r) => {
283
+ }, Te = (e, t, n, r) => {
284
284
  let i = e.length;
285
285
  for (let a = 0; a < i; a++) {
286
286
  let i = e[a];
287
- De(i, t, n, r);
287
+ Ee(i, t, n, r);
288
288
  }
289
- }, De = (e, t, n, r) => {
289
+ }, Ee = (e, t, n, r) => {
290
290
  if (typeof e == "string") {
291
- Oe(e, t, n);
291
+ De(e, t, n);
292
292
  return;
293
293
  }
294
294
  if (typeof e == "function") {
295
- ke(e, t, n, r);
295
+ Oe(e, t, n, r);
296
296
  return;
297
297
  }
298
- Ae(e, t, n, r);
299
- }, Oe = (e, t, n) => {
300
- let r = e === "" ? t : je(t, e);
298
+ ke(e, t, n, r);
299
+ }, De = (e, t, n) => {
300
+ let r = e === "" ? t : Ae(t, e);
301
301
  r.classGroupId = n;
302
- }, ke = (e, t, n, r) => {
303
- if (Me(e)) {
304
- Ee(e(r), t, n, r);
302
+ }, Oe = (e, t, n, r) => {
303
+ if (je(e)) {
304
+ Te(e(r), t, n, r);
305
305
  return;
306
306
  }
307
- t.validators === null && (t.validators = []), t.validators.push(ge(n, e));
308
- }, Ae = (e, t, n, r) => {
307
+ t.validators === null && (t.validators = []), t.validators.push(he(n, e));
308
+ }, ke = (e, t, n, r) => {
309
309
  let i = Object.entries(e), a = i.length;
310
310
  for (let e = 0; e < a; e++) {
311
311
  let [a, o] = i[e];
312
- Ee(o, je(t, a), n, r);
312
+ Te(o, Ae(t, a), n, r);
313
313
  }
314
- }, je = (e, t) => {
315
- let n = e, r = t.split(ve), i = r.length;
314
+ }, Ae = (e, t) => {
315
+ let n = e, r = t.split(_e), i = r.length;
316
316
  for (let e = 0; e < i; e++) {
317
317
  let t = r[e], i = n.nextPart.get(t);
318
- i || (i = _e(), n.nextPart.set(t, i)), n = i;
318
+ i || (i = ge(), n.nextPart.set(t, i)), n = i;
319
319
  }
320
320
  return n;
321
- }, Me = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Ne = (e) => {
321
+ }, je = (e) => "isThemeGetter" in e && e.isThemeGetter === !0, Me = (e) => {
322
322
  if (e < 1) return {
323
323
  get: () => void 0,
324
324
  set: () => {}
@@ -336,19 +336,19 @@ var he = (e, t) => {
336
336
  e in n ? n[e] = t : i(e, t);
337
337
  }
338
338
  };
339
- }, Pe = "!", Fe = ":", Ie = [], Le = (e, t, n, r, i) => ({
339
+ }, Ne = "!", Pe = ":", Fe = [], Ie = (e, t, n, r, i) => ({
340
340
  modifiers: e,
341
341
  hasImportantModifier: t,
342
342
  baseClassName: n,
343
343
  maybePostfixModifierPosition: r,
344
344
  isExternal: i
345
- }), Re = (e) => {
345
+ }), Le = (e) => {
346
346
  let { prefix: t, experimentalParseClassName: n } = e, r = (e) => {
347
347
  let t = [], n = 0, r = 0, i = 0, a, o = e.length;
348
348
  for (let s = 0; s < o; s++) {
349
349
  let o = e[s];
350
350
  if (n === 0 && r === 0) {
351
- if (o === Fe) {
351
+ if (o === Pe) {
352
352
  t.push(e.slice(i, s)), i = s + 1;
353
353
  continue;
354
354
  }
@@ -360,13 +360,13 @@ var he = (e, t) => {
360
360
  o === "[" ? n++ : o === "]" ? n-- : o === "(" ? r++ : o === ")" && r--;
361
361
  }
362
362
  let s = t.length === 0 ? e : e.slice(i), c = s, l = !1;
363
- s.endsWith(Pe) ? (c = s.slice(0, -1), l = !0) : s.startsWith(Pe) && (c = s.slice(1), l = !0);
363
+ s.endsWith(Ne) ? (c = s.slice(0, -1), l = !0) : s.startsWith(Ne) && (c = s.slice(1), l = !0);
364
364
  let u = a && a > i ? a - i : void 0;
365
- return Le(t, l, c, u);
365
+ return Ie(t, l, c, u);
366
366
  };
367
367
  if (t) {
368
- let e = t + Fe, n = r;
369
- r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : Le(Ie, !1, t, void 0, !0);
368
+ let e = t + Pe, n = r;
369
+ r = (t) => t.startsWith(e) ? n(t.slice(e.length)) : Ie(Fe, !1, t, void 0, !0);
370
370
  }
371
371
  if (n) {
372
372
  let e = r;
@@ -376,7 +376,7 @@ var he = (e, t) => {
376
376
  });
377
377
  }
378
378
  return r;
379
- }, ze = (e) => {
379
+ }, Re = (e) => {
380
380
  let t = /* @__PURE__ */ new Map();
381
381
  return e.orderSensitiveModifiers.forEach((e, n) => {
382
382
  t.set(e, 1e6 + n);
@@ -388,13 +388,13 @@ var he = (e, t) => {
388
388
  }
389
389
  return r.length > 0 && (r.sort(), n.push(...r)), n;
390
390
  };
391
- }, Be = (e) => ({
392
- cache: Ne(e.cacheSize),
393
- parseClassName: Re(e),
394
- sortModifiers: ze(e),
395
- ...xe(e)
396
- }), Ve = /\s+/, He = (e, t) => {
397
- let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a } = t, o = [], s = e.trim().split(Ve), c = "";
391
+ }, ze = (e) => ({
392
+ cache: Me(e.cacheSize),
393
+ parseClassName: Le(e),
394
+ sortModifiers: Re(e),
395
+ ...be(e)
396
+ }), Be = /\s+/, Ve = (e, t) => {
397
+ let { parseClassName: n, getClassGroupId: r, getConflictingClassGroupIds: i, sortModifiers: a } = t, o = [], s = e.trim().split(Be), c = "";
398
398
  for (let e = s.length - 1; e >= 0; --e) {
399
399
  let t = s[e], { isExternal: l, modifiers: u, hasImportantModifier: d, baseClassName: f, maybePostfixModifierPosition: p } = n(t);
400
400
  if (l) {
@@ -413,7 +413,7 @@ var he = (e, t) => {
413
413
  }
414
414
  m = !1;
415
415
  }
416
- let g = u.length === 0 ? "" : u.length === 1 ? u[0] : a(u).join(":"), _ = d ? g + Pe : g, v = _ + h;
416
+ let g = u.length === 0 ? "" : u.length === 1 ? u[0] : a(u).join(":"), _ = d ? g + Ne : g, v = _ + h;
417
417
  if (o.indexOf(v) > -1) continue;
418
418
  o.push(v);
419
419
  let y = i(h, m);
@@ -424,34 +424,34 @@ var he = (e, t) => {
424
424
  c = t + (c.length > 0 ? " " + c : c);
425
425
  }
426
426
  return c;
427
- }, Ue = (...e) => {
427
+ }, He = (...e) => {
428
428
  let t = 0, n, r, i = "";
429
- for (; t < e.length;) (n = e[t++]) && (r = We(n)) && (i && (i += " "), i += r);
429
+ for (; t < e.length;) (n = e[t++]) && (r = Ue(n)) && (i && (i += " "), i += r);
430
430
  return i;
431
- }, We = (e) => {
431
+ }, Ue = (e) => {
432
432
  if (typeof e == "string") return e;
433
433
  let t, n = "";
434
- for (let r = 0; r < e.length; r++) e[r] && (t = We(e[r])) && (n && (n += " "), n += t);
434
+ for (let r = 0; r < e.length; r++) e[r] && (t = Ue(e[r])) && (n && (n += " "), n += t);
435
435
  return n;
436
- }, Ge = (e, ...t) => {
437
- let n, r, i, a, o = (o) => (n = Be(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
436
+ }, We = (e, ...t) => {
437
+ let n, r, i, a, o = (o) => (n = ze(t.reduce((e, t) => t(e), e())), r = n.cache.get, i = n.cache.set, a = s, s(o)), s = (e) => {
438
438
  let t = r(e);
439
439
  if (t) return t;
440
- let a = He(e, n);
440
+ let a = Ve(e, n);
441
441
  return i(e, a), a;
442
442
  };
443
- return a = o, (...e) => a(Ue(...e));
444
- }, Ke = [], z = (e) => {
445
- let t = (t) => t[e] || Ke;
443
+ return a = o, (...e) => a(He(...e));
444
+ }, Ge = [], B = (e) => {
445
+ let t = (t) => t[e] || Ge;
446
446
  return t.isThemeGetter = !0, t;
447
- }, qe = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, Je = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Ye = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Xe = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Ze = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Qe = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, $e = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, et = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, tt = (e) => Ye.test(e), B = (e) => !!e && !Number.isNaN(Number(e)), nt = (e) => !!e && Number.isInteger(Number(e)), rt = (e) => e.endsWith("%") && B(e.slice(0, -1)), it = (e) => Xe.test(e), at = () => !0, ot = (e) => Ze.test(e) && !Qe.test(e), st = () => !1, ct = (e) => $e.test(e), lt = (e) => et.test(e), ut = (e) => !V(e) && !H(e), dt = (e) => Et(e, At, st), V = (e) => qe.test(e), ft = (e) => Et(e, jt, ot), pt = (e) => Et(e, Mt, B), mt = (e) => Et(e, Pt, at), ht = (e) => Et(e, Nt, st), gt = (e) => Et(e, Ot, st), _t = (e) => Et(e, kt, lt), vt = (e) => Et(e, Ft, ct), H = (e) => Je.test(e), yt = (e) => Dt(e, jt), bt = (e) => Dt(e, Nt), xt = (e) => Dt(e, Ot), St = (e) => Dt(e, At), Ct = (e) => Dt(e, kt), wt = (e) => Dt(e, Ft, !0), Tt = (e) => Dt(e, Pt, !0), Et = (e, t, n) => {
448
- let r = qe.exec(e);
447
+ }, Ke = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, qe = /^\((?:(\w[\w-]*):)?(.+)\)$/i, Je = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/, Ye = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Xe = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Ze = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, Qe = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, $e = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, et = (e) => Je.test(e), V = (e) => !!e && !Number.isNaN(Number(e)), tt = (e) => !!e && Number.isInteger(Number(e)), nt = (e) => e.endsWith("%") && V(e.slice(0, -1)), rt = (e) => Ye.test(e), it = () => !0, at = (e) => Xe.test(e) && !Ze.test(e), ot = () => !1, st = (e) => Qe.test(e), ct = (e) => $e.test(e), lt = (e) => !H(e) && !U(e), ut = (e) => Tt(e, kt, ot), H = (e) => Ke.test(e), dt = (e) => Tt(e, At, at), ft = (e) => Tt(e, jt, V), pt = (e) => Tt(e, Nt, it), mt = (e) => Tt(e, Mt, ot), ht = (e) => Tt(e, Dt, ot), gt = (e) => Tt(e, Ot, ct), _t = (e) => Tt(e, Pt, st), U = (e) => qe.test(e), vt = (e) => Et(e, At), yt = (e) => Et(e, Mt), bt = (e) => Et(e, Dt), xt = (e) => Et(e, kt), St = (e) => Et(e, Ot), Ct = (e) => Et(e, Pt, !0), wt = (e) => Et(e, Nt, !0), Tt = (e, t, n) => {
448
+ let r = Ke.exec(e);
449
449
  return r ? r[1] ? t(r[1]) : n(r[2]) : !1;
450
- }, Dt = (e, t, n = !1) => {
451
- let r = Je.exec(e);
450
+ }, Et = (e, t, n = !1) => {
451
+ let r = qe.exec(e);
452
452
  return r ? r[1] ? t(r[1]) : n : !1;
453
- }, Ot = (e) => e === "position" || e === "percentage", kt = (e) => e === "image" || e === "url", At = (e) => e === "length" || e === "size" || e === "bg-size", jt = (e) => e === "length", Mt = (e) => e === "number", Nt = (e) => e === "family-name", Pt = (e) => e === "number" || e === "weight", Ft = (e) => e === "shadow", It = /* @__PURE__ */ Ge(() => {
454
- let e = z("color"), t = z("font"), n = z("text"), r = z("font-weight"), i = z("tracking"), a = z("leading"), o = z("breakpoint"), s = z("container"), c = z("spacing"), l = z("radius"), u = z("shadow"), d = z("inset-shadow"), f = z("text-shadow"), p = z("drop-shadow"), m = z("blur"), h = z("perspective"), g = z("aspect"), _ = z("ease"), v = z("animate"), y = () => [
453
+ }, Dt = (e) => e === "position" || e === "percentage", Ot = (e) => e === "image" || e === "url", kt = (e) => e === "length" || e === "size" || e === "bg-size", At = (e) => e === "length", jt = (e) => e === "number", Mt = (e) => e === "family-name", Nt = (e) => e === "number" || e === "weight", Pt = (e) => e === "shadow", Ft = /* @__PURE__ */ We(() => {
454
+ let e = B("color"), t = B("font"), n = B("text"), r = B("font-weight"), i = B("tracking"), a = B("leading"), o = B("breakpoint"), s = B("container"), c = B("spacing"), l = B("radius"), u = B("shadow"), d = B("inset-shadow"), f = B("text-shadow"), p = B("drop-shadow"), m = B("blur"), h = B("perspective"), g = B("aspect"), _ = B("ease"), v = B("animate"), y = () => [
455
455
  "auto",
456
456
  "avoid",
457
457
  "all",
@@ -476,8 +476,8 @@ var he = (e, t) => {
476
476
  "left-bottom"
477
477
  ], x = () => [
478
478
  ...b(),
479
- H,
480
- V
479
+ U,
480
+ H
481
481
  ], S = () => [
482
482
  "auto",
483
483
  "hidden",
@@ -489,43 +489,43 @@ var he = (e, t) => {
489
489
  "contain",
490
490
  "none"
491
491
  ], w = () => [
492
+ U,
492
493
  H,
493
- V,
494
494
  c
495
495
  ], T = () => [
496
- tt,
496
+ et,
497
497
  "full",
498
498
  "auto",
499
499
  ...w()
500
500
  ], E = () => [
501
- nt,
501
+ tt,
502
502
  "none",
503
503
  "subgrid",
504
- H,
505
- V
504
+ U,
505
+ H
506
506
  ], D = () => [
507
507
  "auto",
508
508
  { span: [
509
509
  "full",
510
- nt,
511
- H,
512
- V
510
+ tt,
511
+ U,
512
+ H
513
513
  ] },
514
- nt,
515
- H,
516
- V
514
+ tt,
515
+ U,
516
+ H
517
517
  ], O = () => [
518
- nt,
518
+ tt,
519
519
  "auto",
520
- H,
521
- V
520
+ U,
521
+ H
522
522
  ], k = () => [
523
523
  "auto",
524
524
  "min",
525
525
  "max",
526
526
  "fr",
527
- H,
528
- V
527
+ U,
528
+ H
529
529
  ], A = () => [
530
530
  "start",
531
531
  "end",
@@ -545,7 +545,7 @@ var he = (e, t) => {
545
545
  "center-safe",
546
546
  "end-safe"
547
547
  ], M = () => ["auto", ...w()], N = () => [
548
- tt,
548
+ et,
549
549
  "auto",
550
550
  "full",
551
551
  "dvw",
@@ -559,7 +559,7 @@ var he = (e, t) => {
559
559
  "fit",
560
560
  ...w()
561
561
  ], ee = () => [
562
- tt,
562
+ et,
563
563
  "screen",
564
564
  "full",
565
565
  "dvw",
@@ -569,8 +569,8 @@ var he = (e, t) => {
569
569
  "max",
570
570
  "fit",
571
571
  ...w()
572
- ], te = () => [
573
- tt,
572
+ ], P = () => [
573
+ et,
574
574
  "screen",
575
575
  "full",
576
576
  "lh",
@@ -581,15 +581,15 @@ var he = (e, t) => {
581
581
  "max",
582
582
  "fit",
583
583
  ...w()
584
- ], P = () => [
585
- e,
586
- H,
587
- V
588
584
  ], F = () => [
585
+ e,
586
+ U,
587
+ H
588
+ ], te = () => [
589
589
  ...b(),
590
- xt,
591
- gt,
592
- { position: [H, V] }
590
+ bt,
591
+ ht,
592
+ { position: [U, H] }
593
593
  ], ne = () => ["no-repeat", { repeat: [
594
594
  "",
595
595
  "x",
@@ -600,31 +600,31 @@ var he = (e, t) => {
600
600
  "auto",
601
601
  "cover",
602
602
  "contain",
603
- St,
604
- dt,
605
- { size: [H, V] }
603
+ xt,
604
+ ut,
605
+ { size: [U, H] }
606
606
  ], ie = () => [
607
- rt,
608
- yt,
609
- ft
607
+ nt,
608
+ vt,
609
+ dt
610
610
  ], I = () => [
611
611
  "",
612
612
  "none",
613
613
  "full",
614
614
  l,
615
- H,
616
- V
615
+ U,
616
+ H
617
617
  ], L = () => [
618
618
  "",
619
- B,
620
- yt,
621
- ft
622
- ], ae = () => [
619
+ V,
620
+ vt,
621
+ dt
622
+ ], R = () => [
623
623
  "solid",
624
624
  "dashed",
625
625
  "dotted",
626
626
  "double"
627
- ], oe = () => [
627
+ ], ae = () => [
628
628
  "normal",
629
629
  "multiply",
630
630
  "screen",
@@ -641,33 +641,33 @@ var he = (e, t) => {
641
641
  "saturation",
642
642
  "color",
643
643
  "luminosity"
644
- ], R = () => [
645
- B,
646
- rt,
647
- xt,
648
- gt
649
- ], se = () => [
644
+ ], z = () => [
645
+ V,
646
+ nt,
647
+ bt,
648
+ ht
649
+ ], oe = () => [
650
650
  "",
651
651
  "none",
652
652
  m,
653
- H,
654
- V
653
+ U,
654
+ H
655
+ ], se = () => [
656
+ "none",
657
+ V,
658
+ U,
659
+ H
655
660
  ], ce = () => [
656
661
  "none",
657
- B,
658
- H,
659
- V
662
+ V,
663
+ U,
664
+ H
660
665
  ], le = () => [
661
- "none",
662
- B,
663
- H,
664
- V
666
+ V,
667
+ U,
668
+ H
665
669
  ], ue = () => [
666
- B,
667
- H,
668
- V
669
- ], de = () => [
670
- tt,
670
+ et,
671
671
  "full",
672
672
  ...w()
673
673
  ];
@@ -681,17 +681,17 @@ var he = (e, t) => {
681
681
  "bounce"
682
682
  ],
683
683
  aspect: ["video"],
684
- blur: [it],
685
- breakpoint: [it],
686
- color: [at],
687
- container: [it],
688
- "drop-shadow": [it],
684
+ blur: [rt],
685
+ breakpoint: [rt],
686
+ color: [it],
687
+ container: [rt],
688
+ "drop-shadow": [rt],
689
689
  ease: [
690
690
  "in",
691
691
  "out",
692
692
  "in-out"
693
693
  ],
694
- font: [ut],
694
+ font: [lt],
695
695
  "font-weight": [
696
696
  "thin",
697
697
  "extralight",
@@ -703,7 +703,7 @@ var he = (e, t) => {
703
703
  "extrabold",
704
704
  "black"
705
705
  ],
706
- "inset-shadow": [it],
706
+ "inset-shadow": [rt],
707
707
  leading: [
708
708
  "none",
709
709
  "tight",
@@ -720,11 +720,11 @@ var he = (e, t) => {
720
720
  "distant",
721
721
  "none"
722
722
  ],
723
- radius: [it],
724
- shadow: [it],
725
- spacing: ["px", B],
726
- text: [it],
727
- "text-shadow": [it],
723
+ radius: [rt],
724
+ shadow: [rt],
725
+ spacing: ["px", V],
726
+ text: [rt],
727
+ "text-shadow": [rt],
728
728
  tracking: [
729
729
  "tighter",
730
730
  "tight",
@@ -738,16 +738,16 @@ var he = (e, t) => {
738
738
  aspect: [{ aspect: [
739
739
  "auto",
740
740
  "square",
741
- tt,
742
- V,
741
+ et,
743
742
  H,
743
+ U,
744
744
  g
745
745
  ] }],
746
746
  container: ["container"],
747
747
  columns: [{ columns: [
748
- B,
749
748
  V,
750
749
  H,
750
+ U,
751
751
  s
752
752
  ] }],
753
753
  "break-after": [{ "break-after": y() }],
@@ -844,13 +844,13 @@ var he = (e, t) => {
844
844
  "collapse"
845
845
  ],
846
846
  z: [{ z: [
847
- nt,
847
+ tt,
848
848
  "auto",
849
- H,
850
- V
849
+ U,
850
+ H
851
851
  ] }],
852
852
  basis: [{ basis: [
853
- tt,
853
+ et,
854
854
  "full",
855
855
  "auto",
856
856
  s,
@@ -868,32 +868,32 @@ var he = (e, t) => {
868
868
  "wrap-reverse"
869
869
  ] }],
870
870
  flex: [{ flex: [
871
- B,
872
- tt,
871
+ V,
872
+ et,
873
873
  "auto",
874
874
  "initial",
875
875
  "none",
876
- V
876
+ H
877
877
  ] }],
878
878
  grow: [{ grow: [
879
879
  "",
880
- B,
881
- H,
882
- V
880
+ V,
881
+ U,
882
+ H
883
883
  ] }],
884
884
  shrink: [{ shrink: [
885
885
  "",
886
- B,
887
- H,
888
- V
886
+ V,
887
+ U,
888
+ H
889
889
  ] }],
890
890
  order: [{ order: [
891
- nt,
891
+ tt,
892
892
  "first",
893
893
  "last",
894
894
  "none",
895
- H,
896
- V
895
+ U,
896
+ H
897
897
  ] }],
898
898
  "grid-cols": [{ "grid-cols": E() }],
899
899
  "col-start-end": [{ col: D() }],
@@ -958,9 +958,9 @@ var he = (e, t) => {
958
958
  "inline-size": [{ inline: ["auto", ...ee()] }],
959
959
  "min-inline-size": [{ "min-inline": ["auto", ...ee()] }],
960
960
  "max-inline-size": [{ "max-inline": ["none", ...ee()] }],
961
- "block-size": [{ block: ["auto", ...te()] }],
962
- "min-block-size": [{ "min-block": ["auto", ...te()] }],
963
- "max-block-size": [{ "max-block": ["none", ...te()] }],
961
+ "block-size": [{ block: ["auto", ...P()] }],
962
+ "min-block-size": [{ "min-block": ["auto", ...P()] }],
963
+ "max-block-size": [{ "max-block": ["none", ...P()] }],
964
964
  w: [{ w: [
965
965
  s,
966
966
  "screen",
@@ -999,15 +999,15 @@ var he = (e, t) => {
999
999
  "font-size": [{ text: [
1000
1000
  "base",
1001
1001
  n,
1002
- yt,
1003
- ft
1002
+ vt,
1003
+ dt
1004
1004
  ] }],
1005
1005
  "font-smoothing": ["antialiased", "subpixel-antialiased"],
1006
1006
  "font-style": ["italic", "not-italic"],
1007
1007
  "font-weight": [{ font: [
1008
1008
  r,
1009
- Tt,
1010
- mt
1009
+ wt,
1010
+ pt
1011
1011
  ] }],
1012
1012
  "font-stretch": [{ "font-stretch": [
1013
1013
  "ultra-condensed",
@@ -1019,15 +1019,15 @@ var he = (e, t) => {
1019
1019
  "expanded",
1020
1020
  "extra-expanded",
1021
1021
  "ultra-expanded",
1022
- rt,
1023
- V
1022
+ nt,
1023
+ H
1024
1024
  ] }],
1025
1025
  "font-family": [{ font: [
1026
- bt,
1027
- ht,
1026
+ yt,
1027
+ mt,
1028
1028
  t
1029
1029
  ] }],
1030
- "font-features": [{ "font-features": [V] }],
1030
+ "font-features": [{ "font-features": [H] }],
1031
1031
  "fvn-normal": ["normal-nums"],
1032
1032
  "fvn-ordinal": ["ordinal"],
1033
1033
  "fvn-slashed-zero": ["slashed-zero"],
@@ -1036,28 +1036,28 @@ var he = (e, t) => {
1036
1036
  "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1037
1037
  tracking: [{ tracking: [
1038
1038
  i,
1039
- H,
1040
- V
1039
+ U,
1040
+ H
1041
1041
  ] }],
1042
1042
  "line-clamp": [{ "line-clamp": [
1043
- B,
1043
+ V,
1044
1044
  "none",
1045
- H,
1046
- pt
1045
+ U,
1046
+ ft
1047
1047
  ] }],
1048
1048
  leading: [{ leading: [a, ...w()] }],
1049
1049
  "list-image": [{ "list-image": [
1050
1050
  "none",
1051
- H,
1052
- V
1051
+ U,
1052
+ H
1053
1053
  ] }],
1054
1054
  "list-style-position": [{ list: ["inside", "outside"] }],
1055
1055
  "list-style-type": [{ list: [
1056
1056
  "disc",
1057
1057
  "decimal",
1058
1058
  "none",
1059
- H,
1060
- V
1059
+ U,
1060
+ H
1061
1061
  ] }],
1062
1062
  "text-alignment": [{ text: [
1063
1063
  "left",
@@ -1067,28 +1067,28 @@ var he = (e, t) => {
1067
1067
  "start",
1068
1068
  "end"
1069
1069
  ] }],
1070
- "placeholder-color": [{ placeholder: P() }],
1071
- "text-color": [{ text: P() }],
1070
+ "placeholder-color": [{ placeholder: F() }],
1071
+ "text-color": [{ text: F() }],
1072
1072
  "text-decoration": [
1073
1073
  "underline",
1074
1074
  "overline",
1075
1075
  "line-through",
1076
1076
  "no-underline"
1077
1077
  ],
1078
- "text-decoration-style": [{ decoration: [...ae(), "wavy"] }],
1078
+ "text-decoration-style": [{ decoration: [...R(), "wavy"] }],
1079
1079
  "text-decoration-thickness": [{ decoration: [
1080
- B,
1080
+ V,
1081
1081
  "from-font",
1082
1082
  "auto",
1083
- H,
1084
- ft
1083
+ U,
1084
+ dt
1085
1085
  ] }],
1086
- "text-decoration-color": [{ decoration: P() }],
1086
+ "text-decoration-color": [{ decoration: F() }],
1087
1087
  "underline-offset": [{ "underline-offset": [
1088
- B,
1088
+ V,
1089
1089
  "auto",
1090
- H,
1091
- V
1090
+ U,
1091
+ H
1092
1092
  ] }],
1093
1093
  "text-transform": [
1094
1094
  "uppercase",
@@ -1117,8 +1117,8 @@ var he = (e, t) => {
1117
1117
  "text-bottom",
1118
1118
  "sub",
1119
1119
  "super",
1120
- H,
1121
- V
1120
+ U,
1121
+ H
1122
1122
  ] }],
1123
1123
  whitespace: [{ whitespace: [
1124
1124
  "normal",
@@ -1146,8 +1146,8 @@ var he = (e, t) => {
1146
1146
  ] }],
1147
1147
  content: [{ content: [
1148
1148
  "none",
1149
- H,
1150
- V
1149
+ U,
1150
+ H
1151
1151
  ] }],
1152
1152
  "bg-attachment": [{ bg: [
1153
1153
  "fixed",
@@ -1165,7 +1165,7 @@ var he = (e, t) => {
1165
1165
  "padding",
1166
1166
  "content"
1167
1167
  ] }],
1168
- "bg-position": [{ bg: F() }],
1168
+ "bg-position": [{ bg: te() }],
1169
1169
  "bg-repeat": [{ bg: ne() }],
1170
1170
  "bg-size": [{ bg: re() }],
1171
1171
  "bg-image": [{ bg: [
@@ -1182,31 +1182,31 @@ var he = (e, t) => {
1182
1182
  "l",
1183
1183
  "tl"
1184
1184
  ] },
1185
- nt,
1186
- H,
1187
- V
1185
+ tt,
1186
+ U,
1187
+ H
1188
1188
  ],
1189
1189
  radial: [
1190
1190
  "",
1191
- H,
1192
- V
1191
+ U,
1192
+ H
1193
1193
  ],
1194
1194
  conic: [
1195
- nt,
1196
- H,
1197
- V
1195
+ tt,
1196
+ U,
1197
+ H
1198
1198
  ]
1199
1199
  },
1200
- Ct,
1201
- _t
1200
+ St,
1201
+ gt
1202
1202
  ] }],
1203
- "bg-color": [{ bg: P() }],
1203
+ "bg-color": [{ bg: F() }],
1204
1204
  "gradient-from-pos": [{ from: ie() }],
1205
1205
  "gradient-via-pos": [{ via: ie() }],
1206
1206
  "gradient-to-pos": [{ to: ie() }],
1207
- "gradient-from": [{ from: P() }],
1208
- "gradient-via": [{ via: P() }],
1209
- "gradient-to": [{ to: P() }],
1207
+ "gradient-from": [{ from: F() }],
1208
+ "gradient-via": [{ via: F() }],
1209
+ "gradient-to": [{ to: F() }],
1210
1210
  rounded: [{ rounded: I() }],
1211
1211
  "rounded-s": [{ "rounded-s": I() }],
1212
1212
  "rounded-e": [{ "rounded-e": I() }],
@@ -1238,84 +1238,84 @@ var he = (e, t) => {
1238
1238
  "divide-y": [{ "divide-y": L() }],
1239
1239
  "divide-y-reverse": ["divide-y-reverse"],
1240
1240
  "border-style": [{ border: [
1241
- ...ae(),
1241
+ ...R(),
1242
1242
  "hidden",
1243
1243
  "none"
1244
1244
  ] }],
1245
1245
  "divide-style": [{ divide: [
1246
- ...ae(),
1246
+ ...R(),
1247
1247
  "hidden",
1248
1248
  "none"
1249
1249
  ] }],
1250
- "border-color": [{ border: P() }],
1251
- "border-color-x": [{ "border-x": P() }],
1252
- "border-color-y": [{ "border-y": P() }],
1253
- "border-color-s": [{ "border-s": P() }],
1254
- "border-color-e": [{ "border-e": P() }],
1255
- "border-color-bs": [{ "border-bs": P() }],
1256
- "border-color-be": [{ "border-be": P() }],
1257
- "border-color-t": [{ "border-t": P() }],
1258
- "border-color-r": [{ "border-r": P() }],
1259
- "border-color-b": [{ "border-b": P() }],
1260
- "border-color-l": [{ "border-l": P() }],
1261
- "divide-color": [{ divide: P() }],
1250
+ "border-color": [{ border: F() }],
1251
+ "border-color-x": [{ "border-x": F() }],
1252
+ "border-color-y": [{ "border-y": F() }],
1253
+ "border-color-s": [{ "border-s": F() }],
1254
+ "border-color-e": [{ "border-e": F() }],
1255
+ "border-color-bs": [{ "border-bs": F() }],
1256
+ "border-color-be": [{ "border-be": F() }],
1257
+ "border-color-t": [{ "border-t": F() }],
1258
+ "border-color-r": [{ "border-r": F() }],
1259
+ "border-color-b": [{ "border-b": F() }],
1260
+ "border-color-l": [{ "border-l": F() }],
1261
+ "divide-color": [{ divide: F() }],
1262
1262
  "outline-style": [{ outline: [
1263
- ...ae(),
1263
+ ...R(),
1264
1264
  "none",
1265
1265
  "hidden"
1266
1266
  ] }],
1267
1267
  "outline-offset": [{ "outline-offset": [
1268
- B,
1269
- H,
1270
- V
1268
+ V,
1269
+ U,
1270
+ H
1271
1271
  ] }],
1272
1272
  "outline-w": [{ outline: [
1273
1273
  "",
1274
- B,
1275
- yt,
1276
- ft
1274
+ V,
1275
+ vt,
1276
+ dt
1277
1277
  ] }],
1278
- "outline-color": [{ outline: P() }],
1278
+ "outline-color": [{ outline: F() }],
1279
1279
  shadow: [{ shadow: [
1280
1280
  "",
1281
1281
  "none",
1282
1282
  u,
1283
- wt,
1284
- vt
1283
+ Ct,
1284
+ _t
1285
1285
  ] }],
1286
- "shadow-color": [{ shadow: P() }],
1286
+ "shadow-color": [{ shadow: F() }],
1287
1287
  "inset-shadow": [{ "inset-shadow": [
1288
1288
  "none",
1289
1289
  d,
1290
- wt,
1291
- vt
1290
+ Ct,
1291
+ _t
1292
1292
  ] }],
1293
- "inset-shadow-color": [{ "inset-shadow": P() }],
1293
+ "inset-shadow-color": [{ "inset-shadow": F() }],
1294
1294
  "ring-w": [{ ring: L() }],
1295
1295
  "ring-w-inset": ["ring-inset"],
1296
- "ring-color": [{ ring: P() }],
1297
- "ring-offset-w": [{ "ring-offset": [B, ft] }],
1298
- "ring-offset-color": [{ "ring-offset": P() }],
1296
+ "ring-color": [{ ring: F() }],
1297
+ "ring-offset-w": [{ "ring-offset": [V, dt] }],
1298
+ "ring-offset-color": [{ "ring-offset": F() }],
1299
1299
  "inset-ring-w": [{ "inset-ring": L() }],
1300
- "inset-ring-color": [{ "inset-ring": P() }],
1300
+ "inset-ring-color": [{ "inset-ring": F() }],
1301
1301
  "text-shadow": [{ "text-shadow": [
1302
1302
  "none",
1303
1303
  f,
1304
- wt,
1305
- vt
1304
+ Ct,
1305
+ _t
1306
1306
  ] }],
1307
- "text-shadow-color": [{ "text-shadow": P() }],
1307
+ "text-shadow-color": [{ "text-shadow": F() }],
1308
1308
  opacity: [{ opacity: [
1309
- B,
1310
- H,
1311
- V
1309
+ V,
1310
+ U,
1311
+ H
1312
1312
  ] }],
1313
1313
  "mix-blend": [{ "mix-blend": [
1314
- ...oe(),
1314
+ ...ae(),
1315
1315
  "plus-darker",
1316
1316
  "plus-lighter"
1317
1317
  ] }],
1318
- "bg-blend": [{ "bg-blend": oe() }],
1318
+ "bg-blend": [{ "bg-blend": ae() }],
1319
1319
  "mask-clip": [{ "mask-clip": [
1320
1320
  "border",
1321
1321
  "padding",
@@ -1330,51 +1330,51 @@ var he = (e, t) => {
1330
1330
  "intersect",
1331
1331
  "exclude"
1332
1332
  ] }],
1333
- "mask-image-linear-pos": [{ "mask-linear": [B] }],
1334
- "mask-image-linear-from-pos": [{ "mask-linear-from": R() }],
1335
- "mask-image-linear-to-pos": [{ "mask-linear-to": R() }],
1336
- "mask-image-linear-from-color": [{ "mask-linear-from": P() }],
1337
- "mask-image-linear-to-color": [{ "mask-linear-to": P() }],
1338
- "mask-image-t-from-pos": [{ "mask-t-from": R() }],
1339
- "mask-image-t-to-pos": [{ "mask-t-to": R() }],
1340
- "mask-image-t-from-color": [{ "mask-t-from": P() }],
1341
- "mask-image-t-to-color": [{ "mask-t-to": P() }],
1342
- "mask-image-r-from-pos": [{ "mask-r-from": R() }],
1343
- "mask-image-r-to-pos": [{ "mask-r-to": R() }],
1344
- "mask-image-r-from-color": [{ "mask-r-from": P() }],
1345
- "mask-image-r-to-color": [{ "mask-r-to": P() }],
1346
- "mask-image-b-from-pos": [{ "mask-b-from": R() }],
1347
- "mask-image-b-to-pos": [{ "mask-b-to": R() }],
1348
- "mask-image-b-from-color": [{ "mask-b-from": P() }],
1349
- "mask-image-b-to-color": [{ "mask-b-to": P() }],
1350
- "mask-image-l-from-pos": [{ "mask-l-from": R() }],
1351
- "mask-image-l-to-pos": [{ "mask-l-to": R() }],
1352
- "mask-image-l-from-color": [{ "mask-l-from": P() }],
1353
- "mask-image-l-to-color": [{ "mask-l-to": P() }],
1354
- "mask-image-x-from-pos": [{ "mask-x-from": R() }],
1355
- "mask-image-x-to-pos": [{ "mask-x-to": R() }],
1356
- "mask-image-x-from-color": [{ "mask-x-from": P() }],
1357
- "mask-image-x-to-color": [{ "mask-x-to": P() }],
1358
- "mask-image-y-from-pos": [{ "mask-y-from": R() }],
1359
- "mask-image-y-to-pos": [{ "mask-y-to": R() }],
1360
- "mask-image-y-from-color": [{ "mask-y-from": P() }],
1361
- "mask-image-y-to-color": [{ "mask-y-to": P() }],
1362
- "mask-image-radial": [{ "mask-radial": [H, V] }],
1363
- "mask-image-radial-from-pos": [{ "mask-radial-from": R() }],
1364
- "mask-image-radial-to-pos": [{ "mask-radial-to": R() }],
1365
- "mask-image-radial-from-color": [{ "mask-radial-from": P() }],
1366
- "mask-image-radial-to-color": [{ "mask-radial-to": P() }],
1333
+ "mask-image-linear-pos": [{ "mask-linear": [V] }],
1334
+ "mask-image-linear-from-pos": [{ "mask-linear-from": z() }],
1335
+ "mask-image-linear-to-pos": [{ "mask-linear-to": z() }],
1336
+ "mask-image-linear-from-color": [{ "mask-linear-from": F() }],
1337
+ "mask-image-linear-to-color": [{ "mask-linear-to": F() }],
1338
+ "mask-image-t-from-pos": [{ "mask-t-from": z() }],
1339
+ "mask-image-t-to-pos": [{ "mask-t-to": z() }],
1340
+ "mask-image-t-from-color": [{ "mask-t-from": F() }],
1341
+ "mask-image-t-to-color": [{ "mask-t-to": F() }],
1342
+ "mask-image-r-from-pos": [{ "mask-r-from": z() }],
1343
+ "mask-image-r-to-pos": [{ "mask-r-to": z() }],
1344
+ "mask-image-r-from-color": [{ "mask-r-from": F() }],
1345
+ "mask-image-r-to-color": [{ "mask-r-to": F() }],
1346
+ "mask-image-b-from-pos": [{ "mask-b-from": z() }],
1347
+ "mask-image-b-to-pos": [{ "mask-b-to": z() }],
1348
+ "mask-image-b-from-color": [{ "mask-b-from": F() }],
1349
+ "mask-image-b-to-color": [{ "mask-b-to": F() }],
1350
+ "mask-image-l-from-pos": [{ "mask-l-from": z() }],
1351
+ "mask-image-l-to-pos": [{ "mask-l-to": z() }],
1352
+ "mask-image-l-from-color": [{ "mask-l-from": F() }],
1353
+ "mask-image-l-to-color": [{ "mask-l-to": F() }],
1354
+ "mask-image-x-from-pos": [{ "mask-x-from": z() }],
1355
+ "mask-image-x-to-pos": [{ "mask-x-to": z() }],
1356
+ "mask-image-x-from-color": [{ "mask-x-from": F() }],
1357
+ "mask-image-x-to-color": [{ "mask-x-to": F() }],
1358
+ "mask-image-y-from-pos": [{ "mask-y-from": z() }],
1359
+ "mask-image-y-to-pos": [{ "mask-y-to": z() }],
1360
+ "mask-image-y-from-color": [{ "mask-y-from": F() }],
1361
+ "mask-image-y-to-color": [{ "mask-y-to": F() }],
1362
+ "mask-image-radial": [{ "mask-radial": [U, H] }],
1363
+ "mask-image-radial-from-pos": [{ "mask-radial-from": z() }],
1364
+ "mask-image-radial-to-pos": [{ "mask-radial-to": z() }],
1365
+ "mask-image-radial-from-color": [{ "mask-radial-from": F() }],
1366
+ "mask-image-radial-to-color": [{ "mask-radial-to": F() }],
1367
1367
  "mask-image-radial-shape": [{ "mask-radial": ["circle", "ellipse"] }],
1368
1368
  "mask-image-radial-size": [{ "mask-radial": [{
1369
1369
  closest: ["side", "corner"],
1370
1370
  farthest: ["side", "corner"]
1371
1371
  }] }],
1372
1372
  "mask-image-radial-pos": [{ "mask-radial-at": b() }],
1373
- "mask-image-conic-pos": [{ "mask-conic": [B] }],
1374
- "mask-image-conic-from-pos": [{ "mask-conic-from": R() }],
1375
- "mask-image-conic-to-pos": [{ "mask-conic-to": R() }],
1376
- "mask-image-conic-from-color": [{ "mask-conic-from": P() }],
1377
- "mask-image-conic-to-color": [{ "mask-conic-to": P() }],
1373
+ "mask-image-conic-pos": [{ "mask-conic": [V] }],
1374
+ "mask-image-conic-from-pos": [{ "mask-conic-from": z() }],
1375
+ "mask-image-conic-to-pos": [{ "mask-conic-to": z() }],
1376
+ "mask-image-conic-from-color": [{ "mask-conic-from": F() }],
1377
+ "mask-image-conic-to-color": [{ "mask-conic-to": F() }],
1378
1378
  "mask-mode": [{ mask: [
1379
1379
  "alpha",
1380
1380
  "luminance",
@@ -1388,117 +1388,117 @@ var he = (e, t) => {
1388
1388
  "stroke",
1389
1389
  "view"
1390
1390
  ] }],
1391
- "mask-position": [{ mask: F() }],
1391
+ "mask-position": [{ mask: te() }],
1392
1392
  "mask-repeat": [{ mask: ne() }],
1393
1393
  "mask-size": [{ mask: re() }],
1394
1394
  "mask-type": [{ "mask-type": ["alpha", "luminance"] }],
1395
1395
  "mask-image": [{ mask: [
1396
1396
  "none",
1397
- H,
1398
- V
1397
+ U,
1398
+ H
1399
1399
  ] }],
1400
1400
  filter: [{ filter: [
1401
1401
  "",
1402
1402
  "none",
1403
- H,
1404
- V
1403
+ U,
1404
+ H
1405
1405
  ] }],
1406
- blur: [{ blur: se() }],
1406
+ blur: [{ blur: oe() }],
1407
1407
  brightness: [{ brightness: [
1408
- B,
1409
- H,
1410
- V
1408
+ V,
1409
+ U,
1410
+ H
1411
1411
  ] }],
1412
1412
  contrast: [{ contrast: [
1413
- B,
1414
- H,
1415
- V
1413
+ V,
1414
+ U,
1415
+ H
1416
1416
  ] }],
1417
1417
  "drop-shadow": [{ "drop-shadow": [
1418
1418
  "",
1419
1419
  "none",
1420
1420
  p,
1421
- wt,
1422
- vt
1421
+ Ct,
1422
+ _t
1423
1423
  ] }],
1424
- "drop-shadow-color": [{ "drop-shadow": P() }],
1424
+ "drop-shadow-color": [{ "drop-shadow": F() }],
1425
1425
  grayscale: [{ grayscale: [
1426
1426
  "",
1427
- B,
1428
- H,
1429
- V
1427
+ V,
1428
+ U,
1429
+ H
1430
1430
  ] }],
1431
1431
  "hue-rotate": [{ "hue-rotate": [
1432
- B,
1433
- H,
1434
- V
1432
+ V,
1433
+ U,
1434
+ H
1435
1435
  ] }],
1436
1436
  invert: [{ invert: [
1437
1437
  "",
1438
- B,
1439
- H,
1440
- V
1438
+ V,
1439
+ U,
1440
+ H
1441
1441
  ] }],
1442
1442
  saturate: [{ saturate: [
1443
- B,
1444
- H,
1445
- V
1443
+ V,
1444
+ U,
1445
+ H
1446
1446
  ] }],
1447
1447
  sepia: [{ sepia: [
1448
1448
  "",
1449
- B,
1450
- H,
1451
- V
1449
+ V,
1450
+ U,
1451
+ H
1452
1452
  ] }],
1453
1453
  "backdrop-filter": [{ "backdrop-filter": [
1454
1454
  "",
1455
1455
  "none",
1456
- H,
1457
- V
1456
+ U,
1457
+ H
1458
1458
  ] }],
1459
- "backdrop-blur": [{ "backdrop-blur": se() }],
1459
+ "backdrop-blur": [{ "backdrop-blur": oe() }],
1460
1460
  "backdrop-brightness": [{ "backdrop-brightness": [
1461
- B,
1462
- H,
1463
- V
1461
+ V,
1462
+ U,
1463
+ H
1464
1464
  ] }],
1465
1465
  "backdrop-contrast": [{ "backdrop-contrast": [
1466
- B,
1467
- H,
1468
- V
1466
+ V,
1467
+ U,
1468
+ H
1469
1469
  ] }],
1470
1470
  "backdrop-grayscale": [{ "backdrop-grayscale": [
1471
1471
  "",
1472
- B,
1473
- H,
1474
- V
1472
+ V,
1473
+ U,
1474
+ H
1475
1475
  ] }],
1476
1476
  "backdrop-hue-rotate": [{ "backdrop-hue-rotate": [
1477
- B,
1478
- H,
1479
- V
1477
+ V,
1478
+ U,
1479
+ H
1480
1480
  ] }],
1481
1481
  "backdrop-invert": [{ "backdrop-invert": [
1482
1482
  "",
1483
- B,
1484
- H,
1485
- V
1483
+ V,
1484
+ U,
1485
+ H
1486
1486
  ] }],
1487
1487
  "backdrop-opacity": [{ "backdrop-opacity": [
1488
- B,
1489
- H,
1490
- V
1488
+ V,
1489
+ U,
1490
+ H
1491
1491
  ] }],
1492
1492
  "backdrop-saturate": [{ "backdrop-saturate": [
1493
- B,
1494
- H,
1495
- V
1493
+ V,
1494
+ U,
1495
+ H
1496
1496
  ] }],
1497
1497
  "backdrop-sepia": [{ "backdrop-sepia": [
1498
1498
  "",
1499
- B,
1500
- H,
1501
- V
1499
+ V,
1500
+ U,
1501
+ H
1502
1502
  ] }],
1503
1503
  "border-collapse": [{ border: ["collapse", "separate"] }],
1504
1504
  "border-spacing": [{ "border-spacing": w() }],
@@ -1514,56 +1514,56 @@ var he = (e, t) => {
1514
1514
  "shadow",
1515
1515
  "transform",
1516
1516
  "none",
1517
- H,
1518
- V
1517
+ U,
1518
+ H
1519
1519
  ] }],
1520
1520
  "transition-behavior": [{ transition: ["normal", "discrete"] }],
1521
1521
  duration: [{ duration: [
1522
- B,
1522
+ V,
1523
1523
  "initial",
1524
- H,
1525
- V
1524
+ U,
1525
+ H
1526
1526
  ] }],
1527
1527
  ease: [{ ease: [
1528
1528
  "linear",
1529
1529
  "initial",
1530
1530
  _,
1531
- H,
1532
- V
1531
+ U,
1532
+ H
1533
1533
  ] }],
1534
1534
  delay: [{ delay: [
1535
- B,
1536
- H,
1537
- V
1535
+ V,
1536
+ U,
1537
+ H
1538
1538
  ] }],
1539
1539
  animate: [{ animate: [
1540
1540
  "none",
1541
1541
  v,
1542
- H,
1543
- V
1542
+ U,
1543
+ H
1544
1544
  ] }],
1545
1545
  backface: [{ backface: ["hidden", "visible"] }],
1546
1546
  perspective: [{ perspective: [
1547
1547
  h,
1548
- H,
1549
- V
1548
+ U,
1549
+ H
1550
1550
  ] }],
1551
1551
  "perspective-origin": [{ "perspective-origin": x() }],
1552
- rotate: [{ rotate: ce() }],
1553
- "rotate-x": [{ "rotate-x": ce() }],
1554
- "rotate-y": [{ "rotate-y": ce() }],
1555
- "rotate-z": [{ "rotate-z": ce() }],
1556
- scale: [{ scale: le() }],
1557
- "scale-x": [{ "scale-x": le() }],
1558
- "scale-y": [{ "scale-y": le() }],
1559
- "scale-z": [{ "scale-z": le() }],
1552
+ rotate: [{ rotate: se() }],
1553
+ "rotate-x": [{ "rotate-x": se() }],
1554
+ "rotate-y": [{ "rotate-y": se() }],
1555
+ "rotate-z": [{ "rotate-z": se() }],
1556
+ scale: [{ scale: ce() }],
1557
+ "scale-x": [{ "scale-x": ce() }],
1558
+ "scale-y": [{ "scale-y": ce() }],
1559
+ "scale-z": [{ "scale-z": ce() }],
1560
1560
  "scale-3d": ["scale-3d"],
1561
- skew: [{ skew: ue() }],
1562
- "skew-x": [{ "skew-x": ue() }],
1563
- "skew-y": [{ "skew-y": ue() }],
1561
+ skew: [{ skew: le() }],
1562
+ "skew-x": [{ "skew-x": le() }],
1563
+ "skew-y": [{ "skew-y": le() }],
1564
1564
  transform: [{ transform: [
1565
+ U,
1565
1566
  H,
1566
- V,
1567
1567
  "",
1568
1568
  "none",
1569
1569
  "gpu",
@@ -1571,14 +1571,14 @@ var he = (e, t) => {
1571
1571
  ] }],
1572
1572
  "transform-origin": [{ origin: x() }],
1573
1573
  "transform-style": [{ transform: ["3d", "flat"] }],
1574
- translate: [{ translate: de() }],
1575
- "translate-x": [{ "translate-x": de() }],
1576
- "translate-y": [{ "translate-y": de() }],
1577
- "translate-z": [{ "translate-z": de() }],
1574
+ translate: [{ translate: ue() }],
1575
+ "translate-x": [{ "translate-x": ue() }],
1576
+ "translate-y": [{ "translate-y": ue() }],
1577
+ "translate-z": [{ "translate-z": ue() }],
1578
1578
  "translate-none": ["translate-none"],
1579
- accent: [{ accent: P() }],
1579
+ accent: [{ accent: F() }],
1580
1580
  appearance: [{ appearance: ["none", "auto"] }],
1581
- "caret-color": [{ caret: P() }],
1581
+ "caret-color": [{ caret: F() }],
1582
1582
  "color-scheme": [{ scheme: [
1583
1583
  "normal",
1584
1584
  "dark",
@@ -1624,8 +1624,8 @@ var he = (e, t) => {
1624
1624
  "nwse-resize",
1625
1625
  "zoom-in",
1626
1626
  "zoom-out",
1627
- H,
1628
- V
1627
+ U,
1628
+ H
1629
1629
  ] }],
1630
1630
  "field-sizing": [{ "field-sizing": ["fixed", "content"] }],
1631
1631
  "pointer-events": [{ "pointer-events": ["auto", "none"] }],
@@ -1699,17 +1699,17 @@ var he = (e, t) => {
1699
1699
  "scroll",
1700
1700
  "contents",
1701
1701
  "transform",
1702
- H,
1703
- V
1702
+ U,
1703
+ H
1704
1704
  ] }],
1705
- fill: [{ fill: ["none", ...P()] }],
1705
+ fill: [{ fill: ["none", ...F()] }],
1706
1706
  "stroke-w": [{ stroke: [
1707
- B,
1708
- yt,
1709
- ft,
1710
- pt
1707
+ V,
1708
+ vt,
1709
+ dt,
1710
+ ft
1711
1711
  ] }],
1712
- stroke: [{ stroke: ["none", ...P()] }],
1712
+ stroke: [{ stroke: ["none", ...F()] }],
1713
1713
  "forced-color-adjust": [{ "forced-color-adjust": ["auto", "none"] }]
1714
1714
  },
1715
1715
  conflictingClassGroups: {
@@ -1896,53 +1896,53 @@ var he = (e, t) => {
1896
1896
  });
1897
1897
  //#endregion
1898
1898
  //#region src/lib/utils.ts
1899
- function U(...e) {
1900
- return It(me(e));
1899
+ function W(...e) {
1900
+ return Ft(pe(e));
1901
1901
  }
1902
1902
  //#endregion
1903
1903
  //#region src/components/ui/card.tsx
1904
- var Lt = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1904
+ var It = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1905
1905
  ref: n,
1906
- className: U("w-full max-w-[420px] rounded-lg shadow-sm border border-gray-100 dark:border-gray-800 p-8", e),
1906
+ className: W("w-full max-w-[420px] rounded-lg shadow-sm border border-gray-100 dark:border-gray-800 p-8", e),
1907
1907
  ...t
1908
1908
  }));
1909
- Lt.displayName = "Card";
1910
- var Rt = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1909
+ It.displayName = "Card";
1910
+ var Lt = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1911
1911
  ref: n,
1912
- className: U("text-center mb-6", e),
1912
+ className: W("text-center mb-6", e),
1913
1913
  ...t
1914
1914
  }));
1915
- Rt.displayName = "CardHeader";
1916
- var W = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("h2", {
1915
+ Lt.displayName = "CardHeader";
1916
+ var G = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("h2", {
1917
1917
  ref: n,
1918
- className: U("text-xl font-semibold text-gray-900 dark:text-gray-100 mb-2", e),
1918
+ className: W("text-xl font-semibold text-gray-900 dark:text-gray-100 mb-2", e),
1919
1919
  ...t
1920
1920
  }));
1921
- W.displayName = "CardTitle";
1922
- var zt = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("p", {
1921
+ G.displayName = "CardTitle";
1922
+ var Rt = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("p", {
1923
1923
  ref: n,
1924
- className: U("text-sm text-gray-500 dark:text-gray-400", e),
1924
+ className: W("text-sm text-gray-500 dark:text-gray-400", e),
1925
1925
  ...t
1926
1926
  }));
1927
- zt.displayName = "CardDescription";
1928
- var Bt = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1927
+ Rt.displayName = "CardDescription";
1928
+ var zt = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1929
1929
  ref: n,
1930
- className: U("", e),
1930
+ className: W("", e),
1931
1931
  ...t
1932
1932
  }));
1933
- Bt.displayName = "CardContent";
1934
- var G = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1933
+ zt.displayName = "CardContent";
1934
+ var K = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("div", {
1935
1935
  ref: n,
1936
- className: U("mt-4 text-center", e),
1936
+ className: W("mt-4 text-center", e),
1937
1937
  ...t
1938
1938
  }));
1939
- G.displayName = "CardFooter";
1939
+ K.displayName = "CardFooter";
1940
1940
  //#endregion
1941
1941
  //#region node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
1942
- var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Ht = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ut = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Wt = (e) => {
1943
- let t = Ut(e);
1942
+ var Bt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Vt = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ht = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Ut = (e) => {
1943
+ let t = Ht(e);
1944
1944
  return t.charAt(0).toUpperCase() + t.slice(1);
1945
- }, Gt = {
1945
+ }, Wt = {
1946
1946
  xmlns: "http://www.w3.org/2000/svg",
1947
1947
  width: 24,
1948
1948
  height: 24,
@@ -1952,37 +1952,37 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
1952
1952
  strokeWidth: 2,
1953
1953
  strokeLinecap: "round",
1954
1954
  strokeLinejoin: "round"
1955
- }, Kt = (e) => {
1955
+ }, Gt = (e) => {
1956
1956
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
1957
1957
  return !1;
1958
- }, qt = e({}), Jt = () => i(qt), Yt = n(({ color: e, size: n, strokeWidth: r, absoluteStrokeWidth: i, className: a = "", children: o, iconNode: s, ...c }, l) => {
1959
- let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } = Jt() ?? {}, h = i ?? f ? Number(r ?? d) * 24 / Number(n ?? u) : r ?? d;
1958
+ }, Kt = e({}), qt = () => i(Kt), Jt = n(({ color: e, size: n, strokeWidth: r, absoluteStrokeWidth: i, className: a = "", children: o, iconNode: s, ...c }, l) => {
1959
+ let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: f = !1, color: p = "currentColor", className: m = "" } = qt() ?? {}, h = i ?? f ? Number(r ?? d) * 24 / Number(n ?? u) : r ?? d;
1960
1960
  return t("svg", {
1961
1961
  ref: l,
1962
- ...Gt,
1963
- width: n ?? u ?? Gt.width,
1964
- height: n ?? u ?? Gt.height,
1962
+ ...Wt,
1963
+ width: n ?? u ?? Wt.width,
1964
+ height: n ?? u ?? Wt.height,
1965
1965
  stroke: e ?? p,
1966
1966
  strokeWidth: h,
1967
- className: Vt("lucide", m, a),
1968
- ...!o && !Kt(c) && { "aria-hidden": "true" },
1967
+ className: Bt("lucide", m, a),
1968
+ ...!o && !Gt(c) && { "aria-hidden": "true" },
1969
1969
  ...c
1970
1970
  }, [...s.map(([e, n]) => t(e, n)), ...Array.isArray(o) ? o : [o]]);
1971
- }), Xt = (e, r) => {
1972
- let i = n(({ className: n, ...i }, a) => t(Yt, {
1971
+ }), Yt = (e, r) => {
1972
+ let i = n(({ className: n, ...i }, a) => t(Jt, {
1973
1973
  ref: a,
1974
1974
  iconNode: r,
1975
- className: Vt(`lucide-${Ht(Wt(e))}`, `lucide-${e}`, n),
1975
+ className: Bt(`lucide-${Vt(Ut(e))}`, `lucide-${e}`, n),
1976
1976
  ...i
1977
1977
  }));
1978
- return i.displayName = Wt(e), i;
1979
- }, Zt = Xt("check", [["path", {
1978
+ return i.displayName = Ut(e), i;
1979
+ }, Xt = Yt("check", [["path", {
1980
1980
  d: "M20 6 9 17l-5-5",
1981
1981
  key: "1gmf2c"
1982
- }]]), Qt = Xt("loader-circle", [["path", {
1982
+ }]]), Zt = Yt("loader-circle", [["path", {
1983
1983
  d: "M21 12a9 9 0 1 1-6.219-8.56",
1984
1984
  key: "13zald"
1985
- }]]), $t = Xt("monitor", [
1985
+ }]]), Qt = Yt("monitor", [
1986
1986
  ["rect", {
1987
1987
  width: "20",
1988
1988
  height: "14",
@@ -2005,10 +2005,10 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2005
2005
  y2: "21",
2006
2006
  key: "vw1qmm"
2007
2007
  }]
2008
- ]), en = Xt("moon", [["path", {
2008
+ ]), $t = Yt("moon", [["path", {
2009
2009
  d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
2010
2010
  key: "kfwtm"
2011
- }]]), tn = Xt("sun", [
2011
+ }]]), en = Yt("sun", [
2012
2012
  ["circle", {
2013
2013
  cx: "12",
2014
2014
  cy: "12",
@@ -2047,61 +2047,61 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2047
2047
  d: "m19.07 4.93-1.41 1.41",
2048
2048
  key: "1shlcs"
2049
2049
  }]
2050
- ]), nn = Xt("x", [["path", {
2050
+ ]), tn = Yt("x", [["path", {
2051
2051
  d: "M18 6 6 18",
2052
2052
  key: "1bl5f8"
2053
2053
  }], ["path", {
2054
2054
  d: "m6 6 12 12",
2055
2055
  key: "d8bk6v"
2056
- }]]), K = (e) => typeof e == "string", rn = () => {
2056
+ }]]), q = (e) => typeof e == "string", nn = () => {
2057
2057
  let e, t, n = new Promise((n, r) => {
2058
2058
  e = n, t = r;
2059
2059
  });
2060
2060
  return n.resolve = e, n.reject = t, n;
2061
- }, an = (e) => e == null ? "" : "" + e, on = (e, t, n) => {
2061
+ }, rn = (e) => e == null ? "" : "" + e, an = (e, t, n) => {
2062
2062
  e.forEach((e) => {
2063
2063
  t[e] && (n[e] = t[e]);
2064
2064
  });
2065
- }, sn = /###/g, cn = (e) => e && e.indexOf("###") > -1 ? e.replace(sn, ".") : e, ln = (e) => !e || K(e), un = (e, t, n) => {
2066
- let r = K(t) ? t.split(".") : t, i = 0;
2065
+ }, on = /###/g, sn = (e) => e && e.indexOf("###") > -1 ? e.replace(on, ".") : e, cn = (e) => !e || q(e), ln = (e, t, n) => {
2066
+ let r = q(t) ? t.split(".") : t, i = 0;
2067
2067
  for (; i < r.length - 1;) {
2068
- if (ln(e)) return {};
2069
- let t = cn(r[i]);
2068
+ if (cn(e)) return {};
2069
+ let t = sn(r[i]);
2070
2070
  !e[t] && n && (e[t] = new n()), e = Object.prototype.hasOwnProperty.call(e, t) ? e[t] : {}, ++i;
2071
2071
  }
2072
- return ln(e) ? {} : {
2072
+ return cn(e) ? {} : {
2073
2073
  obj: e,
2074
- k: cn(r[i])
2074
+ k: sn(r[i])
2075
2075
  };
2076
- }, dn = (e, t, n) => {
2077
- let { obj: r, k: i } = un(e, t, Object);
2076
+ }, un = (e, t, n) => {
2077
+ let { obj: r, k: i } = ln(e, t, Object);
2078
2078
  if (r !== void 0 || t.length === 1) {
2079
2079
  r[i] = n;
2080
2080
  return;
2081
2081
  }
2082
- let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = un(e, o, Object);
2083
- for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = un(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2082
+ let a = t[t.length - 1], o = t.slice(0, t.length - 1), s = ln(e, o, Object);
2083
+ for (; s.obj === void 0 && o.length;) a = `${o[o.length - 1]}.${a}`, o = o.slice(0, o.length - 1), s = ln(e, o, Object), s?.obj && s.obj[`${s.k}.${a}`] !== void 0 && (s.obj = void 0);
2084
2084
  s.obj[`${s.k}.${a}`] = n;
2085
- }, fn = (e, t, n, r) => {
2086
- let { obj: i, k: a } = un(e, t, Object);
2085
+ }, dn = (e, t, n, r) => {
2086
+ let { obj: i, k: a } = ln(e, t, Object);
2087
2087
  i[a] = i[a] || [], i[a].push(n);
2088
- }, pn = (e, t) => {
2089
- let { obj: n, k: r } = un(e, t);
2088
+ }, fn = (e, t) => {
2089
+ let { obj: n, k: r } = ln(e, t);
2090
2090
  if (n && Object.prototype.hasOwnProperty.call(n, r)) return n[r];
2091
+ }, pn = (e, t, n) => {
2092
+ let r = fn(e, n);
2093
+ return r === void 0 ? fn(t, n) : r;
2091
2094
  }, mn = (e, t, n) => {
2092
- let r = pn(e, n);
2093
- return r === void 0 ? pn(t, n) : r;
2094
- }, hn = (e, t, n) => {
2095
- for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? K(e[r]) || e[r] instanceof String || K(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : hn(e[r], t[r], n) : e[r] = t[r]);
2095
+ for (let r in t) r !== "__proto__" && r !== "constructor" && (r in e ? q(e[r]) || e[r] instanceof String || q(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : mn(e[r], t[r], n) : e[r] = t[r]);
2096
2096
  return e;
2097
- }, gn = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), _n = {
2097
+ }, hn = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), gn = {
2098
2098
  "&": "&amp;",
2099
2099
  "<": "&lt;",
2100
2100
  ">": "&gt;",
2101
2101
  "\"": "&quot;",
2102
2102
  "'": "&#39;",
2103
2103
  "/": "&#x2F;"
2104
- }, vn = (e) => K(e) ? e.replace(/[&<>"'\/]/g, (e) => _n[e]) : e, yn = class {
2104
+ }, _n = (e) => q(e) ? e.replace(/[&<>"'\/]/g, (e) => gn[e]) : e, vn = class {
2105
2105
  constructor(e) {
2106
2106
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
2107
2107
  }
@@ -2111,23 +2111,23 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2111
2111
  let n = new RegExp(e);
2112
2112
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
2113
2113
  }
2114
- }, bn = [
2114
+ }, yn = [
2115
2115
  " ",
2116
2116
  ",",
2117
2117
  "?",
2118
2118
  "!",
2119
2119
  ";"
2120
- ], xn = new yn(20), Sn = (e, t, n) => {
2120
+ ], bn = new vn(20), xn = (e, t, n) => {
2121
2121
  t ||= "", n ||= "";
2122
- let r = bn.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2122
+ let r = yn.filter((e) => t.indexOf(e) < 0 && n.indexOf(e) < 0);
2123
2123
  if (r.length === 0) return !0;
2124
- let i = xn.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2124
+ let i = bn.getRegExp(`(${r.map((e) => e === "?" ? "\\?" : e).join("|")})`), a = !i.test(e);
2125
2125
  if (!a) {
2126
2126
  let t = e.indexOf(n);
2127
2127
  t > 0 && !i.test(e.substring(0, t)) && (a = !0);
2128
2128
  }
2129
2129
  return a;
2130
- }, Cn = (e, t, n = ".") => {
2130
+ }, Sn = (e, t, n = ".") => {
2131
2131
  if (!e) return;
2132
2132
  if (e[t]) return Object.prototype.hasOwnProperty.call(e, t) ? e[t] : void 0;
2133
2133
  let r = t.split(n), i = e;
@@ -2146,7 +2146,7 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2146
2146
  i = t;
2147
2147
  }
2148
2148
  return i;
2149
- }, wn = (e) => e?.replace(/_/g, "-"), Tn = {
2149
+ }, Cn = (e) => e?.replace(/_/g, "-"), wn = {
2150
2150
  type: "logger",
2151
2151
  log(e) {
2152
2152
  this.output("log", e);
@@ -2160,12 +2160,12 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2160
2160
  output(e, t) {
2161
2161
  console?.[e]?.apply?.(console, t);
2162
2162
  }
2163
- }, q = new class e {
2163
+ }, Tn = new class e {
2164
2164
  constructor(e, t = {}) {
2165
2165
  this.init(e, t);
2166
2166
  }
2167
2167
  init(e, t = {}) {
2168
- this.prefix = t.prefix || "i18next:", this.logger = e || Tn, this.options = t, this.debug = t.debug;
2168
+ this.prefix = t.prefix || "i18next:", this.logger = e || wn, this.options = t, this.debug = t.debug;
2169
2169
  }
2170
2170
  log(...e) {
2171
2171
  return this.forward(e, "log", "", !0);
@@ -2180,7 +2180,7 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2180
2180
  return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
2181
2181
  }
2182
2182
  forward(e, t, n, r) {
2183
- return r && !this.debug ? null : (K(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
2183
+ return r && !this.debug ? null : (q(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
2184
2184
  }
2185
2185
  create(t) {
2186
2186
  return new e(this.logger, {
@@ -2234,16 +2234,16 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2234
2234
  }
2235
2235
  getResource(e, t, n, r = {}) {
2236
2236
  let i = r.keySeparator === void 0 ? this.options.keySeparator : r.keySeparator, a = r.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r.ignoreJSONStructure, o;
2237
- e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : K(n) && i ? o.push(...n.split(i)) : o.push(n)));
2238
- let s = pn(this.data, o);
2239
- return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !K(n) ? s : Cn(this.data?.[e]?.[t], n, i);
2237
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], n && (Array.isArray(n) ? o.push(...n) : q(n) && i ? o.push(...n.split(i)) : o.push(n)));
2238
+ let s = fn(this.data, o);
2239
+ return !s && !t && !n && e.indexOf(".") > -1 && (e = o[0], t = o[1], n = o.slice(2).join(".")), s || !a || !q(n) ? s : Sn(this.data?.[e]?.[t], n, i);
2240
2240
  }
2241
2241
  addResource(e, t, n, r, i = { silent: !1 }) {
2242
2242
  let a = i.keySeparator === void 0 ? this.options.keySeparator : i.keySeparator, o = [e, t];
2243
- n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), dn(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2243
+ n && (o = o.concat(a ? n.split(a) : n)), e.indexOf(".") > -1 && (o = e.split("."), r = t, t = o[1]), this.addNamespaces(t), un(this.data, o, r), i.silent || this.emit("added", e, t, n, r);
2244
2244
  }
2245
2245
  addResources(e, t, n, r = { silent: !1 }) {
2246
- for (let r in n) (K(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
2246
+ for (let r in n) (q(n[r]) || Array.isArray(n[r])) && this.addResource(e, t, r, n[r], { silent: !0 });
2247
2247
  r.silent || this.emit("added", e, t, n);
2248
2248
  }
2249
2249
  addResourceBundle(e, t, n, r, i, a = {
@@ -2252,11 +2252,11 @@ var Vt = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
2252
2252
  }) {
2253
2253
  let o = [e, t];
2254
2254
  e.indexOf(".") > -1 && (o = e.split("."), r = n, n = t, t = o[1]), this.addNamespaces(t);
2255
- let s = pn(this.data, o) || {};
2256
- a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? hn(s, n, i) : s = {
2255
+ let s = fn(this.data, o) || {};
2256
+ a.skipCopy || (n = JSON.parse(JSON.stringify(n))), r ? mn(s, n, i) : s = {
2257
2257
  ...s,
2258
2258
  ...n
2259
- }, dn(this.data, o, s), a.silent || this.emit("added", e, t, n);
2259
+ }, un(this.data, o, s), a.silent || this.emit("added", e, t, n);
2260
2260
  }
2261
2261
  removeResourceBundle(e, t) {
2262
2262
  this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
@@ -2300,9 +2300,9 @@ function jn(e, t) {
2300
2300
  }
2301
2301
  return n.join(r);
2302
2302
  }
2303
- var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number", Pn = class e extends En {
2303
+ var Mn = {}, Nn = (e) => !q(e) && typeof e != "boolean" && typeof e != "number", Pn = class e extends En {
2304
2304
  constructor(e, t = {}) {
2305
- super(), on([
2305
+ super(), an([
2306
2306
  "resourceStore",
2307
2307
  "languageUtils",
2308
2308
  "pluralResolver",
@@ -2310,7 +2310,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2310
2310
  "backendConnector",
2311
2311
  "i18nFormat",
2312
2312
  "utils"
2313
- ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = q.create("translator");
2313
+ ], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = Tn.create("translator");
2314
2314
  }
2315
2315
  changeLanguage(e) {
2316
2316
  e && (this.language = e);
@@ -2326,19 +2326,19 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2326
2326
  extractFromKey(e, t) {
2327
2327
  let n = t.nsSeparator === void 0 ? this.options.nsSeparator : t.nsSeparator;
2328
2328
  n === void 0 && (n = ":");
2329
- let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Sn(e, n, r);
2329
+ let r = t.keySeparator === void 0 ? this.options.keySeparator : t.keySeparator, i = t.ns || this.options.defaultNS || [], a = n && e.indexOf(n) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !xn(e, n, r);
2330
2330
  if (a && !o) {
2331
2331
  let t = e.match(this.interpolator.nestingRegexp);
2332
2332
  if (t && t.length > 0) return {
2333
2333
  key: e,
2334
- namespaces: K(i) ? [i] : i
2334
+ namespaces: q(i) ? [i] : i
2335
2335
  };
2336
2336
  let a = e.split(n);
2337
2337
  (n !== r || n === r && this.options.ns.indexOf(a[0]) > -1) && (i = a.shift()), e = a.join(r);
2338
2338
  }
2339
2339
  return {
2340
2340
  key: e,
2341
- namespaces: K(i) ? [i] : i
2341
+ namespaces: q(i) ? [i] : i
2342
2342
  };
2343
2343
  }
2344
2344
  translate(t, n, r) {
@@ -2373,10 +2373,10 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2373
2373
  "[object Number]",
2374
2374
  "[object Function]",
2375
2375
  "[object RegExp]"
2376
- ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !K(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
2376
+ ], v = i.joinArrays === void 0 ? this.options.joinArrays : i.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, b = i.count !== void 0 && !q(i.count), x = e.hasDefaultValue(i), S = b ? this.pluralResolver.getSuffix(d, i.count, i) : "", C = i.ordinal && b ? this.pluralResolver.getSuffix(d, i.count, { ordinal: !1 }) : "", w = b && !i.ordinal && i.count === 0, T = w && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${C}`] || i.defaultValue, E = m;
2377
2377
  y && !m && x && (E = T);
2378
2378
  let D = Nn(E), O = Object.prototype.toString.apply(E);
2379
- if (y && E && D && _.indexOf(O) < 0 && !(K(v) && Array.isArray(E))) {
2379
+ if (y && E && D && _.indexOf(O) < 0 && !(q(v) && Array.isArray(E))) {
2380
2380
  if (!i.returnObjects && !this.options.returnObjects) {
2381
2381
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
2382
2382
  let e = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h, E, {
@@ -2402,7 +2402,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2402
2402
  }
2403
2403
  m = t;
2404
2404
  }
2405
- } else if (y && K(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
2405
+ } else if (y && q(v) && Array.isArray(m)) m = m.join(v), m &&= this.extendTranslation(m, t, i, r);
2406
2406
  else {
2407
2407
  let e = !1, n = !1;
2408
2408
  !this.isValidLookup(m) && x && (e = !0, m = T), this.isValidLookup(m) || (n = !0, m = s);
@@ -2446,12 +2446,12 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2446
2446
  ...n.interpolation
2447
2447
  }
2448
2448
  });
2449
- let a = K(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
2449
+ let a = q(e) && (n?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n.interpolation.skipOnVariables), o;
2450
2450
  if (a) {
2451
2451
  let t = e.match(this.interpolator.nestingRegexp);
2452
2452
  o = t && t.length;
2453
2453
  }
2454
- let s = n.replace && !K(n.replace) ? n.replace : n;
2454
+ let s = n.replace && !q(n.replace) ? n.replace : n;
2455
2455
  if (this.options.interpolation.defaultVariables && (s = {
2456
2456
  ...this.options.interpolation.defaultVariables,
2457
2457
  ...s
@@ -2461,7 +2461,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2461
2461
  }
2462
2462
  !n.lng && r && r.res && (n.lng = this.language || r.usedLng), n.nest !== !1 && (e = this.interpolator.nest(e, (...e) => i?.[0] === e[0] && !n.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`), null) : this.translate(...e, t), n)), n.interpolation && this.interpolator.reset();
2463
2463
  }
2464
- let a = n.postProcess || this.options.postProcess, o = K(a) ? [a] : a;
2464
+ let a = n.postProcess || this.options.postProcess, o = q(a) ? [a] : a;
2465
2465
  return e != null && o?.length && n.applyPostProcessor !== !1 && (e = On.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
2466
2466
  i18nResolved: {
2467
2467
  ...r,
@@ -2472,7 +2472,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2472
2472
  }
2473
2473
  resolve(e, t = {}) {
2474
2474
  let n, r, i, a, o;
2475
- return K(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? jn(e, {
2475
+ return q(e) && (e = [e]), Array.isArray(e) && (e = e.map((e) => typeof e == "function" ? jn(e, {
2476
2476
  ...this.options,
2477
2477
  ...t
2478
2478
  }) : e)), e.forEach((e) => {
@@ -2481,7 +2481,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2481
2481
  r = c;
2482
2482
  let l = s.namespaces;
2483
2483
  this.options.fallbackNS && (l = l.concat(this.options.fallbackNS));
2484
- let u = t.count !== void 0 && !K(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (K(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
2484
+ let u = t.count !== void 0 && !q(t.count), d = u && !t.ordinal && t.count === 0, f = t.context !== void 0 && (q(t.context) || typeof t.context == "number") && t.context !== "", p = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
2485
2485
  l.forEach((e) => {
2486
2486
  this.isValidLookup(n) || (o = e, !Mn[`${p[0]}-${e}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o) && (Mn[`${p[0]}-${e}`] = !0, this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), p.forEach((r) => {
2487
2487
  if (this.isValidLookup(n)) return;
@@ -2532,7 +2532,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2532
2532
  "joinArrays",
2533
2533
  "postProcess",
2534
2534
  "interpolation"
2535
- ], n = e.replace && !K(e.replace), r = n ? e.replace : e;
2535
+ ], n = e.replace && !q(e.replace), r = n ? e.replace : e;
2536
2536
  if (n && e.count !== void 0 && (r.count = e.count), this.options.interpolation.defaultVariables && (r = {
2537
2537
  ...this.options.interpolation.defaultVariables,
2538
2538
  ...r
@@ -2548,20 +2548,20 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2548
2548
  }
2549
2549
  }, Fn = class {
2550
2550
  constructor(e) {
2551
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = q.create("languageUtils");
2551
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = Tn.create("languageUtils");
2552
2552
  }
2553
2553
  getScriptPartFromCode(e) {
2554
- if (e = wn(e), !e || e.indexOf("-") < 0) return null;
2554
+ if (e = Cn(e), !e || e.indexOf("-") < 0) return null;
2555
2555
  let t = e.split("-");
2556
2556
  return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
2557
2557
  }
2558
2558
  getLanguagePartFromCode(e) {
2559
- if (e = wn(e), !e || e.indexOf("-") < 0) return e;
2559
+ if (e = Cn(e), !e || e.indexOf("-") < 0) return e;
2560
2560
  let t = e.split("-");
2561
2561
  return this.formatLanguageCode(t[0]);
2562
2562
  }
2563
2563
  formatLanguageCode(e) {
2564
- if (K(e) && e.indexOf("-") > -1) {
2564
+ if (q(e) && e.indexOf("-") > -1) {
2565
2565
  let t;
2566
2566
  try {
2567
2567
  t = Intl.getCanonicalLocales(e)[0];
@@ -2593,7 +2593,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2593
2593
  }
2594
2594
  getFallbackCodes(e, t) {
2595
2595
  if (!e) return [];
2596
- if (typeof e == "function" && (e = e(t)), K(e) && (e = [e]), Array.isArray(e)) return e;
2596
+ if (typeof e == "function" && (e = e(t)), q(e) && (e = [e]), Array.isArray(e)) return e;
2597
2597
  if (!t) return e.default || [];
2598
2598
  let n = e[t];
2599
2599
  return n ||= e[this.getScriptPartFromCode(t)], n ||= e[this.formatLanguageCode(t)], n ||= e[this.getLanguagePartFromCode(t)], n ||= e.default, n || [];
@@ -2602,7 +2602,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2602
2602
  let n = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), r = [], i = (e) => {
2603
2603
  e && (this.isSupportedCode(e) ? r.push(e) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`));
2604
2604
  };
2605
- return K(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : K(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
2605
+ return q(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && i(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && i(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && i(this.getLanguagePartFromCode(e))) : q(e) && i(this.formatLanguageCode(e)), n.forEach((e) => {
2606
2606
  r.indexOf(e) < 0 && i(this.formatLanguageCode(e));
2607
2607
  }), r;
2608
2608
  }
@@ -2618,13 +2618,13 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2618
2618
  resolvedOptions: () => ({ pluralCategories: ["one", "other"] })
2619
2619
  }, Rn = class {
2620
2620
  constructor(e, t = {}) {
2621
- this.languageUtils = e, this.options = t, this.logger = q.create("pluralResolver"), this.pluralRulesCache = {};
2621
+ this.languageUtils = e, this.options = t, this.logger = Tn.create("pluralResolver"), this.pluralRulesCache = {};
2622
2622
  }
2623
2623
  clearCache() {
2624
2624
  this.pluralRulesCache = {};
2625
2625
  }
2626
2626
  getRule(e, t = {}) {
2627
- let n = wn(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
2627
+ let n = Cn(e === "dev" ? "en" : e), r = t.ordinal ? "ordinal" : "cardinal", i = JSON.stringify({
2628
2628
  cleanedCode: n,
2629
2629
  type: r
2630
2630
  });
@@ -2656,16 +2656,16 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2656
2656
  return r ? `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${r.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, n));
2657
2657
  }
2658
2658
  }, zn = (e, t, n, r = ".", i = !0) => {
2659
- let a = mn(e, t, n);
2660
- return !a && i && K(n) && (a = Cn(e, n, r), a === void 0 && (a = Cn(t, n, r))), a;
2659
+ let a = pn(e, t, n);
2660
+ return !a && i && q(n) && (a = Sn(e, n, r), a === void 0 && (a = Sn(t, n, r))), a;
2661
2661
  }, Bn = (e) => e.replace(/\$/g, "$$$$"), Vn = class {
2662
2662
  constructor(e = {}) {
2663
- this.logger = q.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
2663
+ this.logger = Tn.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((e) => e), this.init(e);
2664
2664
  }
2665
2665
  init(e = {}) {
2666
2666
  e.interpolation ||= { escapeValue: !0 };
2667
2667
  let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: h, maxReplaces: g, alwaysFormat: _ } = e.interpolation;
2668
- this.escape = t === void 0 ? vn : t, this.escapeValue = n === void 0 ? !0 : n, this.useRawValueToEscape = r === void 0 ? !1 : r, this.prefix = i ? gn(i) : a || "{{", this.suffix = o ? gn(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? gn(d) : f || gn("$t("), this.nestingSuffix = p ? gn(p) : m || gn(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ === void 0 ? !1 : _, this.resetRegExp();
2668
+ this.escape = t === void 0 ? _n : t, this.escapeValue = n === void 0 ? !0 : n, this.useRawValueToEscape = r === void 0 ? !1 : r, this.prefix = i ? hn(i) : a || "{{", this.suffix = o ? hn(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? hn(d) : f || hn("$t("), this.nestingSuffix = p ? hn(p) : m || hn(")"), this.nestingOptionsSeparator = h || ",", this.maxReplaces = g || 1e3, this.alwaysFormat = _ === void 0 ? !1 : _, this.resetRegExp();
2669
2669
  }
2670
2670
  reset() {
2671
2671
  this.options && this.init(this.options);
@@ -2704,13 +2704,13 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2704
2704
  let n = i[1].trim();
2705
2705
  if (a = c(n), a === void 0) if (typeof l == "function") {
2706
2706
  let t = l(e, i, r);
2707
- a = K(t) ? t : "";
2707
+ a = q(t) ? t : "";
2708
2708
  } else if (r && Object.prototype.hasOwnProperty.call(r, n)) a = "";
2709
2709
  else if (u) {
2710
2710
  a = i[0];
2711
2711
  continue;
2712
2712
  } else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`), a = "";
2713
- else !K(a) && !this.useRawValueToEscape && (a = an(a));
2713
+ else !q(a) && !this.useRawValueToEscape && (a = rn(a));
2714
2714
  let s = t.safeValue(a);
2715
2715
  if (e = e.replace(i[0], s), u ? (t.regex.lastIndex += a.length, t.regex.lastIndex -= i[0].length) : t.regex.lastIndex = 0, o++, o >= this.maxReplaces) break;
2716
2716
  }
@@ -2720,7 +2720,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2720
2720
  let r, i, a, o = (e, t) => {
2721
2721
  let n = this.nestingOptionsSeparator;
2722
2722
  if (e.indexOf(n) < 0) return e;
2723
- let r = e.split(RegExp(`${gn(n)}[ ]*{`)), i = `{${r[1]}`;
2723
+ let r = e.split(RegExp(`${hn(n)}[ ]*{`)), i = `{${r[1]}`;
2724
2724
  e = r[0], i = this.interpolate(i, a);
2725
2725
  let o = i.match(/'/g), s = i.match(/"/g);
2726
2726
  ((o?.length ?? 0) % 2 == 0 && !s || (s?.length ?? 0) % 2 != 0) && (i = i.replace(/'/g, "\""));
@@ -2736,10 +2736,10 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2736
2736
  };
2737
2737
  for (; r = this.nestingRegexp.exec(e);) {
2738
2738
  let s = [];
2739
- a = { ...n }, a = a.replace && !K(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
2739
+ a = { ...n }, a = a.replace && !q(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
2740
2740
  let c = /{.*}/.test(r[1]) ? r[1].lastIndexOf("}") + 1 : r[1].indexOf(this.formatSeparator);
2741
- if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !K(i)) return i;
2742
- K(i) || (i = an(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
2741
+ if (c !== -1 && (s = r[1].slice(c).split(this.formatSeparator).map((e) => e.trim()).filter(Boolean), r[1] = r[1].slice(0, c)), i = t(o.call(this, r[1].trim(), a), a), i && r[0] === e && !q(i)) return i;
2742
+ q(i) || (i = rn(i)), i ||= (this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`), ""), s.length && (i = s.reduce((e, t) => this.format(e, t, n.lng, {
2743
2743
  ...n,
2744
2744
  interpolationkey: r[1].trim()
2745
2745
  }), i.trim())), e = e.replace(r[0], i), this.regexp.lastIndex = 0;
@@ -2772,11 +2772,11 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2772
2772
  [i.interpolationkey]: void 0
2773
2773
  });
2774
2774
  let o = r + JSON.stringify(a), s = t[o];
2775
- return s || (s = e(wn(r), i), t[o] = s), s(n);
2775
+ return s || (s = e(Cn(r), i), t[o] = s), s(n);
2776
2776
  };
2777
- }, Wn = (e) => (t, n, r) => e(wn(n), r)(t), Gn = class {
2777
+ }, Wn = (e) => (t, n, r) => e(Cn(n), r)(t), Gn = class {
2778
2778
  constructor(e = {}) {
2779
- this.logger = q.create("formatter"), this.options = e, this.init(e);
2779
+ this.logger = Tn.create("formatter"), this.options = e, this.init(e);
2780
2780
  }
2781
2781
  init(e, t = { interpolation: {} }) {
2782
2782
  this.formatSeparator = t.interpolation.formatSeparator || ",";
@@ -2842,7 +2842,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2842
2842
  e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--);
2843
2843
  }, qn = class extends En {
2844
2844
  constructor(e, t, n, r = {}) {
2845
- super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = q.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
2845
+ super(), this.backend = e, this.store = t, this.services = n, this.languageUtils = n.languageUtils, this.options = r, this.logger = Tn.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = r.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r.maxRetries >= 0 ? r.maxRetries : 5, this.retryTimeout = r.retryTimeout >= 1 ? r.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n, r.backend, r);
2846
2846
  }
2847
2847
  queueLoad(e, t, n, r) {
2848
2848
  let i = {}, a = {}, o = {}, s = {};
@@ -2870,7 +2870,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2870
2870
  t && this.emit("failedLoading", i, a, t), !t && n && this.store.addResourceBundle(i, a, n, void 0, void 0, { skipCopy: !0 }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
2871
2871
  let o = {};
2872
2872
  this.queue.forEach((n) => {
2873
- fn(n.loaded, [i], a), Kn(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
2873
+ dn(n.loaded, [i], a), Kn(n, e), t && n.errors.push(t), n.pendingCount === 0 && !n.done && (Object.keys(n.loaded).forEach((e) => {
2874
2874
  o[e] || (o[e] = {});
2875
2875
  let t = n.loaded[e];
2876
2876
  t.length && t.forEach((t) => {
@@ -2919,7 +2919,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2919
2919
  }
2920
2920
  prepareLoading(e, t, n = {}, r) {
2921
2921
  if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), r && r();
2922
- K(e) && (e = this.languageUtils.toResolveHierarchy(e)), K(t) && (t = [t]);
2922
+ q(e) && (e = this.languageUtils.toResolveHierarchy(e)), q(t) && (t = [t]);
2923
2923
  let i = this.queueLoad(e, t, n, r);
2924
2924
  if (!i.toLoad.length) return i.pending.length || r(), null;
2925
2925
  i.toLoad.forEach((e) => {
@@ -2995,7 +2995,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
2995
2995
  appendNamespaceToCIMode: !1,
2996
2996
  overloadTranslationOptionHandler: (e) => {
2997
2997
  let t = {};
2998
- if (typeof e[1] == "object" && (t = e[1]), K(e[1]) && (t.defaultValue = e[1]), K(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
2998
+ if (typeof e[1] == "object" && (t = e[1]), q(e[1]) && (t.defaultValue = e[1]), q(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
2999
2999
  let n = e[3] || e[2];
3000
3000
  Object.keys(n).forEach((e) => {
3001
3001
  t[e] = n[e];
@@ -3017,7 +3017,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3017
3017
  skipOnVariables: !0
3018
3018
  },
3019
3019
  cacheInBuiltFormats: !0
3020
- }), Yn = (e) => (K(e.ns) && (e.ns = [e.ns]), K(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), K(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Xn = () => {}, Zn = (e) => {
3020
+ }), Yn = (e) => (q(e.ns) && (e.ns = [e.ns]), q(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), q(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs?.indexOf?.("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e), Xn = () => {}, Zn = (e) => {
3021
3021
  Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((t) => {
3022
3022
  typeof e[t] == "function" && (e[t] = e[t].bind(e));
3023
3023
  });
@@ -3025,7 +3025,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3025
3025
  typeof globalThis < "u" && (globalThis[Qn] = !0);
3026
3026
  }, tr = (e) => !!(e?.modules?.backend?.name?.indexOf("Locize") > 0 || e?.modules?.backend?.constructor?.name?.indexOf("Locize") > 0 || e?.options?.backend?.backends && e.options.backend.backends.some((e) => e?.name?.indexOf("Locize") > 0 || e?.constructor?.name?.indexOf("Locize") > 0) || e?.options?.backend?.projectId || e?.options?.backend?.backendOptions && e.options.backend.backendOptions.some((e) => e?.projectId)), J = class e extends En {
3027
3027
  constructor(e = {}, t) {
3028
- if (super(), this.options = Yn(e), this.services = {}, this.logger = q, this.modules = { external: [] }, Zn(this), t && !this.isInitialized && !e.isClone) {
3028
+ if (super(), this.options = Yn(e), this.services = {}, this.logger = Tn, this.modules = { external: [] }, Zn(this), t && !this.isInitialized && !e.isClone) {
3029
3029
  if (!this.options.initAsync) return this.init(e, t), this;
3030
3030
  setTimeout(() => {
3031
3031
  this.init(e, t);
@@ -3033,7 +3033,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3033
3033
  }
3034
3034
  }
3035
3035
  init(e = {}, t) {
3036
- this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (K(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
3036
+ this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (q(e.ns) ? e.defaultNS = e.ns : e.ns.indexOf("translation") < 0 && (e.defaultNS = e.ns[0]));
3037
3037
  let n = Jn();
3038
3038
  this.options = {
3039
3039
  ...n,
@@ -3045,13 +3045,13 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3045
3045
  }, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = n.overloadTranslationOptionHandler), this.options.showSupportNotice !== !1 && !tr(this) && !$n() && (typeof console < "u" && console.info !== void 0 && console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"), er());
3046
3046
  let r = (e) => e ? typeof e == "function" ? new e() : e : null;
3047
3047
  if (!this.options.isClone) {
3048
- this.modules.logger ? q.init(r(this.modules.logger), this.options) : q.init(null, this.options);
3048
+ this.modules.logger ? Tn.init(r(this.modules.logger), this.options) : Tn.init(null, this.options);
3049
3049
  let e;
3050
3050
  e = this.modules.formatter ? this.modules.formatter : Gn;
3051
3051
  let t = new Fn(this.options);
3052
3052
  this.store = new Dn(this.options.resources, this.options);
3053
3053
  let i = this.services;
3054
- i.logger = q, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Rn(t, {
3054
+ i.logger = Tn, i.resourceStore = this.store, i.languageUtils = t, i.pluralResolver = new Rn(t, {
3055
3055
  prepend: this.options.pluralSeparator,
3056
3056
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
3057
3057
  }), this.options.interpolation.format && this.options.interpolation.format !== n.interpolation.format && this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"), e && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (i.formatter = r(e), i.formatter.init && i.formatter.init(i, this.options), this.options.interpolation.format = i.formatter.format.bind(i.formatter)), i.interpolator = new Vn(this.options), i.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, i.backendConnector = new qn(r(this.modules.backend), i.resourceStore, i, this.options), i.backendConnector.on("*", (e, ...t) => {
@@ -3081,7 +3081,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3081
3081
  ].forEach((e) => {
3082
3082
  this[e] = (...t) => (this.store[e](...t), this);
3083
3083
  });
3084
- let i = rn(), a = () => {
3084
+ let i = nn(), a = () => {
3085
3085
  let e = (e, n) => {
3086
3086
  this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), i.resolve(n), t(e, n);
3087
3087
  };
@@ -3091,7 +3091,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3091
3091
  return this.options.resources || !this.options.initAsync ? a() : setTimeout(a, 0), i;
3092
3092
  }
3093
3093
  loadResources(e, t = Xn) {
3094
- let n = t, r = K(e) ? e : this.language;
3094
+ let n = t, r = q(e) ? e : this.language;
3095
3095
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
3096
3096
  if (r?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
3097
3097
  let e = [], t = (t) => {
@@ -3105,7 +3105,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3105
3105
  } else n(null);
3106
3106
  }
3107
3107
  reloadResources(e, t, n) {
3108
- let r = rn();
3108
+ let r = nn();
3109
3109
  return typeof e == "function" && (n = e, e = void 0), typeof t == "function" && (n = t, t = void 0), e ||= this.languages, t ||= this.options.ns, n ||= Xn, this.services.backendConnector.reload(e, t, (e) => {
3110
3110
  r.resolve(), n(e);
3111
3111
  }), r;
@@ -3129,7 +3129,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3129
3129
  }
3130
3130
  changeLanguage(e, t) {
3131
3131
  this.isLanguageChangingTo = e;
3132
- let n = rn();
3132
+ let n = nn();
3133
3133
  this.emit("languageChanging", e);
3134
3134
  let r = (e) => {
3135
3135
  this.language = e, this.languages = this.services.languageUtils.toResolveHierarchy(e), this.resolvedLanguage = void 0, this.setResolvedLanguage(e);
@@ -3137,7 +3137,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3137
3137
  a ? this.isLanguageChangingTo === e && (r(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, n.resolve((...e) => this.t(...e)), t && t(i, (...e) => this.t(...e));
3138
3138
  }, a = (t) => {
3139
3139
  !e && !t && this.services.languageDetector && (t = []);
3140
- let n = K(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(K(t) ? [t] : t);
3140
+ let n = q(t) ? t : t && t[0], a = this.store.hasLanguageSomeTranslations(n) ? n : this.services.languageUtils.getBestMatchFromCodes(q(t) ? [t] : t);
3141
3141
  a && (this.language || r(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector?.cacheUserLanguage?.(a)), this.loadResources(a, (e) => {
3142
3142
  i(e, a);
3143
3143
  });
@@ -3156,7 +3156,7 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3156
3156
  let s = this.options.keySeparator || ".", c;
3157
3157
  return a.keyPrefix && Array.isArray(e) ? c = e.map((e) => (typeof e == "function" && (e = jn(e, o)), `${a.keyPrefix}${s}${e}`)) : (typeof e == "function" && (e = jn(e, o)), c = a.keyPrefix ? `${a.keyPrefix}${s}${e}` : e), this.t(c, a);
3158
3158
  };
3159
- return K(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
3159
+ return q(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = n, r;
3160
3160
  }
3161
3161
  t(...e) {
3162
3162
  return this.translator?.translate(...e);
@@ -3183,16 +3183,16 @@ var Mn = {}, Nn = (e) => !K(e) && typeof e != "boolean" && typeof e != "number",
3183
3183
  return !!(this.hasResourceBundle(n, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(n, e) && (!r || a(i, e)));
3184
3184
  }
3185
3185
  loadNamespaces(e, t) {
3186
- let n = rn();
3187
- return this.options.ns ? (K(e) && (e = [e]), e.forEach((e) => {
3186
+ let n = nn();
3187
+ return this.options.ns ? (q(e) && (e = [e]), e.forEach((e) => {
3188
3188
  this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
3189
3189
  }), this.loadResources((e) => {
3190
3190
  n.resolve(), t && t(e);
3191
3191
  }), n) : (t && t(), Promise.resolve());
3192
3192
  }
3193
3193
  loadLanguages(e, t) {
3194
- let n = rn();
3195
- K(e) && (e = [e]);
3194
+ let n = nn();
3195
+ q(e) && (e = [e]);
3196
3196
  let r = this.options.preload || [], i = e.filter((e) => r.indexOf(e) < 0 && this.services.languageUtils.isSupportedCode(e));
3197
3197
  return i.length ? (this.options.preload = r.concat(i), this.loadResources((e) => {
3198
3198
  n.resolve(), t && t(e);
@@ -4411,7 +4411,7 @@ var Er = {
4411
4411
  };
4412
4412
  //#endregion
4413
4413
  //#region src/i18n/index.ts
4414
- J.use(Tr).use(P).init({
4414
+ J.use(Tr).use(F).init({
4415
4415
  resources: {
4416
4416
  en: { translation: Er },
4417
4417
  "zh-Hans": { translation: Dr },
@@ -4475,18 +4475,18 @@ var Ir = [
4475
4475
  }
4476
4476
  ];
4477
4477
  function Lr() {
4478
- let { theme: e, setTheme: t } = fe(), n = [
4478
+ let { theme: e, setTheme: t } = de(), n = [
4479
4479
  {
4480
4480
  value: "light",
4481
- icon: tn
4481
+ icon: en
4482
4482
  },
4483
4483
  {
4484
4484
  value: "system",
4485
- icon: $t
4485
+ icon: Qt
4486
4486
  },
4487
4487
  {
4488
4488
  value: "dark",
4489
- icon: en
4489
+ icon: $t
4490
4490
  }
4491
4491
  ];
4492
4492
  return /* @__PURE__ */ l("div", {
@@ -4495,7 +4495,7 @@ function Lr() {
4495
4495
  children: n.map(({ value: n, icon: r }) => /* @__PURE__ */ l("button", {
4496
4496
  type: "button",
4497
4497
  onClick: () => t(n),
4498
- className: U("p-1 rounded cursor-pointer border-none bg-transparent transition-colors", e === n ? "text-gray-700 dark:text-gray-200" : "text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300"),
4498
+ className: W("p-1 rounded cursor-pointer border-none bg-transparent transition-colors", e === n ? "text-gray-700 dark:text-gray-200" : "text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300"),
4499
4499
  title: n,
4500
4500
  "aria-label": `${n} theme`,
4501
4501
  children: /* @__PURE__ */ l(r, { className: "h-3.5 w-3.5" })
@@ -4503,8 +4503,8 @@ function Lr() {
4503
4503
  });
4504
4504
  }
4505
4505
  function Rr({ children: e }) {
4506
- let t = se(), { i18n: n } = L();
4507
- return fe(), a(() => {
4506
+ let t = oe(), { i18n: n } = L();
4507
+ return de(), a(() => {
4508
4508
  if (t.primaryColor && Fr(t.primaryColor) && document.documentElement.style.setProperty("--brand-primary", t.primaryColor), t.customCssUrl) try {
4509
4509
  if (new URL(t.customCssUrl, window.location.origin).origin === window.location.origin) {
4510
4510
  let e = document.createElement("link");
@@ -4517,7 +4517,7 @@ function Rr({ children: e }) {
4517
4517
  className: "min-h-screen flex items-center justify-center p-4",
4518
4518
  "data-auth": "page",
4519
4519
  style: { background: "var(--auth-bg)" },
4520
- children: /* @__PURE__ */ u(Lt, {
4520
+ children: /* @__PURE__ */ u(It, {
4521
4521
  style: {
4522
4522
  background: "var(--auth-card-bg)",
4523
4523
  borderRadius: "var(--auth-radius, 0.5rem)",
@@ -4548,7 +4548,7 @@ function Rr({ children: e }) {
4548
4548
  "data-auth": "languages",
4549
4549
  children: (t.languages ?? Ir).map((e) => /* @__PURE__ */ l("button", {
4550
4550
  type: "button",
4551
- className: U("bg-transparent border-none px-2 py-1 text-xs rounded cursor-pointer transition-colors", n.language === e.code || n.language?.startsWith(e.code) ? "text-primary font-semibold" : "text-gray-400 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),
4551
+ className: W("bg-transparent border-none px-2 py-1 text-xs rounded cursor-pointer transition-colors", n.language === e.code || n.language?.startsWith(e.code) ? "text-primary font-semibold" : "text-gray-400 dark:text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800"),
4552
4552
  onClick: () => n.changeLanguage(e.code),
4553
4553
  children: e.label
4554
4554
  }, e.code))
@@ -4560,7 +4560,7 @@ function Rr({ children: e }) {
4560
4560
  }
4561
4561
  //#endregion
4562
4562
  //#region node_modules/class-variance-authority/dist/index.mjs
4563
- var zr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Br = me, Vr = (e, t) => (n) => {
4563
+ var zr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Br = pe, Vr = (e, t) => (n) => {
4564
4564
  if (t?.variants == null) return Br(e, n?.class, n?.className);
4565
4565
  let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
4566
4566
  let t = n?.[e], a = i?.[e];
@@ -4606,7 +4606,7 @@ var zr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Br = me, Vr
4606
4606
  size: "default"
4607
4607
  }
4608
4608
  }), Y = n(({ className: e, variant: t, size: n, loading: r, children: i, disabled: a, ...o }, s) => /* @__PURE__ */ u("button", {
4609
- className: U(Hr({
4609
+ className: W(Hr({
4610
4610
  variant: t,
4611
4611
  size: n,
4612
4612
  className: e
@@ -4614,14 +4614,14 @@ var zr = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Br = me, Vr
4614
4614
  ref: s,
4615
4615
  disabled: a || r,
4616
4616
  ...o,
4617
- children: [r && /* @__PURE__ */ l(Qt, { className: "h-4 w-4 animate-spin" }), i]
4617
+ children: [r && /* @__PURE__ */ l(Zt, { className: "h-4 w-4 animate-spin" }), i]
4618
4618
  }));
4619
4619
  Y.displayName = "Button";
4620
4620
  //#endregion
4621
4621
  //#region src/components/ui/input.tsx
4622
4622
  var X = n(({ className: e, type: t, ...n }, r) => /* @__PURE__ */ l("input", {
4623
4623
  type: t,
4624
- className: U("flex h-11 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-base text-gray-900 placeholder:text-gray-400 transition-colors focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:placeholder:text-gray-500", e),
4624
+ className: W("flex h-11 w-full rounded-md border border-gray-300 bg-white px-3 py-2 text-base text-gray-900 placeholder:text-gray-400 transition-colors focus-visible:outline-none focus-visible:border-primary focus-visible:ring-[3px] focus-visible:ring-primary/15 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:placeholder:text-gray-500", e),
4625
4625
  ref: r,
4626
4626
  ...n
4627
4627
  }));
@@ -4630,7 +4630,7 @@ X.displayName = "Input";
4630
4630
  //#region src/components/ui/label.tsx
4631
4631
  var Z = n(({ className: e, ...t }, n) => /* @__PURE__ */ l("label", {
4632
4632
  ref: n,
4633
- className: U("block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5", e),
4633
+ className: W("block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1.5", e),
4634
4634
  ...t
4635
4635
  }));
4636
4636
  Z.displayName = "Label";
@@ -4644,7 +4644,7 @@ var Ur = Vr("rounded-md border px-3 py-2.5 text-sm mb-4", {
4644
4644
  defaultVariants: { variant: "error" }
4645
4645
  }), Q = n(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ l("div", {
4646
4646
  ref: r,
4647
- className: U(Ur({
4647
+ className: W(Ur({
4648
4648
  variant: t,
4649
4649
  className: e
4650
4650
  })),
@@ -4655,7 +4655,7 @@ Q.displayName = "Alert";
4655
4655
  //#region src/components/ui/separator.tsx
4656
4656
  function Wr({ label: e, className: t }) {
4657
4657
  return /* @__PURE__ */ u("div", {
4658
- className: U("flex items-center gap-3 my-4 text-gray-400 dark:text-gray-500 text-[13px]", t),
4658
+ className: W("flex items-center gap-3 my-4 text-gray-400 dark:text-gray-500 text-[13px]", t),
4659
4659
  children: [
4660
4660
  /* @__PURE__ */ l("div", { className: "flex-1 h-px bg-gray-200 dark:bg-gray-800" }),
4661
4661
  e && /* @__PURE__ */ l("span", { children: e }),
@@ -4699,23 +4699,25 @@ async function $(e, t) {
4699
4699
  function qr(e) {
4700
4700
  return e ? { "X-MFA-Setup-Token": e } : {};
4701
4701
  }
4702
- function Jr(e, t, n) {
4702
+ function Jr(e, t, n, r) {
4703
4703
  return $(n ? `/api/auth/login?returnUrl=${encodeURIComponent(n)}` : "/api/auth/login", {
4704
4704
  method: "POST",
4705
4705
  body: JSON.stringify({
4706
4706
  email: e,
4707
- password: t
4707
+ password: t,
4708
+ turnstileToken: r
4708
4709
  })
4709
4710
  });
4710
4711
  }
4711
- function Yr(e, t, n, r) {
4712
+ function Yr(e, t, n, r, i) {
4712
4713
  return $("/api/auth/register", {
4713
4714
  method: "POST",
4714
4715
  body: JSON.stringify({
4715
4716
  email: e,
4716
4717
  password: t,
4717
4718
  firstName: n,
4718
- lastName: r
4719
+ lastName: r,
4720
+ turnstileToken: i
4719
4721
  })
4720
4722
  });
4721
4723
  }
@@ -4808,9 +4810,49 @@ function ui(e, t) {
4808
4810
  });
4809
4811
  }
4810
4812
  //#endregion
4813
+ //#region src/components/Turnstile.tsx
4814
+ var di = "https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit", fi = null;
4815
+ function pi() {
4816
+ return typeof window < "u" && window.turnstile ? Promise.resolve() : fi || (fi = new Promise((e, t) => {
4817
+ let n = document.createElement("script");
4818
+ n.src = di, n.async = !0, n.defer = !0, n.onload = () => e(), n.onerror = () => {
4819
+ fi = null, t(/* @__PURE__ */ Error("Failed to load Cloudflare Turnstile"));
4820
+ }, document.head.appendChild(n);
4821
+ }), fi);
4822
+ }
4823
+ function mi({ siteKey: e, onToken: t, theme: n = "auto" }) {
4824
+ let r = o(null), i = o(null);
4825
+ return a(() => {
4826
+ let a = !1;
4827
+ return pi().then(() => {
4828
+ a || !r.current || !window.turnstile || (i.current = window.turnstile.render(r.current, {
4829
+ sitekey: e,
4830
+ theme: n,
4831
+ callback: (e) => t(e),
4832
+ "expired-callback": () => t(null),
4833
+ "error-callback": () => t(null)
4834
+ }));
4835
+ }).catch(() => t(null)), () => {
4836
+ if (a = !0, i.current && window.turnstile) {
4837
+ try {
4838
+ window.turnstile.remove(i.current);
4839
+ } catch {}
4840
+ i.current = null;
4841
+ }
4842
+ };
4843
+ }, [
4844
+ e,
4845
+ n,
4846
+ t
4847
+ ]), /* @__PURE__ */ l("div", {
4848
+ ref: r,
4849
+ className: "flex justify-center"
4850
+ });
4851
+ }
4852
+ //#endregion
4811
4853
  //#region src/pages/LoginPage.tsx
4812
- var di = "";
4813
- function fi(e) {
4854
+ var hi = "";
4855
+ function gi(e) {
4814
4856
  if (!e) return !1;
4815
4857
  try {
4816
4858
  return new URL(e, window.location.origin).origin === window.location.origin && e.startsWith("/");
@@ -4818,10 +4860,10 @@ function fi(e) {
4818
4860
  return !1;
4819
4861
  }
4820
4862
  }
4821
- function pi() {
4822
- let { t: e } = L(), t = se(), n = g(), [i] = _(), d = i.get("returnUrl") || "", p = i.get("login_hint") || "", m = i.get("error_description") || i.get("error") || "", h = i.get("message") || "", [v, y] = s(p), [b, x] = s(""), [S, C] = s(m), [w] = s(() => h === "registration_success" ? e("registrationSuccess") : ""), [T, E] = s(!1), [D, O] = s(null), [k, A] = s(!1), [j, M] = s(!1), [N, ee] = s([]), [te, P] = s(null), [F, ne] = s(null), re = o(null), ie = o(""), I = r(async (e) => {
4823
- if (!(!e.includes("@") || e === ie.current)) {
4824
- ie.current = e, M(!0), C("");
4863
+ function _i() {
4864
+ let { t: e } = L(), t = oe(), n = g(), [i] = _(), d = i.get("returnUrl") || "", p = i.get("login_hint") || "", m = i.get("error_description") || i.get("error") || "", h = i.get("message") || "", [v, y] = s(p), [b, x] = s(""), [S, C] = s(m), [w] = s(() => h === "registration_success" ? e("registrationSuccess") : ""), [T, E] = s(!1), [D, O] = s(null), [k, A] = s(!1), [j, M] = s(!1), [N, ee] = s([]), [P, F] = s(void 0), [te, ne] = s(null), [re, ie] = s(0), [I, R] = s(null), [ae, z] = s(null), se = o(null), ce = o(""), le = r(async (e) => {
4865
+ if (!(!e.includes("@") || e === ce.current)) {
4866
+ ce.current = e, M(!0), C("");
4825
4867
  try {
4826
4868
  let t = await ei(e);
4827
4869
  t.ssoRequired && t.redirectUrl ? O({ redirectUrl: t.redirectUrl }) : O(null), A(!0);
@@ -4833,39 +4875,41 @@ function pi() {
4833
4875
  }
4834
4876
  }, []);
4835
4877
  a(() => {
4836
- d && fi(d) || $r().then((e) => {
4837
- e.authenticated && P({
4878
+ d && gi(d) || $r().then((e) => {
4879
+ e.authenticated && R({
4838
4880
  name: e.name,
4839
4881
  email: e.email
4840
4882
  });
4841
4883
  }).catch(() => {});
4842
4884
  }, [d]), a(() => {
4843
- ti().then((e) => ee(e.providers ?? [])).catch(() => {});
4885
+ ti().then((e) => {
4886
+ ee(e.providers ?? []), F(e.turnstileSiteKey);
4887
+ }).catch(() => {});
4844
4888
  }, []), a(() => {
4845
- p && p.includes("@") && I(p);
4846
- }, [p, I]);
4847
- function ae() {
4848
- re.current && clearTimeout(re.current), re.current = setTimeout(() => {
4849
- I(v);
4889
+ p && p.includes("@") && le(p);
4890
+ }, [p, le]);
4891
+ function ue() {
4892
+ se.current && clearTimeout(se.current), se.current = setTimeout(() => {
4893
+ le(v);
4850
4894
  }, 300);
4851
4895
  }
4852
- function oe(e) {
4853
- y(e), e !== ie.current && (A(!1), O(null));
4896
+ function de(e) {
4897
+ y(e), e !== ce.current && (A(!1), O(null));
4854
4898
  }
4855
- function R(e) {
4856
- let t = new URL(`${di}${e.loginUrl}`, window.location.origin);
4857
- d && fi(d) && t.searchParams.set("returnUrl", d), window.location.href = t.toString();
4899
+ function fe(e) {
4900
+ let t = new URL(`${hi}${e.loginUrl}`, window.location.origin);
4901
+ d && gi(d) && t.searchParams.set("returnUrl", d), window.location.href = t.toString();
4858
4902
  }
4859
- function ce() {
4903
+ function pe() {
4860
4904
  if (D) {
4861
- let e = new URL(`${di}${D.redirectUrl}`, window.location.origin);
4862
- d && fi(d) && e.searchParams.set("returnUrl", d), v && e.searchParams.set("loginHint", v), window.location.href = e.toString();
4905
+ let e = new URL(`${hi}${D.redirectUrl}`, window.location.origin);
4906
+ d && gi(d) && e.searchParams.set("returnUrl", d), v && e.searchParams.set("loginHint", v), window.location.href = e.toString();
4863
4907
  }
4864
4908
  }
4865
- async function le(t) {
4909
+ async function me(t) {
4866
4910
  t.preventDefault(), C(""), E(!0);
4867
4911
  try {
4868
- let e = await Jr(v, b, d || void 0);
4912
+ let e = await Jr(v, b, d || void 0, te || void 0);
4869
4913
  if (e.mfaRequired && e.challengeId) {
4870
4914
  n(`/mfa-challenge?${new URLSearchParams({
4871
4915
  challengeId: e.challengeId,
@@ -4885,7 +4929,7 @@ function pi() {
4885
4929
  if (e.mfaAvailable && e.userId) {
4886
4930
  let t = `mfa-prompt-dismissed:${e.userId}:${e.clientId || "default"}`;
4887
4931
  if (!localStorage.getItem(t)) {
4888
- ne({
4932
+ z({
4889
4933
  returnUrl: d,
4890
4934
  userId: e.userId,
4891
4935
  clientId: e.clientId || "default"
@@ -4893,7 +4937,7 @@ function pi() {
4893
4937
  return;
4894
4938
  }
4895
4939
  }
4896
- d && fi(d) ? window.location.href = d : window.location.href = "/";
4940
+ d && gi(d) ? window.location.href = d : window.location.href = "/";
4897
4941
  } catch (t) {
4898
4942
  if (t instanceof Kr) switch (t.error) {
4899
4943
  case "invalid_credentials":
@@ -4907,8 +4951,8 @@ function pi() {
4907
4951
  break;
4908
4952
  case "sso_required":
4909
4953
  if (t.redirectUrl) {
4910
- let e = new URL(`${di}${t.redirectUrl}`, window.location.origin);
4911
- d && fi(d) && e.searchParams.set("returnUrl", d), window.location.href = e.toString();
4954
+ let e = new URL(`${hi}${t.redirectUrl}`, window.location.origin);
4955
+ d && gi(d) && e.searchParams.set("returnUrl", d), window.location.href = e.toString();
4912
4956
  return;
4913
4957
  }
4914
4958
  C(e("errorSsoRequired"));
@@ -4919,60 +4963,64 @@ function pi() {
4919
4963
  case "password_required":
4920
4964
  C(e("errorPasswordRequired"));
4921
4965
  break;
4966
+ case "captcha_failed":
4967
+ C(e("errorUnexpected"));
4968
+ break;
4922
4969
  default: C(t.message || e("errorUnexpected"));
4923
4970
  }
4924
4971
  else C(e("errorUnexpected"));
4972
+ P && (ne(null), ie((e) => e + 1));
4925
4973
  } finally {
4926
4974
  E(!1);
4927
4975
  }
4928
4976
  }
4929
- let ue = d && fi(d) ? `/forgot-password?returnUrl=${encodeURIComponent(d)}` : "/forgot-password", de = k && !D;
4930
- return F ? /* @__PURE__ */ u("div", { children: [
4931
- /* @__PURE__ */ l(W, { children: e("mfaPromptTitle") }),
4977
+ let he = d && gi(d) ? `/forgot-password?returnUrl=${encodeURIComponent(d)}` : "/forgot-password", ge = k && !D;
4978
+ return ae ? /* @__PURE__ */ u("div", { children: [
4979
+ /* @__PURE__ */ l(G, { children: e("mfaPromptTitle") }),
4932
4980
  /* @__PURE__ */ l("p", {
4933
4981
  className: "text-center text-gray-500 dark:text-gray-400 mb-6",
4934
4982
  children: e("mfaPromptMessage")
4935
4983
  }),
4936
4984
  /* @__PURE__ */ l(Y, {
4937
4985
  className: "mb-3",
4938
- onClick: () => n(`/mfa-setup?returnUrl=${encodeURIComponent(F.returnUrl || "/")}`),
4986
+ onClick: () => n(`/mfa-setup?returnUrl=${encodeURIComponent(ae.returnUrl || "/")}`),
4939
4987
  children: e("mfaPromptSetup")
4940
4988
  }),
4941
4989
  /* @__PURE__ */ l(Y, {
4942
4990
  variant: "secondary",
4943
4991
  onClick: () => {
4944
- localStorage.setItem(`mfa-prompt-dismissed:${F.userId}:${F.clientId}`, "1");
4945
- let e = F.returnUrl && fi(F.returnUrl) ? F.returnUrl : "/";
4992
+ localStorage.setItem(`mfa-prompt-dismissed:${ae.userId}:${ae.clientId}`, "1");
4993
+ let e = ae.returnUrl && gi(ae.returnUrl) ? ae.returnUrl : "/";
4946
4994
  window.location.href = e;
4947
4995
  },
4948
4996
  children: e("mfaPromptSkip")
4949
4997
  })
4950
- ] }) : te ? /* @__PURE__ */ u("div", { children: [
4951
- /* @__PURE__ */ l(W, { children: e("signedInAs", { name: te.name || te.email }) }),
4998
+ ] }) : I ? /* @__PURE__ */ u("div", { children: [
4999
+ /* @__PURE__ */ l(G, { children: e("signedInAs", { name: I.name || I.email }) }),
4952
5000
  /* @__PURE__ */ l("p", {
4953
5001
  className: "text-center text-gray-500 dark:text-gray-400",
4954
5002
  children: e("signedInMessage")
4955
5003
  }),
4956
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(Y, {
5004
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l(Y, {
4957
5005
  variant: "secondary",
4958
5006
  onClick: () => {
4959
5007
  Xr().then(() => {
4960
- P(null);
5008
+ R(null);
4961
5009
  }).catch(() => {
4962
- P(null);
5010
+ R(null);
4963
5011
  });
4964
5012
  },
4965
5013
  children: e("signOut")
4966
5014
  }) })
4967
5015
  ] }) : /* @__PURE__ */ u("div", { children: [
4968
- /* @__PURE__ */ l(W, { children: e("signIn") }),
4969
- N.length > 0 && !de && /* @__PURE__ */ u("div", {
5016
+ /* @__PURE__ */ l(G, { children: e("signIn") }),
5017
+ N.length > 0 && !ge && /* @__PURE__ */ u("div", {
4970
5018
  className: "mb-2",
4971
5019
  children: [N.map((t) => /* @__PURE__ */ u(Y, {
4972
5020
  type: "button",
4973
5021
  variant: "secondary",
4974
5022
  className: "mb-2",
4975
- onClick: () => R(t),
5023
+ onClick: () => fe(t),
4976
5024
  children: [t.connectionId === "google" && /* @__PURE__ */ u("svg", {
4977
5025
  className: "shrink-0",
4978
5026
  viewBox: "0 0 24 24",
@@ -4999,14 +5047,14 @@ function pi() {
4999
5047
  }), e("continueWith", { provider: t.name })]
5000
5048
  }, t.connectionId)), /* @__PURE__ */ l(Wr, { label: e("or") })]
5001
5049
  }),
5002
- N.length > 0 && de && /* @__PURE__ */ u("div", {
5050
+ N.length > 0 && ge && /* @__PURE__ */ u("div", {
5003
5051
  className: "flex items-center gap-3 mb-4 text-gray-400 dark:text-gray-500 text-[13px]",
5004
5052
  children: [
5005
5053
  /* @__PURE__ */ l("div", { className: "flex-1 h-px bg-gray-200 dark:bg-gray-800" }),
5006
5054
  /* @__PURE__ */ l("button", {
5007
5055
  type: "button",
5008
5056
  onClick: () => {
5009
- A(!1), O(null), ie.current = "";
5057
+ A(!1), O(null), ce.current = "";
5010
5058
  },
5011
5059
  className: "bg-transparent border-none cursor-pointer text-[13px] text-primary hover:underline",
5012
5060
  children: e("orSignInWith", { provider: N.map((e) => e.name).join(", ") })
@@ -5023,7 +5071,7 @@ function pi() {
5023
5071
  children: S
5024
5072
  }),
5025
5073
  /* @__PURE__ */ u("form", {
5026
- onSubmit: le,
5074
+ onSubmit: me,
5027
5075
  "data-auth": "login-form",
5028
5076
  children: [
5029
5077
  /* @__PURE__ */ u("div", {
@@ -5036,10 +5084,10 @@ function pi() {
5036
5084
  id: "email",
5037
5085
  type: "email",
5038
5086
  value: v,
5039
- onChange: (e) => oe(e.target.value),
5040
- onBlur: ae,
5087
+ onChange: (e) => de(e.target.value),
5088
+ onBlur: ue,
5041
5089
  onKeyDown: (e) => {
5042
- e.key === "Enter" && !k && !j && v.includes("@") && (e.preventDefault(), I(v));
5090
+ e.key === "Enter" && !k && !j && v.includes("@") && (e.preventDefault(), le(v));
5043
5091
  },
5044
5092
  placeholder: e("emailPlaceholder"),
5045
5093
  autoComplete: "email",
@@ -5050,7 +5098,7 @@ function pi() {
5050
5098
  }),
5051
5099
  !k && !j && /* @__PURE__ */ l(Y, {
5052
5100
  type: "button",
5053
- onClick: () => I(v),
5101
+ onClick: () => le(v),
5054
5102
  disabled: !v.includes("@"),
5055
5103
  children: e("continue")
5056
5104
  }),
@@ -5066,11 +5114,11 @@ function pi() {
5066
5114
  }), /* @__PURE__ */ l(Y, {
5067
5115
  variant: "secondary",
5068
5116
  type: "button",
5069
- onClick: ce,
5117
+ onClick: pe,
5070
5118
  children: e("continueWithSso")
5071
5119
  })]
5072
5120
  }),
5073
- de && /* @__PURE__ */ u(c, { children: [
5121
+ ge && /* @__PURE__ */ u(c, { children: [
5074
5122
  /* @__PURE__ */ u("div", {
5075
5123
  className: "mb-4",
5076
5124
  "data-auth": "password-field",
@@ -5089,21 +5137,29 @@ function pi() {
5089
5137
  required: !0
5090
5138
  })]
5091
5139
  }),
5140
+ P && /* @__PURE__ */ l("div", {
5141
+ className: "mb-4",
5142
+ children: /* @__PURE__ */ l(mi, {
5143
+ siteKey: P,
5144
+ onToken: ne
5145
+ }, re)
5146
+ }),
5092
5147
  /* @__PURE__ */ l(Y, {
5093
5148
  type: "submit",
5094
5149
  loading: T,
5150
+ disabled: !!P && !te,
5095
5151
  "data-auth": "submit-button",
5096
5152
  children: e(T ? "signingIn" : "signIn")
5097
5153
  }),
5098
- t.showForgotPassword && /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(f, {
5099
- to: ue,
5154
+ t.showForgotPassword && /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l(f, {
5155
+ to: he,
5100
5156
  className: "text-sm font-medium text-primary hover:underline no-underline",
5101
5157
  children: e("forgotPassword")
5102
5158
  }) })
5103
5159
  ] })
5104
5160
  ]
5105
5161
  }),
5106
- t.showRegistration && /* @__PURE__ */ l(G, {
5162
+ t.showRegistration && /* @__PURE__ */ l(K, {
5107
5163
  className: "mt-4",
5108
5164
  children: /* @__PURE__ */ u("span", {
5109
5165
  className: "text-sm text-gray-500 dark:text-gray-400",
@@ -5122,44 +5178,51 @@ function pi() {
5122
5178
  }
5123
5179
  //#endregion
5124
5180
  //#region src/pages/RegisterPage.tsx
5125
- function mi() {
5126
- let { t: e } = L(), t = g(), [n] = _(), r = n.get("returnUrl") || "", [i, a] = s(""), [o, c] = s(""), [d, p] = s(""), [m, h] = s(""), [v, y] = s(""), [b, x] = s(!1), [S, C] = s([]), [w, T] = s(!1);
5127
- function E() {
5128
- w || ni().then((e) => C(e.rules)).catch(() => {}).finally(() => T(!0));
5181
+ function vi() {
5182
+ let { t: e } = L(), t = g(), [n] = _(), r = n.get("returnUrl") || "", [i, o] = s(""), [c, d] = s(""), [p, m] = s(""), [h, v] = s(""), [y, b] = s(""), [x, S] = s(!1), [C, w] = s([]), [T, E] = s(!1), [D, O] = s(void 0), [k, A] = s(null), [j, M] = s(0);
5183
+ a(() => {
5184
+ ti().then((e) => O(e.turnstileSiteKey)).catch(() => {});
5185
+ }, []);
5186
+ function N() {
5187
+ T || ni().then((e) => w(e.rules)).catch(() => {}).finally(() => E(!0));
5129
5188
  }
5130
- async function D(n) {
5131
- n.preventDefault(), y(""), x(!0);
5189
+ async function ee(n) {
5190
+ n.preventDefault(), b(""), S(!0);
5132
5191
  try {
5133
- await Yr(i, o, d || void 0, m || void 0);
5192
+ await Yr(i, c, p || void 0, h || void 0, k || void 0);
5134
5193
  let e = new URLSearchParams();
5135
5194
  r && e.set("returnUrl", r), e.set("login_hint", i), e.set("message", "registration_success"), t(`/login?${e.toString()}`);
5136
5195
  } catch (t) {
5137
5196
  if (t instanceof Kr) switch (t.error) {
5138
5197
  case "email_already_registered":
5139
- y(e("errorEmailAlreadyRegistered"));
5198
+ b(e("errorEmailAlreadyRegistered"));
5140
5199
  break;
5141
5200
  case "weak_password":
5142
- y(t.message || e("errorWeakPassword"));
5201
+ b(t.message || e("errorWeakPassword"));
5143
5202
  break;
5144
5203
  case "email_and_password_required":
5145
- y(e("errorEmailAndPasswordRequired"));
5204
+ b(e("errorEmailAndPasswordRequired"));
5146
5205
  break;
5147
- default: y(t.message || e("errorRegistrationFailed"));
5206
+ case "captcha_failed":
5207
+ b(e("errorRegistrationFailed"));
5208
+ break;
5209
+ default: b(t.message || e("errorRegistrationFailed"));
5148
5210
  }
5149
- else y(e("errorRegistrationFailed"));
5211
+ else b(e("errorRegistrationFailed"));
5212
+ D && (A(null), M((e) => e + 1));
5150
5213
  } finally {
5151
- x(!1);
5214
+ S(!1);
5152
5215
  }
5153
5216
  }
5154
- let O = r ? `/login?returnUrl=${encodeURIComponent(r)}` : "/login";
5217
+ let P = r ? `/login?returnUrl=${encodeURIComponent(r)}` : "/login";
5155
5218
  return /* @__PURE__ */ u("div", { children: [
5156
- /* @__PURE__ */ l(W, { children: e("registerTitle") }),
5157
- v && /* @__PURE__ */ l(Q, {
5219
+ /* @__PURE__ */ l(G, { children: e("registerTitle") }),
5220
+ y && /* @__PURE__ */ l(Q, {
5158
5221
  variant: "error",
5159
- children: v
5222
+ children: y
5160
5223
  }),
5161
5224
  /* @__PURE__ */ u("form", {
5162
- onSubmit: D,
5225
+ onSubmit: ee,
5163
5226
  children: [
5164
5227
  /* @__PURE__ */ u("div", {
5165
5228
  className: "flex gap-3",
@@ -5171,8 +5234,8 @@ function mi() {
5171
5234
  }), /* @__PURE__ */ l(X, {
5172
5235
  id: "firstName",
5173
5236
  type: "text",
5174
- value: d,
5175
- onChange: (e) => p(e.target.value),
5237
+ value: p,
5238
+ onChange: (e) => m(e.target.value),
5176
5239
  placeholder: e("firstNamePlaceholder"),
5177
5240
  autoComplete: "given-name",
5178
5241
  maxLength: 100
@@ -5185,8 +5248,8 @@ function mi() {
5185
5248
  }), /* @__PURE__ */ l(X, {
5186
5249
  id: "lastName",
5187
5250
  type: "text",
5188
- value: m,
5189
- onChange: (e) => h(e.target.value),
5251
+ value: h,
5252
+ onChange: (e) => v(e.target.value),
5190
5253
  placeholder: e("lastNamePlaceholder"),
5191
5254
  autoComplete: "family-name",
5192
5255
  maxLength: 100
@@ -5202,7 +5265,7 @@ function mi() {
5202
5265
  id: "email",
5203
5266
  type: "email",
5204
5267
  value: i,
5205
- onChange: (e) => a(e.target.value),
5268
+ onChange: (e) => o(e.target.value),
5206
5269
  placeholder: e("emailPlaceholder"),
5207
5270
  autoComplete: "email",
5208
5271
  autoFocus: !0,
@@ -5218,31 +5281,39 @@ function mi() {
5218
5281
  }), /* @__PURE__ */ l(X, {
5219
5282
  id: "password",
5220
5283
  type: "password",
5221
- value: o,
5222
- onChange: (e) => c(e.target.value),
5223
- onFocus: E,
5284
+ value: c,
5285
+ onChange: (e) => d(e.target.value),
5286
+ onFocus: N,
5224
5287
  placeholder: e("passwordPlaceholder"),
5225
5288
  autoComplete: "new-password",
5226
5289
  maxLength: 256,
5227
5290
  required: !0
5228
5291
  })]
5229
5292
  }),
5230
- S.length > 0 && /* @__PURE__ */ l("ul", {
5293
+ C.length > 0 && /* @__PURE__ */ l("ul", {
5231
5294
  className: "text-[13px] text-gray-500 dark:text-gray-400 mb-4 pl-5 list-disc",
5232
- children: S.map((e) => /* @__PURE__ */ l("li", { children: e.label }, e.rule))
5295
+ children: C.map((e) => /* @__PURE__ */ l("li", { children: e.label }, e.rule))
5296
+ }),
5297
+ D && /* @__PURE__ */ l("div", {
5298
+ className: "mb-4",
5299
+ children: /* @__PURE__ */ l(mi, {
5300
+ siteKey: D,
5301
+ onToken: A
5302
+ }, j)
5233
5303
  }),
5234
5304
  /* @__PURE__ */ l(Y, {
5235
5305
  type: "submit",
5236
- loading: b,
5237
- children: e(b ? "registering" : "registerButton")
5306
+ loading: x,
5307
+ disabled: !!D && !k,
5308
+ children: e(x ? "registering" : "registerButton")
5238
5309
  }),
5239
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ u("span", {
5310
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ u("span", {
5240
5311
  className: "text-sm text-gray-500 dark:text-gray-400",
5241
5312
  children: [
5242
5313
  e("alreadyHaveAccount"),
5243
5314
  " ",
5244
5315
  /* @__PURE__ */ l(f, {
5245
- to: O,
5316
+ to: P,
5246
5317
  className: "text-sm font-medium text-primary hover:underline no-underline",
5247
5318
  children: e("signIn")
5248
5319
  })
@@ -5254,7 +5325,7 @@ function mi() {
5254
5325
  }
5255
5326
  //#endregion
5256
5327
  //#region src/pages/ForgotPasswordPage.tsx
5257
- function hi() {
5328
+ function yi() {
5258
5329
  let { t: e } = L(), [t] = _(), n = t.get("returnUrl") || "", [r, i] = s(""), [a, o] = s(!1), [c, d] = s(!1), [p, m] = s(""), h = n ? `/login?returnUrl=${encodeURIComponent(n)}` : "/login";
5259
5330
  async function g(t) {
5260
5331
  t.preventDefault(), m(""), o(!0);
@@ -5267,19 +5338,19 @@ function hi() {
5267
5338
  }
5268
5339
  }
5269
5340
  return c ? /* @__PURE__ */ u("div", { children: [
5270
- /* @__PURE__ */ l(W, { children: e("checkYourEmail") }),
5341
+ /* @__PURE__ */ l(G, { children: e("checkYourEmail") }),
5271
5342
  /* @__PURE__ */ l(Q, {
5272
5343
  variant: "success",
5273
5344
  children: e("resetEmailSent")
5274
5345
  }),
5275
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(f, {
5346
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l(f, {
5276
5347
  to: h,
5277
5348
  className: "text-sm font-medium text-primary hover:underline no-underline",
5278
5349
  children: e("backToSignIn")
5279
5350
  }) })
5280
5351
  ] }) : /* @__PURE__ */ u("div", { children: [
5281
- /* @__PURE__ */ l(W, { children: e("resetYourPassword") }),
5282
- /* @__PURE__ */ l(zt, {
5352
+ /* @__PURE__ */ l(G, { children: e("resetYourPassword") }),
5353
+ /* @__PURE__ */ l(Rt, {
5283
5354
  className: "mb-5",
5284
5355
  children: e("resetSubtitle")
5285
5356
  }),
@@ -5312,7 +5383,7 @@ function hi() {
5312
5383
  loading: a,
5313
5384
  children: e(a ? "sending" : "sendResetLink")
5314
5385
  }),
5315
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(f, {
5386
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l(f, {
5316
5387
  to: h,
5317
5388
  className: "text-sm font-medium text-primary hover:underline no-underline",
5318
5389
  children: e("backToSignIn")
@@ -5323,7 +5394,7 @@ function hi() {
5323
5394
  }
5324
5395
  //#endregion
5325
5396
  //#region src/pages/ResetPasswordPage.tsx
5326
- var gi = "", _i = [
5397
+ var bi = "", xi = [
5327
5398
  {
5328
5399
  rule: "minLength",
5329
5400
  value: 8,
@@ -5350,7 +5421,7 @@ var gi = "", _i = [
5350
5421
  label: "Special character"
5351
5422
  }
5352
5423
  ];
5353
- function vi(e, t) {
5424
+ function Si(e, t) {
5354
5425
  return t.map((t) => {
5355
5426
  let n = !1;
5356
5427
  switch (t.rule) {
@@ -5377,10 +5448,10 @@ function vi(e, t) {
5377
5448
  };
5378
5449
  });
5379
5450
  }
5380
- function yi() {
5381
- let { t: e } = L(), [t] = _(), n = t.get("p") || "", [r, i] = s(""), [o, c] = s(""), [d, p] = s(!1), [m, h] = s(""), [g, v] = s(!1), [y, b] = s(""), [x, S] = s(_i);
5451
+ function Ci() {
5452
+ let { t: e } = L(), [t] = _(), n = t.get("p") || "", [r, i] = s(""), [o, c] = s(""), [d, p] = s(!1), [m, h] = s(""), [g, v] = s(!1), [y, b] = s(""), [x, S] = s(xi);
5382
5453
  a(() => {
5383
- fetch(`${gi}/api/auth/password-policy`).then((e) => e.ok ? e.json() : null).then((e) => {
5454
+ fetch(`${bi}/api/auth/password-policy`).then((e) => e.ok ? e.json() : null).then((e) => {
5384
5455
  e?.rules && S(e.rules);
5385
5456
  }).catch(() => {});
5386
5457
  }, []);
@@ -5394,7 +5465,7 @@ function yi() {
5394
5465
  default: return t.label;
5395
5466
  }
5396
5467
  }
5397
- let w = vi(r, x.map((e) => ({
5468
+ let w = Si(r, x.map((e) => ({
5398
5469
  ...e,
5399
5470
  label: C(e)
5400
5471
  }))), T = w.every((e) => e.met);
@@ -5430,18 +5501,18 @@ function yi() {
5430
5501
  }
5431
5502
  }
5432
5503
  return g ? /* @__PURE__ */ u("div", { children: [
5433
- /* @__PURE__ */ l(W, { children: e("passwordResetSuccess") }),
5504
+ /* @__PURE__ */ l(G, { children: e("passwordResetSuccess") }),
5434
5505
  /* @__PURE__ */ l(Q, {
5435
5506
  variant: "success",
5436
5507
  children: e("passwordResetSuccessMessage")
5437
5508
  }),
5438
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(f, {
5509
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l(f, {
5439
5510
  to: "/login",
5440
5511
  className: "text-sm font-medium text-primary hover:underline no-underline",
5441
5512
  children: e("signIn")
5442
5513
  }) })
5443
5514
  ] }) : n ? /* @__PURE__ */ u("div", { children: [
5444
- /* @__PURE__ */ l(W, { children: e("setNewPassword") }),
5515
+ /* @__PURE__ */ l(G, { children: e("setNewPassword") }),
5445
5516
  m && /* @__PURE__ */ l(Q, {
5446
5517
  variant: "error",
5447
5518
  children: m
@@ -5474,7 +5545,7 @@ function yi() {
5474
5545
  className: "list-none mb-4 p-3 bg-gray-50 dark:bg-gray-800/60 rounded-md",
5475
5546
  children: w.map((e) => /* @__PURE__ */ u("li", {
5476
5547
  className: `text-[13px] py-0.5 flex items-center gap-1.5 ${e.met ? "text-green-800 dark:text-green-400" : "text-red-800 dark:text-red-400"}`,
5477
- children: [e.met ? /* @__PURE__ */ l(Zt, { className: "h-3.5 w-3.5 shrink-0" }) : /* @__PURE__ */ l(nn, { className: "h-3.5 w-3.5 shrink-0" }), e.label]
5548
+ children: [e.met ? /* @__PURE__ */ l(Xt, { className: "h-3.5 w-3.5 shrink-0" }) : /* @__PURE__ */ l(tn, { className: "h-3.5 w-3.5 shrink-0" }), e.label]
5478
5549
  }, e.label))
5479
5550
  }),
5480
5551
  /* @__PURE__ */ u("div", {
@@ -5499,7 +5570,7 @@ function yi() {
5499
5570
  disabled: !T,
5500
5571
  children: e(d ? "resetting" : "resetPassword")
5501
5572
  }),
5502
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(f, {
5573
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l(f, {
5503
5574
  to: "/login",
5504
5575
  className: "text-sm font-medium text-primary hover:underline no-underline",
5505
5576
  children: e("backToSignIn")
@@ -5507,12 +5578,12 @@ function yi() {
5507
5578
  ]
5508
5579
  })
5509
5580
  ] }) : /* @__PURE__ */ u("div", { children: [
5510
- /* @__PURE__ */ l(W, { children: e("invalidLink") }),
5581
+ /* @__PURE__ */ l(G, { children: e("invalidLink") }),
5511
5582
  /* @__PURE__ */ l(Q, {
5512
5583
  variant: "error",
5513
5584
  children: e("invalidOrExpiredLink")
5514
5585
  }),
5515
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l(f, {
5586
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l(f, {
5516
5587
  to: "/forgot-password",
5517
5588
  className: "text-sm font-medium text-primary hover:underline no-underline",
5518
5589
  children: e("requestNewResetLink")
@@ -5521,7 +5592,7 @@ function yi() {
5521
5592
  }
5522
5593
  //#endregion
5523
5594
  //#region src/pages/MfaChallengePage.tsx
5524
- function bi(e) {
5595
+ function wi(e) {
5525
5596
  if (!e) return !1;
5526
5597
  try {
5527
5598
  return new URL(e, window.location.origin).origin === window.location.origin && e.startsWith("/");
@@ -5529,19 +5600,19 @@ function bi(e) {
5529
5600
  return !1;
5530
5601
  }
5531
5602
  }
5532
- function xi(e) {
5603
+ function Ti(e) {
5533
5604
  let t = e.replace(/-/g, "+").replace(/_/g, "/"), n = t.length % 4 == 0 ? "" : "=".repeat(4 - t.length % 4), r = atob(t + n), i = new Uint8Array(r.length);
5534
5605
  for (let e = 0; e < r.length; e++) i[e] = r.charCodeAt(e);
5535
5606
  return i.buffer;
5536
5607
  }
5537
- function Si(e) {
5608
+ function Ei(e) {
5538
5609
  let t = new Uint8Array(e), n = "";
5539
5610
  for (let e of t) n += String.fromCharCode(e);
5540
5611
  return btoa(n).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
5541
5612
  }
5542
- function Ci() {
5613
+ function Di() {
5543
5614
  let { t: e } = L(), [t] = _(), n = t.get("challengeId") || "", i = t.get("returnUrl") || "", a = t.get("methods") || "", o = a ? a.split(",") : [], c = o.includes("webauthn"), [d, f] = s(c ? "webauthn" : o.includes("totp") ? "totp" : o[0] || "totp"), [p, m] = s(""), [h, g] = s(""), [v, y] = s(!1), b = r(() => {
5544
- i && bi(i) ? window.location.href = i : window.location.href = "/";
5615
+ i && wi(i) ? window.location.href = i : window.location.href = "/";
5545
5616
  }, [i]), x = r((t) => {
5546
5617
  if (t instanceof Kr) switch (t.error) {
5547
5618
  case "invalid_code":
@@ -5564,12 +5635,12 @@ function Ci() {
5564
5635
  return;
5565
5636
  }
5566
5637
  let i = JSON.parse(r), a = {
5567
- challenge: xi(i.challenge),
5638
+ challenge: Ti(i.challenge),
5568
5639
  rpId: i.rpId,
5569
5640
  timeout: i.timeout || 6e4,
5570
5641
  userVerification: i.userVerification || "preferred",
5571
5642
  allowCredentials: (i.allowCredentials || []).map((e) => ({
5572
- id: xi(e.id),
5643
+ id: Ti(e.id),
5573
5644
  type: e.type,
5574
5645
  transports: e.transports
5575
5646
  }))
@@ -5581,13 +5652,13 @@ function Ci() {
5581
5652
  let s = o.response;
5582
5653
  await ri(n, "webauthn", void 0, JSON.stringify({
5583
5654
  id: o.id,
5584
- rawId: Si(o.rawId),
5655
+ rawId: Ei(o.rawId),
5585
5656
  type: o.type,
5586
5657
  response: {
5587
- authenticatorData: Si(s.authenticatorData),
5588
- clientDataJSON: Si(s.clientDataJSON),
5589
- signature: Si(s.signature),
5590
- userHandle: s.userHandle ? Si(s.userHandle) : null
5658
+ authenticatorData: Ei(s.authenticatorData),
5659
+ clientDataJSON: Ei(s.clientDataJSON),
5660
+ signature: Ei(s.signature),
5661
+ userHandle: s.userHandle ? Ei(s.userHandle) : null
5591
5662
  }
5592
5663
  })), b();
5593
5664
  } catch (t) {
@@ -5614,8 +5685,8 @@ function Ci() {
5614
5685
  }, 100);
5615
5686
  }
5616
5687
  return /* @__PURE__ */ u("div", { children: [
5617
- /* @__PURE__ */ l(W, { children: e("mfaTitle") }),
5618
- /* @__PURE__ */ l(zt, {
5688
+ /* @__PURE__ */ l(G, { children: e("mfaTitle") }),
5689
+ /* @__PURE__ */ l(Rt, {
5619
5690
  className: "mb-6",
5620
5691
  children: e("mfaSubtitle")
5621
5692
  }),
@@ -5694,7 +5765,7 @@ function Ci() {
5694
5765
  }
5695
5766
  //#endregion
5696
5767
  //#region src/pages/MfaSetupPage.tsx
5697
- function wi(e) {
5768
+ function Oi(e) {
5698
5769
  if (!e) return !1;
5699
5770
  try {
5700
5771
  return new URL(e, window.location.origin).origin === window.location.origin && e.startsWith("/");
@@ -5702,17 +5773,17 @@ function wi(e) {
5702
5773
  return !1;
5703
5774
  }
5704
5775
  }
5705
- function Ti(e) {
5776
+ function ki(e) {
5706
5777
  let t = e.replace(/-/g, "+").replace(/_/g, "/"), n = t.length % 4 == 0 ? "" : "=".repeat(4 - t.length % 4), r = atob(t + n), i = new Uint8Array(r.length);
5707
5778
  for (let e = 0; e < r.length; e++) i[e] = r.charCodeAt(e);
5708
5779
  return i.buffer;
5709
5780
  }
5710
- function Ei(e) {
5781
+ function Ai(e) {
5711
5782
  let t = new Uint8Array(e), n = "";
5712
5783
  for (let e of t) n += String.fromCharCode(e);
5713
5784
  return btoa(n).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
5714
5785
  }
5715
- function Di() {
5786
+ function ji() {
5716
5787
  let { t: e } = L(), [t] = _(), n = t.get("setupToken") || void 0, r = t.get("returnUrl") || "", i = t.get("backUrl") || "", [o, c] = s(!1), [d, f] = s([]), [p, m] = s(""), [h, g] = s(!0), [v, y] = s(null), [b, x] = s(""), [S, C] = s(!1), [w, T] = s(!1), [E, D] = s(null), [O, k] = s(!1);
5717
5788
  a(() => {
5718
5789
  A();
@@ -5728,7 +5799,7 @@ function Di() {
5728
5799
  }
5729
5800
  }
5730
5801
  function j() {
5731
- n && (r && wi(r) ? window.location.href = r : window.location.href = "/");
5802
+ n && (r && Oi(r) ? window.location.href = r : window.location.href = "/");
5732
5803
  }
5733
5804
  async function M() {
5734
5805
  m(""), C(!0);
@@ -5756,18 +5827,18 @@ function Di() {
5756
5827
  m(""), T(!0);
5757
5828
  try {
5758
5829
  let { setupToken: t, options: r } = await ci(n), i = {
5759
- challenge: Ti(r.challenge),
5830
+ challenge: ki(r.challenge),
5760
5831
  rp: r.rp,
5761
5832
  user: {
5762
5833
  ...r.user,
5763
- id: Ti(r.user.id)
5834
+ id: ki(r.user.id)
5764
5835
  },
5765
5836
  pubKeyCredParams: r.pubKeyCredParams,
5766
5837
  timeout: r.timeout || 6e4,
5767
5838
  attestation: r.attestation || "none",
5768
5839
  authenticatorSelection: r.authenticatorSelection,
5769
5840
  excludeCredentials: (r.excludeCredentials || []).map((e) => ({
5770
- id: Ti(e.id),
5841
+ id: ki(e.id),
5771
5842
  type: e.type,
5772
5843
  transports: e.transports
5773
5844
  }))
@@ -5779,11 +5850,11 @@ function Di() {
5779
5850
  let o = a.response;
5780
5851
  await li(t, JSON.stringify({
5781
5852
  id: a.id,
5782
- rawId: Ei(a.rawId),
5853
+ rawId: Ai(a.rawId),
5783
5854
  type: a.type,
5784
5855
  response: {
5785
- attestationObject: Ei(o.attestationObject),
5786
- clientDataJSON: Ei(o.clientDataJSON)
5856
+ attestationObject: Ai(o.attestationObject),
5857
+ clientDataJSON: Ai(o.clientDataJSON)
5787
5858
  }
5788
5859
  }), n), j(), await A();
5789
5860
  } catch (t) {
@@ -5792,7 +5863,7 @@ function Di() {
5792
5863
  T(!1);
5793
5864
  }
5794
5865
  }
5795
- async function te() {
5866
+ async function P() {
5796
5867
  m(""), k(!0);
5797
5868
  try {
5798
5869
  D((await si(n)).codes), await A();
@@ -5802,7 +5873,7 @@ function Di() {
5802
5873
  k(!1);
5803
5874
  }
5804
5875
  }
5805
- async function P(t) {
5876
+ async function F(t) {
5806
5877
  m("");
5807
5878
  try {
5808
5879
  await ui(t, n), await A();
@@ -5814,14 +5885,14 @@ function Di() {
5814
5885
  className: "text-center py-10 text-gray-500 dark:text-gray-400",
5815
5886
  children: e("mfaLoading")
5816
5887
  });
5817
- let F = d.some((e) => e.type === "totp"), ne = d.some((e) => e.type === "webauthn"), re = d.some((e) => e.type === "recoverycode"), ie = F || ne, I = typeof window < "u" && !!window.PublicKeyCredential;
5888
+ let te = d.some((e) => e.type === "totp"), ne = d.some((e) => e.type === "webauthn"), re = d.some((e) => e.type === "recoverycode"), ie = te || ne, I = typeof window < "u" && !!window.PublicKeyCredential;
5818
5889
  return /* @__PURE__ */ u("div", { children: [
5819
- /* @__PURE__ */ l(W, { children: e("mfaSetupTitle") }),
5890
+ /* @__PURE__ */ l(G, { children: e("mfaSetupTitle") }),
5820
5891
  p && /* @__PURE__ */ l(Q, {
5821
5892
  variant: "error",
5822
5893
  children: p
5823
5894
  }),
5824
- /* @__PURE__ */ l(zt, {
5895
+ /* @__PURE__ */ l(Rt, {
5825
5896
  className: "mb-6",
5826
5897
  children: e(o ? "mfaStatusEnabled" : "mfaStatusDisabled")
5827
5898
  }),
@@ -5847,12 +5918,12 @@ function Di() {
5847
5918
  variant: "secondary",
5848
5919
  size: "sm",
5849
5920
  className: "w-auto",
5850
- onClick: () => P(t.id),
5921
+ onClick: () => F(t.id),
5851
5922
  children: e("mfaRemove")
5852
5923
  })]
5853
5924
  }, t.id))]
5854
5925
  }),
5855
- !F && !v && /* @__PURE__ */ l(Y, {
5926
+ !te && !v && /* @__PURE__ */ l(Y, {
5856
5927
  className: "mb-4",
5857
5928
  onClick: M,
5858
5929
  disabled: S,
@@ -5919,7 +5990,7 @@ function Di() {
5919
5990
  ie && !re && !E && /* @__PURE__ */ l(Y, {
5920
5991
  variant: "secondary",
5921
5992
  className: "mb-4",
5922
- onClick: te,
5993
+ onClick: P,
5923
5994
  disabled: O,
5924
5995
  children: e("mfaGenerateRecoveryCodes")
5925
5996
  }),
@@ -5952,23 +6023,23 @@ function Di() {
5952
6023
  re && !E && /* @__PURE__ */ l(Y, {
5953
6024
  variant: "secondary",
5954
6025
  className: "mb-4",
5955
- onClick: te,
6026
+ onClick: P,
5956
6027
  disabled: O,
5957
6028
  children: e("mfaRegenerateRecoveryCodes")
5958
6029
  }),
5959
- !n && /* @__PURE__ */ l(G, {
6030
+ !n && /* @__PURE__ */ l(K, {
5960
6031
  className: "mt-4",
5961
6032
  children: /* @__PURE__ */ l("button", {
5962
6033
  type: "button",
5963
6034
  className: "bg-transparent border-none cursor-pointer text-[13px] text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200",
5964
6035
  onClick: () => {
5965
- let e = r && wi(r) ? r : "/";
6036
+ let e = r && Oi(r) ? r : "/";
5966
6037
  window.location.href = e;
5967
6038
  },
5968
6039
  children: e("mfaSkipSetup")
5969
6040
  })
5970
6041
  }),
5971
- i && wi(i) && /* @__PURE__ */ l("div", {
6042
+ i && Oi(i) && /* @__PURE__ */ l("div", {
5972
6043
  className: "mt-6 text-center pt-4 border-t border-gray-200 dark:border-gray-800",
5973
6044
  children: /* @__PURE__ */ u("a", {
5974
6045
  href: i,
@@ -5980,7 +6051,7 @@ function Di() {
5980
6051
  }
5981
6052
  //#endregion
5982
6053
  //#region src/pages/ConsentPage.tsx
5983
- var Oi = {
6054
+ var Mi = {
5984
6055
  openid: "consent.scopeOpenid",
5985
6056
  profile: "consent.scopeProfile",
5986
6057
  email: "consent.scopeEmail",
@@ -5988,7 +6059,7 @@ var Oi = {
5988
6059
  address: "consent.scopeAddress",
5989
6060
  phone: "consent.scopePhone"
5990
6061
  };
5991
- function ki() {
6062
+ function Ni() {
5992
6063
  let { t: e } = L(), [t] = _(), n = t.get("client_id") ?? "", r = t.get("scope") ?? "openid", i = t.get("returnUrl") ?? "/", [o, c] = s(null), [d, f] = s(!0), [p, m] = s(!1), [h, g] = s("");
5993
6064
  a(() => {
5994
6065
  fetch(`/consent/info?client_id=${encodeURIComponent(n)}&scope=${encodeURIComponent(r)}`).then(async (e) => {
@@ -6033,7 +6104,7 @@ function ki() {
6033
6104
  }
6034
6105
  })
6035
6106
  }),
6036
- /* @__PURE__ */ l(W, { children: e("consent.title", { appName: o?.clientName ?? n }) }),
6107
+ /* @__PURE__ */ l(G, { children: e("consent.title", { appName: o?.clientName ?? n }) }),
6037
6108
  /* @__PURE__ */ l("p", {
6038
6109
  className: "text-sm text-gray-500 dark:text-gray-400 mb-4",
6039
6110
  children: e("consent.subtitle", { appName: o?.clientName ?? n })
@@ -6059,7 +6130,7 @@ function ki() {
6059
6130
  /* @__PURE__ */ l("div", {
6060
6131
  className: "space-y-2 mb-6",
6061
6132
  children: (o?.scopes ?? r.split(" ")).map((t) => {
6062
- let n = Oi[t];
6133
+ let n = Mi[t];
6063
6134
  return /* @__PURE__ */ u("div", {
6064
6135
  className: "flex items-center gap-3 p-3 bg-gray-50 dark:bg-gray-800/60 rounded-lg",
6065
6136
  children: [/* @__PURE__ */ l("div", { className: "w-2 h-2 bg-primary rounded-full shrink-0" }), /* @__PURE__ */ l("span", {
@@ -6084,7 +6155,7 @@ function ki() {
6084
6155
  children: e("consent.deny")
6085
6156
  })]
6086
6157
  }),
6087
- /* @__PURE__ */ l(G, { children: /* @__PURE__ */ l("p", {
6158
+ /* @__PURE__ */ l(K, { children: /* @__PURE__ */ l("p", {
6088
6159
  className: "text-xs text-gray-400 dark:text-gray-500",
6089
6160
  children: e("consent.hint")
6090
6161
  }) })
@@ -6092,8 +6163,8 @@ function ki() {
6092
6163
  }
6093
6164
  //#endregion
6094
6165
  //#region src/pages/DevicePage.tsx
6095
- var Ai = "";
6096
- function ji() {
6166
+ var Pi = "";
6167
+ function Fi() {
6097
6168
  let e = g(), [t] = _(), [n, r] = s(t.get("user_code") || ""), [i, o] = s(!1), [c, d] = s(!0), [f, p] = s(!1), [m, h] = s(!1), [v, y] = s("");
6098
6169
  a(() => {
6099
6170
  $r().then((e) => {
@@ -6108,7 +6179,7 @@ function ji() {
6108
6179
  return;
6109
6180
  }
6110
6181
  try {
6111
- let e = await fetch(`${Ai}/api/auth/device/approve`, {
6182
+ let e = await fetch(`${Pi}/api/auth/device/approve`, {
6112
6183
  method: "POST",
6113
6184
  headers: { "Content-Type": "application/x-www-form-urlencoded" },
6114
6185
  credentials: "include",
@@ -6134,7 +6205,7 @@ function ji() {
6134
6205
  return /* @__PURE__ */ u("div", {
6135
6206
  className: "text-center",
6136
6207
  children: [
6137
- /* @__PURE__ */ l(W, {
6208
+ /* @__PURE__ */ l(G, {
6138
6209
  className: "mb-4",
6139
6210
  children: "Sign in to continue"
6140
6211
  }),
@@ -6153,7 +6224,7 @@ function ji() {
6153
6224
  return m ? /* @__PURE__ */ u("div", {
6154
6225
  className: "text-center",
6155
6226
  children: [
6156
- /* @__PURE__ */ l(W, {
6227
+ /* @__PURE__ */ l(G, {
6157
6228
  className: "mb-4",
6158
6229
  children: "Device approved"
6159
6230
  }),
@@ -6181,7 +6252,7 @@ function ji() {
6181
6252
  })
6182
6253
  ]
6183
6254
  }) : /* @__PURE__ */ u("div", { children: [
6184
- /* @__PURE__ */ l(W, {
6255
+ /* @__PURE__ */ l(G, {
6185
6256
  className: "mb-2 text-center",
6186
6257
  children: "Authorize device"
6187
6258
  }),
@@ -6223,7 +6294,7 @@ function ji() {
6223
6294
  }
6224
6295
  //#endregion
6225
6296
  //#region src/pages/GrantsPage.tsx
6226
- function Mi() {
6297
+ function Ii() {
6227
6298
  let { t: e } = L(), [t, n] = s([]), [r, i] = s(!0), [o, c] = s(""), [d, f] = s("");
6228
6299
  a(() => {
6229
6300
  fetch("/consent/grants").then(async (e) => {
@@ -6244,7 +6315,7 @@ function Mi() {
6244
6315
  }
6245
6316
  }
6246
6317
  return /* @__PURE__ */ u(Rr, { children: [
6247
- /* @__PURE__ */ l(W, { children: e("grants.title") }),
6318
+ /* @__PURE__ */ l(G, { children: e("grants.title") }),
6248
6319
  /* @__PURE__ */ l("p", {
6249
6320
  className: "text-sm text-gray-500 dark:text-gray-400 mb-4",
6250
6321
  children: e("grants.subtitle")
@@ -6289,43 +6360,43 @@ function Mi() {
6289
6360
  }
6290
6361
  //#endregion
6291
6362
  //#region src/App.tsx
6292
- function Ni() {
6363
+ function Li() {
6293
6364
  return /* @__PURE__ */ l(d, { children: /* @__PURE__ */ l(Rr, { children: /* @__PURE__ */ u(h, { children: [
6294
6365
  /* @__PURE__ */ l(m, {
6295
6366
  path: "/login",
6296
- element: /* @__PURE__ */ l(pi, {})
6367
+ element: /* @__PURE__ */ l(_i, {})
6297
6368
  }),
6298
6369
  /* @__PURE__ */ l(m, {
6299
6370
  path: "/register",
6300
- element: /* @__PURE__ */ l(mi, {})
6371
+ element: /* @__PURE__ */ l(vi, {})
6301
6372
  }),
6302
6373
  /* @__PURE__ */ l(m, {
6303
6374
  path: "/forgot-password",
6304
- element: /* @__PURE__ */ l(hi, {})
6375
+ element: /* @__PURE__ */ l(yi, {})
6305
6376
  }),
6306
6377
  /* @__PURE__ */ l(m, {
6307
6378
  path: "/reset-password",
6308
- element: /* @__PURE__ */ l(yi, {})
6379
+ element: /* @__PURE__ */ l(Ci, {})
6309
6380
  }),
6310
6381
  /* @__PURE__ */ l(m, {
6311
6382
  path: "/mfa-challenge",
6312
- element: /* @__PURE__ */ l(Ci, {})
6383
+ element: /* @__PURE__ */ l(Di, {})
6313
6384
  }),
6314
6385
  /* @__PURE__ */ l(m, {
6315
6386
  path: "/mfa-setup",
6316
- element: /* @__PURE__ */ l(Di, {})
6387
+ element: /* @__PURE__ */ l(ji, {})
6317
6388
  }),
6318
6389
  /* @__PURE__ */ l(m, {
6319
6390
  path: "/device",
6320
- element: /* @__PURE__ */ l(ji, {})
6391
+ element: /* @__PURE__ */ l(Fi, {})
6321
6392
  }),
6322
6393
  /* @__PURE__ */ l(m, {
6323
6394
  path: "/consent",
6324
- element: /* @__PURE__ */ l(ki, {})
6395
+ element: /* @__PURE__ */ l(Ni, {})
6325
6396
  }),
6326
6397
  /* @__PURE__ */ l(m, {
6327
6398
  path: "/grants",
6328
- element: /* @__PURE__ */ l(Mi, {})
6399
+ element: /* @__PURE__ */ l(Ii, {})
6329
6400
  }),
6330
6401
  /* @__PURE__ */ l(m, {
6331
6402
  path: "*",
@@ -6337,4 +6408,4 @@ function Ni() {
6337
6408
  ] }) }) });
6338
6409
  }
6339
6410
  //#endregion
6340
- export { Q as Alert, Kr as ApiRequestError, Ni as App, Rr as AuthLayout, R as BrandingContext, Y as Button, Lt as Card, Bt as CardContent, zt as CardDescription, G as CardFooter, Rt as CardHeader, W as CardTitle, ki as ConsentPage, ji as DevicePage, hi as ForgotPasswordPage, Mi as GrantsPage, X as Input, Z as Label, pi as LoginPage, Ci as MfaChallengePage, Di as MfaSetupPage, mi as RegisterPage, yi as ResetPasswordPage, Wr as Separator, U as cn, Zr as forgotPassword, ni as getPasswordPolicy, ti as getProviders, $r as getSession, Pr as i18n, oe as loadBranding, Jr as login, Xr as logout, ui as mfaDeleteCredential, si as mfaRecoveryGenerate, ii as mfaStatus, oi as mfaTotpConfirm, ai as mfaTotpSetup, ri as mfaVerify, li as mfaWebAuthnConfirm, ci as mfaWebAuthnSetup, Yr as register, Qr as resetPassword, ce as resolveLocalized, ei as ssoCheck, se as useBranding, L as useTranslation };
6411
+ export { Q as Alert, Kr as ApiRequestError, Li as App, Rr as AuthLayout, z as BrandingContext, Y as Button, It as Card, zt as CardContent, Rt as CardDescription, K as CardFooter, Lt as CardHeader, G as CardTitle, Ni as ConsentPage, Fi as DevicePage, yi as ForgotPasswordPage, Ii as GrantsPage, X as Input, Z as Label, _i as LoginPage, Di as MfaChallengePage, ji as MfaSetupPage, vi as RegisterPage, Ci as ResetPasswordPage, Wr as Separator, W as cn, Zr as forgotPassword, ni as getPasswordPolicy, ti as getProviders, $r as getSession, Pr as i18n, ae as loadBranding, Jr as login, Xr as logout, ui as mfaDeleteCredential, si as mfaRecoveryGenerate, ii as mfaStatus, oi as mfaTotpConfirm, ai as mfaTotpSetup, ri as mfaVerify, li as mfaWebAuthnConfirm, ci as mfaWebAuthnSetup, Yr as register, Qr as resetPassword, se as resolveLocalized, ei as ssoCheck, oe as useBranding, L as useTranslation };