@nxgt/material 3.60.0 → 3.63.0

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.
Files changed (114) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +3 -2
  3. package/dist/alert-dialog-RHm6WtQj.js +189 -0
  4. package/dist/{async-slice-HJY_VJjD.js → async-slice-DmX59NyA.js} +3 -4
  5. package/dist/{button-7BuUCGRm.js → button-DfS_amfQ.js} +1 -1
  6. package/dist/charts.js +3 -3
  7. package/dist/{chip-kQOrHlDX.js → chip-Cbndukko.js} +2 -2
  8. package/dist/{code-editor-Ckc9TTCM.js → code-editor-B0tN8Ha_.js} +11 -11
  9. package/dist/code-editor.js +54 -37
  10. package/dist/{code-language-items-rCPB0Xee.js → code-language-items-andgHKrM.js} +2 -2
  11. package/dist/components/ui/layout/sidebar/sidebar-tokens.css +13 -1
  12. package/dist/{components-BSM-h5IQ.js → components-Cm2doOJS.js} +13090 -12957
  13. package/dist/components.js +28 -26
  14. package/dist/dialog-Bd7Hid2L.js +219 -0
  15. package/dist/dnd.js +1 -1
  16. package/dist/{dropdown-menu-CiobN1wi.js → dropdown-menu-_SyVmSuy.js} +1 -1
  17. package/dist/editor.js +707 -706
  18. package/dist/{empty-state-DA517HAb.js → empty-state-D-2ZMXXJ.js} +2 -2
  19. package/dist/escape-owner-DpaP0lm1.js +19 -0
  20. package/dist/{field-blur-DdvY0NQQ.js → field-blur-DyOByjzw.js} +1 -1
  21. package/dist/{field-blur-context-DbJQZkEB.js → field-blur-context-DPe5_Nv5.js} +1 -1
  22. package/dist/hooks-a7_exKWS.js +329 -0
  23. package/dist/hooks.js +8 -102
  24. package/dist/{hover-card-DPs9huSs.js → hover-card-D_0smKBQ.js} +2 -2
  25. package/dist/i18n.js +8 -10
  26. package/dist/{icon-badge-C646JTOI.js → icon-badge-CBCU3ySF.js} +14 -14
  27. package/dist/{icon-button-DvP0Gy3j.js → icon-button-hKHsWTAt.js} +1 -1
  28. package/dist/illustrations-game.js +2 -0
  29. package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +6 -0
  30. package/dist/lib/components/ui/display/list-tile/partials/list-tile-classes.d.ts +3 -1
  31. package/dist/lib/components/ui/display/list-tile/partials/list-tile-line.d.ts +1 -1
  32. package/dist/lib/components/ui/display/list-tile/partials/list-tile-toggle.d.ts +1 -1
  33. package/dist/lib/components/ui/feedback/index.d.ts +1 -0
  34. package/dist/lib/components/ui/feedback/unsaved-dialog/index.d.ts +1 -0
  35. package/dist/lib/components/ui/feedback/unsaved-dialog/unsaved-dialog.d.ts +20 -0
  36. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  37. package/dist/lib/components/ui/fields/textarea-field/textarea-footer.d.ts +2 -1
  38. package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +6 -3
  39. package/dist/lib/components/ui/layout/app-shell/index.d.ts +1 -1
  40. package/dist/lib/components/ui/layout/app-shell/route-transition.d.ts +20 -2
  41. package/dist/lib/components/ui/layout/app-shell/shapes-clear-content.d.ts +2 -1
  42. package/dist/lib/components/ui/widgets/code-editor/configure-monaco.d.ts +2 -0
  43. package/dist/lib/components/ui/widgets/education/questions/index.d.ts +3 -1
  44. package/dist/lib/components/ui/widgets/education/questions/partials/question-content.d.ts +1 -1
  45. package/dist/lib/components/ui/widgets/education/questions/partials/question-top.d.ts +6 -0
  46. package/dist/lib/components/ui/widgets/education/questions/question-long-text.d.ts +5 -0
  47. package/dist/lib/components/ui/widgets/education/questions/question-media-content.d.ts +24 -0
  48. package/dist/lib/components/ui/widgets/education/questions/question-media-helpers.d.ts +11 -0
  49. package/dist/lib/components/ui/widgets/education/questions/question-media-view.d.ts +18 -0
  50. package/dist/lib/components/ui/widgets/education/questions/question-media-view.types.d.ts +32 -0
  51. package/dist/lib/components/ui/widgets/education/questions/question-options.d.ts +2 -2
  52. package/dist/lib/components/ui/widgets/education/questions/question-text.d.ts +1 -1
  53. package/dist/lib/components/ui/widgets/education/questions/question.d.ts +1 -1
  54. package/dist/lib/components/ui/widgets/education/questions/types.d.ts +38 -1
  55. package/dist/lib/components/ui/widgets/education/questions/use-reload-focus.d.ts +13 -0
  56. package/dist/lib/hooks/drafts-store.d.ts +4 -0
  57. package/dist/lib/hooks/index.d.ts +4 -0
  58. package/dist/lib/hooks/unsaved-guard-rules.d.ts +30 -0
  59. package/dist/lib/hooks/use-drafts.d.ts +75 -0
  60. package/dist/lib/hooks/use-react-router-block.d.ts +11 -0
  61. package/dist/lib/hooks/use-unsaved-guard/guard-core.d.ts +30 -0
  62. package/dist/lib/hooks/use-unsaved-guard/index.d.ts +3 -0
  63. package/dist/lib/hooks/use-unsaved-guard/types.d.ts +63 -0
  64. package/dist/lib/hooks/use-unsaved-guard/use-discard-guard.d.ts +15 -0
  65. package/dist/lib/hooks/use-unsaved-guard/use-unsaved-guard.d.ts +19 -0
  66. package/dist/lib/i18n/resources/en/en.d.ts +20 -0
  67. package/dist/lib/i18n/resources/en/material.json.d.ts +21 -1
  68. package/dist/lib/i18n/resources/fr/fr.d.ts +20 -0
  69. package/dist/lib/i18n/resources/fr/material.json.d.ts +21 -1
  70. package/dist/lib/i18n/resources/resources.d.ts +40 -0
  71. package/dist/lib/i18n/translator.d.ts +1 -1
  72. package/dist/lib/illustrations-game/index.d.ts +17 -0
  73. package/dist/lib.js +1 -1
  74. package/dist/main.js +42 -43
  75. package/dist/map.js +63 -63
  76. package/dist/material.css +1 -1
  77. package/dist/pdf-reader.js +1 -1
  78. package/dist/print.js +1 -2
  79. package/dist/{public-BYsrhyPW.js → public-D8JGp3PH.js} +823 -822
  80. package/dist/{rich-code-block-WJxDWPPY.js → rich-code-block-0R3bidsM.js} +5 -5
  81. package/dist/{sortable-provider-oPjlhlZo.js → sortable-provider-B75v53sB.js} +2 -2
  82. package/dist/{spinner-C5lObWXT.js → spinner-CAnpF3RK.js} +1 -1
  83. package/dist/theme-picker.js +2 -2
  84. package/dist/{theme-toggle-CPEq5JG-.js → theme-toggle-pQ5F602V.js} +1 -1
  85. package/dist/{toolbar-items-ByvXcMHm.js → toolbar-items-_ezD5B0r.js} +4 -4
  86. package/dist/translate-material-CvZK8_S6.js +96 -0
  87. package/dist/{stored-language-B-tiWZU2.js → translator-Caf-d96e.js} +2497 -8
  88. package/dist/{escape-owner-r57kuPjn.js → typography-CEK19bj8.js} +17 -34
  89. package/dist/{use-chat-composer-CzOVaIed.js → use-chat-composer-Dpvi_-CR.js} +5164 -5338
  90. package/dist/{use-heading-spy-BOtygPFu.js → use-heading-spy-mmcyEGmm.js} +186 -71
  91. package/dist/{use-material-translation-B5j3jZs7.js → use-material-translation-C_1cWRzW.js} +1 -2
  92. package/dist/use-return-focus-1ZIchrBM.js +269 -0
  93. package/docs/components/data-display.md +1 -0
  94. package/docs/components/feedback-and-status.md +23 -0
  95. package/docs/components/navigation-and-layout.md +5 -4
  96. package/docs/components/rich-widgets.md +73 -1
  97. package/docs/guides/app-shell.md +17 -0
  98. package/docs/guides/code-editor.md +8 -0
  99. package/docs/guides/csp.md +4 -0
  100. package/docs/guides/helpers.md +120 -0
  101. package/docs/guides/icon-motifs.md +3 -1
  102. package/docs/guides/illustrations.md +33 -1
  103. package/docs/guides/migrating-to-3.md +4 -2
  104. package/docs/guides/theming.md +13 -3
  105. package/docs/previews/feedback-status-illustration-game.webp +0 -0
  106. package/docs/previews/feedback-status-unsaveddialog.webp +0 -0
  107. package/docs/roadmap.md +1 -1
  108. package/docs/troubleshooting.md +9 -6
  109. package/lib/components/ui/layout/sidebar/sidebar-tokens.css +13 -1
  110. package/package.json +7 -2
  111. package/dist/dialog-yfPkLqUQ.js +0 -482
  112. package/dist/i18n-provider-BehR6cU7.js +0 -79
  113. package/dist/translate-material-tUaLZUmT.js +0 -20
  114. package/dist/translator-B9XjUDRu.js +0 -2451
@@ -1,7 +1,9 @@
1
- import { t as e } from "./read-storage-C2J90bNm.js";
1
+ import { t as e } from "./is-production-GLw59WU8.js";
2
+ import { t } from "./read-storage-C2J90bNm.js";
3
+ import { t as n } from "./get-CTzJAwfc.js";
2
4
  //#endregion
3
5
  //#region lib/i18n/resources/resources.ts
