gt-react 10.19.14 β†’ 10.19.16

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 (170) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/browser.cjs +10789 -0
  3. package/dist/browser.cjs.map +1 -0
  4. package/dist/browser.d.cts +732 -0
  5. package/dist/browser.d.cts.map +1 -0
  6. package/dist/browser.d.mts +734 -0
  7. package/dist/browser.d.mts.map +1 -0
  8. package/dist/browser.mjs +10751 -0
  9. package/dist/browser.mjs.map +1 -0
  10. package/dist/client.cjs +3356 -0
  11. package/dist/client.cjs.map +1 -0
  12. package/dist/client.d.cts +249 -0
  13. package/dist/client.d.cts.map +1 -0
  14. package/dist/client.d.mts +250 -0
  15. package/dist/client.d.mts.map +1 -0
  16. package/dist/client.mjs +3296 -0
  17. package/dist/client.mjs.map +1 -0
  18. package/dist/index.cjs +3509 -0
  19. package/dist/index.cjs.map +1 -0
  20. package/dist/index.d.cts +377 -0
  21. package/dist/index.d.cts.map +1 -0
  22. package/dist/index.d.mts +376 -0
  23. package/dist/index.d.mts.map +1 -0
  24. package/dist/index.mjs +3453 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/internal.cjs +3954 -0
  27. package/dist/internal.cjs.map +1 -0
  28. package/dist/internal.d.cts +1118 -0
  29. package/dist/internal.d.cts.map +1 -0
  30. package/dist/internal.d.mts +1118 -0
  31. package/dist/internal.d.mts.map +1 -0
  32. package/dist/internal.mjs +3893 -0
  33. package/dist/internal.mjs.map +1 -0
  34. package/dist/macros.cjs +6139 -0
  35. package/dist/macros.cjs.map +1 -0
  36. package/dist/macros.d.cts +25 -0
  37. package/dist/macros.d.cts.map +1 -0
  38. package/dist/macros.d.mts +25 -0
  39. package/dist/macros.d.mts.map +1 -0
  40. package/dist/macros.mjs +6140 -0
  41. package/dist/macros.mjs.map +1 -0
  42. package/package.json +61 -53
  43. package/dist/browser-types.d.ts +0 -5
  44. package/dist/browser-types.d.ts.map +0 -1
  45. package/dist/browser.cjs.min.cjs +0 -2
  46. package/dist/browser.cjs.min.cjs.map +0 -1
  47. package/dist/browser.d.ts +0 -4
  48. package/dist/browser.d.ts.map +0 -1
  49. package/dist/browser.esm.min.mjs +0 -2
  50. package/dist/browser.esm.min.mjs.map +0 -1
  51. package/dist/client.cjs.min.cjs +0 -2
  52. package/dist/client.cjs.min.cjs.map +0 -1
  53. package/dist/client.d.ts +0 -6
  54. package/dist/client.d.ts.map +0 -1
  55. package/dist/client.esm.min.mjs +0 -2
  56. package/dist/client.esm.min.mjs.map +0 -1
  57. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts +0 -32
  58. package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts.map +0 -1
  59. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts +0 -42
  60. package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts.map +0 -1
  61. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts +0 -90
  62. package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts.map +0 -1
  63. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts +0 -9
  64. package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts.map +0 -1
  65. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts +0 -3
  66. package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts.map +0 -1
  67. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts +0 -19
  68. package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts.map +0 -1
  69. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts +0 -15
  70. package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts.map +0 -1
  71. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts +0 -14
  72. package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts.map +0 -1
  73. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts +0 -29
  74. package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts.map +0 -1
  75. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts +0 -30
  76. package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts.map +0 -1
  77. package/dist/i18n-context/functions/branching/index.d.ts +0 -3
  78. package/dist/i18n-context/functions/branching/index.d.ts.map +0 -1
  79. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts +0 -31
  80. package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts.map +0 -1
  81. package/dist/i18n-context/functions/derivation/index.d.ts +0 -2
  82. package/dist/i18n-context/functions/derivation/index.d.ts.map +0 -1
  83. package/dist/i18n-context/functions/html-tag-operations.d.ts +0 -19
  84. package/dist/i18n-context/functions/html-tag-operations.d.ts.map +0 -1
  85. package/dist/i18n-context/functions/index.d.ts +0 -8
  86. package/dist/i18n-context/functions/index.d.ts.map +0 -1
  87. package/dist/i18n-context/functions/locale-operations.d.ts +0 -11
  88. package/dist/i18n-context/functions/locale-operations.d.ts.map +0 -1
  89. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts +0 -11
  90. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts.map +0 -1
  91. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts +0 -11
  92. package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts.map +0 -1
  93. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts +0 -33
  94. package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts.map +0 -1
  95. package/dist/i18n-context/functions/translation/index.d.ts +0 -5
  96. package/dist/i18n-context/functions/translation/index.d.ts.map +0 -1
  97. package/dist/i18n-context/functions/translation/t.d.ts +0 -25
  98. package/dist/i18n-context/functions/translation/t.d.ts.map +0 -1
  99. package/dist/i18n-context/functions/translation/types.d.ts +0 -21
  100. package/dist/i18n-context/functions/translation/types.d.ts.map +0 -1
  101. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts +0 -28
  102. package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts.map +0 -1
  103. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts +0 -26
  104. package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts.map +0 -1
  105. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts +0 -26
  106. package/dist/i18n-context/functions/variables/GtInternalNum.d.ts.map +0 -1
  107. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts +0 -35
  108. package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts.map +0 -1
  109. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts +0 -23
  110. package/dist/i18n-context/functions/variables/GtInternalVar.d.ts.map +0 -1
  111. package/dist/i18n-context/functions/variables/index.d.ts +0 -6
  112. package/dist/i18n-context/functions/variables/index.d.ts.map +0 -1
  113. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts +0 -9
  114. package/dist/i18n-context/functions/variables/utils/computeVar.d.ts.map +0 -1
  115. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts +0 -15
  116. package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts.map +0 -1
  117. package/dist/i18n-context/setup/bootstrap.d.ts +0 -22
  118. package/dist/i18n-context/setup/bootstrap.d.ts.map +0 -1
  119. package/dist/i18n-context/setup/index.d.ts +0 -3
  120. package/dist/i18n-context/setup/index.d.ts.map +0 -1
  121. package/dist/i18n-context/setup/initializeGT.d.ts +0 -7
  122. package/dist/i18n-context/setup/initializeGT.d.ts.map +0 -1
  123. package/dist/i18n-context/setup/types.d.ts +0 -19
  124. package/dist/i18n-context/setup/types.d.ts.map +0 -1
  125. package/dist/i18n-context/ui/LocaleSelector.d.ts +0 -18
  126. package/dist/i18n-context/ui/LocaleSelector.d.ts.map +0 -1
  127. package/dist/i18n-context/utils/enforceBrowser.d.ts +0 -7
  128. package/dist/i18n-context/utils/enforceBrowser.d.ts.map +0 -1
  129. package/dist/index.cjs.min.cjs +0 -2
  130. package/dist/index.cjs.min.cjs.map +0 -1
  131. package/dist/index.d.ts +0 -8
  132. package/dist/index.d.ts.map +0 -1
  133. package/dist/index.esm.min.mjs +0 -2
  134. package/dist/index.esm.min.mjs.map +0 -1
  135. package/dist/internal.cjs.min.cjs +0 -2
  136. package/dist/internal.cjs.min.cjs.map +0 -1
  137. package/dist/internal.d.ts +0 -7
  138. package/dist/internal.d.ts.map +0 -1
  139. package/dist/internal.esm.min.mjs +0 -2
  140. package/dist/internal.esm.min.mjs.map +0 -1
  141. package/dist/macros.cjs.min.cjs +0 -2
  142. package/dist/macros.cjs.min.cjs.map +0 -1
  143. package/dist/macros.d.ts +0 -22
  144. package/dist/macros.d.ts.map +0 -1
  145. package/dist/macros.esm.min.mjs +0 -2
  146. package/dist/macros.esm.min.mjs.map +0 -1
  147. package/dist/react-context/provider/ClientProvider.d.ts +0 -4
  148. package/dist/react-context/provider/ClientProvider.d.ts.map +0 -1
  149. package/dist/react-context/provider/GTProvider.d.ts +0 -29
  150. package/dist/react-context/provider/GTProvider.d.ts.map +0 -1
  151. package/dist/react-context/provider/helpers/isSSREnabled.d.ts +0 -2
  152. package/dist/react-context/provider/helpers/isSSREnabled.d.ts.map +0 -1
  153. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts +0 -5
  154. package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts.map +0 -1
  155. package/dist/react-context/provider/hooks/useEnableI18n.d.ts +0 -10
  156. package/dist/react-context/provider/hooks/useEnableI18n.d.ts.map +0 -1
  157. package/dist/react-context/provider/hooks/useRegionState.d.ts +0 -9
  158. package/dist/react-context/provider/hooks/useRegionState.d.ts.map +0 -1
  159. package/dist/react-context/types/config.d.ts +0 -67
  160. package/dist/react-context/types/config.d.ts.map +0 -1
  161. package/dist/react-context/ui/LocaleSelector.d.ts +0 -18
  162. package/dist/react-context/ui/LocaleSelector.d.ts.map +0 -1
  163. package/dist/react-context/ui/RegionSelector.d.ts +0 -38
  164. package/dist/react-context/ui/RegionSelector.d.ts.map +0 -1
  165. package/dist/react-context/utils/readAuthFromEnv.d.ts +0 -9
  166. package/dist/react-context/utils/readAuthFromEnv.d.ts.map +0 -1
  167. package/dist/shared/InternalLocaleSelector.d.ts +0 -26
  168. package/dist/shared/InternalLocaleSelector.d.ts.map +0 -1
  169. package/dist/shared/messages.d.ts +0 -11
  170. package/dist/shared/messages.d.ts.map +0 -1
