@nice2dev/i18n 1.0.5 → 1.0.6

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.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { jsx as w } from "react/jsx-runtime";
2
- import { useMemo as u, useContext as k, createContext as y, useEffect as j } from "react";
3
- const E = [
1
+ import { jsx as O } from "react/jsx-runtime";
2
+ import { useMemo as v, useContext as F, createContext as U, useEffect as I, useState as P, useCallback as Q } from "react";
3
+ const j = [
4
4
  "en",
5
5
  "pl",
6
6
  "de",
@@ -23,7 +23,7 @@ const E = [
23
23
  "ko",
24
24
  "zh",
25
25
  "ar"
26
- ], P = {
26
+ ], be = {
27
27
  // ── Global / Generic ──
28
28
  ok: "OK",
29
29
  cancel: "Cancel",
@@ -416,7 +416,7 @@ const E = [
416
416
  "wm.minimizeAll": "Minimize all",
417
417
  "wm.newWindow": "New window",
418
418
  "wm.moveToFront": "Move to front"
419
- }, T = {
419
+ }, we = {
420
420
  ok: "OK",
421
421
  cancel: "Anuluj",
422
422
  save: "Zapisz",
@@ -779,7 +779,7 @@ const E = [
779
779
  "wm.minimizeAll": "Minimalizuj wszystkie",
780
780
  "wm.newWindow": "Nowe okno",
781
781
  "wm.moveToFront": "Na wierzch"
782
- }, F = {
782
+ }, ye = {
783
783
  ok: "OK",
784
784
  cancel: "Abbrechen",
785
785
  save: "Speichern",
@@ -1142,7 +1142,7 @@ const E = [
1142
1142
  "wm.minimizeAll": "Alle minimieren",
1143
1143
  "wm.newWindow": "Neues Fenster",
1144
1144
  "wm.moveToFront": "In den Vordergrund"
1145
- }, R = {
1145
+ }, Ee = {
1146
1146
  ok: "OK",
1147
1147
  cancel: "Annuler",
1148
1148
  save: "Enregistrer",
@@ -1505,7 +1505,7 @@ const E = [
1505
1505
  "wm.minimizeAll": "Tout réduire",
1506
1506
  "wm.newWindow": "Nouvelle fenêtre",
1507
1507
  "wm.moveToFront": "Au premier plan"
1508
- }, M = {
1508
+ }, ze = {
1509
1509
  ok: "OK",
1510
1510
  cancel: "Cancelar",
1511
1511
  save: "Guardar",
@@ -1868,7 +1868,7 @@ const E = [
1868
1868
  "wm.minimizeAll": "Minimizar todo",
1869
1869
  "wm.newWindow": "Nueva ventana",
1870
1870
  "wm.moveToFront": "Al frente"
1871
- }, O = {
1871
+ }, Se = {
1872
1872
  ok: "OK",
1873
1873
  cancel: "Annulla",
1874
1874
  save: "Salva",
@@ -1982,7 +1982,7 @@ const E = [
1982
1982
  "lang.ko": "Coreano",
1983
1983
  "lang.zh": "Cinese",
1984
1984
  "lang.ar": "Arabo"
1985
- }, N = {
1985
+ }, xe = {
1986
1986
  ok: "OK",
1987
1987
  cancel: "Cancelar",
1988
1988
  save: "Salvar",
@@ -2345,7 +2345,7 @@ const E = [
2345
2345
  "wm.minimizeAll": "Minimizar todos",
2346
2346
  "wm.newWindow": "Nova janela",
2347
2347
  "wm.moveToFront": "Trazer para frente"
2348
- }, L = {
2348
+ }, Ae = {
2349
2349
  ok: "OK",
2350
2350
  cancel: "Annuleren",
2351
2351
  save: "Opslaan",
@@ -2430,7 +2430,7 @@ const E = [
2430
2430
  "lang.ko": "Koreaans",
2431
2431
  "lang.zh": "Chinees",
2432
2432
  "lang.ar": "Arabisch"
2433
- }, I = {
2433
+ }, Ce = {
2434
2434
  ok: "OK",
2435
2435
  cancel: "Avbryt",
2436
2436
  save: "Spara",
@@ -2500,7 +2500,7 @@ const E = [
2500
2500
  "lang.ko": "Koreanska",
2501
2501
  "lang.zh": "Kinesiska",
2502
2502
  "lang.ar": "Arabiska"
2503
- }, U = {
2503
+ }, De = {
2504
2504
  ok: "OK",
2505
2505
  cancel: "Avbryt",
2506
2506
  save: "Lagre",
@@ -2563,7 +2563,7 @@ const E = [
2563
2563
  "lang.ko": "Koreansk",
2564
2564
  "lang.zh": "Kinesisk",
2565
2565
  "lang.ar": "Arabisk"
2566
- }, W = {
2566
+ }, Te = {
2567
2567
  ok: "OK",
2568
2568
  cancel: "Annuller",
2569
2569
  save: "Gem",
@@ -2626,7 +2626,7 @@ const E = [
2626
2626
  "lang.ko": "Koreansk",
2627
2627
  "lang.zh": "Kinesisk",
2628
2628
  "lang.ar": "Arabisk"
2629
- }, K = {
2629
+ }, Pe = {
2630
2630
  ok: "OK",
2631
2631
  cancel: "Peruuta",
2632
2632
  save: "Tallenna",
@@ -2689,7 +2689,7 @@ const E = [
2689
2689
  "lang.ko": "Korea",
2690
2690
  "lang.zh": "Kiina",
2691
2691
  "lang.ar": "Arabia"
2692
- }, Z = {
2692
+ }, je = {
2693
2693
  ok: "OK",
2694
2694
  cancel: "Zrušit",
2695
2695
  save: "Uložit",
@@ -3052,7 +3052,7 @@ const E = [
3052
3052
  "wm.minimizeAll": "Minimalizovat vše",
3053
3053
  "wm.newWindow": "Nové okno",
3054
3054
  "wm.moveToFront": "Přenést dopředu"
3055
- }, q = {
3055
+ }, Fe = {
3056
3056
  ok: "OK",
3057
3057
  cancel: "Zrušiť",
3058
3058
  save: "Uložiť",
@@ -3115,7 +3115,7 @@ const E = [
3115
3115
  "lang.ko": "Kórejčina",
3116
3116
  "lang.zh": "Čínština",
3117
3117
  "lang.ar": "Arabčina"
3118
- }, B = {
3118
+ }, Le = {
3119
3119
  ok: "OK",
3120
3120
  cancel: "Mégse",
3121
3121
  save: "Mentés",
@@ -3178,7 +3178,7 @@ const E = [
3178
3178
  "lang.ko": "Koreai",
3179
3179
  "lang.zh": "Kínai",
3180
3180
  "lang.ar": "Arab"
3181
- }, V = {
3181
+ }, Re = {
3182
3182
  ok: "OK",
3183
3183
  cancel: "Anulare",
3184
3184
  save: "Salvare",
@@ -3233,7 +3233,7 @@ const E = [
3233
3233
  "lang.ko": "Coreeană",
3234
3234
  "lang.zh": "Chineză",
3235
3235
  "lang.ar": "Arabă"
3236
- }, H = {
3236
+ }, Ne = {
3237
3237
  ok: "OK",
3238
3238
  cancel: "Отказ",
3239
3239
  save: "Запис",
@@ -3288,7 +3288,7 @@ const E = [
3288
3288
  "lang.ko": "Корейски",
3289
3289
  "lang.zh": "Китайски",
3290
3290
  "lang.ar": "Арабски"
3291
- }, G = {
3291
+ }, Me = {
3292
3292
  ok: "OK",
3293
3293
  cancel: "Скасувати",
3294
3294
  save: "Зберегти",
@@ -3651,7 +3651,7 @@ const E = [
3651
3651
  "wm.minimizeAll": "Згорнути всі",
3652
3652
  "wm.newWindow": "Нове вікно",
3653
3653
  "wm.moveToFront": "На передній план"
3654
- }, J = {
3654
+ }, Ie = {
3655
3655
  ok: "OK",
3656
3656
  cancel: "キャンセル",
3657
3657
  save: "保存",
@@ -4014,7 +4014,7 @@ const E = [
4014
4014
  "wm.minimizeAll": "すべて最小化",
4015
4015
  "wm.newWindow": "新しいウィンドウ",
4016
4016
  "wm.moveToFront": "最前面に移動"
4017
- }, $ = {
4017
+ }, Oe = {
4018
4018
  ok: "확인",
4019
4019
  cancel: "취소",
4020
4020
  save: "저장",
@@ -4377,7 +4377,7 @@ const E = [
4377
4377
  "wm.minimizeAll": "모두 최소화",
4378
4378
  "wm.newWindow": "새 창",
4379
4379
  "wm.moveToFront": "맨 앞으로"
4380
- }, _ = {
4380
+ }, Ue = {
4381
4381
  ok: "确定",
4382
4382
  cancel: "取消",
4383
4383
  save: "保存",
@@ -4740,7 +4740,7 @@ const E = [
4740
4740
  "wm.minimizeAll": "最小化全部",
4741
4741
  "wm.newWindow": "新建窗口",
4742
4742
  "wm.moveToFront": "置于最前"
4743
- }, Y = {
4743
+ }, We = {
4744
4744
  ok: "حسناً",
4745
4745
  cancel: "إلغاء",
4746
4746
  save: "حفظ",
@@ -5103,75 +5103,75 @@ const E = [
5103
5103
  "wm.minimizeAll": "تصغير الكل",
5104
5104
  "wm.newWindow": "نافذة جديدة",
5105
5105
  "wm.moveToFront": "نقل إلى الأمام"
5106
- }, c = {
5107
- en: P,
5108
- pl: T,
5109
- de: F,
5110
- fr: R,
5111
- es: M,
5112
- it: O,
5113
- pt: N,
5114
- nl: L,
5115
- sv: I,
5116
- no: U,
5117
- da: W,
5118
- fi: K,
5119
- cs: Z,
5120
- sk: q,
5121
- hu: B,
5122
- ro: V,
5123
- bg: H,
5124
- uk: G,
5125
- ja: J,
5126
- ko: $,
5127
- zh: _,
5128
- ar: Y
5129
- }, Q = (e, o) => o, z = y(Q), xe = ({
5106
+ }, b = {
5107
+ en: be,
5108
+ pl: we,
5109
+ de: ye,
5110
+ fr: Ee,
5111
+ es: ze,
5112
+ it: Se,
5113
+ pt: xe,
5114
+ nl: Ae,
5115
+ sv: Ce,
5116
+ no: De,
5117
+ da: Te,
5118
+ fi: Pe,
5119
+ cs: je,
5120
+ sk: Fe,
5121
+ hu: Le,
5122
+ ro: Re,
5123
+ bg: Ne,
5124
+ uk: Me,
5125
+ ja: Ie,
5126
+ ko: Oe,
5127
+ zh: Ue,
5128
+ ar: We
5129
+ }, Be = (e, a) => a, X = U(Be), Ra = ({
5130
5130
  t: e,
5131
- lang: o = "en",
5132
- overrides: n,
5133
- children: a
5131
+ lang: a = "en",
5132
+ overrides: t,
5133
+ children: o
5134
5134
  }) => {
5135
- const r = u(() => {
5135
+ const r = v(() => {
5136
5136
  if (e) return e;
5137
- const t = c[o] ?? c.en, i = n ? { ...t, ...n } : t;
5138
- return (l, s) => i[l] ?? s;
5139
- }, [e, o, n]);
5140
- return /* @__PURE__ */ w(z.Provider, { value: r, children: a });
5137
+ const n = b[a] ?? b.en, i = t ? { ...n, ...t } : n;
5138
+ return (s, l) => i[s] ?? l;
5139
+ }, [e, a, t]);
5140
+ return /* @__PURE__ */ O(X.Provider, { value: r, children: o });
5141
5141
  };
5142
- function Se() {
5143
- return { t: k(z) };
5142
+ function Na() {
5143
+ return { t: F(X) };
5144
5144
  }
5145
- function Ae(e = "en", o) {
5146
- const n = c[e] ?? c.en, a = o ? { ...n, ...o } : n;
5147
- return (r, t) => a[r] ?? t;
5145
+ function Ma(e = "en", a) {
5146
+ const t = b[e] ?? b.en, o = a ? { ...t, ...a } : t;
5147
+ return (r, n) => o[r] ?? n;
5148
5148
  }
5149
- function Ce(e, o = {}) {
5150
- let n = e.replace(/\{(\w+)\}/g, (a, r) => {
5151
- const t = o[r];
5152
- return t !== void 0 ? String(t) : a;
5149
+ function Ia(e, a = {}) {
5150
+ let t = e.replace(/\{(\w+)\}/g, (o, r) => {
5151
+ const n = a[r];
5152
+ return n !== void 0 ? String(n) : o;
5153
5153
  });
5154
- return n = n.replace(
5154
+ return t = t.replace(
5155
5155
  /\{(\w+),\s*plural,\s*one\{([^}]+)\}\s*other\{([^}]+)\}\}/g,
5156
- (a, r, t, i) => {
5157
- const l = o[r];
5158
- return typeof l != "number" ? a : (l === 1 ? t : i).replace(/#/g, String(l));
5156
+ (o, r, n, i) => {
5157
+ const s = a[r];
5158
+ return typeof s != "number" ? o : (s === 1 ? n : i).replace(/#/g, String(s));
5159
5159
  }
5160
- ), n;
5160
+ ), t;
5161
5161
  }
5162
- function X(e) {
5163
- return E.includes(e);
5162
+ function Ke(e) {
5163
+ return j.includes(e);
5164
5164
  }
5165
- function De() {
5166
- var o;
5165
+ function Oa() {
5166
+ var a;
5167
5167
  if (typeof navigator > "u") return "en";
5168
- const e = (o = navigator.language) == null ? void 0 : o.split("-")[0];
5169
- return X(e) ? e : "en";
5168
+ const e = (a = navigator.language) == null ? void 0 : a.split("-")[0];
5169
+ return Ke(e) ? e : "en";
5170
5170
  }
5171
- function x(e, o) {
5172
- var t;
5173
- const n = Math.abs(e), a = Math.floor(n), r = e.toString().includes(".") && ((t = e.toString().split(".")[1]) == null ? void 0 : t.length) || 0;
5174
- switch (r > 0 && parseInt(e.toString().split(".")[1] || "0", 10), o) {
5171
+ function ee(e, a) {
5172
+ var n;
5173
+ const t = Math.abs(e), o = Math.floor(t), r = e.toString().includes(".") && ((n = e.toString().split(".")[1]) == null ? void 0 : n.length) || 0;
5174
+ switch (r > 0 && parseInt(e.toString().split(".")[1] || "0", 10), a) {
5175
5175
  // ── English-like (one/other) ───────────────────────────
5176
5176
  case "en":
5177
5177
  case "de":
@@ -5183,29 +5183,29 @@ function x(e, o) {
5183
5183
  case "it":
5184
5184
  case "es":
5185
5185
  case "pt":
5186
- return a === 1 && r === 0 ? "one" : "other";
5186
+ return o === 1 && r === 0 ? "one" : "other";
5187
5187
  // ── French (one/many/other) ────────────────────────────
5188
5188
  case "fr":
5189
- return a === 0 || a === 1 ? "one" : n >= 1e6 ? "many" : "other";
5189
+ return o === 0 || o === 1 ? "one" : t >= 1e6 ? "many" : "other";
5190
5190
  // ── Polish (Slavic: one/few/many/other) ────────────────
5191
5191
  case "pl":
5192
- return a === 1 && r === 0 ? "one" : r === 0 && a % 10 >= 2 && a % 10 <= 4 && !(a % 100 >= 12 && a % 100 <= 14) ? "few" : r === 0 && a !== 1 && (a % 10 === 0 || a % 10 === 1) || r === 0 && a % 10 >= 5 && a % 10 <= 9 || r === 0 && a % 100 >= 12 && a % 100 <= 14 ? "many" : "other";
5192
+ return o === 1 && r === 0 ? "one" : r === 0 && o % 10 >= 2 && o % 10 <= 4 && !(o % 100 >= 12 && o % 100 <= 14) ? "few" : r === 0 && o !== 1 && (o % 10 === 0 || o % 10 === 1) || r === 0 && o % 10 >= 5 && o % 10 <= 9 || r === 0 && o % 100 >= 12 && o % 100 <= 14 ? "many" : "other";
5193
5193
  // ── Ukrainian (Slavic: one/few/many/other) ─────────────
5194
5194
  case "uk":
5195
- return r === 0 && a % 10 === 1 && a % 100 !== 11 ? "one" : r === 0 && a % 10 >= 2 && a % 10 <= 4 && !(a % 100 >= 12 && a % 100 <= 14) ? "few" : r === 0 && a % 10 === 0 || r === 0 && a % 10 >= 5 && a % 10 <= 9 || r === 0 && a % 100 >= 11 && a % 100 <= 14 ? "many" : "other";
5195
+ return r === 0 && o % 10 === 1 && o % 100 !== 11 ? "one" : r === 0 && o % 10 >= 2 && o % 10 <= 4 && !(o % 100 >= 12 && o % 100 <= 14) ? "few" : r === 0 && o % 10 === 0 || r === 0 && o % 10 >= 5 && o % 10 <= 9 || r === 0 && o % 100 >= 11 && o % 100 <= 14 ? "many" : "other";
5196
5196
  // ── Bulgarian (one/other) ──────────────────────────────
5197
5197
  case "bg":
5198
5198
  return e === 1 ? "one" : "other";
5199
5199
  // ── Czech/Slovak (Slavic: one/few/many/other) ──────────
5200
5200
  case "cs":
5201
5201
  case "sk":
5202
- return a === 1 && r === 0 ? "one" : a >= 2 && a <= 4 && r === 0 ? "few" : r !== 0 ? "many" : "other";
5202
+ return o === 1 && r === 0 ? "one" : o >= 2 && o <= 4 && r === 0 ? "few" : r !== 0 ? "many" : "other";
5203
5203
  // ── Hungarian (one/other) ──────────────────────────────
5204
5204
  case "hu":
5205
5205
  return e === 1 ? "one" : "other";
5206
5206
  // ── Romanian (one/few/other) ───────────────────────────
5207
5207
  case "ro":
5208
- return a === 1 && r === 0 ? "one" : r !== 0 || e === 0 || e % 100 >= 2 && e % 100 <= 19 ? "few" : "other";
5208
+ return o === 1 && r === 0 ? "one" : r !== 0 || e === 0 || e % 100 >= 2 && e % 100 <= 19 ? "few" : "other";
5209
5209
  // ── Japanese/Korean/Chinese (other only) ─────────────────
5210
5210
  case "ja":
5211
5211
  case "ko":
@@ -5220,11 +5220,11 @@ function x(e, o) {
5220
5220
  return i >= 3 && i <= 10 ? "few" : i >= 11 && i <= 99 ? "many" : "other";
5221
5221
  }
5222
5222
  default:
5223
- return a === 1 && r === 0 ? "one" : "other";
5223
+ return o === 1 && r === 0 ? "one" : "other";
5224
5224
  }
5225
5225
  }
5226
- function S(e, o) {
5227
- switch (o) {
5226
+ function ae(e, a) {
5227
+ switch (a) {
5228
5228
  // ── English ────────────────────────────────────────────
5229
5229
  case "en":
5230
5230
  return e % 10 === 1 && e % 100 !== 11 ? "one" : e % 10 === 2 && e % 100 !== 12 ? "two" : e % 10 === 3 && e % 100 !== 13 ? "few" : "other";
@@ -5252,44 +5252,44 @@ function S(e, o) {
5252
5252
  return "other";
5253
5253
  }
5254
5254
  }
5255
- function ee(e) {
5255
+ function Ze(e) {
5256
5256
  var r;
5257
5257
  if (e = e.trim(), !e.includes(","))
5258
5258
  return { type: "simple", name: e };
5259
- const o = e.split(",").map((t) => t.trim()), n = o[0], a = (r = o[1]) == null ? void 0 : r.toLowerCase();
5260
- if (!a || !n) return null;
5261
- if (a === "number")
5262
- return { type: "number", name: n, style: o[2] };
5263
- if (a === "date" || a === "time")
5264
- return { type: a, name: n, style: o[2] || "medium" };
5265
- if (a === "plural" || a === "select" || a === "selectordinal") {
5266
- const t = o.slice(2).join(",").trim(), i = {}, l = /(=?\w+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g;
5267
- let s;
5268
- for (; (s = l.exec(t)) !== null; )
5269
- i[s[1]] = s[2];
5270
- return { type: a, name: n, options: i };
5259
+ const a = e.split(",").map((n) => n.trim()), t = a[0], o = (r = a[1]) == null ? void 0 : r.toLowerCase();
5260
+ if (!o || !t) return null;
5261
+ if (o === "number")
5262
+ return { type: "number", name: t, style: a[2] };
5263
+ if (o === "date" || o === "time")
5264
+ return { type: o, name: t, style: a[2] || "medium" };
5265
+ if (o === "plural" || o === "select" || o === "selectordinal") {
5266
+ const n = a.slice(2).join(",").trim(), i = {}, s = /(=?\w+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g;
5267
+ let l;
5268
+ for (; (l = s.exec(n)) !== null; )
5269
+ i[l[1]] = l[2];
5270
+ return { type: o, name: t, options: i };
5271
5271
  }
5272
- return { type: "simple", name: n };
5272
+ return { type: "simple", name: t };
5273
5273
  }
5274
- function ae(e, o, n) {
5275
- const a = {};
5276
- switch (n) {
5274
+ function qe(e, a, t) {
5275
+ const o = {};
5276
+ switch (t) {
5277
5277
  case "currency":
5278
- a.style = "currency", a.currency = "USD";
5278
+ o.style = "currency", o.currency = "USD";
5279
5279
  break;
5280
5280
  case "percent":
5281
- a.style = "percent";
5281
+ o.style = "percent";
5282
5282
  break;
5283
5283
  case "integer":
5284
- a.maximumFractionDigits = 0;
5284
+ o.maximumFractionDigits = 0;
5285
5285
  break;
5286
5286
  }
5287
- return new Intl.NumberFormat(o, a).format(e);
5287
+ return new Intl.NumberFormat(a, o).format(e);
5288
5288
  }
5289
- function oe(e, o, n) {
5290
- const a = e instanceof Date ? e : new Date(e);
5289
+ function He(e, a, t) {
5290
+ const o = e instanceof Date ? e : new Date(e);
5291
5291
  let r;
5292
- switch (n) {
5292
+ switch (t) {
5293
5293
  case "short":
5294
5294
  r = { dateStyle: "short" };
5295
5295
  break;
@@ -5304,12 +5304,12 @@ function oe(e, o, n) {
5304
5304
  r = { dateStyle: "medium" };
5305
5305
  break;
5306
5306
  }
5307
- return new Intl.DateTimeFormat(o, r).format(a);
5307
+ return new Intl.DateTimeFormat(a, r).format(o);
5308
5308
  }
5309
- function re(e, o, n) {
5310
- const a = e instanceof Date ? e : new Date(e);
5309
+ function Ve(e, a, t) {
5310
+ const o = e instanceof Date ? e : new Date(e);
5311
5311
  let r;
5312
- switch (n) {
5312
+ switch (t) {
5313
5313
  case "short":
5314
5314
  r = { timeStyle: "short" };
5315
5315
  break;
@@ -5324,65 +5324,65 @@ function re(e, o, n) {
5324
5324
  r = { timeStyle: "medium" };
5325
5325
  break;
5326
5326
  }
5327
- return new Intl.DateTimeFormat(o, r).format(a);
5327
+ return new Intl.DateTimeFormat(a, r).format(o);
5328
5328
  }
5329
- function h(e, o, n) {
5330
- return e.replace(/#/g, String(n));
5329
+ function B(e, a, t) {
5330
+ return e.replace(/#/g, String(t));
5331
5331
  }
5332
- function ne(e, o = {}, n = {}) {
5333
- const a = n.lang || "en", r = n.locale || a, t = /\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g;
5334
- return e.replace(t, (i, l) => {
5335
- const s = ee(l);
5336
- if (!s) return i;
5337
- const d = o[s.name];
5332
+ function Ge(e, a = {}, t = {}) {
5333
+ const o = t.lang || "en", r = t.locale || o, n = /\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g;
5334
+ return e.replace(n, (i, s) => {
5335
+ const l = Ze(s);
5336
+ if (!l) return i;
5337
+ const d = a[l.name];
5338
5338
  if (d === void 0) return i;
5339
- switch (s.type) {
5339
+ switch (l.type) {
5340
5340
  case "simple":
5341
5341
  return String(d);
5342
5342
  case "number":
5343
- return typeof d != "number" ? i : ae(d, r, s.style);
5343
+ return typeof d != "number" ? i : qe(d, r, l.style);
5344
5344
  case "date":
5345
- return oe(d, r, s.style);
5345
+ return He(d, r, l.style);
5346
5346
  case "time":
5347
- return re(d, r, s.style);
5347
+ return Ve(d, r, l.style);
5348
5348
  case "plural": {
5349
- if (typeof d != "number" || !s.options) return i;
5350
- const m = x(d, a), p = `=${d}`, D = s.options[p] ?? s.options[m] ?? s.options.other ?? "";
5351
- return h(D, s.name, d);
5349
+ if (typeof d != "number" || !l.options) return i;
5350
+ const m = ee(d, o), f = `=${d}`, u = l.options[f] ?? l.options[m] ?? l.options.other ?? "";
5351
+ return B(u, l.name, d);
5352
5352
  }
5353
5353
  case "selectordinal": {
5354
- if (typeof d != "number" || !s.options) return i;
5355
- const m = S(d, a), p = s.options[m] ?? s.options.other ?? "";
5356
- return h(p, s.name, d);
5354
+ if (typeof d != "number" || !l.options) return i;
5355
+ const m = ae(d, o), f = l.options[m] ?? l.options.other ?? "";
5356
+ return B(f, l.name, d);
5357
5357
  }
5358
5358
  case "select": {
5359
- if (!s.options) return i;
5360
- const m = s.options[String(d)] ?? s.options.other ?? "";
5361
- return h(m, s.name, d);
5359
+ if (!l.options) return i;
5360
+ const m = l.options[String(d)] ?? l.options.other ?? "";
5361
+ return B(m, l.name, d);
5362
5362
  }
5363
5363
  default:
5364
5364
  return i;
5365
5365
  }
5366
5366
  });
5367
5367
  }
5368
- function je(e, o = "en") {
5369
- return function(a, r, t) {
5370
- const i = e[a] ?? r;
5371
- return t ? ne(i, t, { lang: o }) : i;
5368
+ function Ua(e, a = "en") {
5369
+ return function(o, r, n) {
5370
+ const i = e[o] ?? r;
5371
+ return n ? Ge(i, n, { lang: a }) : i;
5372
5372
  };
5373
5373
  }
5374
- function Pe(e, o, n = "en") {
5375
- const a = x(e, n);
5376
- return (o[a] ?? o.other).replace(/#/g, String(e));
5374
+ function Wa(e, a, t = "en") {
5375
+ const o = ee(e, t);
5376
+ return (a[o] ?? a.other).replace(/#/g, String(e));
5377
5377
  }
5378
- function Te(e, o, n = "en") {
5379
- const a = S(e, n);
5380
- return (o[a] ?? o.other).replace(/#/g, String(e));
5378
+ function Ba(e, a, t = "en") {
5379
+ const o = ae(e, t);
5380
+ return (a[o] ?? a.other).replace(/#/g, String(e));
5381
5381
  }
5382
- function Fe(e, o) {
5383
- return o[e] ?? o.other;
5382
+ function Ka(e, a) {
5383
+ return a[e] ?? a.other;
5384
5384
  }
5385
- const te = [
5385
+ const $e = [
5386
5386
  "ar",
5387
5387
  // Arabic
5388
5388
  "he",
@@ -5396,28 +5396,28 @@ const te = [
5396
5396
  "ps"
5397
5397
  // Pashto
5398
5398
  ];
5399
- function A(e) {
5400
- return te.includes(e);
5399
+ function oe(e) {
5400
+ return $e.includes(e);
5401
5401
  }
5402
- function ie(e) {
5403
- return A(e) ? "rtl" : "ltr";
5402
+ function Je(e) {
5403
+ return oe(e) ? "rtl" : "ltr";
5404
5404
  }
5405
- function se(e) {
5405
+ function _e(e) {
5406
5406
  if (typeof document > "u") return;
5407
- const o = ie(e);
5408
- document.documentElement.setAttribute("dir", o), document.documentElement.setAttribute("lang", e);
5407
+ const a = Je(e);
5408
+ document.documentElement.setAttribute("dir", a), document.documentElement.setAttribute("lang", e);
5409
5409
  }
5410
- function Re() {
5410
+ function Za() {
5411
5411
  return typeof document > "u" ? "ltr" : document.documentElement.getAttribute("dir") || "ltr";
5412
5412
  }
5413
- function le(e, o) {
5414
- return o ? e.rtl : e.ltr;
5413
+ function Ye(e, a) {
5414
+ return a ? e.rtl : e.ltr;
5415
5415
  }
5416
- function Me(e) {
5416
+ function qa(e) {
5417
5417
  return e === "left" ? "right" : "left";
5418
5418
  }
5419
- function de(e, o) {
5420
- return o && {
5419
+ function Qe(e, a) {
5420
+ return a && {
5421
5421
  left: "right",
5422
5422
  right: "left",
5423
5423
  start: "end",
@@ -5426,7 +5426,7 @@ function de(e, o) {
5426
5426
  "flex-end": "flex-start"
5427
5427
  }[e] || e;
5428
5428
  }
5429
- function ce(e) {
5429
+ function Xe(e) {
5430
5430
  return {
5431
5431
  // Margins
5432
5432
  "margin-left": "margin-inline-start",
@@ -5456,36 +5456,36 @@ function ce(e) {
5456
5456
  "text-align: right": "text-align: end"
5457
5457
  }[e] || e;
5458
5458
  }
5459
- const v = y({
5459
+ const V = U({
5460
5460
  dir: "ltr",
5461
5461
  isRTL: !1,
5462
5462
  flip: (e) => e,
5463
5463
  value: (e) => e.ltr
5464
- }), Oe = ({
5464
+ }), Ha = ({
5465
5465
  lang: e,
5466
- autoSetDocument: o = !0,
5467
- children: n
5466
+ autoSetDocument: a = !0,
5467
+ children: t
5468
5468
  }) => {
5469
- const a = A(e), r = a ? "rtl" : "ltr";
5470
- j(() => {
5471
- o && se(e);
5472
- }, [e, o]);
5473
- const t = u(() => ({
5469
+ const o = oe(e), r = o ? "rtl" : "ltr";
5470
+ I(() => {
5471
+ a && _e(e);
5472
+ }, [e, a]);
5473
+ const n = v(() => ({
5474
5474
  dir: r,
5475
- isRTL: a,
5476
- flip: (i) => de(i, a),
5477
- value: (i) => le(i, a)
5478
- }), [r, a]);
5479
- return /* @__PURE__ */ w(v.Provider, { value: t, children: n });
5475
+ isRTL: o,
5476
+ flip: (i) => Qe(i, o),
5477
+ value: (i) => Ye(i, o)
5478
+ }), [r, o]);
5479
+ return /* @__PURE__ */ O(V.Provider, { value: n, children: t });
5480
5480
  };
5481
- function Ne() {
5482
- return k(v);
5481
+ function Va() {
5482
+ return F(V);
5483
5483
  }
5484
- function Le() {
5485
- return k(v).isRTL;
5484
+ function Ga() {
5485
+ return F(V).isRTL;
5486
5486
  }
5487
- function Ie(e) {
5488
- const o = [], n = [
5487
+ function $a(e) {
5488
+ const a = [], t = [
5489
5489
  "left",
5490
5490
  "right",
5491
5491
  "margin-left",
@@ -5495,11 +5495,11 @@ function Ie(e) {
5495
5495
  "border-left",
5496
5496
  "border-right"
5497
5497
  ];
5498
- for (const [a, r] of Object.entries(e))
5499
- n.includes(a) && o.push(`Use logical property instead of '${a}' → '${ce(a)}'`), a === "text-align" && (r === "left" || r === "right") && o.push(`Use 'text-align: start/end' instead of 'text-align: ${r}'`), a === "float" && (r === "left" || r === "right") && o.push(`Use flexbox or grid instead of 'float: ${r}' for RTL support`);
5500
- return o;
5498
+ for (const [o, r] of Object.entries(e))
5499
+ t.includes(o) && a.push(`Use logical property instead of '${o}' → '${Xe(o)}'`), o === "text-align" && (r === "left" || r === "right") && a.push(`Use 'text-align: start/end' instead of 'text-align: ${r}'`), o === "float" && (r === "left" || r === "right") && a.push(`Use flexbox or grid instead of 'float: ${r}' for RTL support`);
5500
+ return a;
5501
5501
  }
5502
- const f = {
5502
+ const K = {
5503
5503
  // Direction multiplier: 1 for LTR, -1 for RTL
5504
5504
  dirMultiplier: "--nice-dir-multiplier",
5505
5505
  // Inline start (left in LTR, right in RTL)
@@ -5507,51 +5507,51 @@ const f = {
5507
5507
  // Inline end (right in LTR, left in RTL)
5508
5508
  inlineEnd: "--nice-inline-end"
5509
5509
  };
5510
- function Ue(e) {
5510
+ function Ja(e) {
5511
5511
  return {
5512
- [f.dirMultiplier]: e ? "-1" : "1",
5513
- [f.inlineStart]: e ? "right" : "left",
5514
- [f.inlineEnd]: e ? "left" : "right"
5512
+ [K.dirMultiplier]: e ? "-1" : "1",
5513
+ [K.inlineStart]: e ? "right" : "left",
5514
+ [K.inlineEnd]: e ? "left" : "right"
5515
5515
  };
5516
5516
  }
5517
- function We() {
5518
- return Object.keys(c.en);
5517
+ function _a() {
5518
+ return Object.keys(b.en);
5519
5519
  }
5520
- function me(e) {
5520
+ function ea(e) {
5521
5521
  if (e === "en") return [];
5522
- const o = c.en, n = c[e], a = [];
5523
- for (const [r, t] of Object.entries(o))
5524
- n[r] || a.push({ key: r, englishValue: t });
5525
- return a;
5522
+ const a = b.en, t = b[e], o = [];
5523
+ for (const [r, n] of Object.entries(a))
5524
+ t[r] || o.push({ key: r, englishValue: n });
5525
+ return o;
5526
5526
  }
5527
- function ue(e) {
5528
- const o = Object.keys(c.en).length, n = Object.keys(c[e]).length, a = o - n, r = Math.round(n / o * 100);
5527
+ function aa(e) {
5528
+ const a = Object.keys(b.en).length, t = Object.keys(b[e]).length, o = a - t, r = Math.round(t / a * 100);
5529
5529
  return {
5530
5530
  lang: e,
5531
- totalKeys: o,
5532
- translatedKeys: n,
5533
- missingKeys: a,
5531
+ totalKeys: a,
5532
+ translatedKeys: t,
5533
+ missingKeys: o,
5534
5534
  coverage: r
5535
5535
  };
5536
5536
  }
5537
- function ge() {
5538
- return E.map((e) => ue(e));
5537
+ function oa() {
5538
+ return j.map((e) => aa(e));
5539
5539
  }
5540
- function Ke(e, o) {
5541
- const n = o.map((a) => {
5542
- const r = a.translated.replace(/'/g, "\\'");
5543
- return ` '${a.key}': '${r}',`;
5540
+ function Ya(e, a) {
5541
+ const t = a.map((o) => {
5542
+ const r = o.translated.replace(/'/g, "\\'");
5543
+ return ` '${o.key}': '${r}',`;
5544
5544
  });
5545
5545
  return `// Auto-translated additions for ${e} (review before merging)
5546
5546
  // Generated on ${(/* @__PURE__ */ new Date()).toISOString()}
5547
5547
  {
5548
- ${n.join(`
5548
+ ${t.join(`
5549
5549
  `)}
5550
5550
  }`;
5551
5551
  }
5552
- function Ze() {
5553
- const e = ge();
5554
- let o = `# Translation Coverage Report
5552
+ function Qa() {
5553
+ const e = oa();
5554
+ let a = `# Translation Coverage Report
5555
5555
 
5556
5556
  Generated: ${(/* @__PURE__ */ new Date()).toISOString()}
5557
5557
 
@@ -5560,29 +5560,29 @@ Generated: ${(/* @__PURE__ */ new Date()).toISOString()}
5560
5560
  | Language | Translated | Missing | Coverage |
5561
5561
  |----------|------------|---------|----------|
5562
5562
  `;
5563
- for (const n of e) {
5564
- const a = "█".repeat(Math.floor(n.coverage / 10)) + "░".repeat(10 - Math.floor(n.coverage / 10));
5565
- o += `| ${n.lang} | ${n.translatedKeys} | ${n.missingKeys} | ${a} ${n.coverage}% |
5563
+ for (const t of e) {
5564
+ const o = "█".repeat(Math.floor(t.coverage / 10)) + "░".repeat(10 - Math.floor(t.coverage / 10));
5565
+ a += `| ${t.lang} | ${t.translatedKeys} | ${t.missingKeys} | ${o} ${t.coverage}% |
5566
5566
  `;
5567
5567
  }
5568
- o += `
5568
+ a += `
5569
5569
  ## Languages with Missing Translations
5570
5570
 
5571
5571
  `;
5572
- for (const n of e.filter((a) => a.missingKeys > 0)) {
5573
- o += `### ${n.lang.toUpperCase()} (${n.coverage}% complete)
5572
+ for (const t of e.filter((o) => o.missingKeys > 0)) {
5573
+ a += `### ${t.lang.toUpperCase()} (${t.coverage}% complete)
5574
5574
 
5575
5575
  `;
5576
- const a = me(n.lang);
5577
- o += `Missing ${a.length} keys:
5576
+ const o = ea(t.lang);
5577
+ a += `Missing ${o.length} keys:
5578
5578
 
5579
- `, o += "```\n", o += a.slice(0, 10).map((r) => r.key).join(`
5580
- `), a.length > 10 && (o += `
5581
- ... and ${a.length - 10} more`), o += "\n```\n\n";
5579
+ `, a += "```\n", a += o.slice(0, 10).map((r) => r.key).join(`
5580
+ `), o.length > 10 && (a += `
5581
+ ... and ${o.length - 10} more`), a += "\n```\n\n";
5582
5582
  }
5583
- return o;
5583
+ return a;
5584
5584
  }
5585
- const pe = {
5585
+ const ta = {
5586
5586
  en: "en-US",
5587
5587
  pl: "pl-PL",
5588
5588
  de: "de-DE",
@@ -5606,57 +5606,57 @@ const pe = {
5606
5606
  zh: "zh-CN",
5607
5607
  ar: "ar-SA"
5608
5608
  };
5609
- function g(e) {
5610
- return pe[e] ?? "en-US";
5609
+ function A(e) {
5610
+ return ta[e] ?? "en-US";
5611
5611
  }
5612
- function he(e, o = "medium") {
5613
- const n = g(e), a = new Intl.DateTimeFormat(n, { dateStyle: o });
5612
+ function ra(e, a = "medium") {
5613
+ const t = A(e), o = new Intl.DateTimeFormat(t, { dateStyle: a });
5614
5614
  return {
5615
- format: (r) => a.format(r instanceof Date ? r : new Date(r)),
5616
- formatRange: (r, t) => {
5617
- const i = r instanceof Date ? r : new Date(r), l = t instanceof Date ? t : new Date(t);
5618
- return a.formatRange(i, l);
5615
+ format: (r) => o.format(r instanceof Date ? r : new Date(r)),
5616
+ formatRange: (r, n) => {
5617
+ const i = r instanceof Date ? r : new Date(r), s = n instanceof Date ? n : new Date(n);
5618
+ return o.formatRange(i, s);
5619
5619
  },
5620
- formatRelative: (r) => be(r instanceof Date ? r : new Date(r), n)
5620
+ formatRelative: (r) => la(r instanceof Date ? r : new Date(r), t)
5621
5621
  };
5622
5622
  }
5623
- function qe(e, o = "medium") {
5624
- return u(() => he(e, o), [e, o]);
5623
+ function Xa(e, a = "medium") {
5624
+ return v(() => ra(e, a), [e, a]);
5625
5625
  }
5626
- function fe(e, o = "short") {
5627
- const n = g(e), a = new Intl.DateTimeFormat(n, { timeStyle: o });
5626
+ function na(e, a = "short") {
5627
+ const t = A(e), o = new Intl.DateTimeFormat(t, { timeStyle: a });
5628
5628
  return {
5629
- format: (r) => a.format(r instanceof Date ? r : new Date(r))
5629
+ format: (r) => o.format(r instanceof Date ? r : new Date(r))
5630
5630
  };
5631
5631
  }
5632
- function Be(e, o = "short") {
5633
- return u(() => fe(e, o), [e, o]);
5632
+ function eo(e, a = "short") {
5633
+ return v(() => na(e, a), [e, a]);
5634
5634
  }
5635
- function ke(e) {
5636
- const o = g(e);
5635
+ function ia(e) {
5636
+ const a = A(e);
5637
5637
  return {
5638
- format: (n) => new Intl.NumberFormat(o).format(n),
5639
- formatCompact: (n) => new Intl.NumberFormat(o, { notation: "compact" }).format(n),
5640
- formatPercent: (n) => new Intl.NumberFormat(o, { style: "percent", maximumFractionDigits: 1 }).format(n)
5638
+ format: (t) => new Intl.NumberFormat(a).format(t),
5639
+ formatCompact: (t) => new Intl.NumberFormat(a, { notation: "compact" }).format(t),
5640
+ formatPercent: (t) => new Intl.NumberFormat(a, { style: "percent", maximumFractionDigits: 1 }).format(t)
5641
5641
  };
5642
5642
  }
5643
- function Ve(e) {
5644
- return u(() => ke(e), [e]);
5643
+ function ao(e) {
5644
+ return v(() => ia(e), [e]);
5645
5645
  }
5646
- function ve(e, o = "USD") {
5647
- const n = g(e), a = new Intl.NumberFormat(n, { style: "currency", currency: o });
5646
+ function sa(e, a = "USD") {
5647
+ const t = A(e), o = new Intl.NumberFormat(t, { style: "currency", currency: a });
5648
5648
  return {
5649
- format: (r) => a.format(r)
5649
+ format: (r) => o.format(r)
5650
5650
  };
5651
5651
  }
5652
- function He(e, o = "USD") {
5653
- return u(() => ve(e, o), [e, o]);
5652
+ function oo(e, a = "USD") {
5653
+ return v(() => sa(e, a), [e, a]);
5654
5654
  }
5655
- function be(e, o) {
5656
- const n = Date.now(), a = e.getTime() - n, r = Math.abs(a), t = new Intl.RelativeTimeFormat(o, { numeric: "auto" });
5657
- return r < 6e4 ? t.format(Math.round(a / 1e3), "second") : r < 36e5 ? t.format(Math.round(a / 6e4), "minute") : r < 864e5 ? t.format(Math.round(a / 36e5), "hour") : r < 2592e6 ? t.format(Math.round(a / 864e5), "day") : r < 31536e6 ? t.format(Math.round(a / 2592e6), "month") : t.format(Math.round(a / 31536e6), "year");
5655
+ function la(e, a) {
5656
+ const t = Date.now(), o = e.getTime() - t, r = Math.abs(o), n = new Intl.RelativeTimeFormat(a, { numeric: "auto" });
5657
+ return r < 6e4 ? n.format(Math.round(o / 1e3), "second") : r < 36e5 ? n.format(Math.round(o / 6e4), "minute") : r < 864e5 ? n.format(Math.round(o / 36e5), "hour") : r < 2592e6 ? n.format(Math.round(o / 864e5), "day") : r < 31536e6 ? n.format(Math.round(o / 2592e6), "month") : n.format(Math.round(o / 31536e6), "year");
5658
5658
  }
5659
- const C = [
5659
+ const te = [
5660
5660
  { en: "Save", translations: { pl: "Zapisz", de: "Speichern", fr: "Enregistrer", es: "Guardar", uk: "Зберегти", cs: "Uložit", ja: "保存", ko: "저장", zh: "保存", ar: "حفظ" } },
5661
5661
  { en: "Cancel", translations: { pl: "Anuluj", de: "Abbrechen", fr: "Annuler", es: "Cancelar", uk: "Скасувати", cs: "Zrušit", ja: "キャンセル", ko: "취소", zh: "取消", ar: "إلغاء" } },
5662
5662
  { en: "Delete", translations: { pl: "Usuń", de: "Löschen", fr: "Supprimer", es: "Eliminar", uk: "Видалити", cs: "Smazat", ja: "削除", ko: "삭제", zh: "删除", ar: "حذف" } },
@@ -5668,98 +5668,1225 @@ const C = [
5668
5668
  { en: "Error", translations: { pl: "Błąd", de: "Fehler", fr: "Erreur", es: "Error", uk: "Помилка", cs: "Chyba", ja: "エラー", ko: "오류", zh: "错误", ar: "خطأ" } },
5669
5669
  { en: "Success", translations: { pl: "Sukces", de: "Erfolg", fr: "Succès", es: "Éxito", uk: "Успіх", cs: "Úspěch", ja: "成功", ko: "성공", zh: "成功", ar: "نجاح" } }
5670
5670
  ];
5671
- function we(e, o) {
5672
- const n = C.find(
5673
- (a) => a.en.toLowerCase() === e.toLowerCase()
5671
+ function da(e, a) {
5672
+ const t = te.find(
5673
+ (o) => o.en.toLowerCase() === e.toLowerCase()
5674
5674
  );
5675
- return n == null ? void 0 : n.translations[o];
5675
+ return t == null ? void 0 : t.translations[a];
5676
5676
  }
5677
- function Ge(e, o, n = 0.8) {
5678
- const a = c.en, r = c[o], t = e.toLowerCase().trim();
5677
+ function to(e, a, t = 0.8) {
5678
+ const o = b.en, r = b[a], n = e.toLowerCase().trim();
5679
5679
  let i;
5680
- for (const [l, s] of Object.entries(a)) {
5681
- const d = r[l];
5680
+ for (const [s, l] of Object.entries(o)) {
5681
+ const d = r[s];
5682
5682
  if (!d) continue;
5683
- const m = ye(t, s.toLowerCase().trim());
5684
- m >= n && (!i || m > i.similarity) && (i = { key: l, english: s, translated: d, similarity: m });
5683
+ const m = ca(n, l.toLowerCase().trim());
5684
+ m >= t && (!i || m > i.similarity) && (i = { key: s, english: l, translated: d, similarity: m });
5685
5685
  }
5686
5686
  return i;
5687
5687
  }
5688
- function Je(e) {
5689
- return C.filter((o) => o.translations[e] != null).map((o) => ({ en: o.en, translation: o.translations[e] }));
5688
+ function ro(e) {
5689
+ return te.filter((a) => a.translations[e] != null).map((a) => ({ en: a.en, translation: a.translations[e] }));
5690
5690
  }
5691
- function $e(e) {
5692
- const o = c[e], n = c.en, a = [];
5693
- for (const [r, t] of Object.entries(n)) {
5694
- const i = we(t, e), l = o[r];
5695
- i && l && l !== i && a.push({ key: r, currentTranslation: l, glossaryTranslation: i });
5691
+ function no(e) {
5692
+ const a = b[e], t = b.en, o = [];
5693
+ for (const [r, n] of Object.entries(t)) {
5694
+ const i = da(n, e), s = a[r];
5695
+ i && s && s !== i && o.push({ key: r, currentTranslation: s, glossaryTranslation: i });
5696
5696
  }
5697
- return a;
5698
- }
5699
- function b(e) {
5700
- const o = /* @__PURE__ */ new Set();
5701
- for (let n = 0; n < e.length - 1; n++)
5702
- o.add(e.substring(n, n + 2));
5703
5697
  return o;
5704
5698
  }
5705
- function ye(e, o) {
5706
- if (e === o) return 1;
5707
- if (e.length < 2 || o.length < 2) return 0;
5708
- const n = b(e), a = b(o);
5699
+ function J(e) {
5700
+ const a = /* @__PURE__ */ new Set();
5701
+ for (let t = 0; t < e.length - 1; t++)
5702
+ a.add(e.substring(t, t + 2));
5703
+ return a;
5704
+ }
5705
+ function ca(e, a) {
5706
+ if (e === a) return 1;
5707
+ if (e.length < 2 || a.length < 2) return 0;
5708
+ const t = J(e), o = J(a);
5709
5709
  let r = 0;
5710
- for (const t of n)
5711
- a.has(t) && r++;
5712
- return 2 * r / (n.size + a.size);
5710
+ for (const n of t)
5711
+ o.has(n) && r++;
5712
+ return 2 * r / (t.size + o.size);
5713
+ }
5714
+ const re = {
5715
+ UTC: ["UTC", "Etc/UTC", "Etc/GMT"],
5716
+ NorthAmerica: [
5717
+ "America/New_York",
5718
+ "America/Chicago",
5719
+ "America/Denver",
5720
+ "America/Los_Angeles",
5721
+ "America/Toronto",
5722
+ "America/Vancouver",
5723
+ "America/Mexico_City"
5724
+ ],
5725
+ SouthAmerica: [
5726
+ "America/Sao_Paulo",
5727
+ "America/Buenos_Aires",
5728
+ "America/Lima",
5729
+ "America/Bogota",
5730
+ "America/Santiago"
5731
+ ],
5732
+ Europe: [
5733
+ "Europe/London",
5734
+ "Europe/Paris",
5735
+ "Europe/Berlin",
5736
+ "Europe/Rome",
5737
+ "Europe/Madrid",
5738
+ "Europe/Amsterdam",
5739
+ "Europe/Warsaw",
5740
+ "Europe/Moscow",
5741
+ "Europe/Kiev",
5742
+ "Europe/Stockholm",
5743
+ "Europe/Prague",
5744
+ "Europe/Budapest",
5745
+ "Europe/Bucharest"
5746
+ ],
5747
+ Asia: [
5748
+ "Asia/Tokyo",
5749
+ "Asia/Shanghai",
5750
+ "Asia/Hong_Kong",
5751
+ "Asia/Singapore",
5752
+ "Asia/Seoul",
5753
+ "Asia/Kolkata",
5754
+ "Asia/Dubai",
5755
+ "Asia/Riyadh",
5756
+ "Asia/Tehran",
5757
+ "Asia/Bangkok",
5758
+ "Asia/Jakarta"
5759
+ ],
5760
+ Africa: [
5761
+ "Africa/Cairo",
5762
+ "Africa/Lagos",
5763
+ "Africa/Johannesburg",
5764
+ "Africa/Nairobi",
5765
+ "Africa/Casablanca"
5766
+ ],
5767
+ Oceania: [
5768
+ "Australia/Sydney",
5769
+ "Australia/Melbourne",
5770
+ "Australia/Perth",
5771
+ "Pacific/Auckland",
5772
+ "Pacific/Fiji"
5773
+ ]
5774
+ };
5775
+ function G() {
5776
+ try {
5777
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
5778
+ } catch {
5779
+ return "UTC";
5780
+ }
5781
+ }
5782
+ function io(e) {
5783
+ try {
5784
+ return new Intl.DateTimeFormat("en", { timeZone: e }), !0;
5785
+ } catch {
5786
+ return !1;
5787
+ }
5788
+ }
5789
+ function L(e, a = "en", t = /* @__PURE__ */ new Date()) {
5790
+ var w, R;
5791
+ const o = A(a), r = new Intl.DateTimeFormat(o, {
5792
+ timeZone: e,
5793
+ timeZoneName: "long"
5794
+ }), n = new Intl.DateTimeFormat(o, {
5795
+ timeZone: e,
5796
+ timeZoneName: "short"
5797
+ }), i = r.formatToParts(t), s = n.formatToParts(t), l = ((w = i.find((D) => D.type === "timeZoneName")) == null ? void 0 : w.value) || e, d = ((R = s.find((D) => D.type === "timeZoneName")) == null ? void 0 : R.value) || e, m = new Date(t.toLocaleString("en-US", { timeZone: "UTC" })), f = new Date(t.toLocaleString("en-US", { timeZone: e })), u = Math.round((f.getTime() - m.getTime()) / 6e4), g = new Date(t.getFullYear(), 0, 1), k = new Date(t.getFullYear(), 6, 1), p = q(e, g), E = q(e, k), z = q(e, t), y = Math.min(p, E), C = z !== y && p !== E;
5798
+ return {
5799
+ id: e,
5800
+ displayName: l,
5801
+ shortName: d,
5802
+ offsetMinutes: u,
5803
+ offsetString: pa(u),
5804
+ isDST: C
5805
+ };
5806
+ }
5807
+ function so(e = "en", a = /* @__PURE__ */ new Date()) {
5808
+ return Object.values(re).flat().map((o) => L(o, e, a));
5809
+ }
5810
+ function lo(e = "en", a = /* @__PURE__ */ new Date()) {
5811
+ const t = {};
5812
+ for (const [o, r] of Object.entries(re))
5813
+ t[o] = r.map((n) => L(n, e, a));
5814
+ return t;
5815
+ }
5816
+ function ne(e, a, t) {
5817
+ const o = e.toLocaleString("en-US", { timeZone: a }), r = new Date(o), n = e.toLocaleString("en-US", { timeZone: t }), i = new Date(n), s = r.getTime() - i.getTime();
5818
+ return new Date(e.getTime() + s);
5819
+ }
5820
+ function ma(e, a) {
5821
+ const t = a || G();
5822
+ return ne(e, t, "UTC");
5823
+ }
5824
+ function ua(e, a) {
5825
+ const t = a || G();
5826
+ return ne(e, "UTC", t);
5827
+ }
5828
+ function ga(e, a, t = {}) {
5829
+ const o = A(e), { dateStyle: r = "medium", timeStyle: n = "short", nameStyle: i = "short" } = t, s = new Intl.DateTimeFormat(o, {
5830
+ timeZone: a,
5831
+ dateStyle: r,
5832
+ timeStyle: n
5833
+ }), l = new Intl.DateTimeFormat(o, {
5834
+ timeZone: a,
5835
+ dateStyle: r,
5836
+ timeStyle: n,
5837
+ timeZoneName: i
5838
+ }), d = new Intl.DateTimeFormat(o, {
5839
+ timeZone: a,
5840
+ timeZoneName: "short"
5841
+ });
5842
+ return {
5843
+ format: (m) => s.format(m),
5844
+ formatWithZone: (m) => l.format(m),
5845
+ getOffset: (m) => L(a, e, m).offsetString,
5846
+ getAbbreviation: (m) => {
5847
+ var u;
5848
+ return ((u = d.formatToParts(m).find((g) => g.type === "timeZoneName")) == null ? void 0 : u.value) || "";
5849
+ }
5850
+ };
5851
+ }
5852
+ function Z(e, a = /* @__PURE__ */ new Date()) {
5853
+ return L(e, "en", a).isDST;
5854
+ }
5855
+ function co(e, a = /* @__PURE__ */ new Date()) {
5856
+ const t = Z(e, a);
5857
+ let o = new Date(a);
5858
+ const r = new Date(a);
5859
+ for (r.setFullYear(r.getFullYear() + 1); o < r; )
5860
+ if (o.setDate(o.getDate() + 1), Z(e, o) !== t) {
5861
+ o.setDate(o.getDate() - 1);
5862
+ const n = new Date(o);
5863
+ n.setHours(0, 0, 0, 0);
5864
+ const i = new Date(o);
5865
+ for (i.setDate(i.getDate() + 2); i.getTime() - n.getTime() > 6e4; ) {
5866
+ const s = new Date((n.getTime() + i.getTime()) / 2);
5867
+ Z(e, s) === t ? n.setTime(s.getTime()) : i.setTime(s.getTime());
5868
+ }
5869
+ return i;
5870
+ }
5871
+ return null;
5872
+ }
5873
+ function mo(e, a, t) {
5874
+ const [o] = P(() => G()), r = a || o, n = v(() => ga(e, r, t), [e, r, t]), i = v(() => L(r, e), [r, e]);
5875
+ return {
5876
+ timezone: r,
5877
+ info: i,
5878
+ format: n.format,
5879
+ formatWithZone: n.formatWithZone,
5880
+ getOffset: n.getOffset,
5881
+ getAbbreviation: n.getAbbreviation,
5882
+ toUTC: (s) => ma(s, r),
5883
+ fromUTC: (s) => ua(s, r)
5884
+ };
5885
+ }
5886
+ function q(e, a) {
5887
+ const t = a.toLocaleString("en-US", { timeZone: "UTC" }), o = a.toLocaleString("en-US", { timeZone: e }), r = new Date(t), n = new Date(o);
5888
+ return Math.round((n.getTime() - r.getTime()) / 6e4);
5889
+ }
5890
+ function pa(e) {
5891
+ const a = e >= 0 ? "+" : "-", t = Math.abs(e), o = Math.floor(t / 60), r = t % 60;
5892
+ return `${a}${o.toString().padStart(2, "0")}:${r.toString().padStart(2, "0")}`;
5893
+ }
5894
+ const W = {
5895
+ gregory: {
5896
+ id: "gregory",
5897
+ displayName: "Gregorian",
5898
+ monthsInYear: 12,
5899
+ hasEra: !0,
5900
+ isLunar: !1,
5901
+ associatedLanguages: [
5902
+ "en",
5903
+ "de",
5904
+ "fr",
5905
+ "es",
5906
+ "it",
5907
+ "pt",
5908
+ "nl",
5909
+ "pl",
5910
+ "cs",
5911
+ "sk",
5912
+ "hu",
5913
+ "ro",
5914
+ "bg",
5915
+ "uk",
5916
+ "sv",
5917
+ "no",
5918
+ "da",
5919
+ "fi"
5920
+ ]
5921
+ },
5922
+ islamic: {
5923
+ id: "islamic",
5924
+ displayName: "Islamic (Hijri)",
5925
+ monthsInYear: 12,
5926
+ hasEra: !0,
5927
+ isLunar: !0,
5928
+ associatedLanguages: ["ar"]
5929
+ },
5930
+ "islamic-umalqura": {
5931
+ id: "islamic-umalqura",
5932
+ displayName: "Islamic (Umm al-Qura)",
5933
+ monthsInYear: 12,
5934
+ hasEra: !0,
5935
+ isLunar: !0,
5936
+ associatedLanguages: ["ar"]
5937
+ },
5938
+ "islamic-tbla": {
5939
+ id: "islamic-tbla",
5940
+ displayName: "Islamic (Tabular)",
5941
+ monthsInYear: 12,
5942
+ hasEra: !0,
5943
+ isLunar: !0,
5944
+ associatedLanguages: ["ar"]
5945
+ },
5946
+ "islamic-civil": {
5947
+ id: "islamic-civil",
5948
+ displayName: "Islamic (Civil)",
5949
+ monthsInYear: 12,
5950
+ hasEra: !0,
5951
+ isLunar: !0,
5952
+ associatedLanguages: ["ar"]
5953
+ },
5954
+ hebrew: {
5955
+ id: "hebrew",
5956
+ displayName: "Hebrew",
5957
+ monthsInYear: 13,
5958
+ // 12 in regular year, 13 in leap year
5959
+ hasEra: !1,
5960
+ isLunar: !0,
5961
+ associatedLanguages: []
5962
+ },
5963
+ buddhist: {
5964
+ id: "buddhist",
5965
+ displayName: "Buddhist",
5966
+ monthsInYear: 12,
5967
+ hasEra: !0,
5968
+ isLunar: !1,
5969
+ associatedLanguages: []
5970
+ },
5971
+ japanese: {
5972
+ id: "japanese",
5973
+ displayName: "Japanese (Imperial)",
5974
+ monthsInYear: 12,
5975
+ hasEra: !0,
5976
+ isLunar: !1,
5977
+ associatedLanguages: ["ja"]
5978
+ },
5979
+ persian: {
5980
+ id: "persian",
5981
+ displayName: "Persian (Jalali)",
5982
+ monthsInYear: 12,
5983
+ hasEra: !0,
5984
+ isLunar: !1,
5985
+ associatedLanguages: []
5986
+ },
5987
+ chinese: {
5988
+ id: "chinese",
5989
+ displayName: "Chinese",
5990
+ monthsInYear: 12,
5991
+ // Can have leap months
5992
+ hasEra: !0,
5993
+ isLunar: !0,
5994
+ associatedLanguages: ["zh"]
5995
+ },
5996
+ coptic: {
5997
+ id: "coptic",
5998
+ displayName: "Coptic",
5999
+ monthsInYear: 13,
6000
+ hasEra: !0,
6001
+ isLunar: !1,
6002
+ associatedLanguages: []
6003
+ },
6004
+ ethiopic: {
6005
+ id: "ethiopic",
6006
+ displayName: "Ethiopian",
6007
+ monthsInYear: 13,
6008
+ hasEra: !0,
6009
+ isLunar: !1,
6010
+ associatedLanguages: []
6011
+ },
6012
+ indian: {
6013
+ id: "indian",
6014
+ displayName: "Indian (Saka)",
6015
+ monthsInYear: 12,
6016
+ hasEra: !0,
6017
+ isLunar: !1,
6018
+ associatedLanguages: []
6019
+ },
6020
+ roc: {
6021
+ id: "roc",
6022
+ displayName: "Republic of China",
6023
+ monthsInYear: 12,
6024
+ hasEra: !0,
6025
+ isLunar: !1,
6026
+ associatedLanguages: ["zh"]
6027
+ }
6028
+ }, ie = {
6029
+ en: "gregory",
6030
+ pl: "gregory",
6031
+ de: "gregory",
6032
+ fr: "gregory",
6033
+ es: "gregory",
6034
+ it: "gregory",
6035
+ pt: "gregory",
6036
+ nl: "gregory",
6037
+ sv: "gregory",
6038
+ no: "gregory",
6039
+ da: "gregory",
6040
+ fi: "gregory",
6041
+ cs: "gregory",
6042
+ sk: "gregory",
6043
+ hu: "gregory",
6044
+ ro: "gregory",
6045
+ bg: "gregory",
6046
+ uk: "gregory",
6047
+ ja: "japanese",
6048
+ ko: "gregory",
6049
+ zh: "gregory",
6050
+ ar: "islamic"
6051
+ };
6052
+ function se(e, a = "gregory", t = {}) {
6053
+ const o = A(e), { dateStyle: r = "medium", showEra: n = !1, showWeekday: i = !1 } = t, s = {
6054
+ calendar: a,
6055
+ dateStyle: r
6056
+ };
6057
+ i && (delete s.dateStyle, s.weekday = "long", s.year = "numeric", s.month = "long", s.day = "numeric");
6058
+ const l = new Intl.DateTimeFormat(o, s), d = {
6059
+ calendar: a,
6060
+ year: "numeric",
6061
+ month: "long",
6062
+ day: "numeric",
6063
+ era: "long"
6064
+ }, m = new Intl.DateTimeFormat(o, d), f = new Intl.DateTimeFormat(o, { calendar: a, month: "long" }), u = new Intl.DateTimeFormat(o, { calendar: a, weekday: "long" });
6065
+ return {
6066
+ format: (g) => l.format(g),
6067
+ formatWithEra: (g) => m.format(g),
6068
+ getMonthName: (g) => f.format(g),
6069
+ getMonthNames: () => {
6070
+ const g = [], k = new Date(2024, 0, 15);
6071
+ for (let p = 0; p < 12; p++)
6072
+ k.setMonth(p), g.push(f.format(k));
6073
+ return g;
6074
+ },
6075
+ getWeekdayName: (g) => u.format(g),
6076
+ getWeekdayNames: () => {
6077
+ const g = [], k = new Date(2024, 0, 7);
6078
+ for (let p = 0; p < 7; p++)
6079
+ k.setDate(7 + p), g.push(u.format(k));
6080
+ return g;
6081
+ },
6082
+ parseParts: (g) => {
6083
+ var E, z, y, C;
6084
+ const p = new Intl.DateTimeFormat(o, {
6085
+ calendar: a,
6086
+ year: "numeric",
6087
+ month: "numeric",
6088
+ day: "numeric",
6089
+ era: "short"
6090
+ }).formatToParts(g);
6091
+ return {
6092
+ calendar: a,
6093
+ year: parseInt(((E = p.find((w) => w.type === "year")) == null ? void 0 : E.value) || "0", 10),
6094
+ month: parseInt(((z = p.find((w) => w.type === "month")) == null ? void 0 : z.value) || "0", 10),
6095
+ day: parseInt(((y = p.find((w) => w.type === "day")) == null ? void 0 : y.value) || "0", 10),
6096
+ era: (C = p.find((w) => w.type === "era")) == null ? void 0 : C.value,
6097
+ gregorianDate: g
6098
+ };
6099
+ },
6100
+ getEraName: (g) => {
6101
+ var E;
6102
+ return (E = new Intl.DateTimeFormat(o, {
6103
+ calendar: a,
6104
+ era: "long"
6105
+ }).formatToParts(g).find((z) => z.type === "era")) == null ? void 0 : E.value;
6106
+ }
6107
+ };
6108
+ }
6109
+ function le(e, a, t = "en") {
6110
+ return se(t, a).parseParts(e);
6111
+ }
6112
+ function ha(e, a = "en") {
6113
+ return le(/* @__PURE__ */ new Date(), e, a);
6114
+ }
6115
+ const uo = [
6116
+ "Muharram",
6117
+ "Safar",
6118
+ "Rabi' al-Awwal",
6119
+ "Rabi' al-Thani",
6120
+ "Jumada al-Awwal",
6121
+ "Jumada al-Thani",
6122
+ "Rajab",
6123
+ "Sha'ban",
6124
+ "Ramadan",
6125
+ "Shawwal",
6126
+ "Dhu al-Qi'dah",
6127
+ "Dhu al-Hijjah"
6128
+ ];
6129
+ function fa(e) {
6130
+ return (11 * e + 14) % 30 < 11;
6131
+ }
6132
+ function go(e, a) {
6133
+ return a === 12 ? fa(e) ? 30 : 29 : a % 2 === 1 ? 30 : 29;
6134
+ }
6135
+ const po = [
6136
+ "Tishrei",
6137
+ "Cheshvan",
6138
+ "Kislev",
6139
+ "Tevet",
6140
+ "Shevat",
6141
+ "Adar",
6142
+ "Nisan",
6143
+ "Iyar",
6144
+ "Sivan",
6145
+ "Tammuz",
6146
+ "Av",
6147
+ "Elul"
6148
+ ], ho = [
6149
+ "Tishrei",
6150
+ "Cheshvan",
6151
+ "Kislev",
6152
+ "Tevet",
6153
+ "Shevat",
6154
+ "Adar I",
6155
+ "Adar II",
6156
+ "Nisan",
6157
+ "Iyar",
6158
+ "Sivan",
6159
+ "Tammuz",
6160
+ "Av",
6161
+ "Elul"
6162
+ ];
6163
+ function fo(e) {
6164
+ return (7 * e + 1) % 19 < 7;
6165
+ }
6166
+ const H = [
6167
+ { name: "Meiji", kanji: "明治", startDate: new Date(1868, 9, 23) },
6168
+ { name: "Taisho", kanji: "大正", startDate: new Date(1912, 6, 30) },
6169
+ { name: "Showa", kanji: "昭和", startDate: new Date(1926, 11, 25) },
6170
+ { name: "Heisei", kanji: "平成", startDate: new Date(1989, 0, 8) },
6171
+ { name: "Reiwa", kanji: "令和", startDate: new Date(2019, 4, 1) }
6172
+ ];
6173
+ function ka(e) {
6174
+ for (let a = H.length - 1; a >= 0; a--)
6175
+ if (e >= H[a].startDate)
6176
+ return H[a];
6177
+ return null;
6178
+ }
6179
+ function ko(e) {
6180
+ const a = ka(e);
6181
+ return a ? e.getFullYear() - a.startDate.getFullYear() + 1 : null;
6182
+ }
6183
+ const vo = [
6184
+ "Farvardin",
6185
+ "Ordibehesht",
6186
+ "Khordad",
6187
+ "Tir",
6188
+ "Mordad",
6189
+ "Shahrivar",
6190
+ "Mehr",
6191
+ "Aban",
6192
+ "Azar",
6193
+ "Dey",
6194
+ "Bahman",
6195
+ "Esfand"
6196
+ ];
6197
+ function bo(e) {
6198
+ return ((e - 474) % 2820 + 2820) % 2820 * 682 % 2816 < 682;
6199
+ }
6200
+ const va = [
6201
+ "Rat",
6202
+ "Ox",
6203
+ "Tiger",
6204
+ "Rabbit",
6205
+ "Dragon",
6206
+ "Snake",
6207
+ "Horse",
6208
+ "Goat",
6209
+ "Monkey",
6210
+ "Rooster",
6211
+ "Dog",
6212
+ "Pig"
6213
+ ];
6214
+ function wo(e) {
6215
+ return va[(e - 4) % 12];
6216
+ }
6217
+ const ba = [
6218
+ "Jia",
6219
+ "Yi",
6220
+ "Bing",
6221
+ "Ding",
6222
+ "Wu",
6223
+ "Ji",
6224
+ "Geng",
6225
+ "Xin",
6226
+ "Ren",
6227
+ "Gui"
6228
+ ];
6229
+ function yo(e) {
6230
+ return ba[(e - 4) % 10];
6231
+ }
6232
+ function Eo(e, a, t) {
6233
+ const o = a || ie[e], r = v(
6234
+ () => se(e, o, t),
6235
+ [e, o, t]
6236
+ ), n = v(() => W[o], [o]), i = v(() => ha(o, e), [o, e]);
6237
+ return {
6238
+ calendar: o,
6239
+ info: n,
6240
+ current: i,
6241
+ format: r.format,
6242
+ formatWithEra: r.formatWithEra,
6243
+ getMonthName: r.getMonthName,
6244
+ getMonthNames: r.getMonthNames,
6245
+ getWeekdayName: r.getWeekdayName,
6246
+ getWeekdayNames: r.getWeekdayNames,
6247
+ parseParts: r.parseParts,
6248
+ getEraName: r.getEraName,
6249
+ toCalendar: (s) => le(s, o, e)
6250
+ };
6251
+ }
6252
+ function zo() {
6253
+ return Object.keys(W);
6254
+ }
6255
+ function So(e, a = "en") {
6256
+ const t = { ...W[e] };
6257
+ try {
6258
+ const o = A(a), n = new Intl.DisplayNames([o], { type: "calendar" }).of(e);
6259
+ n && (t.displayName = n);
6260
+ } catch {
6261
+ }
6262
+ return t;
6263
+ }
6264
+ function xo(e) {
6265
+ const a = ie[e], t = /* @__PURE__ */ new Set([a]);
6266
+ for (const [o, r] of Object.entries(W))
6267
+ r.associatedLanguages.includes(e) && t.add(o);
6268
+ return t.add("gregory"), Array.from(t);
6269
+ }
6270
+ const $ = {
6271
+ // Lowercase
6272
+ a: "ą",
6273
+ b: "ɓ",
6274
+ c: "ç",
6275
+ d: "ð",
6276
+ e: "ë",
6277
+ f: "ƒ",
6278
+ g: "ğ",
6279
+ h: "ĥ",
6280
+ i: "ï",
6281
+ j: "ĵ",
6282
+ k: "ķ",
6283
+ l: "ľ",
6284
+ m: "ɱ",
6285
+ n: "ñ",
6286
+ o: "ő",
6287
+ p: "þ",
6288
+ q: "ǫ",
6289
+ r: "ř",
6290
+ s: "š",
6291
+ t: "ŧ",
6292
+ u: "ü",
6293
+ v: "ṽ",
6294
+ w: "ŵ",
6295
+ x: "χ",
6296
+ y: "ÿ",
6297
+ z: "ž",
6298
+ // Uppercase
6299
+ A: "Ą",
6300
+ B: "Ɓ",
6301
+ C: "Ç",
6302
+ D: "Ð",
6303
+ E: "Ë",
6304
+ F: "Ƒ",
6305
+ G: "Ğ",
6306
+ H: "Ĥ",
6307
+ I: "Ï",
6308
+ J: "Ĵ",
6309
+ K: "Ķ",
6310
+ L: "Ľ",
6311
+ M: "Ṁ",
6312
+ N: "Ñ",
6313
+ O: "Ő",
6314
+ P: "Þ",
6315
+ Q: "Ǫ",
6316
+ R: "Ř",
6317
+ S: "Š",
6318
+ T: "Ŧ",
6319
+ U: "Ü",
6320
+ V: "Ṽ",
6321
+ W: "Ŵ",
6322
+ X: "Χ",
6323
+ Y: "Ÿ",
6324
+ Z: "Ž"
6325
+ }, wa = {
6326
+ ...$,
6327
+ // Additional mappings
6328
+ a: "ặ",
6329
+ e: "ệ",
6330
+ i: "ị",
6331
+ o: "ộ",
6332
+ u: "ụ",
6333
+ y: "ỵ",
6334
+ A: "Ặ",
6335
+ E: "Ệ",
6336
+ I: "Ị",
6337
+ O: "Ộ",
6338
+ U: "Ụ",
6339
+ Y: "Ỵ"
6340
+ }, ya = "‪", Ea = "‫", _ = "‬", za = "~∼~≈";
6341
+ function Ao(e, a = !1) {
6342
+ const t = a ? wa : $;
6343
+ return e.split("").map((o) => t[o] || o).join("");
6344
+ }
6345
+ function Co(e, a = "[", t = "]") {
6346
+ return `${a}${e}${t}`;
6347
+ }
6348
+ function Sa(e, a = 0.3, t = !1) {
6349
+ if (t)
6350
+ return xa(e);
6351
+ const r = Math.ceil(e.length * (1 + a)) - e.length;
6352
+ if (r <= 0) return e;
6353
+ const n = za[0].repeat(r);
6354
+ return e + n;
6355
+ }
6356
+ function xa(e) {
6357
+ const a = /* @__PURE__ */ new Set(["a", "e", "i", "o", "u", "A", "E", "I", "O", "U"]);
6358
+ return e.split("").map((t) => a.has(t) ? t + t : t).join("");
6359
+ }
6360
+ function Aa(e, a = !1) {
6361
+ return a ? `${Ea}${e}${_}` : `${ya}${e}${_}`;
6362
+ }
6363
+ function de(e, a = {}) {
6364
+ const {
6365
+ addBrackets: t = !0,
6366
+ expansionFactor: o = 0.3,
6367
+ addAccents: r = !0,
6368
+ addBidiMarkers: n = !1,
6369
+ useVowelDoubling: i = !1,
6370
+ preservePlaceholders: s = !0,
6371
+ preserveHtml: l = !0,
6372
+ prefix: d = "[",
6373
+ suffix: m = "]"
6374
+ } = a, f = /* @__PURE__ */ new Map();
6375
+ let u = e, g = 0;
6376
+ s && (u = u.replace(/\{[^}]+\}/g, (k) => {
6377
+ const p = `__PH${g++}__`;
6378
+ return f.set(p, k), p;
6379
+ })), l && (u = u.replace(/<[^>]+>/g, (k) => {
6380
+ const p = `__PH${g++}__`;
6381
+ return f.set(p, k), p;
6382
+ })), r && (u = Ca(u, f)), o > 0 && (u = Sa(u, o, i)), n && (u = Aa(u)), t && (u = `${d}${u}${m}`);
6383
+ for (const [k, p] of f.entries())
6384
+ u = u.replace(k, p);
6385
+ return u;
6386
+ }
6387
+ function Ca(e, a) {
6388
+ const t = new Set(a.keys());
6389
+ return e.split("").map((o) => {
6390
+ for (const r of t)
6391
+ if (e.includes(r) && r.includes(o))
6392
+ return o;
6393
+ return $[o] || o;
6394
+ }).join("");
6395
+ }
6396
+ function T(e) {
6397
+ switch (e) {
6398
+ case "accented":
6399
+ return {
6400
+ addBrackets: !0,
6401
+ addAccents: !0,
6402
+ expansionFactor: 0,
6403
+ addBidiMarkers: !1
6404
+ };
6405
+ case "bidi":
6406
+ return {
6407
+ addBrackets: !0,
6408
+ addAccents: !1,
6409
+ expansionFactor: 0,
6410
+ addBidiMarkers: !0
6411
+ };
6412
+ case "expansion":
6413
+ return {
6414
+ addBrackets: !0,
6415
+ addAccents: !1,
6416
+ expansionFactor: 0.4,
6417
+ addBidiMarkers: !1
6418
+ };
6419
+ case "full":
6420
+ default:
6421
+ return {
6422
+ addBrackets: !0,
6423
+ addAccents: !0,
6424
+ expansionFactor: 0.3,
6425
+ addBidiMarkers: !1,
6426
+ useVowelDoubling: !0
6427
+ };
6428
+ }
6429
+ }
6430
+ function Do(e, a) {
6431
+ const t = {};
6432
+ for (const [o, r] of Object.entries(e))
6433
+ t[o] = de(r, a);
6434
+ return t;
6435
+ }
6436
+ function Da(e) {
6437
+ return /[^\x00-\x7F]/.test(e);
6438
+ }
6439
+ function Ta(e) {
6440
+ if (!e || /^[\d.,-]+$/.test(e) || e.startsWith("["))
6441
+ return !1;
6442
+ const a = /[a-zA-Z]{2,}/.test(e), t = Da(e);
6443
+ return a && !t;
6444
+ }
6445
+ function To(e, a) {
6446
+ const t = {
6447
+ totalKeys: Object.keys(e).length,
6448
+ hardcodedStrings: [],
6449
+ emptyValues: [],
6450
+ placeholderMismatches: [],
6451
+ potentialIssues: 0
6452
+ };
6453
+ for (const [o, r] of Object.entries(e)) {
6454
+ if (!r || r.trim() === "") {
6455
+ t.emptyValues.push(o), t.potentialIssues++;
6456
+ continue;
6457
+ }
6458
+ if (Ta(r) && t.hardcodedStrings.push(o), a && a[o]) {
6459
+ const n = Y(r), i = Y(a[o]), s = n.filter((d) => !i.includes(d)), l = i.filter((d) => !n.includes(d));
6460
+ (s.length > 0 || l.length > 0) && (t.placeholderMismatches.push({
6461
+ key: o,
6462
+ placeholders: [
6463
+ ...s.map((d) => `-${d}`),
6464
+ ...l.map((d) => `+${d}`)
6465
+ ]
6466
+ }), t.potentialIssues++);
6467
+ }
6468
+ }
6469
+ return t;
6470
+ }
6471
+ function Y(e) {
6472
+ return (e.match(/\{([^}]+)\}/g) || []).map((t) => t.replace(/[{}]/g, "").split(",")[0].trim());
6473
+ }
6474
+ const ce = U(null);
6475
+ function Po({
6476
+ children: e,
6477
+ initialEnabled: a = !1,
6478
+ initialMode: t = "full"
6479
+ }) {
6480
+ const [o, r] = P(a), [n, i] = P(t), s = v(() => T(n), [n]), l = v(() => (m) => o ? de(m, s) : m, [o, s]), d = v(
6481
+ () => ({
6482
+ enabled: o,
6483
+ mode: n,
6484
+ options: s,
6485
+ toggle: () => r((m) => !m),
6486
+ setMode: i,
6487
+ transform: l
6488
+ }),
6489
+ [o, n, s, l]
6490
+ );
6491
+ return /* @__PURE__ */ O(ce.Provider, { value: d, children: e });
6492
+ }
6493
+ function jo() {
6494
+ const e = F(ce);
6495
+ return e || {
6496
+ enabled: !1,
6497
+ mode: "full",
6498
+ options: T("full"),
6499
+ toggle: () => {
6500
+ },
6501
+ setMode: () => {
6502
+ },
6503
+ transform: (a) => a
6504
+ };
6505
+ }
6506
+ const Fo = {
6507
+ /** Minimal: brackets only */
6508
+ MINIMAL: { addBrackets: !0, addAccents: !1, expansionFactor: 0 },
6509
+ /** Accented: brackets + accents */
6510
+ ACCENTED: T("accented"),
6511
+ /** Expanded: brackets + 30% expansion */
6512
+ EXPANDED: T("expansion"),
6513
+ /** Bidi: brackets + RTL markers */
6514
+ BIDI: T("bidi"),
6515
+ /** Full: brackets + accents + expansion */
6516
+ FULL: T("full"),
6517
+ /** Finnish: 40% expansion (Finnish is very long) */
6518
+ FINNISH: { addBrackets: !0, addAccents: !0, expansionFactor: 0.4 },
6519
+ /** German: 35% expansion */
6520
+ GERMAN: { addBrackets: !0, addAccents: !0, expansionFactor: 0.35 },
6521
+ /** CJK: Short expansion, no accents (CJK often shorter) */
6522
+ CJK: { addBrackets: !0, addAccents: !1, expansionFactor: -0.1 }
6523
+ };
6524
+ class Pa {
6525
+ constructor(a = 0) {
6526
+ this.cache = /* @__PURE__ */ new Map(), this.ttl = a;
6527
+ }
6528
+ getCacheKey(a, t) {
6529
+ return t ? `${a}:${t}` : a;
6530
+ }
6531
+ get(a, t) {
6532
+ const o = this.getCacheKey(a, t), r = this.cache.get(o);
6533
+ return r ? this.ttl > 0 && Date.now() > r.expiresAt ? (this.cache.delete(o), null) : r.data : null;
6534
+ }
6535
+ set(a, t, o) {
6536
+ const r = this.getCacheKey(a, o), n = Date.now();
6537
+ this.cache.set(r, {
6538
+ data: t,
6539
+ loadedAt: n,
6540
+ expiresAt: this.ttl > 0 ? n + this.ttl : 1 / 0
6541
+ });
6542
+ }
6543
+ has(a, t) {
6544
+ return this.get(a, t) !== null;
6545
+ }
6546
+ delete(a, t) {
6547
+ if (t)
6548
+ this.cache.delete(this.getCacheKey(a, t));
6549
+ else
6550
+ for (const o of this.cache.keys())
6551
+ (o === a || o.startsWith(`${a}:`)) && this.cache.delete(o);
6552
+ }
6553
+ clear() {
6554
+ this.cache.clear();
6555
+ }
6556
+ getStats() {
6557
+ const a = /* @__PURE__ */ new Set();
6558
+ for (const t of this.cache.keys())
6559
+ a.add(t.split(":")[0]);
6560
+ return {
6561
+ size: this.cache.size,
6562
+ languages: Array.from(a)
6563
+ };
6564
+ }
6565
+ }
6566
+ function me(e) {
6567
+ const {
6568
+ loadFn: a,
6569
+ fallbackLang: t = "en",
6570
+ cacheTtl: o = 0,
6571
+ preloadLanguages: r = [],
6572
+ namespaces: n = [],
6573
+ defaultNamespace: i,
6574
+ onLoadStart: s,
6575
+ onLoadComplete: l,
6576
+ onLoadError: d
6577
+ } = e, m = new Pa(o), f = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
6578
+ let g = t;
6579
+ const k = /* @__PURE__ */ new Set();
6580
+ function p() {
6581
+ const c = z();
6582
+ k.forEach((h) => h(c));
6583
+ }
6584
+ function E(c, h) {
6585
+ return h ? `${c}:${h}` : c;
6586
+ }
6587
+ function z() {
6588
+ const c = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set();
6589
+ for (const S of j)
6590
+ m.has(S) && c.add(S);
6591
+ for (const S of f) {
6592
+ const N = S.split(":")[0];
6593
+ h.add(N);
6594
+ }
6595
+ return {
6596
+ loadedLanguages: c,
6597
+ loadingLanguages: h,
6598
+ failedLanguages: new Map(u),
6599
+ currentLanguage: g
6600
+ };
6601
+ }
6602
+ async function y(c, h) {
6603
+ const S = E(c, h), N = m.get(c, h);
6604
+ if (N) return N;
6605
+ if (f.has(S))
6606
+ return new Promise((x) => {
6607
+ const M = setInterval(() => {
6608
+ f.has(S) || (clearInterval(M), x(m.get(c, h)));
6609
+ }, 50);
6610
+ });
6611
+ f.add(S), u.delete(c), s == null || s(c, h), p();
6612
+ try {
6613
+ const x = await a(c, h);
6614
+ return m.set(c, x, h), l == null || l(c, h), x;
6615
+ } catch (x) {
6616
+ const M = x instanceof Error ? x : new Error(String(x));
6617
+ return u.set(c, M), d == null || d(c, M, h), c !== t && !h ? (console.warn(`Failed to load ${c}, falling back to ${t}`), y(t, h)) : null;
6618
+ } finally {
6619
+ f.delete(S), p();
6620
+ }
6621
+ }
6622
+ async function C(c) {
6623
+ await Promise.all(c.map((h) => y(h)));
6624
+ }
6625
+ async function w() {
6626
+ r.length !== 0 && await Promise.allSettled(
6627
+ r.map((c) => n.length > 0 ? Promise.all(n.map((h) => y(c, h))) : y(c))
6628
+ );
6629
+ }
6630
+ function R(c, h) {
6631
+ return m.get(c, h);
6632
+ }
6633
+ function D(c, h) {
6634
+ return m.has(c, h);
6635
+ }
6636
+ function ge(c) {
6637
+ for (const h of f)
6638
+ if (h === c || h.startsWith(`${c}:`))
6639
+ return !0;
6640
+ return !1;
6641
+ }
6642
+ function pe() {
6643
+ return m.getStats().languages;
6644
+ }
6645
+ function he(c) {
6646
+ c ? m.delete(c) : m.clear(), p();
6647
+ }
6648
+ async function fe(c) {
6649
+ D(c) || await y(c), g = c, p();
6650
+ }
6651
+ function ke() {
6652
+ return g;
6653
+ }
6654
+ function ve(c) {
6655
+ return k.add(c), () => k.delete(c);
6656
+ }
6657
+ return {
6658
+ loadLanguage: y,
6659
+ loadLanguages: C,
6660
+ preloadLanguages: w,
6661
+ getTranslations: R,
6662
+ isLoaded: D,
6663
+ isLoading: ge,
6664
+ getLoadedLanguages: pe,
6665
+ clearCache: he,
6666
+ getState: z,
6667
+ setLanguage: fe,
6668
+ getCurrentLanguage: ke,
6669
+ subscribe: ve
6670
+ };
6671
+ }
6672
+ function Lo(e, a) {
6673
+ return me({
6674
+ ...a,
6675
+ loadFn: async (t, o) => {
6676
+ const r = o ? `${e}/${t}/${o}.json` : `${e}/${t}.json`, n = await fetch(r);
6677
+ if (!n.ok)
6678
+ throw new Error(`Failed to load translations: ${n.status}`);
6679
+ return n.json();
6680
+ }
6681
+ });
6682
+ }
6683
+ function Ro(e, a) {
6684
+ return me({
6685
+ ...a,
6686
+ loadFn: async (t, o) => (await e(t, o)).default
6687
+ });
6688
+ }
6689
+ const ue = U(null);
6690
+ function No({
6691
+ children: e,
6692
+ loader: a,
6693
+ initialLanguage: t,
6694
+ namespace: o
6695
+ }) {
6696
+ const [r, n] = P(() => a.getState()), [i, s] = P(null);
6697
+ I(() => a.subscribe(n), [a]), I(() => {
6698
+ t && !a.isLoaded(t, o) && a.loadLanguage(t, o).catch(s);
6699
+ }, [a, t, o]);
6700
+ const l = v(() => a.getTranslations(r.currentLanguage, o) || {}, [a, r.currentLanguage, o]), d = Q(
6701
+ async (f) => {
6702
+ s(null);
6703
+ try {
6704
+ await a.setLanguage(f);
6705
+ } catch (u) {
6706
+ s(u instanceof Error ? u : new Error(String(u)));
6707
+ }
6708
+ },
6709
+ [a]
6710
+ ), m = v(
6711
+ () => ({
6712
+ loader: a,
6713
+ translations: l,
6714
+ isLoading: r.loadingLanguages.size > 0,
6715
+ error: i,
6716
+ setLanguage: d,
6717
+ currentLanguage: r.currentLanguage,
6718
+ loadedLanguages: Array.from(r.loadedLanguages)
6719
+ }),
6720
+ [a, l, r, i, d]
6721
+ );
6722
+ return /* @__PURE__ */ O(ue.Provider, { value: m, children: e });
6723
+ }
6724
+ function ja() {
6725
+ const e = F(ue);
6726
+ if (!e)
6727
+ throw new Error("useDynamicI18n must be used within DynamicI18nProvider");
6728
+ return e;
6729
+ }
6730
+ function Mo(e) {
6731
+ const { translations: a, currentLanguage: t, loader: o, isLoading: r } = ja();
6732
+ return I(() => {
6733
+ e && !o.isLoaded(t, e) && o.loadLanguage(t, e);
6734
+ }, [o, t, e]), { t: Q(
6735
+ (i, s) => {
6736
+ let l = a[i] || i;
6737
+ if (s)
6738
+ for (const [d, m] of Object.entries(s))
6739
+ l = l.replace(new RegExp(`\\{${d}\\}`, "g"), String(m));
6740
+ return l;
6741
+ },
6742
+ [a]
6743
+ ), isLoading: r, currentLanguage: t };
6744
+ }
6745
+ function Io(e, a, t) {
6746
+ switch (t) {
6747
+ case "immediate":
6748
+ e.loadLanguages(a);
6749
+ break;
6750
+ case "idle":
6751
+ "requestIdleCallback" in window ? window.requestIdleCallback(() => {
6752
+ e.loadLanguages(a);
6753
+ }) : setTimeout(() => e.loadLanguages(a), 1e3);
6754
+ break;
6755
+ case "visible":
6756
+ if ("IntersectionObserver" in window) {
6757
+ const r = new IntersectionObserver(
6758
+ () => {
6759
+ e.loadLanguages(a), r.disconnect();
6760
+ },
6761
+ { threshold: 0.1 }
6762
+ );
6763
+ r.observe(document.body);
6764
+ } else
6765
+ e.loadLanguages(a);
6766
+ break;
6767
+ case "interaction":
6768
+ const o = () => {
6769
+ e.loadLanguages(a), window.removeEventListener("click", o), window.removeEventListener("keydown", o), window.removeEventListener("touchstart", o);
6770
+ };
6771
+ window.addEventListener("click", o, { once: !0 }), window.addEventListener("keydown", o, { once: !0 }), window.addEventListener("touchstart", o, { once: !0 });
6772
+ break;
6773
+ }
6774
+ }
6775
+ async function Oo(e, a) {
6776
+ const { fallback: t = "en", preferredLanguages: o = [] } = a || {};
6777
+ for (const n of o)
6778
+ if (j.includes(n))
6779
+ return await e.setLanguage(n), n;
6780
+ const r = navigator.language.split("-")[0].toLowerCase();
6781
+ return j.includes(r) ? (await e.setLanguage(r), r) : (await e.setLanguage(t), t);
5713
6782
  }
5714
6783
  export {
5715
- C as NICE_GLOSSARY,
5716
- c as NICE_I18N_DICTIONARIES,
5717
- E as NICE_SUPPORTED_LANGS,
5718
- xe as NiceI18nProvider,
5719
- Oe as RTLProvider,
5720
- f as RTL_CSS_VARS,
5721
- te as RTL_LANGUAGES,
5722
- Ie as analyzeStylesForRTL,
5723
- ve as createCurrencyFormatter,
5724
- he as createDateFormatter,
5725
- je as createICUTranslator,
5726
- ke as createNumberFormatter,
5727
- fe as createTimeFormatter,
5728
- Ae as createTranslator,
5729
- De as detectBrowserLanguage,
5730
- Ge as findSimilarTranslation,
5731
- de as flipAlignment,
5732
- Me as flipHorizontal,
5733
- ne as formatICU,
5734
- Ce as formatMessage,
5735
- Ze as generateCoverageReport,
5736
- Ke as generateTranslationCode,
5737
- ge as getAllTranslationStats,
5738
- Re as getDocumentDirection,
5739
- Je as getGlossaryForLanguage,
5740
- g as getLocaleTag,
5741
- ce as getLogicalProperty,
5742
- me as getMissingTranslations,
5743
- S as getOrdinalCategory,
5744
- x as getPluralCategory,
5745
- Ue as getRTLCSSVars,
5746
- We as getSourceKeys,
5747
- ie as getTextDirection,
5748
- ue as getTranslationStats,
5749
- A as isRTLLanguage,
5750
- X as isSupported,
5751
- we as lookupGlossary,
5752
- Te as ordinal,
5753
- Pe as plural,
5754
- le as rtlValue,
5755
- Fe as select,
5756
- se as setDocumentDirection,
5757
- Le as useIsRTL,
5758
- He as useNiceCurrencyFormat,
5759
- qe as useNiceDateFormat,
5760
- Ve as useNiceNumberFormat,
5761
- Be as useNiceTimeFormat,
5762
- Se as useNiceTranslation,
5763
- Ne as useRTL,
5764
- $e as validateAgainstGlossary
6784
+ W as CALENDAR_INFO,
6785
+ ba as CELESTIAL_STEMS,
6786
+ va as CHINESE_ZODIAC,
6787
+ ie as DEFAULT_CALENDAR,
6788
+ No as DynamicI18nProvider,
6789
+ po as HEBREW_MONTHS,
6790
+ ho as HEBREW_MONTHS_LEAP,
6791
+ uo as HIJRI_MONTHS,
6792
+ H as JAPANESE_ERAS,
6793
+ te as NICE_GLOSSARY,
6794
+ b as NICE_I18N_DICTIONARIES,
6795
+ j as NICE_SUPPORTED_LANGS,
6796
+ Ra as NiceI18nProvider,
6797
+ vo as PERSIAN_MONTHS,
6798
+ Fo as PSEUDO_PRESETS,
6799
+ Po as PseudoLocalizationProvider,
6800
+ Ha as RTLProvider,
6801
+ K as RTL_CSS_VARS,
6802
+ $e as RTL_LANGUAGES,
6803
+ re as TIMEZONE_GROUPS,
6804
+ Ao as addAccents,
6805
+ Aa as addBidiMarkers,
6806
+ Co as addBrackets,
6807
+ To as analyzeDictionary,
6808
+ $a as analyzeStylesForRTL,
6809
+ Da as containsNonAscii,
6810
+ ne as convertTimezone,
6811
+ se as createCalendarFormatter,
6812
+ sa as createCurrencyFormatter,
6813
+ ra as createDateFormatter,
6814
+ me as createDynamicLoader,
6815
+ Lo as createFetchLoader,
6816
+ Ua as createICUTranslator,
6817
+ Ro as createImportLoader,
6818
+ ia as createNumberFormatter,
6819
+ na as createTimeFormatter,
6820
+ ga as createTimezoneFormatter,
6821
+ Ma as createTranslator,
6822
+ Oo as detectAndLoad,
6823
+ Oa as detectBrowserLanguage,
6824
+ Ta as detectHardcodedText,
6825
+ G as detectTimezone,
6826
+ Sa as expandText,
6827
+ to as findSimilarTranslation,
6828
+ Qe as flipAlignment,
6829
+ qa as flipHorizontal,
6830
+ Ge as formatICU,
6831
+ Ia as formatMessage,
6832
+ ua as fromUTC,
6833
+ Qa as generateCoverageReport,
6834
+ Ya as generateTranslationCode,
6835
+ so as getAllTimezones,
6836
+ oa as getAllTranslationStats,
6837
+ zo as getAvailableCalendars,
6838
+ So as getCalendarInfo,
6839
+ yo as getCelestialStem,
6840
+ wo as getChineseZodiac,
6841
+ ha as getCurrentCalendarDate,
6842
+ Za as getDocumentDirection,
6843
+ ro as getGlossaryForLanguage,
6844
+ go as getHijriMonthDays,
6845
+ ka as getJapaneseEra,
6846
+ ko as getJapaneseYear,
6847
+ A as getLocaleTag,
6848
+ Xe as getLogicalProperty,
6849
+ ea as getMissingTranslations,
6850
+ co as getNextDSTTransition,
6851
+ ae as getOrdinalCategory,
6852
+ ee as getPluralCategory,
6853
+ T as getPseudoLocalizationPreset,
6854
+ Ja as getRTLCSSVars,
6855
+ xo as getRecommendedCalendars,
6856
+ _a as getSourceKeys,
6857
+ Je as getTextDirection,
6858
+ L as getTimezoneInfo,
6859
+ lo as getTimezonesGrouped,
6860
+ aa as getTranslationStats,
6861
+ Z as isDSTActive,
6862
+ fo as isHebrewLeapYear,
6863
+ fa as isHijriLeapYear,
6864
+ bo as isPersianLeapYear,
6865
+ oe as isRTLLanguage,
6866
+ Ke as isSupported,
6867
+ io as isValidTimezone,
6868
+ da as lookupGlossary,
6869
+ Ba as ordinal,
6870
+ Wa as plural,
6871
+ Io as preloadWithStrategy,
6872
+ de as pseudoLocalize,
6873
+ Do as pseudoLocalizeDictionary,
6874
+ Ye as rtlValue,
6875
+ Ka as select,
6876
+ _e as setDocumentDirection,
6877
+ le as toCalendar,
6878
+ ma as toUTC,
6879
+ Eo as useCalendar,
6880
+ ja as useDynamicI18n,
6881
+ Mo as useDynamicTranslation,
6882
+ Ga as useIsRTL,
6883
+ oo as useNiceCurrencyFormat,
6884
+ Xa as useNiceDateFormat,
6885
+ ao as useNiceNumberFormat,
6886
+ eo as useNiceTimeFormat,
6887
+ Na as useNiceTranslation,
6888
+ jo as usePseudoLocalization,
6889
+ Va as useRTL,
6890
+ mo as useTimezone,
6891
+ no as validateAgainstGlossary
5765
6892
  };