4
- var t = {
6
+ var r = {
5
7
  en: { material: {
6
8
  "empty-state": {
7
9
  "not-found": {
@@ -291,6 +293,7 @@ var t = {
291
293
  true: "True",
292
294
  false: "False",
293
295
  "answer-placeholder": "Your answer",
296
+ "code-placeholder": "Write your code",
294
297
  expected: "Expected: {answer}",
295
298
  next: "Next",
296
299
  previous: "Previous",
@@ -306,7 +309,20 @@ var t = {
306
309
  "kind-choice": "Multiple choice",
307
310
  "kind-multi": "Select all that apply",
308
311
  "kind-boolean": "True or false",
309
- "kind-text": "Short answer"
312
+ "kind-text": "Short answer",
313
+ "kind-open": "Open answer",
314
+ "kind-code": "Code answer"
315
+ },
316
+ "question-media": {
317
+ image: "Image for this question",
318
+ audio: "Audio for this question",
319
+ video: "Video for this question",
320
+ document: "Document for this question",
321
+ "error-title": "The file did not load",
322
+ "error-description": "The link may have expired.",
323
+ reload: "Reload",
324
+ open: "Open the file",
325
+ "new-tab": "opens in a new tab"
310
326
  },
311
327
  quiz: {
312
328
  count: "{count, plural, one {# question} other {# questions}}",
@@ -1295,6 +1311,12 @@ var t = {
1295
1311
  dark: "Dark",
1296
1312
  system: "System"
1297
1313
  },
1314
+ unsaved: {
1315
+ title: "Leave without saving?",
1316
+ description: "Your changes have not been saved and will be lost.",
1317
+ stay: "Stay",
1318
+ leave: "Leave"
1319
+ },
1298
1320
  "load-more": {
1299
1321
  shown: "Showing {shown} of {total}",
1300
1322
  "shown-count": "{shown, plural, one {# shown} other {# shown}}",
@@ -3174,6 +3196,7 @@ var t = {
3174
3196
  true: "Vrai",
3175
3197
  false: "Faux",
3176
3198
  "answer-placeholder": "Votre réponse",
3199
+ "code-placeholder": "Écrivez votre code",
3177
3200
  expected: "Attendu : {answer}",
3178
3201
  next: "Suivant",
3179
3202
  previous: "Précédent",
@@ -3189,7 +3212,20 @@ var t = {
3189
3212
  "kind-choice": "Choix unique",
3190
3213
  "kind-multi": "Plusieurs réponses",
3191
3214
  "kind-boolean": "Vrai ou faux",
3192
- "kind-text": "Réponse courte"
3215
+ "kind-text": "Réponse courte",
3216
+ "kind-open": "Réponse ouverte",
3217
+ "kind-code": "Réponse en code"
3218
+ },
3219
+ "question-media": {
3220
+ image: "Image de cette question",
3221
+ audio: "Audio de cette question",
3222
+ video: "Vidéo de cette question",
3223
+ document: "Document de cette question",
3224
+ "error-title": "Le fichier ne s’est pas chargé",
3225
+ "error-description": "Le lien a peut-être expiré.",
3226
+ reload: "Recharger",
3227
+ open: "Ouvrir le fichier",
3228
+ "new-tab": "s’ouvre dans un nouvel onglet"
3193
3229
  },
3194
3230
  quiz: {
3195
3231
  count: "{count, plural, one {# question} other {# questions}}",
@@ -4178,6 +4214,12 @@ var t = {
4178
4214
  dark: "Sombre",
4179
4215
  system: "Système"
4180
4216
  },
4217
+ unsaved: {
4218
+ title: "Quitter sans enregistrer ?",
4219
+ description: "Vos modifications n’ont pas été enregistrées et seront perdues.",
4220
+ stay: "Rester",
4221
+ leave: "Quitter"
4222
+ },
4181
4223
  "load-more": {
4182
4224
  shown: "Affichage de {shown} sur {total}",
4183
4225
  "shown-count": "{shown, plural, one {# affiché} other {# affichés}}",
@@ -5768,12 +5810,2459 @@ var t = {
5768
5810
  column: "Actions"
5769
5811
  }
5770
5812
  } }
5771
- }, n = "language", r = "en", i = Object.keys(t);
5813
+ }, i = "language", a = "en", o = Object.keys(r);
5772
5814
  //#endregion
5773
5815
  //#region lib/i18n/stored-language.ts
5774
- function a(t, n, r) {
5775
- let i = e(t);
5816
+ function s(e, n, r) {
5817
+ let i = t(e);
5776
5818
  return i && r.includes(i) ? i : n;
5777
5819
  }
5778
5820
  //#endregion
5779
- export { t as a, i, r as n, n as r, a as t };
5821
+ //#region ../../node_modules/@formatjs/fast-memoize/index.js
5822
+ function c(e, t) {
5823
+ let n = t && t.cache ? t.cache : re, r = t && t.serializer ? t.serializer : te;
5824
+ return (t && t.strategy ? t.strategy : p)(e, {
5825
+ cache: n,
5826
+ serializer: r
5827
+ });
5828
+ }
5829
+ function l(e) {
5830
+ return e == null || typeof e == "number" || typeof e == "boolean";
5831
+ }
5832
+ function u(e, t, n, r) {
5833
+ let i = l(r) ? r : n(r), a = t.get(i);
5834
+ return a === void 0 && (a = e.call(this, r), t.set(i, a)), a;
5835
+ }
5836
+ function d(e, t, n) {
5837
+ let r = Array.prototype.slice.call(arguments, 3), i = n(r), a = t.get(i);
5838
+ return a === void 0 && (a = e.apply(this, r), t.set(i, a)), a;
5839
+ }
5840
+ function f(e, t, n, r, i) {
5841
+ return n.bind(t, e, r, i);
5842
+ }
5843
+ function p(e, t) {
5844
+ let n = e.length === 1 ? u : d;
5845
+ return f(e, this, n, t.cache.create(), t.serializer);
5846
+ }
5847
+ function m(e, t) {
5848
+ return f(e, this, d, t.cache.create(), t.serializer);
5849
+ }
5850
+ function ee(e, t) {
5851
+ return f(e, this, u, t.cache.create(), t.serializer);
5852
+ }
5853
+ var te = function() {
5854
+ return JSON.stringify(arguments);
5855
+ }, ne = class {
5856
+ constructor() {
5857
+ this.cache = Object.create(null);
5858
+ }
5859
+ get(e) {
5860
+ return this.cache[e];
5861
+ }
5862
+ set(e, t) {
5863
+ this.cache[e] = t;
5864
+ }
5865
+ }, re = { create: function() {
5866
+ return new ne();
5867
+ } }, h = {
5868
+ variadic: m,
5869
+ monadic: ee
5870
+ }, ie = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
5871
+ function ae(e) {
5872
+ let t = {};
5873
+ return e.replace(ie, (e) => {
5874
+ let n = e.length;
5875
+ switch (e[0]) {
5876
+ case "G":
5877
+ t.era = n === 4 ? "long" : n === 5 ? "narrow" : "short";
5878
+ break;
5879
+ case "y":
5880
+ t.year = n === 2 ? "2-digit" : "numeric";
5881
+ break;
5882
+ case "Y":
5883
+ case "u":
5884
+ case "U":
5885
+ case "r": throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
5886
+ case "q":
5887
+ case "Q": throw RangeError("`q/Q` (quarter) patterns are not supported");
5888
+ case "M":
5889
+ case "L":
5890
+ t.month = [
5891
+ "numeric",
5892
+ "2-digit",
5893
+ "short",
5894
+ "long",
5895
+ "narrow"
5896
+ ][n - 1];
5897
+ break;
5898
+ case "w":
5899
+ case "W": throw RangeError("`w/W` (week) patterns are not supported");
5900
+ case "d":
5901
+ t.day = ["numeric", "2-digit"][n - 1];
5902
+ break;
5903
+ case "D":
5904
+ case "F":
5905
+ case "g": throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
5906
+ case "E":
5907
+ t.weekday = n === 4 ? "long" : n === 5 ? "narrow" : "short";
5908
+ break;
5909
+ case "e":
5910
+ if (n < 4) throw RangeError("`e..eee` (weekday) patterns are not supported");
5911
+ t.weekday = [
5912
+ "short",
5913
+ "long",
5914
+ "narrow",
5915
+ "short"
5916
+ ][n - 3];
5917
+ break;
5918
+ case "c":
5919
+ if (n < 4) throw RangeError("`c..ccc` (weekday) patterns are not supported");
5920
+ t.weekday = [
5921
+ "short",
5922
+ "long",
5923
+ "narrow",
5924
+ "short"
5925
+ ][n - 3];
5926
+ break;
5927
+ case "a":
5928
+ t.hour12 = !0;
5929
+ break;
5930
+ case "b":
5931
+ case "B": throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");
5932
+ case "h":
5933
+ t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][n - 1];
5934
+ break;
5935
+ case "H":
5936
+ t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][n - 1];
5937
+ break;
5938
+ case "K":
5939
+ t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][n - 1];
5940
+ break;
5941
+ case "k":
5942
+ t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][n - 1];
5943
+ break;
5944
+ case "j":
5945
+ case "J":
5946
+ case "C": throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
5947
+ case "m":
5948
+ t.minute = ["numeric", "2-digit"][n - 1];
5949
+ break;
5950
+ case "s":
5951
+ t.second = ["numeric", "2-digit"][n - 1];
5952
+ break;
5953
+ case "S":
5954
+ case "A": throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");
5955
+ case "z":
5956
+ t.timeZoneName = n < 4 ? "short" : "long";
5957
+ break;
5958
+ case "Z":
5959
+ case "O":
5960
+ case "v":
5961
+ case "V":
5962
+ case "X":
5963
+ case "x": throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
5964
+ }
5965
+ return "";
5966
+ }), t;
5967
+ }
5968
+ var oe = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
5969
+ function se(e) {
5970
+ if (e.length === 0) throw Error("Number skeleton cannot be empty");
5971
+ let t = e.split(oe).filter((e) => e.length > 0), n = [];
5972
+ for (let e of t) {
5973
+ let t = e.split("/");
5974
+ if (t.length === 0) throw Error("Invalid number skeleton");
5975
+ let [r, ...i] = t;
5976
+ for (let e of i) if (e.length === 0) throw Error("Invalid number skeleton");
5977
+ n.push({
5978
+ stem: r,
5979
+ options: i
5980
+ });
5981
+ }
5982
+ return n;
5983
+ }
5984
+ function ce(e) {
5985
+ return e.replace(/^(.*?)-/, "");
5986
+ }
5987
+ var g = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, _ = /^(@+)?(\+|#+)?[rs]?$/g, le = /(\*)(0+)|(#+)(0+)|(0+)/g, v = /^(0+)$/;
5988
+ function y(e) {
5989
+ let t = {};
5990
+ return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(_, function(e, n, r) {
5991
+ return typeof r == "string" ? r === "+" ? t.minimumSignificantDigits = n.length : n[0] === "#" ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof r == "string" ? r.length : 0)) : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length), "";
5992
+ }), t;
5993
+ }
5994
+ function b(e) {
5995
+ switch (e) {
5996
+ case "sign-auto": return { signDisplay: "auto" };
5997
+ case "sign-accounting":
5998
+ case "()": return { currencySign: "accounting" };
5999
+ case "sign-always":
6000
+ case "+!": return { signDisplay: "always" };
6001
+ case "sign-accounting-always":
6002
+ case "()!": return {
6003
+ signDisplay: "always",
6004
+ currencySign: "accounting"
6005
+ };
6006
+ case "sign-except-zero":
6007
+ case "+?": return { signDisplay: "exceptZero" };
6008
+ case "sign-accounting-except-zero":
6009
+ case "()?": return {
6010
+ signDisplay: "exceptZero",
6011
+ currencySign: "accounting"
6012
+ };
6013
+ case "sign-never":
6014
+ case "+_": return { signDisplay: "never" };
6015
+ }
6016
+ }
6017
+ function ue(e) {
6018
+ let t;
6019
+ if (e[0] === "E" && e[1] === "E" ? (t = { notation: "engineering" }, e = e.slice(2)) : e[0] === "E" && (t = { notation: "scientific" }, e = e.slice(1)), t) {
6020
+ let n = e.slice(0, 2);
6021
+ if (n === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : n === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !v.test(e)) throw Error("Malformed concise eng/scientific notation");
6022
+ t.minimumIntegerDigits = e.length;
6023
+ }
6024
+ return t;
6025
+ }
6026
+ function x(e) {
6027
+ return b(e) || {};
6028
+ }
6029
+ function de(e) {
6030
+ let t = {};
6031
+ for (let n of e) {
6032
+ switch (n.stem) {
6033
+ case "percent":
6034
+ case "%":
6035
+ t.style = "percent";
6036
+ continue;
6037
+ case "%x100":
6038
+ t.style = "percent", t.scale = 100;
6039
+ continue;
6040
+ case "currency":
6041
+ t.style = "currency", t.currency = n.options[0];
6042
+ continue;
6043
+ case "group-off":
6044
+ case ",_":
6045
+ t.useGrouping = !1;
6046
+ continue;
6047
+ case "precision-integer":
6048
+ case ".":
6049
+ t.maximumFractionDigits = 0;
6050
+ continue;
6051
+ case "measure-unit":
6052
+ case "unit":
6053
+ t.style = "unit", t.unit = ce(n.options[0]);
6054
+ continue;
6055
+ case "compact-short":
6056
+ case "K":
6057
+ t.notation = "compact", t.compactDisplay = "short";
6058
+ continue;
6059
+ case "compact-long":
6060
+ case "KK":
6061
+ t.notation = "compact", t.compactDisplay = "long";
6062
+ continue;
6063
+ case "scientific":
6064
+ t = {
6065
+ ...t,
6066
+ notation: "scientific",
6067
+ ...n.options.reduce((e, t) => ({
6068
+ ...e,
6069
+ ...x(t)
6070
+ }), {})
6071
+ };
6072
+ continue;
6073
+ case "engineering":
6074
+ t = {
6075
+ ...t,
6076
+ notation: "engineering",
6077
+ ...n.options.reduce((e, t) => ({
6078
+ ...e,
6079
+ ...x(t)
6080
+ }), {})
6081
+ };
6082
+ continue;
6083
+ case "notation-simple":
6084
+ t.notation = "standard";
6085
+ continue;
6086
+ case "unit-width-narrow":
6087
+ t.currencyDisplay = "narrowSymbol", t.unitDisplay = "narrow";
6088
+ continue;
6089
+ case "unit-width-short":
6090
+ t.currencyDisplay = "code", t.unitDisplay = "short";
6091
+ continue;
6092
+ case "unit-width-full-name":
6093
+ t.currencyDisplay = "name", t.unitDisplay = "long";
6094
+ continue;
6095
+ case "unit-width-iso-code":
6096
+ t.currencyDisplay = "symbol";
6097
+ continue;
6098
+ case "scale":
6099
+ t.scale = parseFloat(n.options[0]);
6100
+ continue;
6101
+ case "rounding-mode-floor":
6102
+ t.roundingMode = "floor";
6103
+ continue;
6104
+ case "rounding-mode-ceiling":
6105
+ t.roundingMode = "ceil";
6106
+ continue;
6107
+ case "rounding-mode-down":
6108
+ t.roundingMode = "trunc";
6109
+ continue;
6110
+ case "rounding-mode-up":
6111
+ t.roundingMode = "expand";
6112
+ continue;
6113
+ case "rounding-mode-half-even":
6114
+ t.roundingMode = "halfEven";
6115
+ continue;
6116
+ case "rounding-mode-half-down":
6117
+ t.roundingMode = "halfTrunc";
6118
+ continue;
6119
+ case "rounding-mode-half-up":
6120
+ t.roundingMode = "halfExpand";
6121
+ continue;
6122
+ case "integer-width":
6123
+ if (n.options.length > 1) throw RangeError("integer-width stems only accept a single optional option");
6124
+ n.options[0].replace(le, function(e, n, r, i, a, o) {
6125
+ if (n) t.minimumIntegerDigits = r.length;
6126
+ else if (i && a) throw Error("We currently do not support maximum integer digits");
6127
+ else if (o) throw Error("We currently do not support exact integer digits");
6128
+ return "";
6129
+ });
6130
+ continue;
6131
+ }
6132
+ if (v.test(n.stem)) {
6133
+ t.minimumIntegerDigits = n.stem.length;
6134
+ continue;
6135
+ }
6136
+ if (g.test(n.stem)) {
6137
+ if (n.options.length > 1) throw RangeError("Fraction-precision stems only accept a single optional option");
6138
+ n.stem.replace(g, function(e, n, r, i, a, o) {
6139
+ return r === "*" ? t.minimumFractionDigits = n.length : i && i[0] === "#" ? t.maximumFractionDigits = i.length : a && o ? (t.minimumFractionDigits = a.length, t.maximumFractionDigits = a.length + o.length) : (t.minimumFractionDigits = n.length, t.maximumFractionDigits = n.length), "";
6140
+ });
6141
+ let e = n.options[0];
6142
+ e === "w" ? t = {
6143
+ ...t,
6144
+ trailingZeroDisplay: "stripIfInteger"
6145
+ } : e && (t = {
6146
+ ...t,
6147
+ ...y(e)
6148
+ });
6149
+ continue;
6150
+ }
6151
+ if (_.test(n.stem)) {
6152
+ t = {
6153
+ ...t,
6154
+ ...y(n.stem)
6155
+ };
6156
+ continue;
6157
+ }
6158
+ let e = b(n.stem);
6159
+ e && (t = {
6160
+ ...t,
6161
+ ...e
6162
+ });
6163
+ let r = ue(n.stem);
6164
+ r && (t = {
6165
+ ...t,
6166
+ ...r
6167
+ });
6168
+ }
6169
+ return t;
6170
+ }
6171
+ //#endregion
6172
+ //#region ../../node_modules/@formatjs/icu-messageformat-parser/index.js
6173
+ var fe = /* @__PURE__ */ function(e) {
6174
+ return e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG", e;
6175
+ }({});
6176
+ function S(e) {
6177
+ return e.type === 0;
6178
+ }
6179
+ function pe(e) {
6180
+ return e.type === 1;
6181
+ }
6182
+ function C(e) {
6183
+ return e.type === 2;
6184
+ }
6185
+ function w(e) {
6186
+ return e.type === 3;
6187
+ }
6188
+ function T(e) {
6189
+ return e.type === 4;
6190
+ }
6191
+ function E(e) {
6192
+ return e.type === 5;
6193
+ }
6194
+ function D(e) {
6195
+ return e.type === 6;
6196
+ }
6197
+ function me(e) {
6198
+ return e.type === 7;
6199
+ }
6200
+ function O(e) {
6201
+ return e.type === 8;
6202
+ }
6203
+ function k(e) {
6204
+ return !!(e && typeof e == "object" && e.type === 0);
6205
+ }
6206
+ function A(e) {
6207
+ return !!(e && typeof e == "object" && e.type === 1);
6208
+ }
6209
+ var j = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, M = {
6210
+ "001": ["H", "h"],
6211
+ 419: [
6212
+ "h",
6213
+ "H",
6214
+ "hB",
6215
+ "hb"
6216
+ ],
6217
+ AC: [
6218
+ "H",
6219
+ "h",
6220
+ "hb",
6221
+ "hB"
6222
+ ],
6223
+ AD: ["H", "hB"],
6224
+ AE: [
6225
+ "h",
6226
+ "hB",
6227
+ "hb",
6228
+ "H"
6229
+ ],
6230
+ AF: [
6231
+ "H",
6232
+ "hb",
6233
+ "hB",
6234
+ "h"
6235
+ ],
6236
+ AG: [
6237
+ "h",
6238
+ "hb",
6239
+ "H",
6240
+ "hB"
6241
+ ],
6242
+ AI: [
6243
+ "H",
6244
+ "h",
6245
+ "hb",
6246
+ "hB"
6247
+ ],
6248
+ AL: [
6249
+ "h",
6250
+ "H",
6251
+ "hB"
6252
+ ],
6253
+ AM: ["H", "hB"],
6254
+ AO: ["H", "hB"],
6255
+ AR: [
6256
+ "h",
6257
+ "H",
6258
+ "hB",
6259
+ "hb"
6260
+ ],
6261
+ AS: ["h", "H"],
6262
+ AT: ["H", "hB"],
6263
+ AU: [
6264
+ "h",
6265
+ "hb",
6266
+ "H",
6267
+ "hB"
6268
+ ],
6269
+ AW: ["H", "hB"],
6270
+ AX: ["H"],
6271
+ AZ: [
6272
+ "H",
6273
+ "hB",
6274
+ "h"
6275
+ ],
6276
+ BA: [
6277
+ "H",
6278
+ "hB",
6279
+ "h"
6280
+ ],
6281
+ BB: [
6282
+ "h",
6283
+ "hb",
6284
+ "H",
6285
+ "hB"
6286
+ ],
6287
+ BD: [
6288
+ "h",
6289
+ "hB",
6290
+ "H"
6291
+ ],
6292
+ BE: ["H", "hB"],
6293
+ BF: ["H", "hB"],
6294
+ BG: [
6295
+ "H",
6296
+ "hB",
6297
+ "h"
6298
+ ],
6299
+ BH: [
6300
+ "h",
6301
+ "hB",
6302
+ "hb",
6303
+ "H"
6304
+ ],
6305
+ BI: ["H", "h"],
6306
+ BJ: ["H", "hB"],
6307
+ BL: ["H", "hB"],
6308
+ BM: [
6309
+ "h",
6310
+ "hb",
6311
+ "H",
6312
+ "hB"
6313
+ ],
6314
+ BN: [
6315
+ "hb",
6316
+ "hB",
6317
+ "h",
6318
+ "H"
6319
+ ],
6320
+ BO: [
6321
+ "h",
6322
+ "H",
6323
+ "hB",
6324
+ "hb"
6325
+ ],
6326
+ BQ: ["H"],
6327
+ BR: ["H", "hB"],
6328
+ BS: [
6329
+ "h",
6330
+ "hb",
6331
+ "H",
6332
+ "hB"
6333
+ ],
6334
+ BT: ["h", "H"],
6335
+ BW: [
6336
+ "H",
6337
+ "h",
6338
+ "hb",
6339
+ "hB"
6340
+ ],
6341
+ BY: ["H", "h"],
6342
+ BZ: [
6343
+ "H",
6344
+ "h",
6345
+ "hb",
6346
+ "hB"
6347
+ ],
6348
+ CA: [
6349
+ "h",
6350
+ "hb",
6351
+ "H",
6352
+ "hB"
6353
+ ],
6354
+ CC: [
6355
+ "H",
6356
+ "h",
6357
+ "hb",
6358
+ "hB"
6359
+ ],
6360
+ CD: ["hB", "H"],
6361
+ CF: [
6362
+ "H",
6363
+ "h",
6364
+ "hB"
6365
+ ],
6366
+ CG: ["H", "hB"],
6367
+ CH: [
6368
+ "H",
6369
+ "hB",
6370
+ "h"
6371
+ ],
6372
+ CI: ["H", "hB"],
6373
+ CK: [
6374
+ "H",
6375
+ "h",
6376
+ "hb",
6377
+ "hB"
6378
+ ],
6379
+ CL: [
6380
+ "h",
6381
+ "H",
6382
+ "hB",
6383
+ "hb"
6384
+ ],
6385
+ CM: [
6386
+ "H",
6387
+ "h",
6388
+ "hB"
6389
+ ],
6390
+ CN: [
6391
+ "H",
6392
+ "hB",
6393
+ "hb",
6394
+ "h"
6395
+ ],
6396
+ CO: [
6397
+ "h",
6398
+ "H",
6399
+ "hB",
6400
+ "hb"
6401
+ ],
6402
+ CP: ["H"],
6403
+ CR: [
6404
+ "h",
6405
+ "H",
6406
+ "hB",
6407
+ "hb"
6408
+ ],
6409
+ CU: [
6410
+ "h",
6411
+ "H",
6412
+ "hB",
6413
+ "hb"
6414
+ ],
6415
+ CV: ["H", "hB"],
6416
+ CW: ["H", "hB"],
6417
+ CX: [
6418
+ "H",
6419
+ "h",
6420
+ "hb",
6421
+ "hB"
6422
+ ],
6423
+ CY: [
6424
+ "h",
6425
+ "H",
6426
+ "hb",
6427
+ "hB"
6428
+ ],
6429
+ CZ: ["H"],
6430
+ DE: ["H", "hB"],
6431
+ DG: [
6432
+ "H",
6433
+ "h",
6434
+ "hb",
6435
+ "hB"
6436
+ ],
6437
+ DJ: ["h", "H"],
6438
+ DK: ["H"],
6439
+ DM: [
6440
+ "h",
6441
+ "hb",
6442
+ "H",
6443
+ "hB"
6444
+ ],
6445
+ DO: [
6446
+ "h",
6447
+ "H",
6448
+ "hB",
6449
+ "hb"
6450
+ ],
6451
+ DZ: [
6452
+ "h",
6453
+ "hB",
6454
+ "hb",
6455
+ "H"
6456
+ ],
6457
+ EA: [
6458
+ "H",
6459
+ "h",
6460
+ "hB",
6461
+ "hb"
6462
+ ],
6463
+ EC: [
6464
+ "h",
6465
+ "H",
6466
+ "hB",
6467
+ "hb"
6468
+ ],
6469
+ EE: ["H", "hB"],
6470
+ EG: [
6471
+ "h",
6472
+ "hB",
6473
+ "hb",
6474
+ "H"
6475
+ ],
6476
+ EH: [
6477
+ "h",
6478
+ "hB",
6479
+ "hb",
6480
+ "H"
6481
+ ],
6482
+ ER: ["h", "H"],
6483
+ ES: [
6484
+ "H",
6485
+ "hB",
6486
+ "h",
6487
+ "hb"
6488
+ ],
6489
+ ET: [
6490
+ "hB",
6491
+ "hb",
6492
+ "h",
6493
+ "H"
6494
+ ],
6495
+ FI: ["H"],
6496
+ FJ: [
6497
+ "h",
6498
+ "hb",
6499
+ "H",
6500
+ "hB"
6501
+ ],
6502
+ FK: [
6503
+ "H",
6504
+ "h",
6505
+ "hb",
6506
+ "hB"
6507
+ ],
6508
+ FM: [
6509
+ "h",
6510
+ "hb",
6511
+ "H",
6512
+ "hB"
6513
+ ],
6514
+ FO: ["H", "h"],
6515
+ FR: ["H", "hB"],
6516
+ GA: ["H", "hB"],
6517
+ GB: [
6518
+ "H",
6519
+ "h",
6520
+ "hb",
6521
+ "hB"
6522
+ ],
6523
+ GD: [
6524
+ "h",
6525
+ "hb",
6526
+ "H",
6527
+ "hB"
6528
+ ],
6529
+ GE: [
6530
+ "H",
6531
+ "hB",
6532
+ "h"
6533
+ ],
6534
+ GF: ["H", "hB"],
6535
+ GG: [
6536
+ "H",
6537
+ "h",
6538
+ "hb",
6539
+ "hB"
6540
+ ],
6541
+ GH: ["h", "H"],
6542
+ GI: [
6543
+ "H",
6544
+ "h",
6545
+ "hb",
6546
+ "hB"
6547
+ ],
6548
+ GL: ["H", "h"],
6549
+ GM: [
6550
+ "h",
6551
+ "hb",
6552
+ "H",
6553
+ "hB"
6554
+ ],
6555
+ GN: ["H", "hB"],
6556
+ GP: ["H", "hB"],
6557
+ GQ: [
6558
+ "H",
6559
+ "hB",
6560
+ "h",
6561
+ "hb"
6562
+ ],
6563
+ GR: [
6564
+ "h",
6565
+ "H",
6566
+ "hb",
6567
+ "hB"
6568
+ ],
6569
+ GS: [
6570
+ "H",
6571
+ "h",
6572
+ "hb",
6573
+ "hB"
6574
+ ],
6575
+ GT: [
6576
+ "h",
6577
+ "H",
6578
+ "hB",
6579
+ "hb"
6580
+ ],
6581
+ GU: [
6582
+ "h",
6583
+ "hb",
6584
+ "H",
6585
+ "hB"
6586
+ ],
6587
+ GW: ["H", "hB"],
6588
+ GY: [
6589
+ "h",
6590
+ "hb",
6591
+ "H",
6592
+ "hB"
6593
+ ],
6594
+ HK: [
6595
+ "h",
6596
+ "hB",
6597
+ "hb",
6598
+ "H"
6599
+ ],
6600
+ HN: [
6601
+ "h",
6602
+ "H",
6603
+ "hB",
6604
+ "hb"
6605
+ ],
6606
+ HR: ["H", "hB"],
6607
+ HU: ["H", "h"],
6608
+ IC: [
6609
+ "H",
6610
+ "h",
6611
+ "hB",
6612
+ "hb"
6613
+ ],
6614
+ ID: ["H"],
6615
+ IE: [
6616
+ "H",
6617
+ "h",
6618
+ "hb",
6619
+ "hB"
6620
+ ],
6621
+ IL: ["H", "hB"],
6622
+ IM: [
6623
+ "H",
6624
+ "h",
6625
+ "hb",
6626
+ "hB"
6627
+ ],
6628
+ IN: ["h", "H"],
6629
+ IO: [
6630
+ "H",
6631
+ "h",
6632
+ "hb",
6633
+ "hB"
6634
+ ],
6635
+ IQ: [
6636
+ "h",
6637
+ "hB",
6638
+ "hb",
6639
+ "H"
6640
+ ],
6641
+ IR: ["hB", "H"],
6642
+ IS: ["H"],
6643
+ IT: ["H", "hB"],
6644
+ JE: [
6645
+ "H",
6646
+ "h",
6647
+ "hb",
6648
+ "hB"
6649
+ ],
6650
+ JM: [
6651
+ "h",
6652
+ "hb",
6653
+ "H",
6654
+ "hB"
6655
+ ],
6656
+ JO: [
6657
+ "h",
6658
+ "hB",
6659
+ "hb",
6660
+ "H"
6661
+ ],
6662
+ JP: [
6663
+ "H",
6664
+ "K",
6665
+ "h"
6666
+ ],
6667
+ KE: [
6668
+ "hB",
6669
+ "hb",
6670
+ "H",
6671
+ "h"
6672
+ ],
6673
+ KG: [
6674
+ "H",
6675
+ "h",
6676
+ "hB",
6677
+ "hb"
6678
+ ],
6679
+ KH: [
6680
+ "hB",
6681
+ "h",
6682
+ "H",
6683
+ "hb"
6684
+ ],
6685
+ KI: [
6686
+ "h",
6687
+ "hb",
6688
+ "H",
6689
+ "hB"
6690
+ ],
6691
+ KM: [
6692
+ "H",
6693
+ "h",
6694
+ "hB",
6695
+ "hb"
6696
+ ],
6697
+ KN: [
6698
+ "h",
6699
+ "hb",
6700
+ "H",
6701
+ "hB"
6702
+ ],
6703
+ KP: [
6704
+ "h",
6705
+ "H",
6706
+ "hB",
6707
+ "hb"
6708
+ ],
6709
+ KR: [
6710
+ "h",
6711
+ "H",
6712
+ "hB",
6713
+ "hb"
6714
+ ],
6715
+ KW: [
6716
+ "h",
6717
+ "hB",
6718
+ "hb",
6719
+ "H"
6720
+ ],
6721
+ KY: [
6722
+ "h",
6723
+ "hb",
6724
+ "H",
6725
+ "hB"
6726
+ ],
6727
+ KZ: ["H", "hB"],
6728
+ LA: [
6729
+ "H",
6730
+ "hb",
6731
+ "hB",
6732
+ "h"
6733
+ ],
6734
+ LB: [
6735
+ "h",
6736
+ "hB",
6737
+ "hb",
6738
+ "H"
6739
+ ],
6740
+ LC: [
6741
+ "h",
6742
+ "hb",
6743
+ "H",
6744
+ "hB"
6745
+ ],
6746
+ LI: [
6747
+ "H",
6748
+ "hB",
6749
+ "h"
6750
+ ],
6751
+ LK: [
6752
+ "H",
6753
+ "h",
6754
+ "hB",
6755
+ "hb"
6756
+ ],
6757
+ LR: [
6758
+ "h",
6759
+ "hb",
6760
+ "H",
6761
+ "hB"
6762
+ ],
6763
+ LS: ["h", "H"],
6764
+ LT: [
6765
+ "H",
6766
+ "h",
6767
+ "hb",
6768
+ "hB"
6769
+ ],
6770
+ LU: [
6771
+ "H",
6772
+ "h",
6773
+ "hB"
6774
+ ],
6775
+ LV: [
6776
+ "H",
6777
+ "hB",
6778
+ "hb",
6779
+ "h"
6780
+ ],
6781
+ LY: [
6782
+ "h",
6783
+ "hB",
6784
+ "hb",
6785
+ "H"
6786
+ ],
6787
+ MA: [
6788
+ "H",
6789
+ "h",
6790
+ "hB",
6791
+ "hb"
6792
+ ],
6793
+ MC: ["H", "hB"],
6794
+ MD: ["H", "hB"],
6795
+ ME: [
6796
+ "H",
6797
+ "hB",
6798
+ "h"
6799
+ ],
6800
+ MF: ["H", "hB"],
6801
+ MG: ["H", "h"],
6802
+ MH: [
6803
+ "h",
6804
+ "hb",
6805
+ "H",
6806
+ "hB"
6807
+ ],
6808
+ MK: [
6809
+ "H",
6810
+ "h",
6811
+ "hb",
6812
+ "hB"
6813
+ ],
6814
+ ML: ["H"],
6815
+ MM: [
6816
+ "hB",
6817
+ "hb",
6818
+ "H",
6819
+ "h"
6820
+ ],
6821
+ MN: [
6822
+ "H",
6823
+ "h",
6824
+ "hb",
6825
+ "hB"
6826
+ ],
6827
+ MO: [
6828
+ "h",
6829
+ "hB",
6830
+ "hb",
6831
+ "H"
6832
+ ],
6833
+ MP: [
6834
+ "h",
6835
+ "hb",
6836
+ "H",
6837
+ "hB"
6838
+ ],
6839
+ MQ: ["H", "hB"],
6840
+ MR: [
6841
+ "h",
6842
+ "hB",
6843
+ "hb",
6844
+ "H"
6845
+ ],
6846
+ MS: [
6847
+ "H",
6848
+ "h",
6849
+ "hb",
6850
+ "hB"
6851
+ ],
6852
+ MT: ["H", "h"],
6853
+ MU: ["H", "h"],
6854
+ MV: ["H", "h"],
6855
+ MW: [
6856
+ "h",
6857
+ "hb",
6858
+ "H",
6859
+ "hB"
6860
+ ],
6861
+ MX: [
6862
+ "h",
6863
+ "H",
6864
+ "hB",
6865
+ "hb"
6866
+ ],
6867
+ MY: [
6868
+ "hb",
6869
+ "hB",
6870
+ "h",
6871
+ "H"
6872
+ ],
6873
+ MZ: ["H", "hB"],
6874
+ NA: [
6875
+ "h",
6876
+ "H",
6877
+ "hB",
6878
+ "hb"
6879
+ ],
6880
+ NC: ["H", "hB"],
6881
+ NE: ["H"],
6882
+ NF: [
6883
+ "H",
6884
+ "h",
6885
+ "hb",
6886
+ "hB"
6887
+ ],
6888
+ NG: [
6889
+ "H",
6890
+ "h",
6891
+ "hb",
6892
+ "hB"
6893
+ ],
6894
+ NI: [
6895
+ "h",
6896
+ "H",
6897
+ "hB",
6898
+ "hb"
6899
+ ],
6900
+ NL: ["H", "hB"],
6901
+ NO: ["H", "h"],
6902
+ NP: [
6903
+ "H",
6904
+ "h",
6905
+ "hB"
6906
+ ],
6907
+ NR: [
6908
+ "H",
6909
+ "h",
6910
+ "hb",
6911
+ "hB"
6912
+ ],
6913
+ NU: [
6914
+ "H",
6915
+ "h",
6916
+ "hb",
6917
+ "hB"
6918
+ ],
6919
+ NZ: [
6920
+ "h",
6921
+ "hb",
6922
+ "H",
6923
+ "hB"
6924
+ ],
6925
+ OM: [
6926
+ "h",
6927
+ "hB",
6928
+ "hb",
6929
+ "H"
6930
+ ],
6931
+ PA: [
6932
+ "h",
6933
+ "H",
6934
+ "hB",
6935
+ "hb"
6936
+ ],
6937
+ PE: [
6938
+ "h",
6939
+ "H",
6940
+ "hB",
6941
+ "hb"
6942
+ ],
6943
+ PF: [
6944
+ "H",
6945
+ "h",
6946
+ "hB"
6947
+ ],
6948
+ PG: ["h", "H"],
6949
+ PH: [
6950
+ "h",
6951
+ "hB",
6952
+ "hb",
6953
+ "H"
6954
+ ],
6955
+ PK: [
6956
+ "h",
6957
+ "hB",
6958
+ "H"
6959
+ ],
6960
+ PL: ["H", "h"],
6961
+ PM: ["H", "hB"],
6962
+ PN: [
6963
+ "H",
6964
+ "h",
6965
+ "hb",
6966
+ "hB"
6967
+ ],
6968
+ PR: [
6969
+ "h",
6970
+ "H",
6971
+ "hB",
6972
+ "hb"
6973
+ ],
6974
+ PS: [
6975
+ "h",
6976
+ "hB",
6977
+ "hb",
6978
+ "H"
6979
+ ],
6980
+ PT: ["H", "hB"],
6981
+ PW: ["h", "H"],
6982
+ PY: [
6983
+ "h",
6984
+ "H",
6985
+ "hB",
6986
+ "hb"
6987
+ ],
6988
+ QA: [
6989
+ "h",
6990
+ "hB",
6991
+ "hb",
6992
+ "H"
6993
+ ],
6994
+ RE: ["H", "hB"],
6995
+ RO: ["H", "hB"],
6996
+ RS: [
6997
+ "H",
6998
+ "hB",
6999
+ "h"
7000
+ ],
7001
+ RU: ["H"],
7002
+ RW: ["H", "h"],
7003
+ SA: [
7004
+ "h",
7005
+ "hB",
7006
+ "hb",
7007
+ "H"
7008
+ ],
7009
+ SB: [
7010
+ "h",
7011
+ "hb",
7012
+ "H",
7013
+ "hB"
7014
+ ],
7015
+ SC: [
7016
+ "H",
7017
+ "h",
7018
+ "hB"
7019
+ ],
7020
+ SD: [
7021
+ "h",
7022
+ "hB",
7023
+ "hb",
7024
+ "H"
7025
+ ],
7026
+ SE: ["H"],
7027
+ SG: [
7028
+ "h",
7029
+ "hb",
7030
+ "H",
7031
+ "hB"
7032
+ ],
7033
+ SH: [
7034
+ "H",
7035
+ "h",
7036
+ "hb",
7037
+ "hB"
7038
+ ],
7039
+ SI: ["H", "hB"],
7040
+ SJ: ["H"],
7041
+ SK: ["H"],
7042
+ SL: [
7043
+ "h",
7044
+ "hb",
7045
+ "H",
7046
+ "hB"
7047
+ ],
7048
+ SM: [
7049
+ "H",
7050
+ "h",
7051
+ "hB"
7052
+ ],
7053
+ SN: [
7054
+ "H",
7055
+ "h",
7056
+ "hB"
7057
+ ],
7058
+ SO: ["h", "H"],
7059
+ SR: ["H", "hB"],
7060
+ SS: [
7061
+ "h",
7062
+ "hb",
7063
+ "H",
7064
+ "hB"
7065
+ ],
7066
+ ST: ["H", "hB"],
7067
+ SV: [
7068
+ "h",
7069
+ "H",
7070
+ "hB",
7071
+ "hb"
7072
+ ],
7073
+ SX: [
7074
+ "H",
7075
+ "h",
7076
+ "hb",
7077
+ "hB"
7078
+ ],
7079
+ SY: [
7080
+ "h",
7081
+ "hB",
7082
+ "hb",
7083
+ "H"
7084
+ ],
7085
+ SZ: [
7086
+ "h",
7087
+ "hb",
7088
+ "H",
7089
+ "hB"
7090
+ ],
7091
+ TA: [
7092
+ "H",
7093
+ "h",
7094
+ "hb",
7095
+ "hB"
7096
+ ],
7097
+ TC: [
7098
+ "h",
7099
+ "hb",
7100
+ "H",
7101
+ "hB"
7102
+ ],
7103
+ TD: [
7104
+ "h",
7105
+ "H",
7106
+ "hB"
7107
+ ],
7108
+ TF: [
7109
+ "H",
7110
+ "h",
7111
+ "hB"
7112
+ ],
7113
+ TG: ["H", "hB"],
7114
+ TH: ["H", "h"],
7115
+ TJ: ["H", "h"],
7116
+ TL: [
7117
+ "H",
7118
+ "hB",
7119
+ "hb",
7120
+ "h"
7121
+ ],
7122
+ TM: ["H", "h"],
7123
+ TN: [
7124
+ "h",
7125
+ "hB",
7126
+ "hb",
7127
+ "H"
7128
+ ],
7129
+ TO: ["h", "H"],
7130
+ TR: ["H", "hB"],
7131
+ TT: [
7132
+ "h",
7133
+ "hb",
7134
+ "H",
7135
+ "hB"
7136
+ ],
7137
+ TW: [
7138
+ "hB",
7139
+ "hb",
7140
+ "h",
7141
+ "H"
7142
+ ],
7143
+ TZ: [
7144
+ "hB",
7145
+ "hb",
7146
+ "H",
7147
+ "h"
7148
+ ],
7149
+ UA: [
7150
+ "H",
7151
+ "hB",
7152
+ "h"
7153
+ ],
7154
+ UG: [
7155
+ "hB",
7156
+ "hb",
7157
+ "H",
7158
+ "h"
7159
+ ],
7160
+ UM: [
7161
+ "h",
7162
+ "hb",
7163
+ "H",
7164
+ "hB"
7165
+ ],
7166
+ US: [
7167
+ "h",
7168
+ "hb",
7169
+ "H",
7170
+ "hB"
7171
+ ],
7172
+ UY: [
7173
+ "h",
7174
+ "H",
7175
+ "hB",
7176
+ "hb"
7177
+ ],
7178
+ UZ: [
7179
+ "H",
7180
+ "hB",
7181
+ "h"
7182
+ ],
7183
+ VA: [
7184
+ "H",
7185
+ "h",
7186
+ "hB"
7187
+ ],
7188
+ VC: [
7189
+ "h",
7190
+ "hb",
7191
+ "H",
7192
+ "hB"
7193
+ ],
7194
+ VE: [
7195
+ "h",
7196
+ "H",
7197
+ "hB",
7198
+ "hb"
7199
+ ],
7200
+ VG: [
7201
+ "h",
7202
+ "hb",
7203
+ "H",
7204
+ "hB"
7205
+ ],
7206
+ VI: [
7207
+ "h",
7208
+ "hb",
7209
+ "H",
7210
+ "hB"
7211
+ ],
7212
+ VN: ["H", "h"],
7213
+ VU: ["h", "H"],
7214
+ WF: ["H", "hB"],
7215
+ WS: ["h", "H"],
7216
+ XK: [
7217
+ "H",
7218
+ "hB",
7219
+ "h"
7220
+ ],
7221
+ YE: [
7222
+ "h",
7223
+ "hB",
7224
+ "hb",
7225
+ "H"
7226
+ ],
7227
+ YT: ["H", "hB"],
7228
+ ZA: [
7229
+ "H",
7230
+ "h",
7231
+ "hb",
7232
+ "hB"
7233
+ ],
7234
+ ZM: [
7235
+ "h",
7236
+ "hb",
7237
+ "H",
7238
+ "hB"
7239
+ ],
7240
+ ZW: ["H", "h"],
7241
+ "af-ZA": [
7242
+ "H",
7243
+ "h",
7244
+ "hB",
7245
+ "hb"
7246
+ ],
7247
+ "ar-001": [
7248
+ "h",
7249
+ "hB",
7250
+ "hb",
7251
+ "H"
7252
+ ],
7253
+ "ca-ES": [
7254
+ "H",
7255
+ "h",
7256
+ "hB"
7257
+ ],
7258
+ "en-001": [
7259
+ "h",
7260
+ "hb",
7261
+ "H",
7262
+ "hB"
7263
+ ],
7264
+ "en-HK": [
7265
+ "h",
7266
+ "hb",
7267
+ "H",
7268
+ "hB"
7269
+ ],
7270
+ "en-IL": [
7271
+ "H",
7272
+ "h",
7273
+ "hb",
7274
+ "hB"
7275
+ ],
7276
+ "en-MY": [
7277
+ "h",
7278
+ "hb",
7279
+ "H",
7280
+ "hB"
7281
+ ],
7282
+ "es-BR": [
7283
+ "H",
7284
+ "h",
7285
+ "hB",
7286
+ "hb"
7287
+ ],
7288
+ "es-ES": [
7289
+ "H",
7290
+ "h",
7291
+ "hB",
7292
+ "hb"
7293
+ ],
7294
+ "es-GQ": [
7295
+ "H",
7296
+ "h",
7297
+ "hB",
7298
+ "hb"
7299
+ ],
7300
+ "fr-CA": [
7301
+ "H",
7302
+ "h",
7303
+ "hB"
7304
+ ],
7305
+ "gl-ES": [
7306
+ "H",
7307
+ "h",
7308
+ "hB"
7309
+ ],
7310
+ "gu-IN": [
7311
+ "hB",
7312
+ "hb",
7313
+ "h",
7314
+ "H"
7315
+ ],
7316
+ "hi-IN": [
7317
+ "hB",
7318
+ "h",
7319
+ "H"
7320
+ ],
7321
+ "it-CH": [
7322
+ "H",
7323
+ "h",
7324
+ "hB"
7325
+ ],
7326
+ "it-IT": [
7327
+ "H",
7328
+ "h",
7329
+ "hB"
7330
+ ],
7331
+ "kn-IN": [
7332
+ "hB",
7333
+ "h",
7334
+ "H"
7335
+ ],
7336
+ "ku-SY": ["H", "hB"],
7337
+ "ml-IN": [
7338
+ "hB",
7339
+ "h",
7340
+ "H"
7341
+ ],
7342
+ "mr-IN": [
7343
+ "hB",
7344
+ "hb",
7345
+ "h",
7346
+ "H"
7347
+ ],
7348
+ "pa-IN": [
7349
+ "hB",
7350
+ "hb",
7351
+ "h",
7352
+ "H"
7353
+ ],
7354
+ "ta-IN": [
7355
+ "hB",
7356
+ "h",
7357
+ "hb",
7358
+ "H"
7359
+ ],
7360
+ "te-IN": [
7361
+ "hB",
7362
+ "h",
7363
+ "H"
7364
+ ],
7365
+ "zu-ZA": [
7366
+ "H",
7367
+ "hB",
7368
+ "hb",
7369
+ "h"
7370
+ ]
7371
+ };
7372
+ function he(e, t) {
7373
+ let n = "";
7374
+ for (let r = 0; r < e.length; r++) {
7375
+ let i = e.charAt(r);
7376
+ if (i === "j") {
7377
+ let a = 0;
7378
+ for (; r + 1 < e.length && e.charAt(r + 1) === i;) a++, r++;
7379
+ let o = 1 + (a & 1), s = a < 2 ? 1 : 3 + (a >> 1), c = ge(t);
7380
+ for ((c == "H" || c == "k") && (s = 0); s-- > 0;) n += "a";
7381
+ for (; o-- > 0;) n = c + n;
7382
+ } else i === "J" ? n += "H" : n += i;
7383
+ }
7384
+ return n;
7385
+ }
7386
+ function ge(e) {
7387
+ let t = e.hourCycle;
7388
+ if (t === void 0 && e.hourCycles && e.hourCycles.length && (t = e.hourCycles[0]), t) switch (t) {
7389
+ case "h24": return "k";
7390
+ case "h23": return "H";
7391
+ case "h12": return "h";
7392
+ case "h11": return "K";
7393
+ default: throw Error("Invalid hourCycle");
7394
+ }
7395
+ let n = e.language, r;
7396
+ return n !== "root" && (r = e.maximize().region), (M[r || ""] || M[n || ""] || M[`${n}-001`] || M["001"])[0];
7397
+ }
7398
+ var N = RegExp(`^${j.source}*`), P = RegExp(`${j.source}*$`);
7399
+ function F(e, t) {
7400
+ return {
7401
+ start: e,
7402
+ end: t
7403
+ };
7404
+ }
7405
+ var I = !!Object.fromEntries, L = !!String.prototype.trimStart, _e = !!String.prototype.trimEnd, R = I ? Object.fromEntries : function(e) {
7406
+ let t = {};
7407
+ for (let [n, r] of e) t[n] = r;
7408
+ return t;
7409
+ }, ve = L ? function(e) {
7410
+ return e.trimStart();
7411
+ } : function(e) {
7412
+ return e.replace(N, "");
7413
+ }, ye = _e ? function(e) {
7414
+ return e.trimEnd();
7415
+ } : function(e) {
7416
+ return e.replace(P, "");
7417
+ }, z = /* @__PURE__ */ RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
7418
+ function be(e, t) {
7419
+ return z.lastIndex = t, z.exec(e)[1] ?? "";
7420
+ }
7421
+ function xe(e) {
7422
+ if (e.length === 0) return null;
7423
+ let t = 1, n = 1;
7424
+ for (let r = 0; r < e.length;) {
7425
+ let i = e.charCodeAt(r);
7426
+ switch (i) {
7427
+ case 35:
7428
+ case 39:
7429
+ case 60:
7430
+ case 123:
7431
+ case 125: return null;
7432
+ }
7433
+ if (i === 10) t++, n = 1, r++;
7434
+ else if (n++, i >= 55296 && i <= 56319 && r + 1 < e.length) {
7435
+ let t = e.charCodeAt(r + 1);
7436
+ r += t >= 56320 && t <= 57343 ? 2 : 1;
7437
+ } else r++;
7438
+ }
7439
+ return {
7440
+ offset: e.length,
7441
+ line: t,
7442
+ column: n
7443
+ };
7444
+ }
7445
+ var Se = class {
7446
+ constructor(e, t = {}) {
7447
+ this.message = e, this.position = {
7448
+ offset: 0,
7449
+ line: 1,
7450
+ column: 1
7451
+ }, this.ignoreTag = !!t.ignoreTag, this.locale = t.locale, this.requiresOtherClause = !!t.requiresOtherClause, this.shouldParseSkeletons = !!t.shouldParseSkeletons;
7452
+ }
7453
+ parse() {
7454
+ if (this.offset() !== 0) throw Error("parser can only be used once");
7455
+ if (this.message.length > 0) {
7456
+ let e = this.message.charCodeAt(0);
7457
+ if (e !== 35 && e !== 39 && e !== 60 && e !== 123 && e !== 125) {
7458
+ let e = xe(this.message);
7459
+ if (e) {
7460
+ let t = this.clonePosition();
7461
+ return this.position = e, {
7462
+ val: [{
7463
+ type: 0,
7464
+ value: this.message,
7465
+ location: F(t, this.clonePosition())
7466
+ }],
7467
+ err: null
7468
+ };
7469
+ }
7470
+ }
7471
+ }
7472
+ return this.parseMessage(0, "", !1);
7473
+ }
7474
+ parseMessage(e, t, n) {
7475
+ let r = [];
7476
+ for (; !this.isEOF();) {
7477
+ let i = this.char();
7478
+ if (i === 123) {
7479
+ let t = this.parseArgument(e, n);
7480
+ if (t.err) return t;
7481
+ r.push(t.val);
7482
+ } else if (i === 125 && e > 0) break;
7483
+ else if (i === 35 && (t === "plural" || t === "selectordinal")) {
7484
+ let e = this.clonePosition();
7485
+ this.bump(), r.push({
7486
+ type: 7,
7487
+ location: F(e, this.clonePosition())
7488
+ });
7489
+ } else if (i === 60 && !this.ignoreTag && this.peek() === 47) {
7490
+ if (n) break;
7491
+ return this.error(26, F(this.clonePosition(), this.clonePosition()));
7492
+ } else if (i === 60 && !this.ignoreTag && B(this.peek() || 0)) {
7493
+ let n = this.parseTag(e, t);
7494
+ if (n.err) return n;
7495
+ r.push(n.val);
7496
+ } else {
7497
+ let n = this.parseLiteral(e, t);
7498
+ if (n.err) return n;
7499
+ r.push(n.val);
7500
+ }
7501
+ }
7502
+ return {
7503
+ val: r,
7504
+ err: null
7505
+ };
7506
+ }
7507
+ parseTag(e, t) {
7508
+ let n = this.clonePosition();
7509
+ this.bump();
7510
+ let r = this.parseTagName();
7511
+ if (this.bumpSpace(), this.bumpIf("/>")) return {
7512
+ val: {
7513
+ type: 0,
7514
+ value: `<${r}/>`,
7515
+ location: F(n, this.clonePosition())
7516
+ },
7517
+ err: null
7518
+ };
7519
+ if (this.bumpIf(">")) {
7520
+ let i = this.parseMessage(e + 1, t, !0);
7521
+ if (i.err) return i;
7522
+ let a = i.val, o = this.clonePosition();
7523
+ if (this.bumpIf("</")) {
7524
+ if (this.isEOF() || !B(this.char())) return this.error(23, F(o, this.clonePosition()));
7525
+ let e = this.clonePosition();
7526
+ return r === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(">") ? {
7527
+ val: {
7528
+ type: 8,
7529
+ value: r,
7530
+ children: a,
7531
+ location: F(n, this.clonePosition())
7532
+ },
7533
+ err: null
7534
+ } : this.error(23, F(o, this.clonePosition()))) : this.error(26, F(e, this.clonePosition()));
7535
+ } else return this.error(27, F(n, this.clonePosition()));
7536
+ } else return this.error(23, F(n, this.clonePosition()));
7537
+ }
7538
+ parseTagName() {
7539
+ let e = this.offset();
7540
+ for (this.bump(); !this.isEOF() && we(this.char());) this.bump();
7541
+ return this.message.slice(e, this.offset());
7542
+ }
7543
+ parseLiteral(e, t) {
7544
+ let n = this.clonePosition(), r = "";
7545
+ for (;;) {
7546
+ let n = this.tryParseQuote(t);
7547
+ if (n) {
7548
+ r += n;
7549
+ continue;
7550
+ }
7551
+ let i = this.tryParseUnquoted(e, t);
7552
+ if (i) {
7553
+ r += i;
7554
+ continue;
7555
+ }
7556
+ let a = this.tryParseLeftAngleBracket();
7557
+ if (a) {
7558
+ r += a;
7559
+ continue;
7560
+ }
7561
+ break;
7562
+ }
7563
+ let i = F(n, this.clonePosition());
7564
+ return {
7565
+ val: {
7566
+ type: 0,
7567
+ value: r,
7568
+ location: i
7569
+ },
7570
+ err: null
7571
+ };
7572
+ }
7573
+ tryParseLeftAngleBracket() {
7574
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Ce(this.peek() || 0)) ? (this.bump(), "<") : null;
7575
+ }
7576
+ tryParseQuote(e) {
7577
+ if (this.isEOF() || this.char() !== 39) return null;
7578
+ switch (this.peek()) {
7579
+ case 39: return this.bump(), this.bump(), "'";
7580
+ case 123:
7581
+ case 60:
7582
+ case 62:
7583
+ case 125: break;
7584
+ case 35:
7585
+ if (e === "plural" || e === "selectordinal") break;
7586
+ return null;
7587
+ default: return null;
7588
+ }
7589
+ this.bump();
7590
+ let t = [this.char()];
7591
+ for (this.bump(); !this.isEOF();) {
7592
+ let e = this.char();
7593
+ if (e === 39) if (this.peek() === 39) t.push(39), this.bump();
7594
+ else {
7595
+ this.bump();
7596
+ break;
7597
+ }
7598
+ else t.push(e);
7599
+ this.bump();
7600
+ }
7601
+ return String.fromCodePoint(...t);
7602
+ }
7603
+ tryParseUnquoted(e, t) {
7604
+ if (this.isEOF()) return null;
7605
+ let n = this.char();
7606
+ return n === 60 || n === 123 || n === 35 && (t === "plural" || t === "selectordinal") || n === 125 && e > 0 ? null : (this.bump(), String.fromCodePoint(n));
7607
+ }
7608
+ parseArgument(e, t) {
7609
+ let n = this.clonePosition();
7610
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, F(n, this.clonePosition()));
7611
+ if (this.char() === 125) return this.bump(), this.error(2, F(n, this.clonePosition()));
7612
+ let r = this.parseIdentifierIfPossible().value;
7613
+ if (!r) return this.error(3, F(n, this.clonePosition()));
7614
+ if (this.bumpSpace(), this.isEOF()) return this.error(1, F(n, this.clonePosition()));
7615
+ switch (this.char()) {
7616
+ case 125: return this.bump(), {
7617
+ val: {
7618
+ type: 1,
7619
+ value: r,
7620
+ location: F(n, this.clonePosition())
7621
+ },
7622
+ err: null
7623
+ };
7624
+ case 44: return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, F(n, this.clonePosition())) : this.parseArgumentOptions(e, t, r, n);
7625
+ default: return this.error(3, F(n, this.clonePosition()));
7626
+ }
7627
+ }
7628
+ parseIdentifierIfPossible() {
7629
+ let e = this.clonePosition(), t = this.offset(), n = be(this.message, t), r = t + n.length;
7630
+ return this.bumpTo(r), {
7631
+ value: n,
7632
+ location: F(e, this.clonePosition())
7633
+ };
7634
+ }
7635
+ parseArgumentOptions(e, t, n, r) {
7636
+ let i = this.clonePosition(), a = this.parseIdentifierIfPossible().value, o = this.clonePosition();
7637
+ switch (a) {
7638
+ case "": return this.error(4, F(i, o));
7639
+ case "number":
7640
+ case "date":
7641
+ case "time": {
7642
+ this.bumpSpace();
7643
+ let e = null;
7644
+ if (this.bumpIf(",")) {
7645
+ this.bumpSpace();
7646
+ let t = this.clonePosition(), n = this.parseSimpleArgStyleIfPossible();
7647
+ if (n.err) return n;
7648
+ let r = ye(n.val);
7649
+ if (r.length === 0) return this.error(6, F(this.clonePosition(), this.clonePosition()));
7650
+ e = {
7651
+ style: r,
7652
+ styleLocation: F(t, this.clonePosition())
7653
+ };
7654
+ }
7655
+ let t = this.tryParseArgumentClose(r);
7656
+ if (t.err) return t;
7657
+ let i = F(r, this.clonePosition());
7658
+ if (e && e.style.startsWith("::")) {
7659
+ let t = ve(e.style.slice(2));
7660
+ if (a === "number") {
7661
+ let r = this.parseNumberSkeletonFromString(t, e.styleLocation);
7662
+ return r.err ? r : {
7663
+ val: {
7664
+ type: 2,
7665
+ value: n,
7666
+ location: i,
7667
+ style: r.val
7668
+ },
7669
+ err: null
7670
+ };
7671
+ } else {
7672
+ if (t.length === 0) return this.error(10, i);
7673
+ let r = t;
7674
+ this.locale && (r = he(t, this.locale));
7675
+ let o = {
7676
+ type: 1,
7677
+ pattern: r,
7678
+ location: e.styleLocation,
7679
+ parsedOptions: this.shouldParseSkeletons ? ae(r) : {}
7680
+ };
7681
+ return {
7682
+ val: {
7683
+ type: a === "date" ? 3 : 4,
7684
+ value: n,
7685
+ location: i,
7686
+ style: o
7687
+ },
7688
+ err: null
7689
+ };
7690
+ }
7691
+ }
7692
+ return {
7693
+ val: {
7694
+ type: a === "number" ? 2 : a === "date" ? 3 : 4,
7695
+ value: n,
7696
+ location: i,
7697
+ style: e?.style ?? null
7698
+ },
7699
+ err: null
7700
+ };
7701
+ }
7702
+ case "plural":
7703
+ case "selectordinal":
7704
+ case "select": {
7705
+ let i = this.clonePosition();
7706
+ if (this.bumpSpace(), !this.bumpIf(",")) return this.error(12, F(i, { ...i }));
7707
+ this.bumpSpace();
7708
+ let o = this.parseIdentifierIfPossible(), s = 0;
7709
+ if (a !== "select" && o.value === "offset") {
7710
+ if (!this.bumpIf(":")) return this.error(13, F(this.clonePosition(), this.clonePosition()));
7711
+ this.bumpSpace();
7712
+ let e = this.tryParseDecimalInteger(13, 14);
7713
+ if (e.err) return e;
7714
+ this.bumpSpace(), o = this.parseIdentifierIfPossible(), s = e.val;
7715
+ }
7716
+ let c = this.tryParsePluralOrSelectOptions(e, a, t, o);
7717
+ if (c.err) return c;
7718
+ let l = this.tryParseArgumentClose(r);
7719
+ if (l.err) return l;
7720
+ let u = F(r, this.clonePosition());
7721
+ return a === "select" ? {
7722
+ val: {
7723
+ type: 5,
7724
+ value: n,
7725
+ options: R(c.val),
7726
+ location: u
7727
+ },
7728
+ err: null
7729
+ } : {
7730
+ val: {
7731
+ type: 6,
7732
+ value: n,
7733
+ options: R(c.val),
7734
+ offset: s,
7735
+ pluralType: a === "plural" ? "cardinal" : "ordinal",
7736
+ location: u
7737
+ },
7738
+ err: null
7739
+ };
7740
+ }
7741
+ default: return this.error(5, F(i, o));
7742
+ }
7743
+ }
7744
+ tryParseArgumentClose(e) {
7745
+ return this.isEOF() || this.char() !== 125 ? this.error(1, F(e, this.clonePosition())) : (this.bump(), {
7746
+ val: !0,
7747
+ err: null
7748
+ });
7749
+ }
7750
+ parseSimpleArgStyleIfPossible() {
7751
+ let e = 0, t = this.clonePosition();
7752
+ for (; !this.isEOF();) switch (this.char()) {
7753
+ case 39: {
7754
+ this.bump();
7755
+ let e = this.clonePosition();
7756
+ if (!this.bumpUntil("'")) return this.error(11, F(e, this.clonePosition()));
7757
+ this.bump();
7758
+ break;
7759
+ }
7760
+ case 123:
7761
+ e += 1, this.bump();
7762
+ break;
7763
+ case 125:
7764
+ if (e > 0) --e;
7765
+ else return {
7766
+ val: this.message.slice(t.offset, this.offset()),
7767
+ err: null
7768
+ };
7769
+ break;
7770
+ default: this.bump();
7771
+ }
7772
+ return {
7773
+ val: this.message.slice(t.offset, this.offset()),
7774
+ err: null
7775
+ };
7776
+ }
7777
+ parseNumberSkeletonFromString(e, t) {
7778
+ let n = [];
7779
+ try {
7780
+ n = se(e);
7781
+ } catch {
7782
+ return this.error(7, t);
7783
+ }
7784
+ return {
7785
+ val: {
7786
+ type: 0,
7787
+ tokens: n,
7788
+ location: t,
7789
+ parsedOptions: this.shouldParseSkeletons ? de(n) : {}
7790
+ },
7791
+ err: null
7792
+ };
7793
+ }
7794
+ tryParsePluralOrSelectOptions(e, t, n, r) {
7795
+ let i = !1, a = [], o = /* @__PURE__ */ new Set(), { value: s, location: c } = r;
7796
+ for (;;) {
7797
+ if (s.length === 0) {
7798
+ let e = this.clonePosition();
7799
+ if (t !== "select" && this.bumpIf("=")) {
7800
+ let t = this.tryParseDecimalInteger(16, 19);
7801
+ if (t.err) return t;
7802
+ c = F(e, this.clonePosition()), s = this.message.slice(e.offset, this.offset());
7803
+ } else break;
7804
+ }
7805
+ if (o.has(s)) return this.error(t === "select" ? 21 : 20, c);
7806
+ s === "other" && (i = !0), this.bumpSpace();
7807
+ let r = this.clonePosition();
7808
+ if (!this.bumpIf("{")) return this.error(t === "select" ? 17 : 18, F(this.clonePosition(), this.clonePosition()));
7809
+ let l = this.parseMessage(e + 1, t, n);
7810
+ if (l.err) return l;
7811
+ let u = this.tryParseArgumentClose(r);
7812
+ if (u.err) return u;
7813
+ a.push([s, {
7814
+ value: l.val,
7815
+ location: F(r, this.clonePosition())
7816
+ }]), o.add(s), this.bumpSpace(), {value: s, location: c} = this.parseIdentifierIfPossible();
7817
+ }
7818
+ return a.length === 0 ? this.error(t === "select" ? 15 : 16, F(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i ? this.error(22, F(this.clonePosition(), this.clonePosition())) : {
7819
+ val: a,
7820
+ err: null
7821
+ };
7822
+ }
7823
+ tryParseDecimalInteger(e, t) {
7824
+ let n = 1, r = this.clonePosition();
7825
+ this.bumpIf("+") || this.bumpIf("-") && (n = -1);
7826
+ let i = !1, a = 0;
7827
+ for (; !this.isEOF();) {
7828
+ let e = this.char();
7829
+ if (e >= 48 && e <= 57) i = !0, a = a * 10 + (e - 48), this.bump();
7830
+ else break;
7831
+ }
7832
+ let o = F(r, this.clonePosition());
7833
+ return i ? (a *= n, Number.isSafeInteger(a) ? {
7834
+ val: a,
7835
+ err: null
7836
+ } : this.error(t, o)) : this.error(e, o);
7837
+ }
7838
+ offset() {
7839
+ return this.position.offset;
7840
+ }
7841
+ isEOF() {
7842
+ return this.offset() === this.message.length;
7843
+ }
7844
+ clonePosition() {
7845
+ return {
7846
+ offset: this.position.offset,
7847
+ line: this.position.line,
7848
+ column: this.position.column
7849
+ };
7850
+ }
7851
+ char() {
7852
+ let e = this.position.offset;
7853
+ if (e >= this.message.length) throw Error("out of bound");
7854
+ let t = this.message.codePointAt(e);
7855
+ if (t === void 0) throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);
7856
+ return t;
7857
+ }
7858
+ error(e, t) {
7859
+ return {
7860
+ val: null,
7861
+ err: {
7862
+ kind: e,
7863
+ message: this.message,
7864
+ location: t
7865
+ }
7866
+ };
7867
+ }
7868
+ bump() {
7869
+ if (this.isEOF()) return;
7870
+ let e = this.char();
7871
+ e === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e < 65536 ? 1 : 2);
7872
+ }
7873
+ bumpIf(e) {
7874
+ if (this.message.startsWith(e, this.offset())) {
7875
+ for (let t = 0; t < e.length; t++) this.bump();
7876
+ return !0;
7877
+ }
7878
+ return !1;
7879
+ }
7880
+ bumpUntil(e) {
7881
+ let t = this.offset(), n = this.message.indexOf(e, t);
7882
+ return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
7883
+ }
7884
+ bumpTo(e) {
7885
+ if (this.offset() > e) throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);
7886
+ for (e = Math.min(e, this.message.length);;) {
7887
+ let t = this.offset();
7888
+ if (t === e) break;
7889
+ if (t > e) throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);
7890
+ if (this.bump(), this.isEOF()) break;
7891
+ }
7892
+ }
7893
+ bumpSpace() {
7894
+ for (; !this.isEOF() && Te(this.char());) this.bump();
7895
+ }
7896
+ peek() {
7897
+ if (this.isEOF()) return null;
7898
+ let e = this.char(), t = this.offset();
7899
+ return this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)) ?? null;
7900
+ }
7901
+ };
7902
+ function B(e) {
7903
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
7904
+ }
7905
+ function Ce(e) {
7906
+ return B(e) || e === 47;
7907
+ }
7908
+ function we(e) {
7909
+ return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
7910
+ }
7911
+ function Te(e) {
7912
+ return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
7913
+ }
7914
+ function V(e) {
7915
+ e.forEach((e) => {
7916
+ if (delete e.location, E(e) || D(e)) for (let t in e.options) delete e.options[t].location, V(e.options[t].value);
7917
+ else C(e) && k(e.style) || (w(e) || T(e)) && A(e.style) ? delete e.style.location : O(e) && V(e.children);
7918
+ });
7919
+ }
7920
+ function Ee(e, t = {}) {
7921
+ t = {
7922
+ shouldParseSkeletons: !0,
7923
+ requiresOtherClause: !0,
7924
+ ...t
7925
+ };
7926
+ let n = new Se(e, t).parse();
7927
+ if (n.err) {
7928
+ let e = SyntaxError(fe[n.err.kind]);
7929
+ throw e.location = n.err.location, e.originalMessage = n.err.message, e;
7930
+ }
7931
+ return t?.captureLocation || V(n.val), n.val;
7932
+ }
7933
+ //#endregion
7934
+ //#region ../../node_modules/intl-messageformat/index.js
7935
+ var H = /* @__PURE__ */ function(e) {
7936
+ return e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API", e;
7937
+ }({}), U = class extends Error {
7938
+ constructor(e, t, n) {
7939
+ super(e), this.code = t, this.originalMessage = n;
7940
+ }
7941
+ toString() {
7942
+ return `[formatjs Error: ${this.code}] ${this.message}`;
7943
+ }
7944
+ }, W = class extends U {
7945
+ constructor(e, t, n, r) {
7946
+ super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join("\", \"")}"`, "INVALID_VALUE", r);
7947
+ }
7948
+ }, De = class extends U {
7949
+ constructor(e, t, n) {
7950
+ super(`Value for "${e}" must be of type ${t}`, "INVALID_VALUE", n);
7951
+ }
7952
+ }, Oe = class extends U {
7953
+ constructor(e, t) {
7954
+ super(`The intl string context variable "${e}" was not provided to the string "${t}"`, "MISSING_VALUE", t);
7955
+ }
7956
+ };
7957
+ function ke(e) {
7958
+ return e.length < 2 ? e : e.reduce((e, t) => {
7959
+ let n = e[e.length - 1];
7960
+ return !n || n.type !== 0 || t.type !== 0 ? e.push(t) : n.value += t.value, e;
7961
+ }, []);
7962
+ }
7963
+ function Ae(e) {
7964
+ return typeof e == "function";
7965
+ }
7966
+ function G(e, t, n, r, i, a, o) {
7967
+ if (e.length === 1 && S(e[0])) return [{
7968
+ type: 0,
7969
+ value: e[0].value
7970
+ }];
7971
+ let s = [];
7972
+ for (let c of e) {
7973
+ if (S(c)) {
7974
+ s.push({
7975
+ type: 0,
7976
+ value: c.value
7977
+ });
7978
+ continue;
7979
+ }
7980
+ if (me(c)) {
7981
+ typeof a == "number" && s.push({
7982
+ type: 0,
7983
+ value: n.getNumberFormat(t).format(a)
7984
+ });
7985
+ continue;
7986
+ }
7987
+ let { value: e } = c;
7988
+ if (!(i && e in i)) throw new Oe(e, o);
7989
+ let l = i[e];
7990
+ if (pe(c)) {
7991
+ (!l || typeof l == "string" || typeof l == "number" || typeof l == "bigint") && (l = typeof l == "string" || typeof l == "number" || typeof l == "bigint" ? String(l) : ""), s.push({
7992
+ type: typeof l == "string" ? 0 : 1,
7993
+ value: l
7994
+ });
7995
+ continue;
7996
+ }
7997
+ if (w(c)) {
7998
+ let e = typeof c.style == "string" ? r.date[c.style] : A(c.style) ? c.style.parsedOptions : void 0;
7999
+ s.push({
8000
+ type: 0,
8001
+ value: n.getDateTimeFormat(t, e).format(l)
8002
+ });
8003
+ continue;
8004
+ }
8005
+ if (T(c)) {
8006
+ let e = typeof c.style == "string" ? r.time[c.style] : A(c.style) ? c.style.parsedOptions : r.time.medium;
8007
+ s.push({
8008
+ type: 0,
8009
+ value: n.getDateTimeFormat(t, e).format(l)
8010
+ });
8011
+ continue;
8012
+ }
8013
+ if (C(c)) {
8014
+ let e = typeof c.style == "string" ? r.number[c.style] : k(c.style) ? c.style.parsedOptions : void 0;
8015
+ if (e && e.scale) {
8016
+ let t = e.scale || 1;
8017
+ if (typeof l == "bigint") {
8018
+ if (!Number.isInteger(t)) throw TypeError(`Cannot apply fractional scale ${t} to bigint value. Scale must be an integer when formatting bigint.`);
8019
+ l *= BigInt(t);
8020
+ } else l *= t;
8021
+ }
8022
+ s.push({
8023
+ type: 0,
8024
+ value: n.getNumberFormat(t, e).format(l)
8025
+ });
8026
+ continue;
8027
+ }
8028
+ if (O(c)) {
8029
+ let { children: e, value: l } = c, u = i[l];
8030
+ if (!Ae(u)) throw new De(l, "function", o);
8031
+ let d = u(G(e, t, n, r, i, a).map((e) => e.value));
8032
+ Array.isArray(d) || (d = [d]), s.push(...d.map((e) => ({
8033
+ type: typeof e == "string" ? 0 : 1,
8034
+ value: e
8035
+ })));
8036
+ }
8037
+ if (E(c)) {
8038
+ let e = l, a = (Object.prototype.hasOwnProperty.call(c.options, e) ? c.options[e] : void 0) || c.options.other;
8039
+ if (!a) throw new W(c.value, l, Object.keys(c.options), o);
8040
+ s.push(...G(a.value, t, n, r, i));
8041
+ continue;
8042
+ }
8043
+ if (D(c)) {
8044
+ let e = `=${l}`, a = Object.prototype.hasOwnProperty.call(c.options, e) ? c.options[e] : void 0;
8045
+ if (!a) {
8046
+ if (!Intl.PluralRules) throw new U("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n", "MISSING_INTL_API", o);
8047
+ let e = typeof l == "bigint" ? Number(l) : l, r = n.getPluralRules(t, { type: c.pluralType }).select(e - (c.offset || 0));
8048
+ a = (Object.prototype.hasOwnProperty.call(c.options, r) ? c.options[r] : void 0) || c.options.other;
8049
+ }
8050
+ if (!a) throw new W(c.value, l, Object.keys(c.options), o);
8051
+ let u = typeof l == "bigint" ? Number(l) : l;
8052
+ s.push(...G(a.value, t, n, r, i, u - (c.offset || 0)));
8053
+ continue;
8054
+ }
8055
+ }
8056
+ return ke(s);
8057
+ }
8058
+ function je(e, t) {
8059
+ return t ? {
8060
+ ...e,
8061
+ ...t,
8062
+ ...Object.keys(e).reduce((n, r) => (n[r] = {
8063
+ ...e[r],
8064
+ ...t[r]
8065
+ }, n), {})
8066
+ } : e;
8067
+ }
8068
+ function Me(e, t) {
8069
+ return t ? Object.keys(e).reduce((n, r) => (n[r] = je(e[r], t[r]), n), { ...e }) : e;
8070
+ }
8071
+ function K(e) {
8072
+ return { create() {
8073
+ return {
8074
+ get(t) {
8075
+ return e[t];
8076
+ },
8077
+ set(t, n) {
8078
+ e[t] = n;
8079
+ }
8080
+ };
8081
+ } };
8082
+ }
8083
+ function Ne(e = {
8084
+ number: {},
8085
+ dateTime: {},
8086
+ pluralRules: {}
8087
+ }) {
8088
+ return {
8089
+ getNumberFormat: c((...e) => new Intl.NumberFormat(...e), {
8090
+ cache: K(e.number),
8091
+ strategy: h.variadic
8092
+ }),
8093
+ getDateTimeFormat: c((...e) => new Intl.DateTimeFormat(...e), {
8094
+ cache: K(e.dateTime),
8095
+ strategy: h.variadic
8096
+ }),
8097
+ getPluralRules: c((...e) => new Intl.PluralRules(...e), {
8098
+ cache: K(e.pluralRules),
8099
+ strategy: h.variadic
8100
+ })
8101
+ };
8102
+ }
8103
+ var Pe = class e {
8104
+ constructor(t, n = e.defaultLocale, r, i) {
8105
+ if (this.formatterCache = {
8106
+ number: {},
8107
+ dateTime: {},
8108
+ pluralRules: {}
8109
+ }, this.format = (e) => {
8110
+ let t = this.formatToParts(e);
8111
+ if (t.length === 1) return t[0].value;
8112
+ let n = t.reduce((e, t) => (!e.length || t.type !== 0 || typeof e[e.length - 1] != "string" ? e.push(t.value) : e[e.length - 1] += t.value, e), []);
8113
+ return n.length <= 1 ? n[0] || "" : n;
8114
+ }, this.formatToParts = (e) => G(this.ast, this.locales, this.formatters, this.formats, e, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n, this.resolvedLocale = e.resolveLocale(n), typeof t == "string") {
8115
+ if (this.message = t, !e.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
8116
+ let { ...n } = i || {};
8117
+ this.ast = e.__parse(t, {
8118
+ ...n,
8119
+ locale: this.resolvedLocale
8120
+ });
8121
+ } else this.ast = t;
8122
+ if (!Array.isArray(this.ast)) throw TypeError("A message must be provided as a String or AST.");
8123
+ this.formats = Me(e.formats, r), this.formatters = i && i.formatters || Ne(this.formatterCache);
8124
+ }
8125
+ static {
8126
+ this.memoizedDefaultLocale = null;
8127
+ }
8128
+ static get defaultLocale() {
8129
+ return e.memoizedDefaultLocale ||= new Intl.NumberFormat().resolvedOptions().locale, e.memoizedDefaultLocale;
8130
+ }
8131
+ static {
8132
+ this.resolveLocale = (e) => {
8133
+ if (Intl.Locale === void 0) return;
8134
+ let t = Intl.NumberFormat.supportedLocalesOf(e);
8135
+ return t.length > 0 ? new Intl.Locale(t[0]) : new Intl.Locale(typeof e == "string" ? e : e[0]);
8136
+ };
8137
+ }
8138
+ static {
8139
+ this.__parse = Ee;
8140
+ }
8141
+ static {
8142
+ this.formats = {
8143
+ number: {
8144
+ integer: { maximumFractionDigits: 0 },
8145
+ currency: { style: "currency" },
8146
+ percent: { style: "percent" }
8147
+ },
8148
+ date: {
8149
+ short: {
8150
+ month: "numeric",
8151
+ day: "numeric",
8152
+ year: "2-digit"
8153
+ },
8154
+ medium: {
8155
+ month: "short",
8156
+ day: "numeric",
8157
+ year: "numeric"
8158
+ },
8159
+ long: {
8160
+ month: "long",
8161
+ day: "numeric",
8162
+ year: "numeric"
8163
+ },
8164
+ full: {
8165
+ weekday: "long",
8166
+ month: "long",
8167
+ day: "numeric",
8168
+ year: "numeric"
8169
+ }
8170
+ },
8171
+ time: {
8172
+ short: {
8173
+ hour: "numeric",
8174
+ minute: "numeric"
8175
+ },
8176
+ medium: {
8177
+ hour: "numeric",
8178
+ minute: "numeric",
8179
+ second: "numeric"
8180
+ },
8181
+ long: {
8182
+ hour: "numeric",
8183
+ minute: "numeric",
8184
+ second: "numeric",
8185
+ timeZoneName: "short"
8186
+ },
8187
+ full: {
8188
+ hour: "numeric",
8189
+ minute: "numeric",
8190
+ second: "numeric",
8191
+ timeZoneName: "short"
8192
+ }
8193
+ }
8194
+ };
8195
+ }
8196
+ }, Fe = 500, q = /* @__PURE__ */ new Map();
8197
+ function J(e, t) {
8198
+ let n = `${t}\u0000${e}`, r = q.get(n);
8199
+ return r || (r = new Pe(e, t), q.size >= Fe && q.clear(), q.set(n, r)), r;
8200
+ }
8201
+ var Y = class extends Error {
8202
+ name = "FormatMessageError";
8203
+ reason;
8204
+ source;
8205
+ language;
8206
+ key;
8207
+ cause;
8208
+ constructor(e, t, n, r, i) {
8209
+ super(`Could not format the message (${e}${i ? `, "${i}"` : ""}): ${r instanceof Error ? r.message : String(r)}`), this.cause = r, this.reason = e, this.source = t, this.language = n, this.key = i;
8210
+ }
8211
+ }, Ie = 0, Le = 5, Re = 6, ze = 7, Be = 8;
8212
+ function X(e, t) {
8213
+ for (let n of e) {
8214
+ if (n.type === Ie || n.type === ze) continue;
8215
+ let e = n.value;
8216
+ if (!(t && e in t)) return e;
8217
+ if (n.type === Re || n.type === Le) {
8218
+ let e = n.options;
8219
+ for (let n of Object.values(e)) {
8220
+ let e = X(n.value, t);
8221
+ if (e) return e;
8222
+ }
8223
+ } else if (n.type === Be) {
8224
+ let e = X(n.children, t);
8225
+ if (e) return e;
8226
+ }
8227
+ }
8228
+ }
8229
+ function Ve(e, t, n, r) {
8230
+ if (e instanceof U && e.code === H.MISSING_VALUE) {
8231
+ let i;
8232
+ try {
8233
+ i = X(J(t, n).getAst(), r);
8234
+ } catch {}
8235
+ return new Y("missing-value", t, n, e, i);
8236
+ }
8237
+ return e instanceof U && e.code === H.INVALID_VALUE ? new Y("invalid-value", t, n, e) : new Y(e instanceof SyntaxError ? "parse" : "format", t, n, e);
8238
+ }
8239
+ function Z(e, t, n, r) {
8240
+ try {
8241
+ return J(e, t).format(n);
8242
+ } catch (i) {
8243
+ return r?.onError ? r.onError(Ve(i, e, t, n)) : console.error(i), e;
8244
+ }
8245
+ }
8246
+ var He = () => !e();
8247
+ function Ue(e, t, n) {
8248
+ if (!n && !e.includes("{")) return e;
8249
+ try {
8250
+ return J(e, t).format(n);
8251
+ } catch (t) {
8252
+ return He() && console.warn(`[@nxgt/material] Could not format the fallback "${e}":`, t), e;
8253
+ }
8254
+ }
8255
+ //#endregion
8256
+ //#region lib/i18n/translator.ts
8257
+ function Q() {
8258
+ return s(i, "en", o);
8259
+ }
8260
+ function $(e = {}, t = Q) {
8261
+ return (r, i = void 0, a = t) => {
8262
+ let o = typeof a == "function" ? a() : a;
8263
+ return Z(n(e[o], r) ?? r, o, i);
8264
+ };
8265
+ }
8266
+ var We = $(r);
8267
+ //#endregion
8268
+ export { Ue as a, a as c, r as d, Y as i, i as l, Q as n, Z as o, We as r, s, $ as t, o as u };