@@ -0,0 +1,3356 @@
1
+ "use client";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ //#region \0rolldown/runtime.js
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
+ key = keys[i];
13
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
21
+ value: mod,
22
+ enumerable: true
23
+ }) : target, mod));
24
+ //#endregion
25
+ let react = require("react");
26
+ let react$1 = __toESM(react, 1);
27
+ react = __toESM(react);
28
+ let _generaltranslation_format = require("@generaltranslation/format");
29
+ let generaltranslation = require("generaltranslation");
30
+ let react_jsx_runtime = require("react/jsx-runtime");
31
+ let _generaltranslation_react_core = require("@generaltranslation/react-core");
32
+ //#region ../react-core/dist/internal.esm.min.mjs
33
+ var c = Object.defineProperty, l = Object.getOwnPropertyDescriptor, u = Object.getOwnPropertyNames, d = Object.prototype.hasOwnProperty, f = (e, t) => () => (e && (t = e(e = 0)), t), p = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), m = (e, t) => {
34
+ let n = {};
35
+ for (var r in e) c(n, r, {
36
+ get: e[r],
37
+ enumerable: !0
38
+ });
39
+ return t || c(n, Symbol.toStringTag, { value: `Module` }), n;
40
+ }, h = (e, t, n, r) => {
41
+ if (t && typeof t == `object` || typeof t == `function`) for (var i = u(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !d.call(e, s) && s !== n && c(e, s, {
42
+ get: ((e) => t[e]).bind(null, s),
43
+ enumerable: !(r = l(t, s)) || r.enumerable
44
+ });
45
+ return e;
46
+ }, g = (e) => d.call(e, `module.exports`) ? e[`module.exports`] : h(c({}, `__esModule`, { value: !0 }), e);
47
+ function w(e) {
48
+ return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === `Uint8Array` && `BYTES_PER_ELEMENT` in e && e.BYTES_PER_ELEMENT === 1;
49
+ }
50
+ function T$1(e, t, n = ``) {
51
+ let r = w(e), i = e?.length, a = t !== void 0;
52
+ if (!r || a && i !== t) {
53
+ let o = n && `"${n}" `, s = a ? ` of length ${t}` : ``, c = r ? `length=${i}` : `type=${typeof e}`, l = o + `expected Uint8Array` + s + `, got ` + c;
54
+ throw r ? RangeError(l) : TypeError(l);
55
+ }
56
+ return e;
57
+ }
58
+ function E(e, t = !0) {
59
+ if (e.destroyed) throw Error(`Hash instance has been destroyed`);
60
+ if (t && e.finished) throw Error(`Hash#digest() has already been called`);
61
+ }
62
+ function D(e, t) {
63
+ T$1(e, void 0, `digestInto() output`);
64
+ let n = t.outputLen;
65
+ if (e.length < n) throw RangeError(`"digestInto() output" expected to be of length >=` + n);
66
+ }
67
+ function O(...e) {
68
+ for (let t = 0; t < e.length; t++) e[t].fill(0);
69
+ }
70
+ function k(e) {
71
+ return new DataView(e.buffer, e.byteOffset, e.byteLength);
72
+ }
73
+ function A(e, t) {
74
+ return e << 32 - t | e >>> t;
75
+ }
76
+ new Uint8Array(new Uint32Array([287454020]).buffer)[0];
77
+ typeof Uint8Array.from([]).toHex == `function` && Uint8Array.fromHex;
78
+ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, `0`));
79
+ function oe(e, t = {}) {
80
+ let n = (t, n) => e(n).update(t).digest(), r = e(void 0);
81
+ return n.outputLen = r.outputLen, n.blockLen = r.blockLen, n.canXOF = r.canXOF, n.create = (t) => e(t), Object.assign(n, t), Object.freeze(n);
82
+ }
83
+ const se = (e) => ({ oid: Uint8Array.from([
84
+ 6,
85
+ 9,
86
+ 96,
87
+ 134,
88
+ 72,
89
+ 1,
90
+ 101,
91
+ 3,
92
+ 4,
93
+ 2,
94
+ e
95
+ ]) });
96
+ function ce(e, t, n) {
97
+ return e & t ^ ~e & n;
98
+ }
99
+ function le(e, t, n) {
100
+ return e & t ^ e & n ^ t & n;
101
+ }
102
+ var ue = class {
103
+ blockLen;
104
+ outputLen;
105
+ canXOF = !1;
106
+ padOffset;
107
+ isLE;
108
+ buffer;
109
+ view;
110
+ finished = !1;
111
+ length = 0;
112
+ pos = 0;
113
+ destroyed = !1;
114
+ constructor(e, t, n, r) {
115
+ this.blockLen = e, this.outputLen = t, this.padOffset = n, this.isLE = r, this.buffer = new Uint8Array(e), this.view = k(this.buffer);
116
+ }
117
+ update(e) {
118
+ E(this), T$1(e);
119
+ let { view: t, buffer: n, blockLen: r } = this, i = e.length;
120
+ for (let a = 0; a < i;) {
121
+ let o = Math.min(r - this.pos, i - a);
122
+ if (o === r) {
123
+ let t = k(e);
124
+ for (; r <= i - a; a += r) this.process(t, a);
125
+ continue;
126
+ }
127
+ n.set(e.subarray(a, a + o), this.pos), this.pos += o, a += o, this.pos === r && (this.process(t, 0), this.pos = 0);
128
+ }
129
+ return this.length += e.length, this.roundClean(), this;
130
+ }
131
+ digestInto(e) {
132
+ E(this), D(e, this), this.finished = !0;
133
+ let { buffer: t, view: n, blockLen: r, isLE: i } = this, { pos: a } = this;
134
+ t[a++] = 128, O(this.buffer.subarray(a)), this.padOffset > r - a && (this.process(n, 0), a = 0);
135
+ for (let e = a; e < r; e++) t[e] = 0;
136
+ n.setBigUint64(r - 8, BigInt(this.length * 8), i), this.process(n, 0);
137
+ let o = k(e), s = this.outputLen;
138
+ if (s % 4) throw Error(`_sha2: outputLen must be aligned to 32bit`);
139
+ let c = s / 4, l = this.get();
140
+ if (c > l.length) throw Error(`_sha2: outputLen bigger than state`);
141
+ for (let e = 0; e < c; e++) o.setUint32(4 * e, l[e], i);
142
+ }
143
+ digest() {
144
+ let { buffer: e, outputLen: t } = this;
145
+ this.digestInto(e);
146
+ let n = e.slice(0, t);
147
+ return this.destroy(), n;
148
+ }
149
+ _cloneInto(e) {
150
+ e ||= new this.constructor(), e.set(...this.get());
151
+ let { blockLen: t, buffer: n, length: r, finished: i, destroyed: a, pos: o } = this;
152
+ return e.destroyed = a, e.finished = i, e.length = r, e.pos = o, r % t && e.buffer.set(n), e;
153
+ }
154
+ clone() {
155
+ return this._cloneInto();
156
+ }
157
+ };
158
+ const j = Uint32Array.from([
159
+ 1779033703,
160
+ 3144134277,
161
+ 1013904242,
162
+ 2773480762,
163
+ 1359893119,
164
+ 2600822924,
165
+ 528734635,
166
+ 1541459225
167
+ ]), M = BigInt(2 ** 32 - 1), de = BigInt(32);
168
+ function fe(e, t = !1) {
169
+ return t ? {
170
+ h: Number(e & M),
171
+ l: Number(e >> de & M)
172
+ } : {
173
+ h: Number(e >> de & M) | 0,
174
+ l: Number(e & M) | 0
175
+ };
176
+ }
177
+ function pe(e, t = !1) {
178
+ let n = e.length, r = new Uint32Array(n), i = new Uint32Array(n);
179
+ for (let a = 0; a < n; a++) {
180
+ let { h: n, l: o } = fe(e[a], t);
181
+ [r[a], i[a]] = [n, o];
182
+ }
183
+ return [r, i];
184
+ }
185
+ const me = Uint32Array.from([
186
+ 1116352408,
187
+ 1899447441,
188
+ 3049323471,
189
+ 3921009573,
190
+ 961987163,
191
+ 1508970993,
192
+ 2453635748,
193
+ 2870763221,
194
+ 3624381080,
195
+ 310598401,
196
+ 607225278,
197
+ 1426881987,
198
+ 1925078388,
199
+ 2162078206,
200
+ 2614888103,
201
+ 3248222580,
202
+ 3835390401,
203
+ 4022224774,
204
+ 264347078,
205
+ 604807628,
206
+ 770255983,
207
+ 1249150122,
208
+ 1555081692,
209
+ 1996064986,
210
+ 2554220882,
211
+ 2821834349,
212
+ 2952996808,
213
+ 3210313671,
214
+ 3336571891,
215
+ 3584528711,
216
+ 113926993,
217
+ 338241895,
218
+ 666307205,
219
+ 773529912,
220
+ 1294757372,
221
+ 1396182291,
222
+ 1695183700,
223
+ 1986661051,
224
+ 2177026350,
225
+ 2456956037,
226
+ 2730485921,
227
+ 2820302411,
228
+ 3259730800,
229
+ 3345764771,
230
+ 3516065817,
231
+ 3600352804,
232
+ 4094571909,
233
+ 275423344,
234
+ 430227734,
235
+ 506948616,
236
+ 659060556,
237
+ 883997877,
238
+ 958139571,
239
+ 1322822218,
240
+ 1537002063,
241
+ 1747873779,
242
+ 1955562222,
243
+ 2024104815,
244
+ 2227730452,
245
+ 2361852424,
246
+ 2428436474,
247
+ 2756734187,
248
+ 3204031479,
249
+ 3329325298
250
+ ]), N = new Uint32Array(64);
251
+ var he = class extends ue {
252
+ constructor(e) {
253
+ super(64, e, 8, !1);
254
+ }
255
+ get() {
256
+ let { A: e, B: t, C: n, D: r, E: i, F: a, G: o, H: s } = this;
257
+ return [
258
+ e,
259
+ t,
260
+ n,
261
+ r,
262
+ i,
263
+ a,
264
+ o,
265
+ s
266
+ ];
267
+ }
268
+ set(e, t, n, r, i, a, o, s) {
269
+ this.A = e | 0, this.B = t | 0, this.C = n | 0, this.D = r | 0, this.E = i | 0, this.F = a | 0, this.G = o | 0, this.H = s | 0;
270
+ }
271
+ process(e, t) {
272
+ for (let n = 0; n < 16; n++, t += 4) N[n] = e.getUint32(t, !1);
273
+ for (let e = 16; e < 64; e++) {
274
+ let t = N[e - 15], n = N[e - 2], r = A(t, 7) ^ A(t, 18) ^ t >>> 3;
275
+ N[e] = (A(n, 17) ^ A(n, 19) ^ n >>> 10) + N[e - 7] + r + N[e - 16] | 0;
276
+ }
277
+ let { A: n, B: r, C: i, D: a, E: o, F: s, G: c, H: l } = this;
278
+ for (let e = 0; e < 64; e++) {
279
+ let t = A(o, 6) ^ A(o, 11) ^ A(o, 25), u = l + t + ce(o, s, c) + me[e] + N[e] | 0, d = (A(n, 2) ^ A(n, 13) ^ A(n, 22)) + le(n, r, i) | 0;
280
+ l = c, c = s, s = o, o = a + u | 0, a = i, i = r, r = n, n = u + d | 0;
281
+ }
282
+ n = n + this.A | 0, r = r + this.B | 0, i = i + this.C | 0, a = a + this.D | 0, o = o + this.E | 0, s = s + this.F | 0, c = c + this.G | 0, l = l + this.H | 0, this.set(n, r, i, a, o, s, c, l);
283
+ }
284
+ roundClean() {
285
+ O(N);
286
+ }
287
+ destroy() {
288
+ this.destroyed = !0, this.set(0, 0, 0, 0, 0, 0, 0, 0), O(this.buffer);
289
+ }
290
+ }, ge = class extends he {
291
+ A = j[0] | 0;
292
+ B = j[1] | 0;
293
+ C = j[2] | 0;
294
+ D = j[3] | 0;
295
+ E = j[4] | 0;
296
+ F = j[5] | 0;
297
+ G = j[6] | 0;
298
+ H = j[7] | 0;
299
+ constructor() {
300
+ super(32);
301
+ }
302
+ };
303
+ const _e = pe(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map((e) => BigInt(e)));
304
+ _e[0], _e[1];
305
+ oe(() => new ge(), se(1));
306
+ const ye = (e) => `generaltranslation Formatting Error: Invalid cutoff style: ${e}.`, be = `DEFAULT_TERMINATOR_KEY`, xe = {
307
+ ellipsis: {
308
+ fr: {
309
+ terminator: `…`,
310
+ separator: `β€―`
311
+ },
312
+ zh: {
313
+ terminator: `……`,
314
+ separator: void 0
315
+ },
316
+ ja: {
317
+ terminator: `……`,
318
+ separator: void 0
319
+ },
320
+ [be]: {
321
+ terminator: `…`,
322
+ separator: void 0
323
+ }
324
+ },
325
+ none: { [be]: {
326
+ terminator: void 0,
327
+ separator: void 0
328
+ } }
329
+ };
330
+ var Se = class {
331
+ constructor(e, t = {}) {
332
+ try {
333
+ let t = e ? Array.isArray(e) ? e.map((e) => String(e)) : [String(e)] : [`en`], n = Intl.getCanonicalLocales(t);
334
+ this.locale = n.length ? n[0] : `en`;
335
+ } catch {
336
+ this.locale = `en`;
337
+ }
338
+ if (!xe[t.style ?? `ellipsis`]) throw Error(ye(t.style ?? `ellipsis`));
339
+ let n, r;
340
+ if (t.maxChars !== void 0) {
341
+ n = t.style ?? `ellipsis`;
342
+ let e = new Intl.Locale(this.locale).language;
343
+ r = xe[n][e] || xe[n].DEFAULT_TERMINATOR_KEY;
344
+ }
345
+ let i = t.terminator ?? r?.terminator, a = i == null ? void 0 : t.separator ?? r?.separator;
346
+ this.additionLength = (i?.length ?? 0) + (a?.length ?? 0), t.maxChars !== void 0 && Math.abs(t.maxChars) < this.additionLength && (i = void 0, a = void 0), this.options = {
347
+ maxChars: t.maxChars,
348
+ style: n,
349
+ terminator: i,
350
+ separator: a
351
+ };
352
+ }
353
+ format(e) {
354
+ return this.formatToParts(e).join(``);
355
+ }
356
+ formatToParts(e) {
357
+ let { maxChars: t, terminator: n, separator: r } = this.options, i = t === void 0 || Math.abs(t) >= e.length ? t : t >= 0 ? Math.max(0, t - this.additionLength) : Math.min(0, t + this.additionLength), a = i !== void 0 && i > -1 ? e.slice(0, i) : e.slice(i);
358
+ return t == null || i == null || i === 0 || n == null || e.length <= Math.abs(t) ? [a] : i > 0 ? r == null ? [a, n] : [
359
+ a,
360
+ r,
361
+ n
362
+ ] : r == null ? [n, a] : [
363
+ n,
364
+ r,
365
+ a
366
+ ];
367
+ }
368
+ resolvedOptions() {
369
+ return this.options;
370
+ }
371
+ };
372
+ const Ce = {
373
+ Collator: Intl.Collator,
374
+ DateTimeFormat: Intl.DateTimeFormat,
375
+ DisplayNames: Intl.DisplayNames,
376
+ ListFormat: Intl.ListFormat,
377
+ Locale: Intl.Locale,
378
+ NumberFormat: Intl.NumberFormat,
379
+ PluralRules: Intl.PluralRules,
380
+ RelativeTimeFormat: Intl.RelativeTimeFormat,
381
+ Segmenter: Intl.Segmenter,
382
+ CutoffFormat: Se
383
+ };
384
+ new class {
385
+ constructor() {
386
+ this.cache = {};
387
+ }
388
+ _generateKey(e, t = {}) {
389
+ return `${e ? Array.isArray(e) ? e.map((e) => String(e)).join(`,`) : String(e) : `undefined`}:${t ? JSON.stringify(t, Object.keys(t).sort()) : `{}`}`;
390
+ }
391
+ get(e, ...t) {
392
+ let [n = `en`, r = {}] = t, i = this._generateKey(n, r), a = this.cache[e]?.[i];
393
+ return a === void 0 && (a = new Ce[e](...t), this.cache[e] || (this.cache[e] = {}), this.cache[e][i] = a), a;
394
+ }
395
+ }();
396
+ var P = m({
397
+ __addDisposableResource: () => Ze,
398
+ __assign: () => R,
399
+ __asyncDelegator: () => Ue,
400
+ __asyncGenerator: () => He,
401
+ __asyncValues: () => We,
402
+ __await: () => I,
403
+ __awaiter: () => Fe,
404
+ __classPrivateFieldGet: () => Je,
405
+ __classPrivateFieldIn: () => Xe,
406
+ __classPrivateFieldSet: () => Ye,
407
+ __createBinding: () => z,
408
+ __decorate: () => Oe,
409
+ __disposeResources: () => Qe,
410
+ __esDecorate: () => Ae,
411
+ __exportStar: () => Le,
412
+ __extends: () => Ee,
413
+ __generator: () => Ie,
414
+ __importDefault: () => qe,
415
+ __importStar: () => Ke,
416
+ __makeTemplateObject: () => Ge,
417
+ __metadata: () => Pe,
418
+ __param: () => ke,
419
+ __propKey: () => Me,
420
+ __read: () => Re,
421
+ __rest: () => De,
422
+ __rewriteRelativeImportExtension: () => $e,
423
+ __runInitializers: () => je,
424
+ __setFunctionName: () => Ne,
425
+ __spread: () => ze,
426
+ __spreadArray: () => Ve,
427
+ __spreadArrays: () => Be,
428
+ __values: () => F,
429
+ default: () => nt
430
+ });
431
+ function Ee(e, t) {
432
+ if (typeof t != `function` && t !== null) throw TypeError(`Class extends value ` + String(t) + ` is not a constructor or null`);
433
+ L(e, t);
434
+ function n() {
435
+ this.constructor = e;
436
+ }
437
+ e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
438
+ }
439
+ function De(e, t) {
440
+ var n = {};
441
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
442
+ if (e != null && typeof Object.getOwnPropertySymbols == `function`) for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
443
+ return n;
444
+ }
445
+ function Oe(e, t, n, r) {
446
+ var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
447
+ if (typeof Reflect == `object` && typeof Reflect.decorate == `function`) a = Reflect.decorate(e, t, n, r);
448
+ else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
449
+ return i > 3 && a && Object.defineProperty(t, n, a), a;
450
+ }
451
+ function ke(e, t) {
452
+ return function(n, r) {
453
+ t(n, r, e);
454
+ };
455
+ }
456
+ function Ae(e, t, n, r, i, a) {
457
+ function o(e) {
458
+ if (e !== void 0 && typeof e != `function`) throw TypeError(`Function expected`);
459
+ return e;
460
+ }
461
+ for (var s = r.kind, c = s === `getter` ? `get` : s === `setter` ? `set` : `value`, l = !t && e ? r.static ? e : e.prototype : null, u = t || (l ? Object.getOwnPropertyDescriptor(l, r.name) : {}), d, f = !1, p = n.length - 1; p >= 0; p--) {
462
+ var m = {};
463
+ for (var h in r) m[h] = h === `access` ? {} : r[h];
464
+ for (var h in r.access) m.access[h] = r.access[h];
465
+ m.addInitializer = function(e) {
466
+ if (f) throw TypeError(`Cannot add initializers after decoration has completed`);
467
+ a.push(o(e || null));
468
+ };
469
+ var g = (0, n[p])(s === `accessor` ? {
470
+ get: u.get,
471
+ set: u.set
472
+ } : u[c], m);
473
+ if (s === `accessor`) {
474
+ if (g === void 0) continue;
475
+ if (typeof g != `object` || !g) throw TypeError(`Object expected`);
476
+ (d = o(g.get)) && (u.get = d), (d = o(g.set)) && (u.set = d), (d = o(g.init)) && i.unshift(d);
477
+ } else (d = o(g)) && (s === `field` ? i.unshift(d) : u[c] = d);
478
+ }
479
+ l && Object.defineProperty(l, r.name, u), f = !0;
480
+ }
481
+ function je(e, t, n) {
482
+ for (var r = arguments.length > 2, i = 0; i < t.length; i++) n = r ? t[i].call(e, n) : t[i].call(e);
483
+ return r ? n : void 0;
484
+ }
485
+ function Me(e) {
486
+ return typeof e == `symbol` ? e : `${e}`;
487
+ }
488
+ function Ne(e, t, n) {
489
+ return typeof t == `symbol` && (t = t.description ? `[${t.description}]` : ``), Object.defineProperty(e, `name`, {
490
+ configurable: !0,
491
+ value: n ? `${n} ${t}` : t
492
+ });
493
+ }
494
+ function Pe(e, t) {
495
+ if (typeof Reflect == `object` && typeof Reflect.metadata == `function`) return Reflect.metadata(e, t);
496
+ }
497
+ function Fe(e, t, n, r) {
498
+ function i(e) {
499
+ return e instanceof n ? e : new n(function(t) {
500
+ t(e);
501
+ });
502
+ }
503
+ return new (n ||= Promise)(function(n, a) {
504
+ function o(e) {
505
+ try {
506
+ c(r.next(e));
507
+ } catch (e) {
508
+ a(e);
509
+ }
510
+ }
511
+ function s(e) {
512
+ try {
513
+ c(r.throw(e));
514
+ } catch (e) {
515
+ a(e);
516
+ }
517
+ }
518
+ function c(e) {
519
+ e.done ? n(e.value) : i(e.value).then(o, s);
520
+ }
521
+ c((r = r.apply(e, t || [])).next());
522
+ });
523
+ }
524
+ function Ie(e, t) {
525
+ var n = {
526
+ label: 0,
527
+ sent: function() {
528
+ if (a[0] & 1) throw a[1];
529
+ return a[1];
530
+ },
531
+ trys: [],
532
+ ops: []
533
+ }, r, i, a, o = Object.create((typeof Iterator == `function` ? Iterator : Object).prototype);
534
+ return o.next = s(0), o.throw = s(1), o.return = s(2), typeof Symbol == `function` && (o[Symbol.iterator] = function() {
535
+ return this;
536
+ }), o;
537
+ function s(e) {
538
+ return function(t) {
539
+ return c([e, t]);
540
+ };
541
+ }
542
+ function c(s) {
543
+ if (r) throw TypeError(`Generator is already executing.`);
544
+ for (; o && (o = 0, s[0] && (n = 0)), n;) try {
545
+ if (r = 1, i && (a = s[0] & 2 ? i.return : s[0] ? i.throw || ((a = i.return) && a.call(i), 0) : i.next) && !(a = a.call(i, s[1])).done) return a;
546
+ switch (i = 0, a && (s = [s[0] & 2, a.value]), s[0]) {
547
+ case 0:
548
+ case 1:
549
+ a = s;
550
+ break;
551
+ case 4: return n.label++, {
552
+ value: s[1],
553
+ done: !1
554
+ };
555
+ case 5:
556
+ n.label++, i = s[1], s = [0];
557
+ continue;
558
+ case 7:
559
+ s = n.ops.pop(), n.trys.pop();
560
+ continue;
561
+ default:
562
+ if ((a = n.trys, !(a = a.length > 0 && a[a.length - 1])) && (s[0] === 6 || s[0] === 2)) {
563
+ n = 0;
564
+ continue;
565
+ }
566
+ if (s[0] === 3 && (!a || s[1] > a[0] && s[1] < a[3])) {
567
+ n.label = s[1];
568
+ break;
569
+ }
570
+ if (s[0] === 6 && n.label < a[1]) {
571
+ n.label = a[1], a = s;
572
+ break;
573
+ }
574
+ if (a && n.label < a[2]) {
575
+ n.label = a[2], n.ops.push(s);
576
+ break;
577
+ }
578
+ a[2] && n.ops.pop(), n.trys.pop();
579
+ continue;
580
+ }
581
+ s = t.call(e, n);
582
+ } catch (e) {
583
+ s = [6, e], i = 0;
584
+ } finally {
585
+ r = a = 0;
586
+ }
587
+ if (s[0] & 5) throw s[1];
588
+ return {
589
+ value: s[0] ? s[1] : void 0,
590
+ done: !0
591
+ };
592
+ }
593
+ }
594
+ function Le(e, t) {
595
+ for (var n in e) n !== `default` && !Object.prototype.hasOwnProperty.call(t, n) && z(t, e, n);
596
+ }
597
+ function F(e) {
598
+ var t = typeof Symbol == `function` && Symbol.iterator, n = t && e[t], r = 0;
599
+ if (n) return n.call(e);
600
+ if (e && typeof e.length == `number`) return { next: function() {
601
+ return e && r >= e.length && (e = void 0), {
602
+ value: e && e[r++],
603
+ done: !e
604
+ };
605
+ } };
606
+ throw TypeError(t ? `Object is not iterable.` : `Symbol.iterator is not defined.`);
607
+ }
608
+ function Re(e, t) {
609
+ var n = typeof Symbol == `function` && e[Symbol.iterator];
610
+ if (!n) return e;
611
+ var r = n.call(e), i, a = [], o;
612
+ try {
613
+ for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
614
+ } catch (e) {
615
+ o = { error: e };
616
+ } finally {
617
+ try {
618
+ i && !i.done && (n = r.return) && n.call(r);
619
+ } finally {
620
+ if (o) throw o.error;
621
+ }
622
+ }
623
+ return a;
624
+ }
625
+ function ze() {
626
+ for (var e = [], t = 0; t < arguments.length; t++) e = e.concat(Re(arguments[t]));
627
+ return e;
628
+ }
629
+ function Be() {
630
+ for (var e = 0, t = 0, n = arguments.length; t < n; t++) e += arguments[t].length;
631
+ for (var r = Array(e), i = 0, t = 0; t < n; t++) for (var a = arguments[t], o = 0, s = a.length; o < s; o++, i++) r[i] = a[o];
632
+ return r;
633
+ }
634
+ function Ve(e, t, n) {
635
+ if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
636
+ return e.concat(a || Array.prototype.slice.call(t));
637
+ }
638
+ function I(e) {
639
+ return this instanceof I ? (this.v = e, this) : new I(e);
640
+ }
641
+ function He(e, t, n) {
642
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
643
+ var r = n.apply(e, t || []), i, a = [];
644
+ return i = Object.create((typeof AsyncIterator == `function` ? AsyncIterator : Object).prototype), s(`next`), s(`throw`), s(`return`, o), i[Symbol.asyncIterator] = function() {
645
+ return this;
646
+ }, i;
647
+ function o(e) {
648
+ return function(t) {
649
+ return Promise.resolve(t).then(e, d);
650
+ };
651
+ }
652
+ function s(e, t) {
653
+ r[e] && (i[e] = function(t) {
654
+ return new Promise(function(n, r) {
655
+ a.push([
656
+ e,
657
+ t,
658
+ n,
659
+ r
660
+ ]) > 1 || c(e, t);
661
+ });
662
+ }, t && (i[e] = t(i[e])));
663
+ }
664
+ function c(e, t) {
665
+ try {
666
+ l(r[e](t));
667
+ } catch (e) {
668
+ f(a[0][3], e);
669
+ }
670
+ }
671
+ function l(e) {
672
+ e.value instanceof I ? Promise.resolve(e.value.v).then(u, d) : f(a[0][2], e);
673
+ }
674
+ function u(e) {
675
+ c(`next`, e);
676
+ }
677
+ function d(e) {
678
+ c(`throw`, e);
679
+ }
680
+ function f(e, t) {
681
+ e(t), a.shift(), a.length && c(a[0][0], a[0][1]);
682
+ }
683
+ }
684
+ function Ue(e) {
685
+ var t, n;
686
+ return t = {}, r(`next`), r(`throw`, function(e) {
687
+ throw e;
688
+ }), r(`return`), t[Symbol.iterator] = function() {
689
+ return this;
690
+ }, t;
691
+ function r(r, i) {
692
+ t[r] = e[r] ? function(t) {
693
+ return (n = !n) ? {
694
+ value: I(e[r](t)),
695
+ done: !1
696
+ } : i ? i(t) : t;
697
+ } : i;
698
+ }
699
+ }
700
+ function We(e) {
701
+ if (!Symbol.asyncIterator) throw TypeError(`Symbol.asyncIterator is not defined.`);
702
+ var t = e[Symbol.asyncIterator], n;
703
+ return t ? t.call(e) : (e = typeof F == `function` ? F(e) : e[Symbol.iterator](), n = {}, r(`next`), r(`throw`), r(`return`), n[Symbol.asyncIterator] = function() {
704
+ return this;
705
+ }, n);
706
+ function r(t) {
707
+ n[t] = e[t] && function(n) {
708
+ return new Promise(function(r, a) {
709
+ n = e[t](n), i(r, a, n.done, n.value);
710
+ });
711
+ };
712
+ }
713
+ function i(e, t, n, r) {
714
+ Promise.resolve(r).then(function(t) {
715
+ e({
716
+ value: t,
717
+ done: n
718
+ });
719
+ }, t);
720
+ }
721
+ }
722
+ function Ge(e, t) {
723
+ return Object.defineProperty ? Object.defineProperty(e, `raw`, { value: t }) : e.raw = t, e;
724
+ }
725
+ function Ke(e) {
726
+ if (e && e.__esModule) return e;
727
+ var t = {};
728
+ if (e != null) for (var n = B(e), r = 0; r < n.length; r++) n[r] !== `default` && z(t, e, n[r]);
729
+ return et(t, e), t;
730
+ }
731
+ function qe(e) {
732
+ return e && e.__esModule ? e : { default: e };
733
+ }
734
+ function Je(e, t, n, r) {
735
+ if (n === `a` && !r) throw TypeError(`Private accessor was defined without a getter`);
736
+ if (typeof t == `function` ? e !== t || !r : !t.has(e)) throw TypeError(`Cannot read private member from an object whose class did not declare it`);
737
+ return n === `m` ? r : n === `a` ? r.call(e) : r ? r.value : t.get(e);
738
+ }
739
+ function Ye(e, t, n, r, i) {
740
+ if (r === `m`) throw TypeError(`Private method is not writable`);
741
+ if (r === `a` && !i) throw TypeError(`Private accessor was defined without a setter`);
742
+ if (typeof t == `function` ? e !== t || !i : !t.has(e)) throw TypeError(`Cannot write private member to an object whose class did not declare it`);
743
+ return r === `a` ? i.call(e, n) : i ? i.value = n : t.set(e, n), n;
744
+ }
745
+ function Xe(e, t) {
746
+ if (t === null || typeof t != `object` && typeof t != `function`) throw TypeError(`Cannot use 'in' operator on non-object`);
747
+ return typeof e == `function` ? t === e : e.has(t);
748
+ }
749
+ function Ze(e, t, n) {
750
+ if (t != null) {
751
+ if (typeof t != `object` && typeof t != `function`) throw TypeError(`Object expected.`);
752
+ var r, i;
753
+ if (n) {
754
+ if (!Symbol.asyncDispose) throw TypeError(`Symbol.asyncDispose is not defined.`);
755
+ r = t[Symbol.asyncDispose];
756
+ }
757
+ if (r === void 0) {
758
+ if (!Symbol.dispose) throw TypeError(`Symbol.dispose is not defined.`);
759
+ r = t[Symbol.dispose], n && (i = r);
760
+ }
761
+ if (typeof r != `function`) throw TypeError(`Object not disposable.`);
762
+ i && (r = function() {
763
+ try {
764
+ i.call(this);
765
+ } catch (e) {
766
+ return Promise.reject(e);
767
+ }
768
+ }), e.stack.push({
769
+ value: t,
770
+ dispose: r,
771
+ async: n
772
+ });
773
+ } else n && e.stack.push({ async: !0 });
774
+ return t;
775
+ }
776
+ function Qe(e) {
777
+ function t(t) {
778
+ e.error = e.hasError ? new tt(t, e.error, `An error was suppressed during disposal.`) : t, e.hasError = !0;
779
+ }
780
+ var n, r = 0;
781
+ function i() {
782
+ for (; n = e.stack.pop();) try {
783
+ if (!n.async && r === 1) return r = 0, e.stack.push(n), Promise.resolve().then(i);
784
+ if (n.dispose) {
785
+ var a = n.dispose.call(n.value);
786
+ if (n.async) return r |= 2, Promise.resolve(a).then(i, function(e) {
787
+ return t(e), i();
788
+ });
789
+ } else r |= 1;
790
+ } catch (e) {
791
+ t(e);
792
+ }
793
+ if (r === 1) return e.hasError ? Promise.reject(e.error) : Promise.resolve();
794
+ if (e.hasError) throw e.error;
795
+ }
796
+ return i();
797
+ }
798
+ function $e(e, t) {
799
+ return typeof e == `string` && /^\.\.?\//.test(e) ? e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(e, n, r, i, a) {
800
+ return n ? t ? `.jsx` : `.js` : r && (!i || !a) ? e : r + i + `.` + a.toLowerCase() + `js`;
801
+ }) : e;
802
+ }
803
+ var L, R, z, et, B, tt, nt, V = f((() => {
804
+ L = function(e, t) {
805
+ return L = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
806
+ e.__proto__ = t;
807
+ } || function(e, t) {
808
+ for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
809
+ }, L(e, t);
810
+ }, R = function() {
811
+ return R = Object.assign || function(e) {
812
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
813
+ return e;
814
+ }, R.apply(this, arguments);
815
+ }, z = Object.create ? (function(e, t, n, r) {
816
+ r === void 0 && (r = n);
817
+ var i = Object.getOwnPropertyDescriptor(t, n);
818
+ (!i || (`get` in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
819
+ enumerable: !0,
820
+ get: function() {
821
+ return t[n];
822
+ }
823
+ }), Object.defineProperty(e, r, i);
824
+ }) : (function(e, t, n, r) {
825
+ r === void 0 && (r = n), e[r] = t[n];
826
+ }), et = Object.create ? (function(e, t) {
827
+ Object.defineProperty(e, `default`, {
828
+ enumerable: !0,
829
+ value: t
830
+ });
831
+ }) : function(e, t) {
832
+ e.default = t;
833
+ }, B = function(e) {
834
+ return B = Object.getOwnPropertyNames || function(e) {
835
+ var t = [];
836
+ for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[t.length] = n);
837
+ return t;
838
+ }, B(e);
839
+ }, tt = typeof SuppressedError == `function` ? SuppressedError : function(e, t, n) {
840
+ var r = Error(n);
841
+ return r.name = `SuppressedError`, r.error = e, r.suppressed = t, r;
842
+ }, nt = {
843
+ __extends: Ee,
844
+ __assign: R,
845
+ __rest: De,
846
+ __decorate: Oe,
847
+ __param: ke,
848
+ __esDecorate: Ae,
849
+ __runInitializers: je,
850
+ __propKey: Me,
851
+ __setFunctionName: Ne,
852
+ __metadata: Pe,
853
+ __awaiter: Fe,
854
+ __generator: Ie,
855
+ __createBinding: z,
856
+ __exportStar: Le,
857
+ __values: F,
858
+ __read: Re,
859
+ __spread: ze,
860
+ __spreadArrays: Be,
861
+ __spreadArray: Ve,
862
+ __await: I,
863
+ __asyncGenerator: He,
864
+ __asyncDelegator: Ue,
865
+ __asyncValues: We,
866
+ __makeTemplateObject: Ge,
867
+ __importStar: Ke,
868
+ __importDefault: qe,
869
+ __classPrivateFieldGet: Je,
870
+ __classPrivateFieldSet: Ye,
871
+ __classPrivateFieldIn: Xe,
872
+ __addDisposableResource: Ze,
873
+ __disposeResources: Qe,
874
+ __rewriteRelativeImportExtension: $e
875
+ };
876
+ })), rt = p(((e) => {
877
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.ErrorKind = void 0;
878
+ var t;
879
+ (function(e) {
880
+ 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`;
881
+ })(t || (e.ErrorKind = t = {}));
882
+ })), H = p(((e) => {
883
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.SKELETON_TYPE = e.TYPE = void 0, e.isLiteralElement = r, e.isArgumentElement = i, e.isNumberElement = a, e.isDateElement = o, e.isTimeElement = s, e.isSelectElement = c, e.isPluralElement = l, e.isPoundElement = u, e.isTagElement = d, e.isNumberSkeleton = f, e.isDateTimeSkeleton = p, e.createLiteralElement = m, e.createNumberElement = h;
884
+ var t;
885
+ (function(e) {
886
+ e[e.literal = 0] = `literal`, e[e.argument = 1] = `argument`, e[e.number = 2] = `number`, e[e.date = 3] = `date`, e[e.time = 4] = `time`, e[e.select = 5] = `select`, e[e.plural = 6] = `plural`, e[e.pound = 7] = `pound`, e[e.tag = 8] = `tag`;
887
+ })(t || (e.TYPE = t = {}));
888
+ var n;
889
+ (function(e) {
890
+ e[e.number = 0] = `number`, e[e.dateTime = 1] = `dateTime`;
891
+ })(n || (e.SKELETON_TYPE = n = {}));
892
+ function r(e) {
893
+ return e.type === t.literal;
894
+ }
895
+ function i(e) {
896
+ return e.type === t.argument;
897
+ }
898
+ function a(e) {
899
+ return e.type === t.number;
900
+ }
901
+ function o(e) {
902
+ return e.type === t.date;
903
+ }
904
+ function s(e) {
905
+ return e.type === t.time;
906
+ }
907
+ function c(e) {
908
+ return e.type === t.select;
909
+ }
910
+ function l(e) {
911
+ return e.type === t.plural;
912
+ }
913
+ function u(e) {
914
+ return e.type === t.pound;
915
+ }
916
+ function d(e) {
917
+ return e.type === t.tag;
918
+ }
919
+ function f(e) {
920
+ return !!(e && typeof e == `object` && e.type === n.number);
921
+ }
922
+ function p(e) {
923
+ return !!(e && typeof e == `object` && e.type === n.dateTime);
924
+ }
925
+ function m(e) {
926
+ return {
927
+ type: t.literal,
928
+ value: e
929
+ };
930
+ }
931
+ function h(e, n) {
932
+ return {
933
+ type: t.number,
934
+ value: e,
935
+ style: n
936
+ };
937
+ }
938
+ })), it = p(((e) => {
939
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = e.SPACE_SEPARATOR_REGEX = void 0, e.SPACE_SEPARATOR_REGEX = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/;
940
+ })), at = p(((e) => {
941
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseDateTimeSkeleton = n;
942
+ var t = /(?:[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;
943
+ function n(e) {
944
+ var n = {};
945
+ return e.replace(t, function(e) {
946
+ var t = e.length;
947
+ switch (e[0]) {
948
+ case `G`:
949
+ n.era = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
950
+ break;
951
+ case `y`:
952
+ n.year = t === 2 ? `2-digit` : `numeric`;
953
+ break;
954
+ case `Y`:
955
+ case `u`:
956
+ case `U`:
957
+ case `r`: throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
958
+ case `q`:
959
+ case `Q`: throw RangeError("`q/Q` (quarter) patterns are not supported");
960
+ case `M`:
961
+ case `L`:
962
+ n.month = [
963
+ `numeric`,
964
+ `2-digit`,
965
+ `short`,
966
+ `long`,
967
+ `narrow`
968
+ ][t - 1];
969
+ break;
970
+ case `w`:
971
+ case `W`: throw RangeError("`w/W` (week) patterns are not supported");
972
+ case `d`:
973
+ n.day = [`numeric`, `2-digit`][t - 1];
974
+ break;
975
+ case `D`:
976
+ case `F`:
977
+ case `g`: throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
978
+ case `E`:
979
+ n.weekday = t === 4 ? `long` : t === 5 ? `narrow` : `short`;
980
+ break;
981
+ case `e`:
982
+ if (t < 4) throw RangeError("`e..eee` (weekday) patterns are not supported");
983
+ n.weekday = [
984
+ `short`,
985
+ `long`,
986
+ `narrow`,
987
+ `short`
988
+ ][t - 4];
989
+ break;
990
+ case `c`:
991
+ if (t < 4) throw RangeError("`c..ccc` (weekday) patterns are not supported");
992
+ n.weekday = [
993
+ `short`,
994
+ `long`,
995
+ `narrow`,
996
+ `short`
997
+ ][t - 4];
998
+ break;
999
+ case `a`:
1000
+ n.hour12 = !0;
1001
+ break;
1002
+ case `b`:
1003
+ case `B`: throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");
1004
+ case `h`:
1005
+ n.hourCycle = `h12`, n.hour = [`numeric`, `2-digit`][t - 1];
1006
+ break;
1007
+ case `H`:
1008
+ n.hourCycle = `h23`, n.hour = [`numeric`, `2-digit`][t - 1];
1009
+ break;
1010
+ case `K`:
1011
+ n.hourCycle = `h11`, n.hour = [`numeric`, `2-digit`][t - 1];
1012
+ break;
1013
+ case `k`:
1014
+ n.hourCycle = `h24`, n.hour = [`numeric`, `2-digit`][t - 1];
1015
+ break;
1016
+ case `j`:
1017
+ case `J`:
1018
+ case `C`: throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
1019
+ case `m`:
1020
+ n.minute = [`numeric`, `2-digit`][t - 1];
1021
+ break;
1022
+ case `s`:
1023
+ n.second = [`numeric`, `2-digit`][t - 1];
1024
+ break;
1025
+ case `S`:
1026
+ case `A`: throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");
1027
+ case `z`:
1028
+ n.timeZoneName = t < 4 ? `short` : `long`;
1029
+ break;
1030
+ case `Z`:
1031
+ case `O`:
1032
+ case `v`:
1033
+ case `V`:
1034
+ case `X`:
1035
+ case `x`: throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
1036
+ }
1037
+ return ``;
1038
+ }), n;
1039
+ }
1040
+ })), ot = p(((e) => {
1041
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.WHITE_SPACE_REGEX = void 0, e.WHITE_SPACE_REGEX = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
1042
+ })), st = p(((e) => {
1043
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.parseNumberSkeletonFromString = r, e.parseNumberSkeleton = p;
1044
+ var t = (V(), g(P)), n = ot();
1045
+ function r(e) {
1046
+ if (e.length === 0) throw Error(`Number skeleton cannot be empty`);
1047
+ for (var t = e.split(n.WHITE_SPACE_REGEX).filter(function(e) {
1048
+ return e.length > 0;
1049
+ }), r = [], i = 0, a = t; i < a.length; i++) {
1050
+ var o = a[i].split(`/`);
1051
+ if (o.length === 0) throw Error(`Invalid number skeleton`);
1052
+ for (var s = o[0], c = o.slice(1), l = 0, u = c; l < u.length; l++) if (u[l].length === 0) throw Error(`Invalid number skeleton`);
1053
+ r.push({
1054
+ stem: s,
1055
+ options: c
1056
+ });
1057
+ }
1058
+ return r;
1059
+ }
1060
+ function i(e) {
1061
+ return e.replace(/^(.*?)-/, ``);
1062
+ }
1063
+ var a = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, o = /^(@+)?(\+|#+)?[rs]?$/g, s = /(\*)(0+)|(#+)(0+)|(0+)/g, c = /^(0+)$/;
1064
+ function l(e) {
1065
+ var t = {};
1066
+ return e[e.length - 1] === `r` ? t.roundingPriority = `morePrecision` : e[e.length - 1] === `s` && (t.roundingPriority = `lessPrecision`), e.replace(o, function(e, n, r) {
1067
+ 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), ``;
1068
+ }), t;
1069
+ }
1070
+ function u(e) {
1071
+ switch (e) {
1072
+ case `sign-auto`: return { signDisplay: `auto` };
1073
+ case `sign-accounting`:
1074
+ case `()`: return { currencySign: `accounting` };
1075
+ case `sign-always`:
1076
+ case `+!`: return { signDisplay: `always` };
1077
+ case `sign-accounting-always`:
1078
+ case `()!`: return {
1079
+ signDisplay: `always`,
1080
+ currencySign: `accounting`
1081
+ };
1082
+ case `sign-except-zero`:
1083
+ case `+?`: return { signDisplay: `exceptZero` };
1084
+ case `sign-accounting-except-zero`:
1085
+ case `()?`: return {
1086
+ signDisplay: `exceptZero`,
1087
+ currencySign: `accounting`
1088
+ };
1089
+ case `sign-never`:
1090
+ case `+_`: return { signDisplay: `never` };
1091
+ }
1092
+ }
1093
+ function d(e) {
1094
+ var t;
1095
+ 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) {
1096
+ var n = e.slice(0, 2);
1097
+ if (n === `+!` ? (t.signDisplay = `always`, e = e.slice(2)) : n === `+?` && (t.signDisplay = `exceptZero`, e = e.slice(2)), !c.test(e)) throw Error(`Malformed concise eng/scientific notation`);
1098
+ t.minimumIntegerDigits = e.length;
1099
+ }
1100
+ return t;
1101
+ }
1102
+ function f(e) {
1103
+ return u(e) || {};
1104
+ }
1105
+ function p(e) {
1106
+ for (var n = {}, r = 0, p = e; r < p.length; r++) {
1107
+ var m = p[r];
1108
+ switch (m.stem) {
1109
+ case `percent`:
1110
+ case `%`:
1111
+ n.style = `percent`;
1112
+ continue;
1113
+ case `%x100`:
1114
+ n.style = `percent`, n.scale = 100;
1115
+ continue;
1116
+ case `currency`:
1117
+ n.style = `currency`, n.currency = m.options[0];
1118
+ continue;
1119
+ case `group-off`:
1120
+ case `,_`:
1121
+ n.useGrouping = !1;
1122
+ continue;
1123
+ case `precision-integer`:
1124
+ case `.`:
1125
+ n.maximumFractionDigits = 0;
1126
+ continue;
1127
+ case `measure-unit`:
1128
+ case `unit`:
1129
+ n.style = `unit`, n.unit = i(m.options[0]);
1130
+ continue;
1131
+ case `compact-short`:
1132
+ case `K`:
1133
+ n.notation = `compact`, n.compactDisplay = `short`;
1134
+ continue;
1135
+ case `compact-long`:
1136
+ case `KK`:
1137
+ n.notation = `compact`, n.compactDisplay = `long`;
1138
+ continue;
1139
+ case `scientific`:
1140
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `scientific` }), m.options.reduce(function(e, n) {
1141
+ return t.__assign(t.__assign({}, e), f(n));
1142
+ }, {}));
1143
+ continue;
1144
+ case `engineering`:
1145
+ n = t.__assign(t.__assign(t.__assign({}, n), { notation: `engineering` }), m.options.reduce(function(e, n) {
1146
+ return t.__assign(t.__assign({}, e), f(n));
1147
+ }, {}));
1148
+ continue;
1149
+ case `notation-simple`:
1150
+ n.notation = `standard`;
1151
+ continue;
1152
+ case `unit-width-narrow`:
1153
+ n.currencyDisplay = `narrowSymbol`, n.unitDisplay = `narrow`;
1154
+ continue;
1155
+ case `unit-width-short`:
1156
+ n.currencyDisplay = `code`, n.unitDisplay = `short`;
1157
+ continue;
1158
+ case `unit-width-full-name`:
1159
+ n.currencyDisplay = `name`, n.unitDisplay = `long`;
1160
+ continue;
1161
+ case `unit-width-iso-code`:
1162
+ n.currencyDisplay = `symbol`;
1163
+ continue;
1164
+ case `scale`:
1165
+ n.scale = parseFloat(m.options[0]);
1166
+ continue;
1167
+ case `rounding-mode-floor`:
1168
+ n.roundingMode = `floor`;
1169
+ continue;
1170
+ case `rounding-mode-ceiling`:
1171
+ n.roundingMode = `ceil`;
1172
+ continue;
1173
+ case `rounding-mode-down`:
1174
+ n.roundingMode = `trunc`;
1175
+ continue;
1176
+ case `rounding-mode-up`:
1177
+ n.roundingMode = `expand`;
1178
+ continue;
1179
+ case `rounding-mode-half-even`:
1180
+ n.roundingMode = `halfEven`;
1181
+ continue;
1182
+ case `rounding-mode-half-down`:
1183
+ n.roundingMode = `halfTrunc`;
1184
+ continue;
1185
+ case `rounding-mode-half-up`:
1186
+ n.roundingMode = `halfExpand`;
1187
+ continue;
1188
+ case `integer-width`:
1189
+ if (m.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
1190
+ m.options[0].replace(s, function(e, t, r, i, a, o) {
1191
+ if (t) n.minimumIntegerDigits = r.length;
1192
+ else if (i && a) throw Error(`We currently do not support maximum integer digits`);
1193
+ else if (o) throw Error(`We currently do not support exact integer digits`);
1194
+ return ``;
1195
+ });
1196
+ continue;
1197
+ }
1198
+ if (c.test(m.stem)) {
1199
+ n.minimumIntegerDigits = m.stem.length;
1200
+ continue;
1201
+ }
1202
+ if (a.test(m.stem)) {
1203
+ if (m.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
1204
+ m.stem.replace(a, function(e, t, r, i, a, o) {
1205
+ return r === `*` ? n.minimumFractionDigits = t.length : i && i[0] === `#` ? n.maximumFractionDigits = i.length : a && o ? (n.minimumFractionDigits = a.length, n.maximumFractionDigits = a.length + o.length) : (n.minimumFractionDigits = t.length, n.maximumFractionDigits = t.length), ``;
1206
+ });
1207
+ var h = m.options[0];
1208
+ h === `w` ? n = t.__assign(t.__assign({}, n), { trailingZeroDisplay: `stripIfInteger` }) : h && (n = t.__assign(t.__assign({}, n), l(h)));
1209
+ continue;
1210
+ }
1211
+ if (o.test(m.stem)) {
1212
+ n = t.__assign(t.__assign({}, n), l(m.stem));
1213
+ continue;
1214
+ }
1215
+ var g = u(m.stem);
1216
+ g && (n = t.__assign(t.__assign({}, n), g));
1217
+ var _ = d(m.stem);
1218
+ _ && (n = t.__assign(t.__assign({}, n), _));
1219
+ }
1220
+ return n;
1221
+ }
1222
+ })), ct = p(((e) => {
1223
+ Object.defineProperty(e, `__esModule`, { value: !0 });
1224
+ var t = (V(), g(P));
1225
+ t.__exportStar(at(), e), t.__exportStar(st(), e);
1226
+ })), lt = p(((e) => {
1227
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.timeData = void 0, e.timeData = {
1228
+ "001": [`H`, `h`],
1229
+ 419: [
1230
+ `h`,
1231
+ `H`,
1232
+ `hB`,
1233
+ `hb`
1234
+ ],
1235
+ AC: [
1236
+ `H`,
1237
+ `h`,
1238
+ `hb`,
1239
+ `hB`
1240
+ ],
1241
+ AD: [`H`, `hB`],
1242
+ AE: [
1243
+ `h`,
1244
+ `hB`,
1245
+ `hb`,
1246
+ `H`
1247
+ ],
1248
+ AF: [
1249
+ `H`,
1250
+ `hb`,
1251
+ `hB`,
1252
+ `h`
1253
+ ],
1254
+ AG: [
1255
+ `h`,
1256
+ `hb`,
1257
+ `H`,
1258
+ `hB`
1259
+ ],
1260
+ AI: [
1261
+ `H`,
1262
+ `h`,
1263
+ `hb`,
1264
+ `hB`
1265
+ ],
1266
+ AL: [
1267
+ `h`,
1268
+ `H`,
1269
+ `hB`
1270
+ ],
1271
+ AM: [`H`, `hB`],
1272
+ AO: [`H`, `hB`],
1273
+ AR: [
1274
+ `h`,
1275
+ `H`,
1276
+ `hB`,
1277
+ `hb`
1278
+ ],
1279
+ AS: [`h`, `H`],
1280
+ AT: [`H`, `hB`],
1281
+ AU: [
1282
+ `h`,
1283
+ `hb`,
1284
+ `H`,
1285
+ `hB`
1286
+ ],
1287
+ AW: [`H`, `hB`],
1288
+ AX: [`H`],
1289
+ AZ: [
1290
+ `H`,
1291
+ `hB`,
1292
+ `h`
1293
+ ],
1294
+ BA: [
1295
+ `H`,
1296
+ `hB`,
1297
+ `h`
1298
+ ],
1299
+ BB: [
1300
+ `h`,
1301
+ `hb`,
1302
+ `H`,
1303
+ `hB`
1304
+ ],
1305
+ BD: [
1306
+ `h`,
1307
+ `hB`,
1308
+ `H`
1309
+ ],
1310
+ BE: [`H`, `hB`],
1311
+ BF: [`H`, `hB`],
1312
+ BG: [
1313
+ `H`,
1314
+ `hB`,
1315
+ `h`
1316
+ ],
1317
+ BH: [
1318
+ `h`,
1319
+ `hB`,
1320
+ `hb`,
1321
+ `H`
1322
+ ],
1323
+ BI: [`H`, `h`],
1324
+ BJ: [`H`, `hB`],
1325
+ BL: [`H`, `hB`],
1326
+ BM: [
1327
+ `h`,
1328
+ `hb`,
1329
+ `H`,
1330
+ `hB`
1331
+ ],
1332
+ BN: [
1333
+ `hb`,
1334
+ `hB`,
1335
+ `h`,
1336
+ `H`
1337
+ ],
1338
+ BO: [
1339
+ `h`,
1340
+ `H`,
1341
+ `hB`,
1342
+ `hb`
1343
+ ],
1344
+ BQ: [`H`],
1345
+ BR: [`H`, `hB`],
1346
+ BS: [
1347
+ `h`,
1348
+ `hb`,
1349
+ `H`,
1350
+ `hB`
1351
+ ],
1352
+ BT: [`h`, `H`],
1353
+ BW: [
1354
+ `H`,
1355
+ `h`,
1356
+ `hb`,
1357
+ `hB`
1358
+ ],
1359
+ BY: [`H`, `h`],
1360
+ BZ: [
1361
+ `H`,
1362
+ `h`,
1363
+ `hb`,
1364
+ `hB`
1365
+ ],
1366
+ CA: [
1367
+ `h`,
1368
+ `hb`,
1369
+ `H`,
1370
+ `hB`
1371
+ ],
1372
+ CC: [
1373
+ `H`,
1374
+ `h`,
1375
+ `hb`,
1376
+ `hB`
1377
+ ],
1378
+ CD: [`hB`, `H`],
1379
+ CF: [
1380
+ `H`,
1381
+ `h`,
1382
+ `hB`
1383
+ ],
1384
+ CG: [`H`, `hB`],
1385
+ CH: [
1386
+ `H`,
1387
+ `hB`,
1388
+ `h`
1389
+ ],
1390
+ CI: [`H`, `hB`],
1391
+ CK: [
1392
+ `H`,
1393
+ `h`,
1394
+ `hb`,
1395
+ `hB`
1396
+ ],
1397
+ CL: [
1398
+ `h`,
1399
+ `H`,
1400
+ `hB`,
1401
+ `hb`
1402
+ ],
1403
+ CM: [
1404
+ `H`,
1405
+ `h`,
1406
+ `hB`
1407
+ ],
1408
+ CN: [
1409
+ `H`,
1410
+ `hB`,
1411
+ `hb`,
1412
+ `h`
1413
+ ],
1414
+ CO: [
1415
+ `h`,
1416
+ `H`,
1417
+ `hB`,
1418
+ `hb`
1419
+ ],
1420
+ CP: [`H`],
1421
+ CR: [
1422
+ `h`,
1423
+ `H`,
1424
+ `hB`,
1425
+ `hb`
1426
+ ],
1427
+ CU: [
1428
+ `h`,
1429
+ `H`,
1430
+ `hB`,
1431
+ `hb`
1432
+ ],
1433
+ CV: [`H`, `hB`],
1434
+ CW: [`H`, `hB`],
1435
+ CX: [
1436
+ `H`,
1437
+ `h`,
1438
+ `hb`,
1439
+ `hB`
1440
+ ],
1441
+ CY: [
1442
+ `h`,
1443
+ `H`,
1444
+ `hb`,
1445
+ `hB`
1446
+ ],
1447
+ CZ: [`H`],
1448
+ DE: [`H`, `hB`],
1449
+ DG: [
1450
+ `H`,
1451
+ `h`,
1452
+ `hb`,
1453
+ `hB`
1454
+ ],
1455
+ DJ: [`h`, `H`],
1456
+ DK: [`H`],
1457
+ DM: [
1458
+ `h`,
1459
+ `hb`,
1460
+ `H`,
1461
+ `hB`
1462
+ ],
1463
+ DO: [
1464
+ `h`,
1465
+ `H`,
1466
+ `hB`,
1467
+ `hb`
1468
+ ],
1469
+ DZ: [
1470
+ `h`,
1471
+ `hB`,
1472
+ `hb`,
1473
+ `H`
1474
+ ],
1475
+ EA: [
1476
+ `H`,
1477
+ `h`,
1478
+ `hB`,
1479
+ `hb`
1480
+ ],
1481
+ EC: [
1482
+ `h`,
1483
+ `H`,
1484
+ `hB`,
1485
+ `hb`
1486
+ ],
1487
+ EE: [`H`, `hB`],
1488
+ EG: [
1489
+ `h`,
1490
+ `hB`,
1491
+ `hb`,
1492
+ `H`
1493
+ ],
1494
+ EH: [
1495
+ `h`,
1496
+ `hB`,
1497
+ `hb`,
1498
+ `H`
1499
+ ],
1500
+ ER: [`h`, `H`],
1501
+ ES: [
1502
+ `H`,
1503
+ `hB`,
1504
+ `h`,
1505
+ `hb`
1506
+ ],
1507
+ ET: [
1508
+ `hB`,
1509
+ `hb`,
1510
+ `h`,
1511
+ `H`
1512
+ ],
1513
+ FI: [`H`],
1514
+ FJ: [
1515
+ `h`,
1516
+ `hb`,
1517
+ `H`,
1518
+ `hB`
1519
+ ],
1520
+ FK: [
1521
+ `H`,
1522
+ `h`,
1523
+ `hb`,
1524
+ `hB`
1525
+ ],
1526
+ FM: [
1527
+ `h`,
1528
+ `hb`,
1529
+ `H`,
1530
+ `hB`
1531
+ ],
1532
+ FO: [`H`, `h`],
1533
+ FR: [`H`, `hB`],
1534
+ GA: [`H`, `hB`],
1535
+ GB: [
1536
+ `H`,
1537
+ `h`,
1538
+ `hb`,
1539
+ `hB`
1540
+ ],
1541
+ GD: [
1542
+ `h`,
1543
+ `hb`,
1544
+ `H`,
1545
+ `hB`
1546
+ ],
1547
+ GE: [
1548
+ `H`,
1549
+ `hB`,
1550
+ `h`
1551
+ ],
1552
+ GF: [`H`, `hB`],
1553
+ GG: [
1554
+ `H`,
1555
+ `h`,
1556
+ `hb`,
1557
+ `hB`
1558
+ ],
1559
+ GH: [`h`, `H`],
1560
+ GI: [
1561
+ `H`,
1562
+ `h`,
1563
+ `hb`,
1564
+ `hB`
1565
+ ],
1566
+ GL: [`H`, `h`],
1567
+ GM: [
1568
+ `h`,
1569
+ `hb`,
1570
+ `H`,
1571
+ `hB`
1572
+ ],
1573
+ GN: [`H`, `hB`],
1574
+ GP: [`H`, `hB`],
1575
+ GQ: [
1576
+ `H`,
1577
+ `hB`,
1578
+ `h`,
1579
+ `hb`
1580
+ ],
1581
+ GR: [
1582
+ `h`,
1583
+ `H`,
1584
+ `hb`,
1585
+ `hB`
1586
+ ],
1587
+ GT: [
1588
+ `h`,
1589
+ `H`,
1590
+ `hB`,
1591
+ `hb`
1592
+ ],
1593
+ GU: [
1594
+ `h`,
1595
+ `hb`,
1596
+ `H`,
1597
+ `hB`
1598
+ ],
1599
+ GW: [`H`, `hB`],
1600
+ GY: [
1601
+ `h`,
1602
+ `hb`,
1603
+ `H`,
1604
+ `hB`
1605
+ ],
1606
+ HK: [
1607
+ `h`,
1608
+ `hB`,
1609
+ `hb`,
1610
+ `H`
1611
+ ],
1612
+ HN: [
1613
+ `h`,
1614
+ `H`,
1615
+ `hB`,
1616
+ `hb`
1617
+ ],
1618
+ HR: [`H`, `hB`],
1619
+ HU: [`H`, `h`],
1620
+ IC: [
1621
+ `H`,
1622
+ `h`,
1623
+ `hB`,
1624
+ `hb`
1625
+ ],
1626
+ ID: [`H`],
1627
+ IE: [
1628
+ `H`,
1629
+ `h`,
1630
+ `hb`,
1631
+ `hB`
1632
+ ],
1633
+ IL: [`H`, `hB`],
1634
+ IM: [
1635
+ `H`,
1636
+ `h`,
1637
+ `hb`,
1638
+ `hB`
1639
+ ],
1640
+ IN: [`h`, `H`],
1641
+ IO: [
1642
+ `H`,
1643
+ `h`,
1644
+ `hb`,
1645
+ `hB`
1646
+ ],
1647
+ IQ: [
1648
+ `h`,
1649
+ `hB`,
1650
+ `hb`,
1651
+ `H`
1652
+ ],
1653
+ IR: [`hB`, `H`],
1654
+ IS: [`H`],
1655
+ IT: [`H`, `hB`],
1656
+ JE: [
1657
+ `H`,
1658
+ `h`,
1659
+ `hb`,
1660
+ `hB`
1661
+ ],
1662
+ JM: [
1663
+ `h`,
1664
+ `hb`,
1665
+ `H`,
1666
+ `hB`
1667
+ ],
1668
+ JO: [
1669
+ `h`,
1670
+ `hB`,
1671
+ `hb`,
1672
+ `H`
1673
+ ],
1674
+ JP: [
1675
+ `H`,
1676
+ `K`,
1677
+ `h`
1678
+ ],
1679
+ KE: [
1680
+ `hB`,
1681
+ `hb`,
1682
+ `H`,
1683
+ `h`
1684
+ ],
1685
+ KG: [
1686
+ `H`,
1687
+ `h`,
1688
+ `hB`,
1689
+ `hb`
1690
+ ],
1691
+ KH: [
1692
+ `hB`,
1693
+ `h`,
1694
+ `H`,
1695
+ `hb`
1696
+ ],
1697
+ KI: [
1698
+ `h`,
1699
+ `hb`,
1700
+ `H`,
1701
+ `hB`
1702
+ ],
1703
+ KM: [
1704
+ `H`,
1705
+ `h`,
1706
+ `hB`,
1707
+ `hb`
1708
+ ],
1709
+ KN: [
1710
+ `h`,
1711
+ `hb`,
1712
+ `H`,
1713
+ `hB`
1714
+ ],
1715
+ KP: [
1716
+ `h`,
1717
+ `H`,
1718
+ `hB`,
1719
+ `hb`
1720
+ ],
1721
+ KR: [
1722
+ `h`,
1723
+ `H`,
1724
+ `hB`,
1725
+ `hb`
1726
+ ],
1727
+ KW: [
1728
+ `h`,
1729
+ `hB`,
1730
+ `hb`,
1731
+ `H`
1732
+ ],
1733
+ KY: [
1734
+ `h`,
1735
+ `hb`,
1736
+ `H`,
1737
+ `hB`
1738
+ ],
1739
+ KZ: [`H`, `hB`],
1740
+ LA: [
1741
+ `H`,
1742
+ `hb`,
1743
+ `hB`,
1744
+ `h`
1745
+ ],
1746
+ LB: [
1747
+ `h`,
1748
+ `hB`,
1749
+ `hb`,
1750
+ `H`
1751
+ ],
1752
+ LC: [
1753
+ `h`,
1754
+ `hb`,
1755
+ `H`,
1756
+ `hB`
1757
+ ],
1758
+ LI: [
1759
+ `H`,
1760
+ `hB`,
1761
+ `h`
1762
+ ],
1763
+ LK: [
1764
+ `H`,
1765
+ `h`,
1766
+ `hB`,
1767
+ `hb`
1768
+ ],
1769
+ LR: [
1770
+ `h`,
1771
+ `hb`,
1772
+ `H`,
1773
+ `hB`
1774
+ ],
1775
+ LS: [`h`, `H`],
1776
+ LT: [
1777
+ `H`,
1778
+ `h`,
1779
+ `hb`,
1780
+ `hB`
1781
+ ],
1782
+ LU: [
1783
+ `H`,
1784
+ `h`,
1785
+ `hB`
1786
+ ],
1787
+ LV: [
1788
+ `H`,
1789
+ `hB`,
1790
+ `hb`,
1791
+ `h`
1792
+ ],
1793
+ LY: [
1794
+ `h`,
1795
+ `hB`,
1796
+ `hb`,
1797
+ `H`
1798
+ ],
1799
+ MA: [
1800
+ `H`,
1801
+ `h`,
1802
+ `hB`,
1803
+ `hb`
1804
+ ],
1805
+ MC: [`H`, `hB`],
1806
+ MD: [`H`, `hB`],
1807
+ ME: [
1808
+ `H`,
1809
+ `hB`,
1810
+ `h`
1811
+ ],
1812
+ MF: [`H`, `hB`],
1813
+ MG: [`H`, `h`],
1814
+ MH: [
1815
+ `h`,
1816
+ `hb`,
1817
+ `H`,
1818
+ `hB`
1819
+ ],
1820
+ MK: [
1821
+ `H`,
1822
+ `h`,
1823
+ `hb`,
1824
+ `hB`
1825
+ ],
1826
+ ML: [`H`],
1827
+ MM: [
1828
+ `hB`,
1829
+ `hb`,
1830
+ `H`,
1831
+ `h`
1832
+ ],
1833
+ MN: [
1834
+ `H`,
1835
+ `h`,
1836
+ `hb`,
1837
+ `hB`
1838
+ ],
1839
+ MO: [
1840
+ `h`,
1841
+ `hB`,
1842
+ `hb`,
1843
+ `H`
1844
+ ],
1845
+ MP: [
1846
+ `h`,
1847
+ `hb`,
1848
+ `H`,
1849
+ `hB`
1850
+ ],
1851
+ MQ: [`H`, `hB`],
1852
+ MR: [
1853
+ `h`,
1854
+ `hB`,
1855
+ `hb`,
1856
+ `H`
1857
+ ],
1858
+ MS: [
1859
+ `H`,
1860
+ `h`,
1861
+ `hb`,
1862
+ `hB`
1863
+ ],
1864
+ MT: [`H`, `h`],
1865
+ MU: [`H`, `h`],
1866
+ MV: [`H`, `h`],
1867
+ MW: [
1868
+ `h`,
1869
+ `hb`,
1870
+ `H`,
1871
+ `hB`
1872
+ ],
1873
+ MX: [
1874
+ `h`,
1875
+ `H`,
1876
+ `hB`,
1877
+ `hb`
1878
+ ],
1879
+ MY: [
1880
+ `hb`,
1881
+ `hB`,
1882
+ `h`,
1883
+ `H`
1884
+ ],
1885
+ MZ: [`H`, `hB`],
1886
+ NA: [
1887
+ `h`,
1888
+ `H`,
1889
+ `hB`,
1890
+ `hb`
1891
+ ],
1892
+ NC: [`H`, `hB`],
1893
+ NE: [`H`],
1894
+ NF: [
1895
+ `H`,
1896
+ `h`,
1897
+ `hb`,
1898
+ `hB`
1899
+ ],
1900
+ NG: [
1901
+ `H`,
1902
+ `h`,
1903
+ `hb`,
1904
+ `hB`
1905
+ ],
1906
+ NI: [
1907
+ `h`,
1908
+ `H`,
1909
+ `hB`,
1910
+ `hb`
1911
+ ],
1912
+ NL: [`H`, `hB`],
1913
+ NO: [`H`, `h`],
1914
+ NP: [
1915
+ `H`,
1916
+ `h`,
1917
+ `hB`
1918
+ ],
1919
+ NR: [
1920
+ `H`,
1921
+ `h`,
1922
+ `hb`,
1923
+ `hB`
1924
+ ],
1925
+ NU: [
1926
+ `H`,
1927
+ `h`,
1928
+ `hb`,
1929
+ `hB`
1930
+ ],
1931
+ NZ: [
1932
+ `h`,
1933
+ `hb`,
1934
+ `H`,
1935
+ `hB`
1936
+ ],
1937
+ OM: [
1938
+ `h`,
1939
+ `hB`,
1940
+ `hb`,
1941
+ `H`
1942
+ ],
1943
+ PA: [
1944
+ `h`,
1945
+ `H`,
1946
+ `hB`,
1947
+ `hb`
1948
+ ],
1949
+ PE: [
1950
+ `h`,
1951
+ `H`,
1952
+ `hB`,
1953
+ `hb`
1954
+ ],
1955
+ PF: [
1956
+ `H`,
1957
+ `h`,
1958
+ `hB`
1959
+ ],
1960
+ PG: [`h`, `H`],
1961
+ PH: [
1962
+ `h`,
1963
+ `hB`,
1964
+ `hb`,
1965
+ `H`
1966
+ ],
1967
+ PK: [
1968
+ `h`,
1969
+ `hB`,
1970
+ `H`
1971
+ ],
1972
+ PL: [`H`, `h`],
1973
+ PM: [`H`, `hB`],
1974
+ PN: [
1975
+ `H`,
1976
+ `h`,
1977
+ `hb`,
1978
+ `hB`
1979
+ ],
1980
+ PR: [
1981
+ `h`,
1982
+ `H`,
1983
+ `hB`,
1984
+ `hb`
1985
+ ],
1986
+ PS: [
1987
+ `h`,
1988
+ `hB`,
1989
+ `hb`,
1990
+ `H`
1991
+ ],
1992
+ PT: [`H`, `hB`],
1993
+ PW: [`h`, `H`],
1994
+ PY: [
1995
+ `h`,
1996
+ `H`,
1997
+ `hB`,
1998
+ `hb`
1999
+ ],
2000
+ QA: [
2001
+ `h`,
2002
+ `hB`,
2003
+ `hb`,
2004
+ `H`
2005
+ ],
2006
+ RE: [`H`, `hB`],
2007
+ RO: [`H`, `hB`],
2008
+ RS: [
2009
+ `H`,
2010
+ `hB`,
2011
+ `h`
2012
+ ],
2013
+ RU: [`H`],
2014
+ RW: [`H`, `h`],
2015
+ SA: [
2016
+ `h`,
2017
+ `hB`,
2018
+ `hb`,
2019
+ `H`
2020
+ ],
2021
+ SB: [
2022
+ `h`,
2023
+ `hb`,
2024
+ `H`,
2025
+ `hB`
2026
+ ],
2027
+ SC: [
2028
+ `H`,
2029
+ `h`,
2030
+ `hB`
2031
+ ],
2032
+ SD: [
2033
+ `h`,
2034
+ `hB`,
2035
+ `hb`,
2036
+ `H`
2037
+ ],
2038
+ SE: [`H`],
2039
+ SG: [
2040
+ `h`,
2041
+ `hb`,
2042
+ `H`,
2043
+ `hB`
2044
+ ],
2045
+ SH: [
2046
+ `H`,
2047
+ `h`,
2048
+ `hb`,
2049
+ `hB`
2050
+ ],
2051
+ SI: [`H`, `hB`],
2052
+ SJ: [`H`],
2053
+ SK: [`H`],
2054
+ SL: [
2055
+ `h`,
2056
+ `hb`,
2057
+ `H`,
2058
+ `hB`
2059
+ ],
2060
+ SM: [
2061
+ `H`,
2062
+ `h`,
2063
+ `hB`
2064
+ ],
2065
+ SN: [
2066
+ `H`,
2067
+ `h`,
2068
+ `hB`
2069
+ ],
2070
+ SO: [`h`, `H`],
2071
+ SR: [`H`, `hB`],
2072
+ SS: [
2073
+ `h`,
2074
+ `hb`,
2075
+ `H`,
2076
+ `hB`
2077
+ ],
2078
+ ST: [`H`, `hB`],
2079
+ SV: [
2080
+ `h`,
2081
+ `H`,
2082
+ `hB`,
2083
+ `hb`
2084
+ ],
2085
+ SX: [
2086
+ `H`,
2087
+ `h`,
2088
+ `hb`,
2089
+ `hB`
2090
+ ],
2091
+ SY: [
2092
+ `h`,
2093
+ `hB`,
2094
+ `hb`,
2095
+ `H`
2096
+ ],
2097
+ SZ: [
2098
+ `h`,
2099
+ `hb`,
2100
+ `H`,
2101
+ `hB`
2102
+ ],
2103
+ TA: [
2104
+ `H`,
2105
+ `h`,
2106
+ `hb`,
2107
+ `hB`
2108
+ ],
2109
+ TC: [
2110
+ `h`,
2111
+ `hb`,
2112
+ `H`,
2113
+ `hB`
2114
+ ],
2115
+ TD: [
2116
+ `h`,
2117
+ `H`,
2118
+ `hB`
2119
+ ],
2120
+ TF: [
2121
+ `H`,
2122
+ `h`,
2123
+ `hB`
2124
+ ],
2125
+ TG: [`H`, `hB`],
2126
+ TH: [`H`, `h`],
2127
+ TJ: [`H`, `h`],
2128
+ TL: [
2129
+ `H`,
2130
+ `hB`,
2131
+ `hb`,
2132
+ `h`
2133
+ ],
2134
+ TM: [`H`, `h`],
2135
+ TN: [
2136
+ `h`,
2137
+ `hB`,
2138
+ `hb`,
2139
+ `H`
2140
+ ],
2141
+ TO: [`h`, `H`],
2142
+ TR: [`H`, `hB`],
2143
+ TT: [
2144
+ `h`,
2145
+ `hb`,
2146
+ `H`,
2147
+ `hB`
2148
+ ],
2149
+ TW: [
2150
+ `hB`,
2151
+ `hb`,
2152
+ `h`,
2153
+ `H`
2154
+ ],
2155
+ TZ: [
2156
+ `hB`,
2157
+ `hb`,
2158
+ `H`,
2159
+ `h`
2160
+ ],
2161
+ UA: [
2162
+ `H`,
2163
+ `hB`,
2164
+ `h`
2165
+ ],
2166
+ UG: [
2167
+ `hB`,
2168
+ `hb`,
2169
+ `H`,
2170
+ `h`
2171
+ ],
2172
+ UM: [
2173
+ `h`,
2174
+ `hb`,
2175
+ `H`,
2176
+ `hB`
2177
+ ],
2178
+ US: [
2179
+ `h`,
2180
+ `hb`,
2181
+ `H`,
2182
+ `hB`
2183
+ ],
2184
+ UY: [
2185
+ `h`,
2186
+ `H`,
2187
+ `hB`,
2188
+ `hb`
2189
+ ],
2190
+ UZ: [
2191
+ `H`,
2192
+ `hB`,
2193
+ `h`
2194
+ ],
2195
+ VA: [
2196
+ `H`,
2197
+ `h`,
2198
+ `hB`
2199
+ ],
2200
+ VC: [
2201
+ `h`,
2202
+ `hb`,
2203
+ `H`,
2204
+ `hB`
2205
+ ],
2206
+ VE: [
2207
+ `h`,
2208
+ `H`,
2209
+ `hB`,
2210
+ `hb`
2211
+ ],
2212
+ VG: [
2213
+ `h`,
2214
+ `hb`,
2215
+ `H`,
2216
+ `hB`
2217
+ ],
2218
+ VI: [
2219
+ `h`,
2220
+ `hb`,
2221
+ `H`,
2222
+ `hB`
2223
+ ],
2224
+ VN: [`H`, `h`],
2225
+ VU: [`h`, `H`],
2226
+ WF: [`H`, `hB`],
2227
+ WS: [`h`, `H`],
2228
+ XK: [
2229
+ `H`,
2230
+ `hB`,
2231
+ `h`
2232
+ ],
2233
+ YE: [
2234
+ `h`,
2235
+ `hB`,
2236
+ `hb`,
2237
+ `H`
2238
+ ],
2239
+ YT: [`H`, `hB`],
2240
+ ZA: [
2241
+ `H`,
2242
+ `h`,
2243
+ `hb`,
2244
+ `hB`
2245
+ ],
2246
+ ZM: [
2247
+ `h`,
2248
+ `hb`,
2249
+ `H`,
2250
+ `hB`
2251
+ ],
2252
+ ZW: [`H`, `h`],
2253
+ "af-ZA": [
2254
+ `H`,
2255
+ `h`,
2256
+ `hB`,
2257
+ `hb`
2258
+ ],
2259
+ "ar-001": [
2260
+ `h`,
2261
+ `hB`,
2262
+ `hb`,
2263
+ `H`
2264
+ ],
2265
+ "ca-ES": [
2266
+ `H`,
2267
+ `h`,
2268
+ `hB`
2269
+ ],
2270
+ "en-001": [
2271
+ `h`,
2272
+ `hb`,
2273
+ `H`,
2274
+ `hB`
2275
+ ],
2276
+ "en-HK": [
2277
+ `h`,
2278
+ `hb`,
2279
+ `H`,
2280
+ `hB`
2281
+ ],
2282
+ "en-IL": [
2283
+ `H`,
2284
+ `h`,
2285
+ `hb`,
2286
+ `hB`
2287
+ ],
2288
+ "en-MY": [
2289
+ `h`,
2290
+ `hb`,
2291
+ `H`,
2292
+ `hB`
2293
+ ],
2294
+ "es-BR": [
2295
+ `H`,
2296
+ `h`,
2297
+ `hB`,
2298
+ `hb`
2299
+ ],
2300
+ "es-ES": [
2301
+ `H`,
2302
+ `h`,
2303
+ `hB`,
2304
+ `hb`
2305
+ ],
2306
+ "es-GQ": [
2307
+ `H`,
2308
+ `h`,
2309
+ `hB`,
2310
+ `hb`
2311
+ ],
2312
+ "fr-CA": [
2313
+ `H`,
2314
+ `h`,
2315
+ `hB`
2316
+ ],
2317
+ "gl-ES": [
2318
+ `H`,
2319
+ `h`,
2320
+ `hB`
2321
+ ],
2322
+ "gu-IN": [
2323
+ `hB`,
2324
+ `hb`,
2325
+ `h`,
2326
+ `H`
2327
+ ],
2328
+ "hi-IN": [
2329
+ `hB`,
2330
+ `h`,
2331
+ `H`
2332
+ ],
2333
+ "it-CH": [
2334
+ `H`,
2335
+ `h`,
2336
+ `hB`
2337
+ ],
2338
+ "it-IT": [
2339
+ `H`,
2340
+ `h`,
2341
+ `hB`
2342
+ ],
2343
+ "kn-IN": [
2344
+ `hB`,
2345
+ `h`,
2346
+ `H`
2347
+ ],
2348
+ "ml-IN": [
2349
+ `hB`,
2350
+ `h`,
2351
+ `H`
2352
+ ],
2353
+ "mr-IN": [
2354
+ `hB`,
2355
+ `hb`,
2356
+ `h`,
2357
+ `H`
2358
+ ],
2359
+ "pa-IN": [
2360
+ `hB`,
2361
+ `hb`,
2362
+ `h`,
2363
+ `H`
2364
+ ],
2365
+ "ta-IN": [
2366
+ `hB`,
2367
+ `h`,
2368
+ `hb`,
2369
+ `H`
2370
+ ],
2371
+ "te-IN": [
2372
+ `hB`,
2373
+ `h`,
2374
+ `H`
2375
+ ],
2376
+ "zu-ZA": [
2377
+ `H`,
2378
+ `hB`,
2379
+ `hb`,
2380
+ `h`
2381
+ ]
2382
+ };
2383
+ })), ut = p(((e) => {
2384
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.getBestPattern = n;
2385
+ var t = lt();
2386
+ function n(e, t) {
2387
+ for (var n = ``, i = 0; i < e.length; i++) {
2388
+ var a = e.charAt(i);
2389
+ if (a === `j`) {
2390
+ for (var o = 0; i + 1 < e.length && e.charAt(i + 1) === a;) o++, i++;
2391
+ var s = 1 + (o & 1), c = o < 2 ? 1 : 3 + (o >> 1), l = `a`, u = r(t);
2392
+ for ((u == `H` || u == `k`) && (c = 0); c-- > 0;) n += l;
2393
+ for (; s-- > 0;) n = u + n;
2394
+ } else a === `J` ? n += `H` : n += a;
2395
+ }
2396
+ return n;
2397
+ }
2398
+ function r(e) {
2399
+ var n = e.hourCycle;
2400
+ if (n === void 0 && e.hourCycles && e.hourCycles.length && (n = e.hourCycles[0]), n) switch (n) {
2401
+ case `h24`: return `k`;
2402
+ case `h23`: return `H`;
2403
+ case `h12`: return `h`;
2404
+ case `h11`: return `K`;
2405
+ default: throw Error(`Invalid hourCycle`);
2406
+ }
2407
+ var r = e.language, i;
2408
+ return r !== `root` && (i = e.maximize().region), (t.timeData[i || ``] || t.timeData[r || ``] || t.timeData[`${r}-001`] || t.timeData[`001`])[0];
2409
+ }
2410
+ })), dt = p(((e) => {
2411
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.Parser = void 0;
2412
+ var t = (V(), g(P)), n = rt(), r = H(), i = it(), a = ct(), o = ut(), s = RegExp(`^${i.SPACE_SEPARATOR_REGEX.source}*`), c = RegExp(`${i.SPACE_SEPARATOR_REGEX.source}*\$`);
2413
+ function l(e, t) {
2414
+ return {
2415
+ start: e,
2416
+ end: t
2417
+ };
2418
+ }
2419
+ var u = !!String.prototype.startsWith && `_a`.startsWith(`a`, 1), d = !!String.fromCodePoint, f = !!Object.fromEntries, p = !!String.prototype.codePointAt, m = !!String.prototype.trimStart, h = !!String.prototype.trimEnd, _ = Number.isSafeInteger ? Number.isSafeInteger : function(e) {
2420
+ return typeof e == `number` && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
2421
+ }, v = !0;
2422
+ try {
2423
+ v = C(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`).exec(`a`)?.[0] === `a`;
2424
+ } catch {
2425
+ v = !1;
2426
+ }
2427
+ var y = u ? function(e, t, n) {
2428
+ return e.startsWith(t, n);
2429
+ } : function(e, t, n) {
2430
+ return e.slice(n, n + t.length) === t;
2431
+ }, b = d ? String.fromCodePoint : function() {
2432
+ for (var e = [...arguments], t = ``, n = e.length, r = 0, i; n > r;) {
2433
+ if (i = e[r++], i > 1114111) throw RangeError(i + ` is not a valid code point`);
2434
+ t += i < 65536 ? String.fromCharCode(i) : String.fromCharCode(((i -= 65536) >> 10) + 55296, i % 1024 + 56320);
2435
+ }
2436
+ return t;
2437
+ }, ee = f ? Object.fromEntries : function(e) {
2438
+ for (var t = {}, n = 0, r = e; n < r.length; n++) {
2439
+ var i = r[n], a = i[0];
2440
+ t[a] = i[1];
2441
+ }
2442
+ return t;
2443
+ }, x = p ? function(e, t) {
2444
+ return e.codePointAt(t);
2445
+ } : function(e, t) {
2446
+ var n = e.length;
2447
+ if (!(t < 0 || t >= n)) {
2448
+ var r = e.charCodeAt(t), i;
2449
+ return r < 55296 || r > 56319 || t + 1 === n || (i = e.charCodeAt(t + 1)) < 56320 || i > 57343 ? r : (r - 55296 << 10) + (i - 56320) + 65536;
2450
+ }
2451
+ }, S = m ? function(e) {
2452
+ return e.trimStart();
2453
+ } : function(e) {
2454
+ return e.replace(s, ``);
2455
+ }, te = h ? function(e) {
2456
+ return e.trimEnd();
2457
+ } : function(e) {
2458
+ return e.replace(c, ``);
2459
+ };
2460
+ function C(e, t) {
2461
+ return new RegExp(e, t);
2462
+ }
2463
+ var w;
2464
+ if (v) {
2465
+ var T = C(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2466
+ w = function(e, t) {
2467
+ return T.lastIndex = t, T.exec(e)[1] ?? ``;
2468
+ };
2469
+ } else w = function(e, t) {
2470
+ for (var n = [];;) {
2471
+ var r = x(e, t);
2472
+ if (r === void 0 || k(r) || A(r)) break;
2473
+ n.push(r), t += r >= 65536 ? 2 : 1;
2474
+ }
2475
+ return b.apply(void 0, n);
2476
+ };
2477
+ e.Parser = function() {
2478
+ function e(e, t) {
2479
+ t === void 0 && (t = {}), this.message = e, this.position = {
2480
+ offset: 0,
2481
+ line: 1,
2482
+ column: 1
2483
+ }, this.ignoreTag = !!t.ignoreTag, this.locale = t.locale, this.requiresOtherClause = !!t.requiresOtherClause, this.shouldParseSkeletons = !!t.shouldParseSkeletons;
2484
+ }
2485
+ return e.prototype.parse = function() {
2486
+ if (this.offset() !== 0) throw Error(`parser can only be used once`);
2487
+ return this.parseMessage(0, ``, !1);
2488
+ }, e.prototype.parseMessage = function(e, t, i) {
2489
+ for (var a = []; !this.isEOF();) {
2490
+ var o = this.char();
2491
+ if (o === 123) {
2492
+ var s = this.parseArgument(e, i);
2493
+ if (s.err) return s;
2494
+ a.push(s.val);
2495
+ } else if (o === 125 && e > 0) break;
2496
+ else if (o === 35 && (t === `plural` || t === `selectordinal`)) {
2497
+ var c = this.clonePosition();
2498
+ this.bump(), a.push({
2499
+ type: r.TYPE.pound,
2500
+ location: l(c, this.clonePosition())
2501
+ });
2502
+ } else if (o === 60 && !this.ignoreTag && this.peek() === 47) {
2503
+ if (i) break;
2504
+ return this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(this.clonePosition(), this.clonePosition()));
2505
+ } else if (o === 60 && !this.ignoreTag && E(this.peek() || 0)) {
2506
+ var s = this.parseTag(e, t);
2507
+ if (s.err) return s;
2508
+ a.push(s.val);
2509
+ } else {
2510
+ var s = this.parseLiteral(e, t);
2511
+ if (s.err) return s;
2512
+ a.push(s.val);
2513
+ }
2514
+ }
2515
+ return {
2516
+ val: a,
2517
+ err: null
2518
+ };
2519
+ }, e.prototype.parseTag = function(e, t) {
2520
+ var i = this.clonePosition();
2521
+ this.bump();
2522
+ var a = this.parseTagName();
2523
+ if (this.bumpSpace(), this.bumpIf(`/>`)) return {
2524
+ val: {
2525
+ type: r.TYPE.literal,
2526
+ value: `<${a}/>`,
2527
+ location: l(i, this.clonePosition())
2528
+ },
2529
+ err: null
2530
+ };
2531
+ if (this.bumpIf(`>`)) {
2532
+ var o = this.parseMessage(e + 1, t, !0);
2533
+ if (o.err) return o;
2534
+ var s = o.val, c = this.clonePosition();
2535
+ if (this.bumpIf(`</`)) {
2536
+ if (this.isEOF() || !E(this.char())) return this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()));
2537
+ var u = this.clonePosition();
2538
+ return a === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? {
2539
+ val: {
2540
+ type: r.TYPE.tag,
2541
+ value: a,
2542
+ children: s,
2543
+ location: l(i, this.clonePosition())
2544
+ },
2545
+ err: null
2546
+ } : this.error(n.ErrorKind.INVALID_TAG, l(c, this.clonePosition()))) : this.error(n.ErrorKind.UNMATCHED_CLOSING_TAG, l(u, this.clonePosition()));
2547
+ } else return this.error(n.ErrorKind.UNCLOSED_TAG, l(i, this.clonePosition()));
2548
+ } else return this.error(n.ErrorKind.INVALID_TAG, l(i, this.clonePosition()));
2549
+ }, e.prototype.parseTagName = function() {
2550
+ var e = this.offset();
2551
+ for (this.bump(); !this.isEOF() && O(this.char());) this.bump();
2552
+ return this.message.slice(e, this.offset());
2553
+ }, e.prototype.parseLiteral = function(e, t) {
2554
+ for (var n = this.clonePosition(), i = ``;;) {
2555
+ var a = this.tryParseQuote(t);
2556
+ if (a) {
2557
+ i += a;
2558
+ continue;
2559
+ }
2560
+ var o = this.tryParseUnquoted(e, t);
2561
+ if (o) {
2562
+ i += o;
2563
+ continue;
2564
+ }
2565
+ var s = this.tryParseLeftAngleBracket();
2566
+ if (s) {
2567
+ i += s;
2568
+ continue;
2569
+ }
2570
+ break;
2571
+ }
2572
+ var c = l(n, this.clonePosition());
2573
+ return {
2574
+ val: {
2575
+ type: r.TYPE.literal,
2576
+ value: i,
2577
+ location: c
2578
+ },
2579
+ err: null
2580
+ };
2581
+ }, e.prototype.tryParseLeftAngleBracket = function() {
2582
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !D(this.peek() || 0)) ? (this.bump(), `<`) : null;
2583
+ }, e.prototype.tryParseQuote = function(e) {
2584
+ if (this.isEOF() || this.char() !== 39) return null;
2585
+ switch (this.peek()) {
2586
+ case 39: return this.bump(), this.bump(), `'`;
2587
+ case 123:
2588
+ case 60:
2589
+ case 62:
2590
+ case 125: break;
2591
+ case 35:
2592
+ if (e === `plural` || e === `selectordinal`) break;
2593
+ return null;
2594
+ default: return null;
2595
+ }
2596
+ this.bump();
2597
+ var t = [this.char()];
2598
+ for (this.bump(); !this.isEOF();) {
2599
+ var n = this.char();
2600
+ if (n === 39) if (this.peek() === 39) t.push(39), this.bump();
2601
+ else {
2602
+ this.bump();
2603
+ break;
2604
+ }
2605
+ else t.push(n);
2606
+ this.bump();
2607
+ }
2608
+ return b.apply(void 0, t);
2609
+ }, e.prototype.tryParseUnquoted = function(e, t) {
2610
+ if (this.isEOF()) return null;
2611
+ var n = this.char();
2612
+ return n === 60 || n === 123 || n === 35 && (t === `plural` || t === `selectordinal`) || n === 125 && e > 0 ? null : (this.bump(), b(n));
2613
+ }, e.prototype.parseArgument = function(e, t) {
2614
+ var i = this.clonePosition();
2615
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2616
+ if (this.char() === 125) return this.bump(), this.error(n.ErrorKind.EMPTY_ARGUMENT, l(i, this.clonePosition()));
2617
+ var a = this.parseIdentifierIfPossible().value;
2618
+ if (!a) return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2619
+ if (this.bumpSpace(), this.isEOF()) return this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition()));
2620
+ switch (this.char()) {
2621
+ case 125: return this.bump(), {
2622
+ val: {
2623
+ type: r.TYPE.argument,
2624
+ value: a,
2625
+ location: l(i, this.clonePosition())
2626
+ },
2627
+ err: null
2628
+ };
2629
+ case 44: return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(i, this.clonePosition())) : this.parseArgumentOptions(e, t, a, i);
2630
+ default: return this.error(n.ErrorKind.MALFORMED_ARGUMENT, l(i, this.clonePosition()));
2631
+ }
2632
+ }, e.prototype.parseIdentifierIfPossible = function() {
2633
+ var e = this.clonePosition(), t = this.offset(), n = w(this.message, t), r = t + n.length;
2634
+ return this.bumpTo(r), {
2635
+ value: n,
2636
+ location: l(e, this.clonePosition())
2637
+ };
2638
+ }, e.prototype.parseArgumentOptions = function(e, i, s, c) {
2639
+ var u = this.clonePosition(), d = this.parseIdentifierIfPossible().value, f = this.clonePosition();
2640
+ switch (d) {
2641
+ case ``: return this.error(n.ErrorKind.EXPECT_ARGUMENT_TYPE, l(u, f));
2642
+ case `number`:
2643
+ case `date`:
2644
+ case `time`:
2645
+ this.bumpSpace();
2646
+ var p = null;
2647
+ if (this.bumpIf(`,`)) {
2648
+ this.bumpSpace();
2649
+ var m = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible();
2650
+ if (h.err) return h;
2651
+ var g = te(h.val);
2652
+ if (g.length === 0) return this.error(n.ErrorKind.EXPECT_ARGUMENT_STYLE, l(this.clonePosition(), this.clonePosition()));
2653
+ p = {
2654
+ style: g,
2655
+ styleLocation: l(m, this.clonePosition())
2656
+ };
2657
+ }
2658
+ var _ = this.tryParseArgumentClose(c);
2659
+ if (_.err) return _;
2660
+ var v = l(c, this.clonePosition());
2661
+ if (p && y(p?.style, `::`, 0)) {
2662
+ var b = S(p.style.slice(2));
2663
+ if (d === `number`) {
2664
+ var h = this.parseNumberSkeletonFromString(b, p.styleLocation);
2665
+ return h.err ? h : {
2666
+ val: {
2667
+ type: r.TYPE.number,
2668
+ value: s,
2669
+ location: v,
2670
+ style: h.val
2671
+ },
2672
+ err: null
2673
+ };
2674
+ } else {
2675
+ if (b.length === 0) return this.error(n.ErrorKind.EXPECT_DATE_TIME_SKELETON, v);
2676
+ var x = b;
2677
+ this.locale && (x = (0, o.getBestPattern)(b, this.locale));
2678
+ var g = {
2679
+ type: r.SKELETON_TYPE.dateTime,
2680
+ pattern: x,
2681
+ location: p.styleLocation,
2682
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseDateTimeSkeleton)(x) : {}
2683
+ };
2684
+ return {
2685
+ val: {
2686
+ type: d === `date` ? r.TYPE.date : r.TYPE.time,
2687
+ value: s,
2688
+ location: v,
2689
+ style: g
2690
+ },
2691
+ err: null
2692
+ };
2693
+ }
2694
+ }
2695
+ return {
2696
+ val: {
2697
+ type: d === `number` ? r.TYPE.number : d === `date` ? r.TYPE.date : r.TYPE.time,
2698
+ value: s,
2699
+ location: v,
2700
+ style: p?.style ?? null
2701
+ },
2702
+ err: null
2703
+ };
2704
+ case `plural`:
2705
+ case `selectordinal`:
2706
+ case `select`:
2707
+ var C = this.clonePosition();
2708
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(n.ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, l(C, t.__assign({}, C)));
2709
+ this.bumpSpace();
2710
+ var w = this.parseIdentifierIfPossible(), T = 0;
2711
+ if (d !== `select` && w.value === `offset`) {
2712
+ if (!this.bumpIf(`:`)) return this.error(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, l(this.clonePosition(), this.clonePosition()));
2713
+ this.bumpSpace();
2714
+ var h = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, n.ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2715
+ if (h.err) return h;
2716
+ this.bumpSpace(), w = this.parseIdentifierIfPossible(), T = h.val;
2717
+ }
2718
+ var E = this.tryParsePluralOrSelectOptions(e, d, i, w);
2719
+ if (E.err) return E;
2720
+ var _ = this.tryParseArgumentClose(c);
2721
+ if (_.err) return _;
2722
+ var D = l(c, this.clonePosition());
2723
+ return d === `select` ? {
2724
+ val: {
2725
+ type: r.TYPE.select,
2726
+ value: s,
2727
+ options: ee(E.val),
2728
+ location: D
2729
+ },
2730
+ err: null
2731
+ } : {
2732
+ val: {
2733
+ type: r.TYPE.plural,
2734
+ value: s,
2735
+ options: ee(E.val),
2736
+ offset: T,
2737
+ pluralType: d === `plural` ? `cardinal` : `ordinal`,
2738
+ location: D
2739
+ },
2740
+ err: null
2741
+ };
2742
+ default: return this.error(n.ErrorKind.INVALID_ARGUMENT_TYPE, l(u, f));
2743
+ }
2744
+ }, e.prototype.tryParseArgumentClose = function(e) {
2745
+ return this.isEOF() || this.char() !== 125 ? this.error(n.ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, l(e, this.clonePosition())) : (this.bump(), {
2746
+ val: !0,
2747
+ err: null
2748
+ });
2749
+ }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2750
+ for (var e = 0, t = this.clonePosition(); !this.isEOF();) switch (this.char()) {
2751
+ case 39:
2752
+ this.bump();
2753
+ var r = this.clonePosition();
2754
+ if (!this.bumpUntil(`'`)) return this.error(n.ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, l(r, this.clonePosition()));
2755
+ this.bump();
2756
+ break;
2757
+ case 123:
2758
+ e += 1, this.bump();
2759
+ break;
2760
+ case 125:
2761
+ if (e > 0) --e;
2762
+ else return {
2763
+ val: this.message.slice(t.offset, this.offset()),
2764
+ err: null
2765
+ };
2766
+ break;
2767
+ default:
2768
+ this.bump();
2769
+ break;
2770
+ }
2771
+ return {
2772
+ val: this.message.slice(t.offset, this.offset()),
2773
+ err: null
2774
+ };
2775
+ }, e.prototype.parseNumberSkeletonFromString = function(e, t) {
2776
+ var i = [];
2777
+ try {
2778
+ i = (0, a.parseNumberSkeletonFromString)(e);
2779
+ } catch {
2780
+ return this.error(n.ErrorKind.INVALID_NUMBER_SKELETON, t);
2781
+ }
2782
+ return {
2783
+ val: {
2784
+ type: r.SKELETON_TYPE.number,
2785
+ tokens: i,
2786
+ location: t,
2787
+ parsedOptions: this.shouldParseSkeletons ? (0, a.parseNumberSkeleton)(i) : {}
2788
+ },
2789
+ err: null
2790
+ };
2791
+ }, e.prototype.tryParsePluralOrSelectOptions = function(e, t, r, i) {
2792
+ for (var a, o = !1, s = [], c = /* @__PURE__ */ new Set(), u = i.value, d = i.location;;) {
2793
+ if (u.length === 0) {
2794
+ var f = this.clonePosition();
2795
+ if (t !== `select` && this.bumpIf(`=`)) {
2796
+ var p = this.tryParseDecimalInteger(n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, n.ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);
2797
+ if (p.err) return p;
2798
+ d = l(f, this.clonePosition()), u = this.message.slice(f.offset, this.offset());
2799
+ } else break;
2800
+ }
2801
+ if (c.has(u)) return this.error(t === `select` ? n.ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, d);
2802
+ u === `other` && (o = !0), this.bumpSpace();
2803
+ var m = this.clonePosition();
2804
+ if (!this.bumpIf(`{`)) return this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, l(this.clonePosition(), this.clonePosition()));
2805
+ var h = this.parseMessage(e + 1, t, r);
2806
+ if (h.err) return h;
2807
+ var g = this.tryParseArgumentClose(m);
2808
+ if (g.err) return g;
2809
+ s.push([u, {
2810
+ value: h.val,
2811
+ location: l(m, this.clonePosition())
2812
+ }]), c.add(u), this.bumpSpace(), a = this.parseIdentifierIfPossible(), u = a.value, d = a.location;
2813
+ }
2814
+ return s.length === 0 ? this.error(t === `select` ? n.ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR : n.ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, l(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(n.ErrorKind.MISSING_OTHER_CLAUSE, l(this.clonePosition(), this.clonePosition())) : {
2815
+ val: s,
2816
+ err: null
2817
+ };
2818
+ }, e.prototype.tryParseDecimalInteger = function(e, t) {
2819
+ var n = 1, r = this.clonePosition();
2820
+ this.bumpIf(`+`) || this.bumpIf(`-`) && (n = -1);
2821
+ for (var i = !1, a = 0; !this.isEOF();) {
2822
+ var o = this.char();
2823
+ if (o >= 48 && o <= 57) i = !0, a = a * 10 + (o - 48), this.bump();
2824
+ else break;
2825
+ }
2826
+ var s = l(r, this.clonePosition());
2827
+ return i ? (a *= n, _(a) ? {
2828
+ val: a,
2829
+ err: null
2830
+ } : this.error(t, s)) : this.error(e, s);
2831
+ }, e.prototype.offset = function() {
2832
+ return this.position.offset;
2833
+ }, e.prototype.isEOF = function() {
2834
+ return this.offset() === this.message.length;
2835
+ }, e.prototype.clonePosition = function() {
2836
+ return {
2837
+ offset: this.position.offset,
2838
+ line: this.position.line,
2839
+ column: this.position.column
2840
+ };
2841
+ }, e.prototype.char = function() {
2842
+ var e = this.position.offset;
2843
+ if (e >= this.message.length) throw Error(`out of bound`);
2844
+ var t = x(this.message, e);
2845
+ if (t === void 0) throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);
2846
+ return t;
2847
+ }, e.prototype.error = function(e, t) {
2848
+ return {
2849
+ val: null,
2850
+ err: {
2851
+ kind: e,
2852
+ message: this.message,
2853
+ location: t
2854
+ }
2855
+ };
2856
+ }, e.prototype.bump = function() {
2857
+ if (!this.isEOF()) {
2858
+ var e = this.char();
2859
+ 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);
2860
+ }
2861
+ }, e.prototype.bumpIf = function(e) {
2862
+ if (y(this.message, e, this.offset())) {
2863
+ for (var t = 0; t < e.length; t++) this.bump();
2864
+ return !0;
2865
+ }
2866
+ return !1;
2867
+ }, e.prototype.bumpUntil = function(e) {
2868
+ var t = this.offset(), n = this.message.indexOf(e, t);
2869
+ return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
2870
+ }, e.prototype.bumpTo = function(e) {
2871
+ if (this.offset() > e) throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);
2872
+ for (e = Math.min(e, this.message.length);;) {
2873
+ var t = this.offset();
2874
+ if (t === e) break;
2875
+ if (t > e) throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);
2876
+ if (this.bump(), this.isEOF()) break;
2877
+ }
2878
+ }, e.prototype.bumpSpace = function() {
2879
+ for (; !this.isEOF() && k(this.char());) this.bump();
2880
+ }, e.prototype.peek = function() {
2881
+ if (this.isEOF()) return null;
2882
+ var e = this.char(), t = this.offset();
2883
+ return this.message.charCodeAt(t + (e >= 65536 ? 2 : 1)) ?? null;
2884
+ }, e;
2885
+ }();
2886
+ function E(e) {
2887
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
2888
+ }
2889
+ function D(e) {
2890
+ return E(e) || e === 47;
2891
+ }
2892
+ function O(e) {
2893
+ 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;
2894
+ }
2895
+ function k(e) {
2896
+ return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
2897
+ }
2898
+ function A(e) {
2899
+ return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
2900
+ }
2901
+ })), ft = p(((e) => {
2902
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.hoistSelectors = s, e.isStructurallySame = l;
2903
+ var t = (V(), g(P)), n = H();
2904
+ function r(e) {
2905
+ return Array.isArray(e) ? t.__spreadArray([], e.map(r), !0) : typeof e == `object` && e ? Object.keys(e).reduce(function(t, n) {
2906
+ return t[n] = r(e[n]), t;
2907
+ }, {}) : e;
2908
+ }
2909
+ function i(e, n, i) {
2910
+ var a = r(n), o = a.options;
2911
+ return a.options = Object.keys(o).reduce(function(n, r) {
2912
+ return n[r] = { value: s(t.__spreadArray(t.__spreadArray(t.__spreadArray([], e.slice(0, i), !0), o[r].value, !0), e.slice(i + 1), !0)) }, n;
2913
+ }, {}), a;
2914
+ }
2915
+ function a(e) {
2916
+ return (0, n.isPluralElement)(e) || (0, n.isSelectElement)(e);
2917
+ }
2918
+ function o(e) {
2919
+ return !!e.find(function(e) {
2920
+ return a(e) ? !0 : (0, n.isTagElement)(e) ? o(e.children) : !1;
2921
+ });
2922
+ }
2923
+ function s(e) {
2924
+ for (var t = 0; t < e.length; t++) {
2925
+ var r = e[t];
2926
+ if (a(r)) return [i(e, r, t)];
2927
+ if ((0, n.isTagElement)(r) && o([r])) throw Error(`Cannot hoist plural/select within a tag element. Please put the tag element inside each plural/select option`);
2928
+ }
2929
+ return e;
2930
+ }
2931
+ function c(e, t) {
2932
+ t === void 0 && (t = /* @__PURE__ */ new Map()), e.forEach(function(e) {
2933
+ if ((0, n.isArgumentElement)(e) || (0, n.isDateElement)(e) || (0, n.isTimeElement)(e) || (0, n.isNumberElement)(e)) {
2934
+ if (e.value in t && t.get(e.value) !== e.type) throw Error(`Variable ${e.value} has conflicting types`);
2935
+ t.set(e.value, e.type);
2936
+ }
2937
+ ((0, n.isPluralElement)(e) || (0, n.isSelectElement)(e)) && (t.set(e.value, e.type), Object.keys(e.options).forEach(function(n) {
2938
+ c(e.options[n].value, t);
2939
+ })), (0, n.isTagElement)(e) && (t.set(e.value, e.type), c(e.children, t));
2940
+ });
2941
+ }
2942
+ function l(e, t) {
2943
+ var r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
2944
+ return c(e, r), c(t, i), r.size === i.size ? Array.from(r.entries()).reduce(function(e, t) {
2945
+ var r = t[0], a = t[1];
2946
+ if (!e.success) return e;
2947
+ var o = i.get(r);
2948
+ return o == null ? {
2949
+ success: !1,
2950
+ error: Error(`Missing variable ${r} in message`)
2951
+ } : o === a ? e : {
2952
+ success: !1,
2953
+ error: Error(`Variable ${r} has conflicting types: ${n.TYPE[a]} vs ${n.TYPE[o]}`)
2954
+ };
2955
+ }, { success: !0 }) : {
2956
+ success: !1,
2957
+ error: Error(`Different number of variables: [${Array.from(r.keys()).join(`, `)}] vs [${Array.from(i.keys()).join(`, `)}]`)
2958
+ };
2959
+ }
2960
+ })), pt = p(((e) => {
2961
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.isStructurallySame = e._Parser = void 0, e.parse = o;
2962
+ var t = (V(), g(P)), n = rt(), r = dt(), i = H();
2963
+ function a(e) {
2964
+ e.forEach(function(e) {
2965
+ if (delete e.location, (0, i.isSelectElement)(e) || (0, i.isPluralElement)(e)) for (var t in e.options) delete e.options[t].location, a(e.options[t].value);
2966
+ else (0, i.isNumberElement)(e) && (0, i.isNumberSkeleton)(e.style) || ((0, i.isDateElement)(e) || (0, i.isTimeElement)(e)) && (0, i.isDateTimeSkeleton)(e.style) ? delete e.style.location : (0, i.isTagElement)(e) && a(e.children);
2967
+ });
2968
+ }
2969
+ function o(e, i) {
2970
+ i === void 0 && (i = {}), i = t.__assign({
2971
+ shouldParseSkeletons: !0,
2972
+ requiresOtherClause: !0
2973
+ }, i);
2974
+ var o = new r.Parser(e, i).parse();
2975
+ if (o.err) {
2976
+ var s = SyntaxError(n.ErrorKind[o.err.kind]);
2977
+ throw s.location = o.err.location, s.originalMessage = o.err.message, s;
2978
+ }
2979
+ return i?.captureLocation || a(o.val), o.val;
2980
+ }
2981
+ t.__exportStar(H(), e), e._Parser = r.Parser;
2982
+ var s = ft();
2983
+ Object.defineProperty(e, `isStructurallySame`, {
2984
+ enumerable: !0,
2985
+ get: function() {
2986
+ return s.isStructurallySame;
2987
+ }
2988
+ });
2989
+ })), mt = p(((e) => {
2990
+ Object.defineProperty(e, `__esModule`, { value: !0 }), e.printAST = r;
2991
+ var t = (V(), g(P)), n = H();
2992
+ function r(e) {
2993
+ return i(e, !1);
2994
+ }
2995
+ function i(e, t) {
2996
+ return e.map(function(r, i) {
2997
+ if ((0, n.isLiteralElement)(r)) return s(r, t, i === 0, i === e.length - 1);
2998
+ if ((0, n.isArgumentElement)(r)) return c(r);
2999
+ if ((0, n.isDateElement)(r) || (0, n.isTimeElement)(r) || (0, n.isNumberElement)(r)) return l(r);
3000
+ if ((0, n.isPluralElement)(r)) return m(r);
3001
+ if ((0, n.isSelectElement)(r)) return p(r);
3002
+ if ((0, n.isPoundElement)(r)) return `#`;
3003
+ if ((0, n.isTagElement)(r)) return a(r);
3004
+ }).join(``);
3005
+ }
3006
+ function a(e) {
3007
+ return `<${e.value}>${r(e.children)}</${e.value}>`;
3008
+ }
3009
+ function o(e) {
3010
+ return e.replace(/([{}](?:[\s\S]*[{}])?)/, `'$1'`);
3011
+ }
3012
+ function s(e, t, n, r) {
3013
+ var i = e.value;
3014
+ return !n && i[0] === `'` && (i = `''${i.slice(1)}`), !r && i[i.length - 1] === `'` && (i = `${i.slice(0, i.length - 1)}''`), i = o(i), t ? i.replace(`#`, `'#'`) : i;
3015
+ }
3016
+ function c(e) {
3017
+ return `{${e.value}}`;
3018
+ }
3019
+ function l(e) {
3020
+ return `{${e.value}, ${n.TYPE[e.type]}${e.style ? `, ${d(e.style)}` : ``}}`;
3021
+ }
3022
+ function u(e) {
3023
+ var t = e.stem, n = e.options;
3024
+ return n.length === 0 ? t : `${t}${n.map(function(e) {
3025
+ return `/${e}`;
3026
+ }).join(``)}`;
3027
+ }
3028
+ function d(e) {
3029
+ return typeof e == `string` ? o(e) : e.type === n.SKELETON_TYPE.dateTime ? `::${f(e)}` : `::${e.tokens.map(u).join(` `)}`;
3030
+ }
3031
+ function f(e) {
3032
+ return e.pattern;
3033
+ }
3034
+ function p(e) {
3035
+ return `{${[
3036
+ e.value,
3037
+ `select`,
3038
+ Object.keys(e.options).map(function(t) {
3039
+ return `${t}{${i(e.options[t].value, !1)}}`;
3040
+ }).join(` `)
3041
+ ].join(`,`)}}`;
3042
+ }
3043
+ function m(e) {
3044
+ var n = e.pluralType === `cardinal` ? `plural` : `selectordinal`;
3045
+ return `{${[
3046
+ e.value,
3047
+ n,
3048
+ t.__spreadArray([e.offset ? `offset:${e.offset}` : ``], Object.keys(e.options).map(function(t) {
3049
+ return `${t}{${i(e.options[t].value, !0)}}`;
3050
+ }), !0).filter(Boolean).join(` `)
3051
+ ].join(`,`)}}`;
3052
+ }
3053
+ }));
3054
+ pt();
3055
+ H();
3056
+ mt();
3057
+ const K = `_gt_`;
3058
+ RegExp(`^${K}\\d+$`);
3059
+ RegExp(`^${K}$`);
3060
+ const q = `@generaltranslation/react-core`;
3061
+ `${q}`, `${q}`, `${q}`, `${q}`, `${q}`, `${q}`;
3062
+ `${q}`, `${q}`, `${q}`, `${q}`;
3063
+ `${q}`;
3064
+ const sn = `generaltranslation.locale`, cn = `generaltranslation.region`;
3065
+ react$1.use;
3066
+ function Hn({ children: e }) {
3067
+ return e;
3068
+ }
3069
+ function Un(e) {
3070
+ return Hn(e);
3071
+ }
3072
+ Hn._gtt = `derive`, Un._gtt = `derive`;
3073
+ //#endregion
3074
+ //#region src/react-context/provider/ClientProvider.tsx
3075
+ function ClientProvider({ children, dictionary: _dictionary, dictionaryTranslations: _dictionaryTranslations, translations: _translations, locale: _locale, region: _region, _versionId, defaultLocale, translationRequired, dialectTranslationRequired, locales = [], renderSettings, projectId, devApiKey, runtimeUrl, developmentApiEnabled, resetLocaleCookieName, localeCookieName = sn, regionCookieName = cn, customMapping, environment, reloadServer }) {
3076
+ const didMount = (0, react.useRef)(false);
3077
+ const [translations, setTranslations] = (0, react.useState)(_translations);
3078
+ (0, react.useEffect)(() => {
3079
+ if (!didMount.current) return;
3080
+ setTranslations(_translations);
3081
+ }, [_translations]);
3082
+ const [locale, _setLocale] = (0, react.useState)(_locale ? (0, _generaltranslation_format.determineLocale)(_locale, locales, customMapping) || "" : "");
3083
+ (0, react.useEffect)(() => {
3084
+ let cookieLocale = document.cookie.split("; ").find((row) => row.startsWith(`${localeCookieName}=`))?.split("=")[1];
3085
+ if (cookieLocale) cookieLocale = gt.resolveAliasLocale(cookieLocale);
3086
+ if (locale && cookieLocale && cookieLocale !== locale) document.cookie = `${localeCookieName}=;path=/`;
3087
+ }, [locale, localeCookieName]);
3088
+ const [dictionaryTranslations, setDictionaryTranslations] = (0, react.useState)(_dictionaryTranslations || {});
3089
+ const [dictionary, setDictionary] = (0, react.useState)(_dictionary || {});
3090
+ (0, react.useEffect)(() => {
3091
+ if (!didMount.current) return;
3092
+ setDictionaryTranslations(_dictionaryTranslations);
3093
+ }, [_dictionaryTranslations]);
3094
+ (0, react.useEffect)(() => {
3095
+ if (!didMount.current) return;
3096
+ setDictionary(_dictionary);
3097
+ }, [_dictionary]);
3098
+ const [region, _setRegion] = (0, react.useState)(_region);
3099
+ const setRegion = (newRegion) => {
3100
+ document.cookie = `${regionCookieName}=${newRegion || ""};path=/`;
3101
+ _setRegion(newRegion);
3102
+ };
3103
+ (0, react.useEffect)(() => {
3104
+ const cookieRegion = document.cookie.split("; ").find((row) => row.startsWith(`${regionCookieName}=`))?.split("=")[1];
3105
+ if (region && cookieRegion && cookieRegion !== region) document.cookie = `${regionCookieName}=;path=/`;
3106
+ }, [region, regionCookieName]);
3107
+ const gt = (0, react.useMemo)(() => new generaltranslation.GT({
3108
+ devApiKey,
3109
+ sourceLocale: defaultLocale,
3110
+ targetLocale: locale,
3111
+ projectId,
3112
+ baseUrl: runtimeUrl || void 0,
3113
+ customMapping
3114
+ }), [
3115
+ devApiKey,
3116
+ defaultLocale,
3117
+ locale,
3118
+ projectId,
3119
+ runtimeUrl,
3120
+ customMapping
3121
+ ]);
3122
+ const setLocale = (newLocale) => {
3123
+ newLocale = (0, _generaltranslation_format.determineLocale)(newLocale, locales, customMapping) || locale || defaultLocale;
3124
+ newLocale = gt.resolveAliasLocale(newLocale);
3125
+ document.cookie = `${localeCookieName}=${newLocale};path=/`;
3126
+ document.cookie = `${resetLocaleCookieName}=true;path=/`;
3127
+ _setLocale(newLocale);
3128
+ reloadServer();
3129
+ };
3130
+ const { registerIcuForTranslation, registerJsxForTranslation } = (0, _generaltranslation_react_core.useRuntimeTranslation)({
3131
+ gt,
3132
+ locale,
3133
+ versionId: _versionId,
3134
+ runtimeUrl,
3135
+ setTranslations,
3136
+ defaultLocale,
3137
+ renderSettings,
3138
+ developmentApiEnabled,
3139
+ environment
3140
+ });
3141
+ const { _gtFunction, _mFunction, _filterMessagesForPreload, _preloadMessages } = (0, _generaltranslation_react_core.useCreateInternalUseGTFunction)({
3142
+ gt,
3143
+ translations,
3144
+ locale,
3145
+ defaultLocale,
3146
+ translationRequired,
3147
+ developmentApiEnabled,
3148
+ registerIcuForTranslation,
3149
+ environment
3150
+ });
3151
+ const _dictionaryFunction = (0, _generaltranslation_react_core.useCreateInternalUseTranslationsFunction)(gt, dictionary, dictionaryTranslations, translations, locale, defaultLocale, translationRequired, dialectTranslationRequired, developmentApiEnabled, registerIcuForTranslation, environment);
3152
+ const _dictionaryObjFunction = (0, _generaltranslation_react_core.useCreateInternalUseTranslationsObjFunction)(dictionary, dictionaryTranslations, setDictionary, setDictionaryTranslations, translations, locale, defaultLocale, translationRequired, dialectTranslationRequired, developmentApiEnabled, registerIcuForTranslation, _dictionaryFunction);
3153
+ const display = !!(!translationRequired || translations) && locale;
3154
+ (0, react.useEffect)(() => {
3155
+ didMount.current = true;
3156
+ }, []);
3157
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_generaltranslation_react_core.GTContext.Provider, {
3158
+ value: {
3159
+ gt,
3160
+ registerIcuForTranslation,
3161
+ registerJsxForTranslation,
3162
+ setLocale,
3163
+ _gtFunction,
3164
+ _mFunction,
3165
+ _filterMessagesForPreload,
3166
+ _preloadMessages,
3167
+ _dictionaryFunction,
3168
+ _dictionaryObjFunction,
3169
+ locale,
3170
+ locales,
3171
+ defaultLocale,
3172
+ region,
3173
+ setRegion,
3174
+ translations,
3175
+ translationRequired,
3176
+ dialectTranslationRequired,
3177
+ renderSettings,
3178
+ developmentApiEnabled,
3179
+ _versionId
3180
+ },
3181
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Suspense, {
3182
+ fallback: display && children,
3183
+ children: display && children
3184
+ })
3185
+ });
3186
+ }
3187
+ //#endregion
3188
+ //#region src/shared/InternalLocaleSelector.tsx
3189
+ /**
3190
+ * Capitalizes the first letter of a string if applicable.
3191
+ * For strings that do not use capitalization, it returns the string unchanged.
3192
+ * @param {string} str - The string to capitalize.
3193
+ * @returns {string} The string with the first letter capitalized if applicable.
3194
+ */
3195
+ function capitalizeName(str) {
3196
+ if (!str) return "";
3197
+ return str.charAt(0).toUpperCase() + (str.length > 1 ? str.slice(1) : "");
3198
+ }
3199
+ /**
3200
+ * Internal helper to convert deprecated customNames prop to the new customMapping format.
3201
+ * Used for backward compatibility with previous LocaleSelector API.
3202
+ * @param {object} customNames - Mapping of locale to display name.
3203
+ * @returns {CustomMapping | undefined} The converted mapping or undefined.
3204
+ * @internal
3205
+ */
3206
+ function _convertCustomNamesToMapping(customNames) {
3207
+ if (!customNames) return void 0;
3208
+ const result = {};
3209
+ for (const locale in customNames) result[locale] = { name: customNames[locale] };
3210
+ return result;
3211
+ }
3212
+ /**
3213
+ * A dropdown component that allows users to select a locale.
3214
+ * @param {string} locale - The currently selected locale.
3215
+ * @param {string[]} locales - The list of all available locales.
3216
+ * @param {function} setLocale - Function to update the current locale.
3217
+ * @param {function} getLocaleProperties - Function to retrieve properties for a given locale.
3218
+ * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
3219
+ * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
3220
+ * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
3221
+ *
3222
+ * @internal
3223
+ */
3224
+ function InternalLocaleSelector({ locale, locales, customNames, customMapping = _convertCustomNamesToMapping(customNames), setLocale, getLocaleProperties, ...props }) {
3225
+ const getDisplayName = (locale) => {
3226
+ if (customMapping && customMapping[locale]) {
3227
+ if (typeof customMapping[locale] === "string") return customMapping[locale];
3228
+ if (customMapping[locale].name) return customMapping[locale].name;
3229
+ }
3230
+ return capitalizeName(getLocaleProperties(locale).nativeNameWithRegionCode);
3231
+ };
3232
+ if (!locales || locales.length === 0 || !setLocale) return null;
3233
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
3234
+ ...props,
3235
+ value: locale || "",
3236
+ onChange: (e) => setLocale(e.target.value),
3237
+ children: [!locale && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", { value: "" }), locales.map((locale) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
3238
+ value: locale,
3239
+ suppressHydrationWarning: true,
3240
+ children: getDisplayName(locale)
3241
+ }, locale))]
3242
+ });
3243
+ }
3244
+ //#endregion
3245
+ //#region src/react-context/ui/LocaleSelector.tsx
3246
+ /**
3247
+ * A dropdown component that allows users to select a locale.
3248
+ * @param {string[]} [locales] - An optional list of locales to use for the dropdown. If not provided, the list of locales from the `<GTProvider>` context is used.
3249
+ * @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
3250
+ * @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
3251
+ * @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
3252
+ */
3253
+ function LocaleSelector({ locales: _locales, ...props }) {
3254
+ const { locale, locales, setLocale, getLocaleProperties } = (0, _generaltranslation_react_core.useLocaleSelector)(_locales);
3255
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InternalLocaleSelector, {
3256
+ locale,
3257
+ locales,
3258
+ setLocale,
3259
+ getLocaleProperties,
3260
+ ...props
3261
+ });
3262
+ }
3263
+ //#endregion
3264
+ //#region src/react-context/ui/RegionSelector.tsx
3265
+ /**
3266
+ * A dropdown component that allows users to select a region.
3267
+ *
3268
+ * @param {string[]} [regions] - An optional array of ISO 3166 region codes to display. If not provided, regions are inferred from supported locales in the `<GTProvider>` context.
3269
+ * @param {React.ReactNode} [placeholder] - Optional placeholder node to display as the first option when no region is selected.
3270
+ * @param {object} [customMapping] - An optional object to map region codes to custom display names, emojis, or associated locales. The value can be a string (display name) or an object with `name`, `emoji`, and/or `locale` properties.
3271
+ * @param {boolean} [prioritizeCurrentLocaleRegion] - If true, the region corresponding to the current locale is prioritized in the list.
3272
+ * @param {boolean} [sortRegionsAlphabetically] - If true, regions are sorted alphabetically by display name.
3273
+ * @param {boolean} [asLocaleSelector=false] - If true, selecting a region will also update the locale to the region's associated locale.
3274
+ * @param {object} [props] - Additional props to pass to the underlying `<select>` element.
3275
+ * @returns {React.JSX.Element | null} The rendered region dropdown component or null if no regions are available.
3276
+ *
3277
+ * @example
3278
+ * ```tsx
3279
+ * <RegionSelector
3280
+ * regions={['US', 'CA']}
3281
+ * customMapping={{ US: { name: "United States", emoji: "πŸ‡ΊπŸ‡Έ" } }}
3282
+ * placeholder="Select a region"
3283
+ * />
3284
+ * ```
3285
+ */
3286
+ function RegionSelector({ regions: _regions, placeholder, customMapping, prioritizeCurrentLocaleRegion, sortRegionsAlphabetically, asLocaleSelector = false, ...props }) {
3287
+ const { region, setRegion, regions, regionData, locale, setLocale } = (0, _generaltranslation_react_core.useRegionSelector)({
3288
+ regions: _regions,
3289
+ customMapping,
3290
+ prioritizeCurrentLocaleRegion,
3291
+ sortRegionsAlphabetically
3292
+ });
3293
+ const changeRegion = (region) => {
3294
+ setRegion(region);
3295
+ if (asLocaleSelector) {
3296
+ const regionLocale = regionData.get(region).locale;
3297
+ if (locale !== regionLocale) setLocale(regionLocale);
3298
+ }
3299
+ };
3300
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
3301
+ ...props,
3302
+ value: region || "",
3303
+ onChange: (e) => changeRegion(e.target.value),
3304
+ children: [!region && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
3305
+ value: "",
3306
+ disabled: Boolean(region),
3307
+ hidden: Boolean(region),
3308
+ suppressHydrationWarning: true,
3309
+ children: placeholder || ""
3310
+ }, "placeholder"), regions.map((r) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
3311
+ value: r,
3312
+ suppressHydrationWarning: true,
3313
+ children: regionData.get(r).name
3314
+ }, r))]
3315
+ });
3316
+ }
3317
+ //#endregion
3318
+ exports.Branch = _generaltranslation_react_core.Branch;
3319
+ exports.ClientProvider = ClientProvider;
3320
+ exports.Currency = _generaltranslation_react_core.Currency;
3321
+ exports.DateTime = _generaltranslation_react_core.DateTime;
3322
+ exports.Derive = _generaltranslation_react_core.Derive;
3323
+ exports.GTProvider = _generaltranslation_react_core.GTProvider;
3324
+ exports.LocaleSelector = LocaleSelector;
3325
+ exports.Num = _generaltranslation_react_core.Num;
3326
+ exports.Plural = _generaltranslation_react_core.Plural;
3327
+ exports.RegionSelector = RegionSelector;
3328
+ exports.RelativeTime = _generaltranslation_react_core.RelativeTime;
3329
+ exports.Static = _generaltranslation_react_core.Static;
3330
+ exports.T = _generaltranslation_react_core.T;
3331
+ exports.Var = _generaltranslation_react_core.Var;
3332
+ exports.declareStatic = _generaltranslation_react_core.declareStatic;
3333
+ exports.declareVar = _generaltranslation_react_core.declareVar;
3334
+ exports.decodeMsg = _generaltranslation_react_core.decodeMsg;
3335
+ exports.decodeOptions = _generaltranslation_react_core.decodeOptions;
3336
+ exports.decodeVars = _generaltranslation_react_core.decodeVars;
3337
+ exports.derive = _generaltranslation_react_core.derive;
3338
+ exports.gtFallback = _generaltranslation_react_core.gtFallback;
3339
+ exports.mFallback = _generaltranslation_react_core.mFallback;
3340
+ exports.msg = _generaltranslation_react_core.msg;
3341
+ exports.useDefaultLocale = _generaltranslation_react_core.useDefaultLocale;
3342
+ exports.useGT = _generaltranslation_react_core.useGT;
3343
+ exports.useGTClass = _generaltranslation_react_core.useGTClass;
3344
+ exports.useLocale = _generaltranslation_react_core.useLocale;
3345
+ exports.useLocaleDirection = _generaltranslation_react_core.useLocaleDirection;
3346
+ exports.useLocaleProperties = _generaltranslation_react_core.useLocaleProperties;
3347
+ exports.useLocaleSelector = _generaltranslation_react_core.useLocaleSelector;
3348
+ exports.useLocales = _generaltranslation_react_core.useLocales;
3349
+ exports.useMessages = _generaltranslation_react_core.useMessages;
3350
+ exports.useRegion = _generaltranslation_react_core.useRegion;
3351
+ exports.useRegionSelector = _generaltranslation_react_core.useRegionSelector;
3352
+ exports.useSetLocale = _generaltranslation_react_core.useSetLocale;
3353
+ exports.useTranslations = _generaltranslation_react_core.useTranslations;
3354
+ exports.useVersionId = _generaltranslation_react_core.useVersionId;
3355
+
3356
+ //# sourceMappingURL=client.cjs.map