@feedmepos/mf-connect 0.1.38-beta.74 → 0.1.38-beta.76

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 (140) hide show
  1. package/dist/Analytic-BrBxRQue.js +761 -0
  2. package/dist/App-CE_19YJc.js +4642 -0
  3. package/dist/AuditLogs-CQtMmVIp.js +1991 -0
  4. package/dist/Bin-D9CHhiUb.js +166 -0
  5. package/dist/Broadcast-Dg6eBL_f.js +267 -0
  6. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CSv0R9XX.js +121 -0
  7. package/dist/Card-BTkf67i1.js +910 -0
  8. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  9. package/dist/Collections-Czq4nsdu.js +541 -0
  10. package/dist/Credit-B3nX8aJA.js +261 -0
  11. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  12. package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
  13. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  14. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D2gTuN97.js +3120 -0
  15. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-5U6cSZGZ.js +351 -0
  16. package/dist/Experience-B9Vn3NTH.js +260 -0
  17. package/dist/FileSaver.min-CJaOkSQt.js +74 -0
  18. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  19. package/dist/Game-DTx_EsM3.js +331 -0
  20. package/dist/GenerateMaterial-C3J9_YHw.js +589 -0
  21. package/dist/Grab-B29W7rka.js +301 -0
  22. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-DyegKNzM.js +145 -0
  23. package/dist/Index-Fk8EP5dG.js +259 -0
  24. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  25. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-D2XPGgTM.js +48 -0
  26. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-K8qUYrPk.js +18737 -0
  27. package/dist/MainLayout-BFmqJkE_.js +41 -0
  28. package/dist/Marketing-BRHQHAWD.js +145 -0
  29. package/dist/MarketingMaterialEdit-7s3WEDyJ.js +746 -0
  30. package/dist/Member-DwPJNAo9.js +280 -0
  31. package/dist/MemberList-mS1W0qHY.js +1601 -0
  32. package/dist/MemberOverview-wL_ailso.js +58 -0
  33. package/dist/MemberTransactions-BV3xvFYS.js +45 -0
  34. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DzKqVp2O.js +60799 -0
  35. package/dist/Mission-QmoURSu4.js +335 -0
  36. package/dist/Overview-CaTMLlq-.js +1078 -0
  37. package/dist/Point-CjG77Sma.js +263 -0
  38. package/dist/Promotion-C5I-1qPN.js +397 -0
  39. package/dist/Queue-BaIBCCaX.js +259 -0
  40. package/dist/Record-DqpGwZIU.js +341 -0
  41. package/dist/Review-Bq-edSOO.js +621 -0
  42. package/dist/ReviewFacebookCallback-yaC4rLki.js +243 -0
  43. package/dist/ReviewGoogleCallback-uxrrCQdu.js +213 -0
  44. package/dist/Reward-DGP65n5t.js +442 -0
  45. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-bNMoMZOy.js +149 -0
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dgrc6vXF.js +1912 -0
  47. package/dist/Segment-CNz0sR3c.js +881 -0
  48. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DLZEzpve.js +181 -0
  49. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CLdIeyef.js +188 -0
  50. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-ocCdtbbe.js +147 -0
  51. package/dist/Setting-BKDSGYBR.js +2000 -0
  52. package/dist/SettingAdvertisements-B2GMFfN9.js +264 -0
  53. package/dist/Store-C6uLl_Ue.js +1996 -0
  54. package/dist/StoreRewards-D4728UDf.js +535 -0
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CG09fJTP.js +1129 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-B0_bMK5u.js +7005 -0
  57. package/dist/Tier-BNzTa1_w.js +970 -0
  58. package/dist/Title-DY5knovF.js +568 -0
  59. package/dist/Transaction-Ct4yAJ9n.js +39 -0
  60. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CHnxi3XZ.js +130 -0
  61. package/dist/Voucher-DFTMRPT0.js +422 -0
  62. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DZU7XVlZ.js +421 -0
  63. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BndLHmHB.js +56 -0
  64. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  65. package/dist/app-6lG4w5PT.js +59396 -0
  66. package/dist/app-wDQR6dpb.js +39 -0
  67. package/dist/app.js +7 -0
  68. package/dist/business-CrfQ56D0.js +82 -0
  69. package/dist/campaign-B9fR7RwT.js +100 -0
  70. package/dist/campaign-B_iIaTKz.js +253 -0
  71. package/dist/campaign-CpzFl8Vr.js +4 -0
  72. package/dist/campaign.enum-BAHf0dSv.js +26 -0
  73. package/dist/campaign.fn-DDEgBzH2.js +776 -0
  74. package/dist/collectible.enum-9os2zr5a.js +19 -0
  75. package/dist/collection.fn-7qP_m2MW.js +26 -0
  76. package/dist/dto-C2hLQKuu.js +222 -0
  77. package/dist/duplicateCampaign-C6RXfeWE.js +51 -0
  78. package/dist/effect-DGVfWyIc.js +89 -0
  79. package/dist/email-addresses-BHa_qQBd.js +705 -0
  80. package/dist/export-CRPfo4hq.js +97 -0
  81. package/dist/feedme.ico +0 -0
  82. package/dist/helper-0_zrz4kj.js +86 -0
  83. package/dist/index-4Vl1VXum.js +2639 -0
  84. package/dist/index-4bX0ewBJ.js +31 -0
  85. package/dist/index-Bj0TV_D5.js +36 -0
  86. package/dist/index-BpdSswT6.js +48 -0
  87. package/dist/index-By2wenzb.js +32 -0
  88. package/dist/index-C8L2jQ_6.js +28897 -0
  89. package/dist/index-CO5kQMIK.js +85 -0
  90. package/dist/index-CW_ub4cF.js +8912 -0
  91. package/dist/index-Cp8wkBus.js +124 -0
  92. package/dist/index-CuvNtC_M.js +61 -0
  93. package/dist/index-D6Te1BQZ.js +54 -0
  94. package/dist/index-DbJGJ2fB.js +146 -0
  95. package/dist/index-DeaGdUSH.js +30289 -0
  96. package/dist/index-Dp1J9Fxa.js +3 -0
  97. package/dist/index-QUvYZydO.js +67 -0
  98. package/dist/index-lwxV5iX0.js +3431 -0
  99. package/dist/index-vh86FiIQ.js +10 -0
  100. package/dist/index.esm2017-ofRmIpjY.js +3069 -0
  101. package/dist/loading-8_73fcXo.js +71 -0
  102. package/dist/lodash-Bz_vrY3P.js +3678 -0
  103. package/dist/membership-CpB39vNW.js +235 -0
  104. package/dist/moment-D7p2TMB-.js +2583 -0
  105. package/dist/money-DALHjzjF.js +15 -0
  106. package/dist/number-D_GJahxw.js +12 -0
  107. package/dist/object-qECH92oz.js +26 -0
  108. package/dist/objectId-dwaoBfJX.js +7 -0
  109. package/dist/objectid-BZSH63yc.js +145 -0
  110. package/dist/plugins-A4jDcmfS.js +1817 -0
  111. package/dist/remy-D_Deb3ue.js +13 -0
  112. package/dist/reward-BqFB2Yn2.js +36 -0
  113. package/dist/rule-DNylZfIG.js +1969 -0
  114. package/dist/rule-builder-2iT04EOj.js +102 -0
  115. package/dist/style.css +13 -0
  116. package/dist/template-D7rpG7FN.js +188 -0
  117. package/dist/tier-BJDhpH6X.js +4 -0
  118. package/dist/tiers/tier=1.png +0 -0
  119. package/dist/tiers/tier=2.png +0 -0
  120. package/dist/tiers/tier=3.png +0 -0
  121. package/dist/tiers/tier=4.png +0 -0
  122. package/dist/timezone-BW17tvi2.js +1154 -0
  123. package/dist/titles/type=diamond.png +0 -0
  124. package/dist/titles/type=drinks.png +0 -0
  125. package/dist/titles/type=food.png +0 -0
  126. package/dist/titles/type=heart.png +0 -0
  127. package/dist/titles/type=medal.png +0 -0
  128. package/dist/titles/type=spend.png +0 -0
  129. package/dist/titles/type=thank-you.png +0 -0
  130. package/dist/titles/type=thumbs-up.png +0 -0
  131. package/dist/titles/type=years.png +0 -0
  132. package/dist/trigger-CbVrS2i6.js +213 -0
  133. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  134. package/dist/type_drinks-D6jnpvwV.js +4 -0
  135. package/dist/usePagination-dXSoqxfG.js +266 -0
  136. package/dist/user-Ck-m3cB3.js +55 -0
  137. package/dist/vue-i18n-BvqmcBWZ.js +2365 -0
  138. package/dist/xlsx-CkqDfUNs.js +15491 -0
  139. package/dist/zod-B0YxCfoE.js +91 -0
  140. package/package.json +1 -1
@@ -0,0 +1,1817 @@
1
+ import { u as fe, v as ge, x as Ee, w as Ie, y as Fe } from "./index.esm2017-ofRmIpjY.js";
2
+ import { u as oe } from "./app-wDQR6dpb.js";
3
+ import { e as Ae, Z as O, b as de, i as ke, z as De } from "./app-6lG4w5PT.js";
4
+ import { detectLocale as Te, createFeedMeI18n as Ke } from "@feedmepos/mf-common";
5
+ import { S as k } from "./index-C8L2jQ_6.js";
6
+ function vt(r, e) {
7
+ let t = "", s = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
8
+ const i = s.length;
9
+ for (let n = 0; n < r; n++)
10
+ t += s.charAt(Math.floor(Math.random() * i));
11
+ return t;
12
+ }
13
+ const xt = {
14
+ alphabetOnly(r) {
15
+ return r.replace(/[^a-zA-Z]/g, "");
16
+ },
17
+ alphaNumeric(r) {
18
+ return r.replace(/[^a-zA-Z0-9]/g, "");
19
+ },
20
+ numericOnly(r) {
21
+ return r.replace(/[^0-9]/g, "");
22
+ },
23
+ singularOrPlural(r, e, t) {
24
+ const s = r > 1 ? t || `${e}s` : e;
25
+ return `${r} ${s}`;
26
+ }
27
+ }, yt = {
28
+ title: (r) => r.replace(
29
+ /\b\w+/g,
30
+ (e) => e.charAt(0).toUpperCase() + e.substring(1).toLowerCase()
31
+ )
32
+ }, d = (r) => typeof r == "string", H = () => {
33
+ let r, e;
34
+ const t = new Promise((s, i) => {
35
+ r = s, e = i;
36
+ });
37
+ return t.resolve = r, t.reject = e, t;
38
+ }, pe = (r) => r == null ? "" : "" + r, Me = (r, e, t) => {
39
+ r.forEach((s) => {
40
+ e[s] && (t[s] = e[s]);
41
+ });
42
+ }, Ue = /###/g, me = (r) => r && r.indexOf("###") > -1 ? r.replace(Ue, ".") : r, ve = (r) => !r || d(r), z = (r, e, t) => {
43
+ const s = d(e) ? e.split(".") : e;
44
+ let i = 0;
45
+ for (; i < s.length - 1; ) {
46
+ if (ve(r)) return {};
47
+ const n = me(s[i]);
48
+ !r[n] && t && (r[n] = new t()), Object.prototype.hasOwnProperty.call(r, n) ? r = r[n] : r = {}, ++i;
49
+ }
50
+ return ve(r) ? {} : {
51
+ obj: r,
52
+ k: me(s[i])
53
+ };
54
+ }, xe = (r, e, t) => {
55
+ const {
56
+ obj: s,
57
+ k: i
58
+ } = z(r, e, Object);
59
+ if (s !== void 0 || e.length === 1) {
60
+ s[i] = t;
61
+ return;
62
+ }
63
+ let n = e[e.length - 1], a = e.slice(0, e.length - 1), o = z(r, a, Object);
64
+ for (; o.obj === void 0 && a.length; )
65
+ n = `${a[a.length - 1]}.${n}`, a = a.slice(0, a.length - 1), o = z(r, a, Object), o != null && o.obj && typeof o.obj[`${o.k}.${n}`] < "u" && (o.obj = void 0);
66
+ o.obj[`${o.k}.${n}`] = t;
67
+ }, He = (r, e, t, s) => {
68
+ const {
69
+ obj: i,
70
+ k: n
71
+ } = z(r, e, Object);
72
+ i[n] = i[n] || [], i[n].push(t);
73
+ }, Y = (r, e) => {
74
+ const {
75
+ obj: t,
76
+ k: s
77
+ } = z(r, e);
78
+ if (t && Object.prototype.hasOwnProperty.call(t, s))
79
+ return t[s];
80
+ }, ze = (r, e, t) => {
81
+ const s = Y(r, t);
82
+ return s !== void 0 ? s : Y(e, t);
83
+ }, Ne = (r, e, t) => {
84
+ for (const s in e)
85
+ s !== "__proto__" && s !== "constructor" && (s in r ? d(r[s]) || r[s] instanceof String || d(e[s]) || e[s] instanceof String ? t && (r[s] = e[s]) : Ne(r[s], e[s], t) : r[s] = e[s]);
86
+ return r;
87
+ }, F = (r) => r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
88
+ var Be = {
89
+ "&": "&amp;",
90
+ "<": "&lt;",
91
+ ">": "&gt;",
92
+ '"': "&quot;",
93
+ "'": "&#39;",
94
+ "/": "&#x2F;"
95
+ };
96
+ const Je = (r) => d(r) ? r.replace(/[&<>"'\/]/g, (e) => Be[e]) : r;
97
+ class We {
98
+ constructor(e) {
99
+ this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
100
+ }
101
+ getRegExp(e) {
102
+ const t = this.regExpMap.get(e);
103
+ if (t !== void 0)
104
+ return t;
105
+ const s = new RegExp(e);
106
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, s), this.regExpQueue.push(e), s;
107
+ }
108
+ }
109
+ const _e = [" ", ",", "?", "!", ";"], Ze = new We(20), Ye = (r, e, t) => {
110
+ e = e || "", t = t || "";
111
+ const s = _e.filter((a) => e.indexOf(a) < 0 && t.indexOf(a) < 0);
112
+ if (s.length === 0) return !0;
113
+ const i = Ze.getRegExp(`(${s.map((a) => a === "?" ? "\\?" : a).join("|")})`);
114
+ let n = !i.test(r);
115
+ if (!n) {
116
+ const a = r.indexOf(t);
117
+ a > 0 && !i.test(r.substring(0, a)) && (n = !0);
118
+ }
119
+ return n;
120
+ }, ae = function(r, e) {
121
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
122
+ if (!r) return;
123
+ if (r[e])
124
+ return Object.prototype.hasOwnProperty.call(r, e) ? r[e] : void 0;
125
+ const s = e.split(t);
126
+ let i = r;
127
+ for (let n = 0; n < s.length; ) {
128
+ if (!i || typeof i != "object")
129
+ return;
130
+ let a, o = "";
131
+ for (let l = n; l < s.length; ++l)
132
+ if (l !== n && (o += t), o += s[l], a = i[o], a !== void 0) {
133
+ if (["string", "number", "boolean"].indexOf(typeof a) > -1 && l < s.length - 1)
134
+ continue;
135
+ n += l - n + 1;
136
+ break;
137
+ }
138
+ i = a;
139
+ }
140
+ return i;
141
+ }, Q = (r) => r == null ? void 0 : r.replace("_", "-"), Qe = {
142
+ type: "logger",
143
+ log(r) {
144
+ this.output("log", r);
145
+ },
146
+ warn(r) {
147
+ this.output("warn", r);
148
+ },
149
+ error(r) {
150
+ this.output("error", r);
151
+ },
152
+ output(r, e) {
153
+ var t, s;
154
+ (s = (t = console == null ? void 0 : console[r]) == null ? void 0 : t.apply) == null || s.call(t, console, e);
155
+ }
156
+ };
157
+ class G {
158
+ constructor(e) {
159
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
160
+ this.init(e, t);
161
+ }
162
+ init(e) {
163
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
164
+ this.prefix = t.prefix || "i18next:", this.logger = e || Qe, this.options = t, this.debug = t.debug;
165
+ }
166
+ log() {
167
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
168
+ t[s] = arguments[s];
169
+ return this.forward(t, "log", "", !0);
170
+ }
171
+ warn() {
172
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
173
+ t[s] = arguments[s];
174
+ return this.forward(t, "warn", "", !0);
175
+ }
176
+ error() {
177
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
178
+ t[s] = arguments[s];
179
+ return this.forward(t, "error", "");
180
+ }
181
+ deprecate() {
182
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
183
+ t[s] = arguments[s];
184
+ return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
185
+ }
186
+ forward(e, t, s, i) {
187
+ return i && !this.debug ? null : (d(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
188
+ }
189
+ create(e) {
190
+ return new G(this.logger, {
191
+ prefix: `${this.prefix}:${e}:`,
192
+ ...this.options
193
+ });
194
+ }
195
+ clone(e) {
196
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new G(this.logger, e);
197
+ }
198
+ }
199
+ var P = new G();
200
+ class X {
201
+ constructor() {
202
+ this.observers = {};
203
+ }
204
+ on(e, t) {
205
+ return e.split(" ").forEach((s) => {
206
+ this.observers[s] || (this.observers[s] = /* @__PURE__ */ new Map());
207
+ const i = this.observers[s].get(t) || 0;
208
+ this.observers[s].set(t, i + 1);
209
+ }), this;
210
+ }
211
+ off(e, t) {
212
+ if (this.observers[e]) {
213
+ if (!t) {
214
+ delete this.observers[e];
215
+ return;
216
+ }
217
+ this.observers[e].delete(t);
218
+ }
219
+ }
220
+ emit(e) {
221
+ for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
222
+ s[i - 1] = arguments[i];
223
+ this.observers[e] && Array.from(this.observers[e].entries()).forEach((a) => {
224
+ let [o, l] = a;
225
+ for (let u = 0; u < l; u++)
226
+ o(...s);
227
+ }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((a) => {
228
+ let [o, l] = a;
229
+ for (let u = 0; u < l; u++)
230
+ o.apply(o, [e, ...s]);
231
+ });
232
+ }
233
+ }
234
+ class ye extends X {
235
+ constructor(e) {
236
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
237
+ ns: ["translation"],
238
+ defaultNS: "translation"
239
+ };
240
+ super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
241
+ }
242
+ addNamespaces(e) {
243
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
244
+ }
245
+ removeNamespaces(e) {
246
+ const t = this.options.ns.indexOf(e);
247
+ t > -1 && this.options.ns.splice(t, 1);
248
+ }
249
+ getResource(e, t, s) {
250
+ var u, h;
251
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
252
+ const n = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, a = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
253
+ let o;
254
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], s && (Array.isArray(s) ? o.push(...s) : d(s) && n ? o.push(...s.split(n)) : o.push(s)));
255
+ const l = Y(this.data, o);
256
+ return !l && !t && !s && e.indexOf(".") > -1 && (e = o[0], t = o[1], s = o.slice(2).join(".")), l || !a || !d(s) ? l : ae((h = (u = this.data) == null ? void 0 : u[e]) == null ? void 0 : h[t], s, n);
257
+ }
258
+ addResource(e, t, s, i) {
259
+ let n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
260
+ silent: !1
261
+ };
262
+ const a = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
263
+ let o = [e, t];
264
+ s && (o = o.concat(a ? s.split(a) : s)), e.indexOf(".") > -1 && (o = e.split("."), i = t, t = o[1]), this.addNamespaces(t), xe(this.data, o, i), n.silent || this.emit("added", e, t, s, i);
265
+ }
266
+ addResources(e, t, s) {
267
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
268
+ silent: !1
269
+ };
270
+ for (const n in s)
271
+ (d(s[n]) || Array.isArray(s[n])) && this.addResource(e, t, n, s[n], {
272
+ silent: !0
273
+ });
274
+ i.silent || this.emit("added", e, t, s);
275
+ }
276
+ addResourceBundle(e, t, s, i, n) {
277
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
278
+ silent: !1,
279
+ skipCopy: !1
280
+ }, o = [e, t];
281
+ e.indexOf(".") > -1 && (o = e.split("."), i = s, s = t, t = o[1]), this.addNamespaces(t);
282
+ let l = Y(this.data, o) || {};
283
+ a.skipCopy || (s = JSON.parse(JSON.stringify(s))), i ? Ne(l, s, n) : l = {
284
+ ...l,
285
+ ...s
286
+ }, xe(this.data, o, l), a.silent || this.emit("added", e, t, s);
287
+ }
288
+ removeResourceBundle(e, t) {
289
+ this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
290
+ }
291
+ hasResourceBundle(e, t) {
292
+ return this.getResource(e, t) !== void 0;
293
+ }
294
+ getResourceBundle(e, t) {
295
+ return t || (t = this.options.defaultNS), this.getResource(e, t);
296
+ }
297
+ getDataByLanguage(e) {
298
+ return this.data[e];
299
+ }
300
+ hasLanguageSomeTranslations(e) {
301
+ const t = this.getDataByLanguage(e);
302
+ return !!(t && Object.keys(t) || []).find((i) => t[i] && Object.keys(t[i]).length > 0);
303
+ }
304
+ toJSON() {
305
+ return this.data;
306
+ }
307
+ }
308
+ var Ve = {
309
+ processors: {},
310
+ addPostProcessor(r) {
311
+ this.processors[r.name] = r;
312
+ },
313
+ handle(r, e, t, s, i) {
314
+ return r.forEach((n) => {
315
+ var a;
316
+ e = ((a = this.processors[n]) == null ? void 0 : a.process(e, t, s, i)) ?? e;
317
+ }), e;
318
+ }
319
+ };
320
+ const be = {};
321
+ class q extends X {
322
+ constructor(e) {
323
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
324
+ super(), Me(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = P.create("translator");
325
+ }
326
+ changeLanguage(e) {
327
+ e && (this.language = e);
328
+ }
329
+ exists(e) {
330
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
331
+ interpolation: {}
332
+ };
333
+ if (e == null)
334
+ return !1;
335
+ const s = this.resolve(e, t);
336
+ return (s == null ? void 0 : s.res) !== void 0;
337
+ }
338
+ extractFromKey(e, t) {
339
+ let s = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
340
+ s === void 0 && (s = ":");
341
+ const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
342
+ let n = t.ns || this.options.defaultNS || [];
343
+ const a = s && e.indexOf(s) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ye(e, s, i);
344
+ if (a && !o) {
345
+ const l = e.match(this.interpolator.nestingRegexp);
346
+ if (l && l.length > 0)
347
+ return {
348
+ key: e,
349
+ namespaces: d(n) ? [n] : n
350
+ };
351
+ const u = e.split(s);
352
+ (s !== i || s === i && this.options.ns.indexOf(u[0]) > -1) && (n = u.shift()), e = u.join(i);
353
+ }
354
+ return {
355
+ key: e,
356
+ namespaces: d(n) ? [n] : n
357
+ };
358
+ }
359
+ translate(e, t, s) {
360
+ if (typeof t != "object" && this.options.overloadTranslationOptionHandler && (t = this.options.overloadTranslationOptionHandler(arguments)), typeof t == "object" && (t = {
361
+ ...t
362
+ }), t || (t = {}), e == null) return "";
363
+ Array.isArray(e) || (e = [String(e)]);
364
+ const i = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, n = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
365
+ key: a,
366
+ namespaces: o
367
+ } = this.extractFromKey(e[e.length - 1], t), l = o[o.length - 1], u = t.lng || this.language, h = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
368
+ if ((u == null ? void 0 : u.toLowerCase()) === "cimode") {
369
+ if (h) {
370
+ const x = t.nsSeparator || this.options.nsSeparator;
371
+ return i ? {
372
+ res: `${l}${x}${a}`,
373
+ usedKey: a,
374
+ exactUsedKey: a,
375
+ usedLng: u,
376
+ usedNS: l,
377
+ usedParams: this.getUsedParamsDetails(t)
378
+ } : `${l}${x}${a}`;
379
+ }
380
+ return i ? {
381
+ res: a,
382
+ usedKey: a,
383
+ exactUsedKey: a,
384
+ usedLng: u,
385
+ usedNS: l,
386
+ usedParams: this.getUsedParamsDetails(t)
387
+ } : a;
388
+ }
389
+ const f = this.resolve(e, t);
390
+ let c = f == null ? void 0 : f.res;
391
+ const p = (f == null ? void 0 : f.usedKey) || a, g = (f == null ? void 0 : f.exactUsedKey) || a, m = Object.prototype.toString.apply(c), v = ["[object Number]", "[object Function]", "[object RegExp]"], w = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, C = !this.i18nFormat || this.i18nFormat.handleAsObject, E = !d(c) && typeof c != "boolean" && typeof c != "number";
392
+ if (C && c && E && v.indexOf(m) < 0 && !(d(w) && Array.isArray(c))) {
393
+ if (!t.returnObjects && !this.options.returnObjects) {
394
+ this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
395
+ const x = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(p, c, {
396
+ ...t,
397
+ ns: o
398
+ }) : `key '${a} (${this.language})' returned an object instead of string.`;
399
+ return i ? (f.res = x, f.usedParams = this.getUsedParamsDetails(t), f) : x;
400
+ }
401
+ if (n) {
402
+ const x = Array.isArray(c), L = x ? [] : {}, R = x ? g : p;
403
+ for (const y in c)
404
+ if (Object.prototype.hasOwnProperty.call(c, y)) {
405
+ const N = `${R}${n}${y}`;
406
+ L[y] = this.translate(N, {
407
+ ...t,
408
+ joinArrays: !1,
409
+ ns: o
410
+ }), L[y] === N && (L[y] = c[y]);
411
+ }
412
+ c = L;
413
+ }
414
+ } else if (C && d(w) && Array.isArray(c))
415
+ c = c.join(w), c && (c = this.extendTranslation(c, e, t, s));
416
+ else {
417
+ let x = !1, L = !1;
418
+ const R = t.count !== void 0 && !d(t.count), y = q.hasDefaultValue(t), N = R ? this.pluralResolver.getSuffix(u, t.count, t) : "", I = t.ordinal && R ? this.pluralResolver.getSuffix(u, t.count, {
419
+ ordinal: !1
420
+ }) : "", V = R && !t.ordinal && t.count === 0, T = V && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${N}`] || t[`defaultValue${I}`] || t.defaultValue;
421
+ !this.isValidLookup(c) && y && (x = !0, c = T), this.isValidLookup(c) || (L = !0, c = a);
422
+ const je = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && L ? void 0 : c, K = y && T !== c && this.options.updateMissing;
423
+ if (L || x || K) {
424
+ if (this.logger.log(K ? "updateKey" : "missingKey", u, l, a, K ? T : c), n) {
425
+ const $ = this.resolve(a, {
426
+ ...t,
427
+ keySeparator: !1
428
+ });
429
+ $ && $.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
430
+ }
431
+ let M = [];
432
+ const J = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
433
+ if (this.options.saveMissingTo === "fallback" && J && J[0])
434
+ for (let $ = 0; $ < J.length; $++)
435
+ M.push(J[$]);
436
+ else this.options.saveMissingTo === "all" ? M = this.languageUtils.toResolveHierarchy(t.lng || this.language) : M.push(t.lng || this.language);
437
+ const ue = ($, j, U) => {
438
+ var he;
439
+ const ce = y && U !== c ? U : je;
440
+ this.options.missingKeyHandler ? this.options.missingKeyHandler($, l, j, ce, K, t) : (he = this.backendConnector) != null && he.saveMissing && this.backendConnector.saveMissing($, l, j, ce, K, t), this.emit("missingKey", $, l, j, c);
441
+ };
442
+ this.options.saveMissing && (this.options.saveMissingPlurals && R ? M.forEach(($) => {
443
+ const j = this.pluralResolver.getSuffixes($, t);
444
+ V && t[`defaultValue${this.options.pluralSeparator}zero`] && j.indexOf(`${this.options.pluralSeparator}zero`) < 0 && j.push(`${this.options.pluralSeparator}zero`), j.forEach((U) => {
445
+ ue([$], a + U, t[`defaultValue${U}`] || T);
446
+ });
447
+ }) : ue(M, a, T));
448
+ }
449
+ c = this.extendTranslation(c, e, t, f, s), L && c === a && this.options.appendNamespaceToMissingKey && (c = `${l}:${a}`), (L || x) && this.options.parseMissingKeyHandler && (c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${a}` : a, x ? c : void 0));
450
+ }
451
+ return i ? (f.res = c, f.usedParams = this.getUsedParamsDetails(t), f) : c;
452
+ }
453
+ extendTranslation(e, t, s, i, n) {
454
+ var u, h;
455
+ var a = this;
456
+ if ((u = this.i18nFormat) != null && u.parse)
457
+ e = this.i18nFormat.parse(e, {
458
+ ...this.options.interpolation.defaultVariables,
459
+ ...s
460
+ }, s.lng || this.language || i.usedLng, i.usedNS, i.usedKey, {
461
+ resolved: i
462
+ });
463
+ else if (!s.skipInterpolation) {
464
+ s.interpolation && this.interpolator.init({
465
+ ...s,
466
+ interpolation: {
467
+ ...this.options.interpolation,
468
+ ...s.interpolation
469
+ }
470
+ });
471
+ const f = d(e) && (((h = s == null ? void 0 : s.interpolation) == null ? void 0 : h.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
472
+ let c;
473
+ if (f) {
474
+ const g = e.match(this.interpolator.nestingRegexp);
475
+ c = g && g.length;
476
+ }
477
+ let p = s.replace && !d(s.replace) ? s.replace : s;
478
+ if (this.options.interpolation.defaultVariables && (p = {
479
+ ...this.options.interpolation.defaultVariables,
480
+ ...p
481
+ }), e = this.interpolator.interpolate(e, p, s.lng || this.language || i.usedLng, s), f) {
482
+ const g = e.match(this.interpolator.nestingRegexp), m = g && g.length;
483
+ c < m && (s.nest = !1);
484
+ }
485
+ !s.lng && i && i.res && (s.lng = this.language || i.usedLng), s.nest !== !1 && (e = this.interpolator.nest(e, function() {
486
+ for (var g = arguments.length, m = new Array(g), v = 0; v < g; v++)
487
+ m[v] = arguments[v];
488
+ return (n == null ? void 0 : n[0]) === m[0] && !s.context ? (a.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`), null) : a.translate(...m, t);
489
+ }, s)), s.interpolation && this.interpolator.reset();
490
+ }
491
+ const o = s.postProcess || this.options.postProcess, l = d(o) ? [o] : o;
492
+ return e != null && (l != null && l.length) && s.applyPostProcessor !== !1 && (e = Ve.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
493
+ i18nResolved: {
494
+ ...i,
495
+ usedParams: this.getUsedParamsDetails(s)
496
+ },
497
+ ...s
498
+ } : s, this)), e;
499
+ }
500
+ resolve(e) {
501
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, i, n, a, o;
502
+ return d(e) && (e = [e]), e.forEach((l) => {
503
+ if (this.isValidLookup(s)) return;
504
+ const u = this.extractFromKey(l, t), h = u.key;
505
+ i = h;
506
+ let f = u.namespaces;
507
+ this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
508
+ const c = t.count !== void 0 && !d(t.count), p = c && !t.ordinal && t.count === 0, g = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
509
+ f.forEach((v) => {
510
+ var w, C;
511
+ this.isValidLookup(s) || (o = v, !be[`${m[0]}-${v}`] && ((w = this.utils) != null && w.hasLoadedNamespace) && !((C = this.utils) != null && C.hasLoadedNamespace(o)) && (be[`${m[0]}-${v}`] = !0, this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((E) => {
512
+ var R;
513
+ if (this.isValidLookup(s)) return;
514
+ a = E;
515
+ const x = [h];
516
+ if ((R = this.i18nFormat) != null && R.addLookupKeys)
517
+ this.i18nFormat.addLookupKeys(x, h, E, v, t);
518
+ else {
519
+ let y;
520
+ c && (y = this.pluralResolver.getSuffix(E, t.count, t));
521
+ const N = `${this.options.pluralSeparator}zero`, I = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
522
+ if (c && (x.push(h + y), t.ordinal && y.indexOf(I) === 0 && x.push(h + y.replace(I, this.options.pluralSeparator)), p && x.push(h + N)), g) {
523
+ const V = `${h}${this.options.contextSeparator}${t.context}`;
524
+ x.push(V), c && (x.push(V + y), t.ordinal && y.indexOf(I) === 0 && x.push(V + y.replace(I, this.options.pluralSeparator)), p && x.push(V + N));
525
+ }
526
+ }
527
+ let L;
528
+ for (; L = x.pop(); )
529
+ this.isValidLookup(s) || (n = L, s = this.getResource(E, v, L, t));
530
+ }));
531
+ });
532
+ }), {
533
+ res: s,
534
+ usedKey: i,
535
+ exactUsedKey: n,
536
+ usedLng: a,
537
+ usedNS: o
538
+ };
539
+ }
540
+ isValidLookup(e) {
541
+ return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
542
+ }
543
+ getResource(e, t, s) {
544
+ var n;
545
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
546
+ return (n = this.i18nFormat) != null && n.getResource ? this.i18nFormat.getResource(e, t, s, i) : this.resourceStore.getResource(e, t, s, i);
547
+ }
548
+ getUsedParamsDetails() {
549
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
550
+ const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], s = e.replace && !d(e.replace);
551
+ let i = s ? e.replace : e;
552
+ if (s && typeof e.count < "u" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = {
553
+ ...this.options.interpolation.defaultVariables,
554
+ ...i
555
+ }), !s) {
556
+ i = {
557
+ ...i
558
+ };
559
+ for (const n of t)
560
+ delete i[n];
561
+ }
562
+ return i;
563
+ }
564
+ static hasDefaultValue(e) {
565
+ const t = "defaultValue";
566
+ for (const s in e)
567
+ if (Object.prototype.hasOwnProperty.call(e, s) && t === s.substring(0, t.length) && e[s] !== void 0)
568
+ return !0;
569
+ return !1;
570
+ }
571
+ }
572
+ class Se {
573
+ constructor(e) {
574
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = P.create("languageUtils");
575
+ }
576
+ getScriptPartFromCode(e) {
577
+ if (e = Q(e), !e || e.indexOf("-") < 0) return null;
578
+ const t = e.split("-");
579
+ return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
580
+ }
581
+ getLanguagePartFromCode(e) {
582
+ if (e = Q(e), !e || e.indexOf("-") < 0) return e;
583
+ const t = e.split("-");
584
+ return this.formatLanguageCode(t[0]);
585
+ }
586
+ formatLanguageCode(e) {
587
+ if (d(e) && e.indexOf("-") > -1) {
588
+ let t;
589
+ try {
590
+ t = Intl.getCanonicalLocales(e)[0];
591
+ } catch {
592
+ }
593
+ return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
594
+ }
595
+ return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
596
+ }
597
+ isSupportedCode(e) {
598
+ return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
599
+ }
600
+ getBestMatchFromCodes(e) {
601
+ if (!e) return null;
602
+ let t;
603
+ return e.forEach((s) => {
604
+ if (t) return;
605
+ const i = this.formatLanguageCode(s);
606
+ (!this.options.supportedLngs || this.isSupportedCode(i)) && (t = i);
607
+ }), !t && this.options.supportedLngs && e.forEach((s) => {
608
+ if (t) return;
609
+ const i = this.getLanguagePartFromCode(s);
610
+ if (this.isSupportedCode(i)) return t = i;
611
+ t = this.options.supportedLngs.find((n) => {
612
+ if (n === i) return n;
613
+ if (!(n.indexOf("-") < 0 && i.indexOf("-") < 0) && (n.indexOf("-") > 0 && i.indexOf("-") < 0 && n.substring(0, n.indexOf("-")) === i || n.indexOf(i) === 0 && i.length > 1))
614
+ return n;
615
+ });
616
+ }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
617
+ }
618
+ getFallbackCodes(e, t) {
619
+ if (!e) return [];
620
+ if (typeof e == "function" && (e = e(t)), d(e) && (e = [e]), Array.isArray(e)) return e;
621
+ if (!t) return e.default || [];
622
+ let s = e[t];
623
+ return s || (s = e[this.getScriptPartFromCode(t)]), s || (s = e[this.formatLanguageCode(t)]), s || (s = e[this.getLanguagePartFromCode(t)]), s || (s = e.default), s || [];
624
+ }
625
+ toResolveHierarchy(e, t) {
626
+ const s = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], n = (a) => {
627
+ a && (this.isSupportedCode(a) ? i.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
628
+ };
629
+ return d(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && n(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && n(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && n(this.getLanguagePartFromCode(e))) : d(e) && n(this.formatLanguageCode(e)), s.forEach((a) => {
630
+ i.indexOf(a) < 0 && n(this.formatLanguageCode(a));
631
+ }), i;
632
+ }
633
+ }
634
+ const Oe = {
635
+ zero: 0,
636
+ one: 1,
637
+ two: 2,
638
+ few: 3,
639
+ many: 4,
640
+ other: 5
641
+ }, Le = {
642
+ select: (r) => r === 1 ? "one" : "other",
643
+ resolvedOptions: () => ({
644
+ pluralCategories: ["one", "other"]
645
+ })
646
+ };
647
+ class Ge {
648
+ constructor(e) {
649
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
650
+ this.languageUtils = e, this.options = t, this.logger = P.create("pluralResolver"), this.pluralRulesCache = {};
651
+ }
652
+ addRule(e, t) {
653
+ this.rules[e] = t;
654
+ }
655
+ clearCache() {
656
+ this.pluralRulesCache = {};
657
+ }
658
+ getRule(e) {
659
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
660
+ const s = Q(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
661
+ cleanedCode: s,
662
+ type: i
663
+ });
664
+ if (n in this.pluralRulesCache)
665
+ return this.pluralRulesCache[n];
666
+ let a;
667
+ try {
668
+ a = new Intl.PluralRules(s, {
669
+ type: i
670
+ });
671
+ } catch {
672
+ if (!Intl)
673
+ return this.logger.error("No Intl support, please use an Intl polyfill!"), Le;
674
+ if (!e.match(/-|_/)) return Le;
675
+ const l = this.languageUtils.getLanguagePartFromCode(e);
676
+ a = this.getRule(l, t);
677
+ }
678
+ return this.pluralRulesCache[n] = a, a;
679
+ }
680
+ needsPlural(e) {
681
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = this.getRule(e, t);
682
+ return s || (s = this.getRule("dev", t)), (s == null ? void 0 : s.resolvedOptions().pluralCategories.length) > 1;
683
+ }
684
+ getPluralFormsOfKey(e, t) {
685
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
686
+ return this.getSuffixes(e, s).map((i) => `${t}${i}`);
687
+ }
688
+ getSuffixes(e) {
689
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = this.getRule(e, t);
690
+ return s || (s = this.getRule("dev", t)), s ? s.resolvedOptions().pluralCategories.sort((i, n) => Oe[i] - Oe[n]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
691
+ }
692
+ getSuffix(e, t) {
693
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
694
+ const i = this.getRule(e, s);
695
+ return i ? `${this.options.prepend}${s.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, s));
696
+ }
697
+ }
698
+ const we = function(r, e, t) {
699
+ let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, n = ze(r, e, t);
700
+ return !n && i && d(t) && (n = ae(r, t, s), n === void 0 && (n = ae(e, t, s))), n;
701
+ }, ee = (r) => r.replace(/\$/g, "$$$$");
702
+ class qe {
703
+ constructor() {
704
+ var t;
705
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
706
+ this.logger = P.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((s) => s), this.init(e);
707
+ }
708
+ init() {
709
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
710
+ e.interpolation || (e.interpolation = {
711
+ escapeValue: !0
712
+ });
713
+ const {
714
+ escape: t,
715
+ escapeValue: s,
716
+ useRawValueToEscape: i,
717
+ prefix: n,
718
+ prefixEscaped: a,
719
+ suffix: o,
720
+ suffixEscaped: l,
721
+ formatSeparator: u,
722
+ unescapeSuffix: h,
723
+ unescapePrefix: f,
724
+ nestingPrefix: c,
725
+ nestingPrefixEscaped: p,
726
+ nestingSuffix: g,
727
+ nestingSuffixEscaped: m,
728
+ nestingOptionsSeparator: v,
729
+ maxReplaces: w,
730
+ alwaysFormat: C
731
+ } = e.interpolation;
732
+ this.escape = t !== void 0 ? t : Je, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = n ? F(n) : a || "{{", this.suffix = o ? F(o) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = h ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : h || "", this.nestingPrefix = c ? F(c) : p || F("$t("), this.nestingSuffix = g ? F(g) : m || F(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = w || 1e3, this.alwaysFormat = C !== void 0 ? C : !1, this.resetRegExp();
733
+ }
734
+ reset() {
735
+ this.options && this.init(this.options);
736
+ }
737
+ resetRegExp() {
738
+ const e = (t, s) => (t == null ? void 0 : t.source) === s ? (t.lastIndex = 0, t) : new RegExp(s, "g");
739
+ this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
740
+ }
741
+ interpolate(e, t, s, i) {
742
+ var p;
743
+ let n, a, o;
744
+ const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (g) => {
745
+ if (g.indexOf(this.formatSeparator) < 0) {
746
+ const C = we(t, l, g, this.options.keySeparator, this.options.ignoreJSONStructure);
747
+ return this.alwaysFormat ? this.format(C, void 0, s, {
748
+ ...i,
749
+ ...t,
750
+ interpolationkey: g
751
+ }) : C;
752
+ }
753
+ const m = g.split(this.formatSeparator), v = m.shift().trim(), w = m.join(this.formatSeparator).trim();
754
+ return this.format(we(t, l, v, this.options.keySeparator, this.options.ignoreJSONStructure), w, s, {
755
+ ...i,
756
+ ...t,
757
+ interpolationkey: v
758
+ });
759
+ };
760
+ this.resetRegExp();
761
+ const h = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, f = ((p = i == null ? void 0 : i.interpolation) == null ? void 0 : p.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
762
+ return [{
763
+ regex: this.regexpUnescape,
764
+ safeValue: (g) => ee(g)
765
+ }, {
766
+ regex: this.regexp,
767
+ safeValue: (g) => this.escapeValue ? ee(this.escape(g)) : ee(g)
768
+ }].forEach((g) => {
769
+ for (o = 0; n = g.regex.exec(e); ) {
770
+ const m = n[1].trim();
771
+ if (a = u(m), a === void 0)
772
+ if (typeof h == "function") {
773
+ const w = h(e, n, i);
774
+ a = d(w) ? w : "";
775
+ } else if (i && Object.prototype.hasOwnProperty.call(i, m))
776
+ a = "";
777
+ else if (f) {
778
+ a = n[0];
779
+ continue;
780
+ } else
781
+ this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`), a = "";
782
+ else !d(a) && !this.useRawValueToEscape && (a = pe(a));
783
+ const v = g.safeValue(a);
784
+ if (e = e.replace(n[0], v), f ? (g.regex.lastIndex += a.length, g.regex.lastIndex -= n[0].length) : g.regex.lastIndex = 0, o++, o >= this.maxReplaces)
785
+ break;
786
+ }
787
+ }), e;
788
+ }
789
+ nest(e, t) {
790
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, n, a;
791
+ const o = (l, u) => {
792
+ const h = this.nestingOptionsSeparator;
793
+ if (l.indexOf(h) < 0) return l;
794
+ const f = l.split(new RegExp(`${h}[ ]*{`));
795
+ let c = `{${f[1]}`;
796
+ l = f[0], c = this.interpolate(c, a);
797
+ const p = c.match(/'/g), g = c.match(/"/g);
798
+ (((p == null ? void 0 : p.length) ?? 0) % 2 === 0 && !g || g.length % 2 !== 0) && (c = c.replace(/'/g, '"'));
799
+ try {
800
+ a = JSON.parse(c), u && (a = {
801
+ ...u,
802
+ ...a
803
+ });
804
+ } catch (m) {
805
+ return this.logger.warn(`failed parsing options string in nesting for key ${l}`, m), `${l}${h}${c}`;
806
+ }
807
+ return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, l;
808
+ };
809
+ for (; i = this.nestingRegexp.exec(e); ) {
810
+ let l = [];
811
+ a = {
812
+ ...s
813
+ }, a = a.replace && !d(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
814
+ let u = !1;
815
+ if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) {
816
+ const h = i[1].split(this.formatSeparator).map((f) => f.trim());
817
+ i[1] = h.shift(), l = h, u = !0;
818
+ }
819
+ if (n = t(o.call(this, i[1].trim(), a), a), n && i[0] === e && !d(n)) return n;
820
+ d(n) || (n = pe(n)), n || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), n = ""), u && (n = l.reduce((h, f) => this.format(h, f, s.lng, {
821
+ ...s,
822
+ interpolationkey: i[1].trim()
823
+ }), n.trim())), e = e.replace(i[0], n), this.regexp.lastIndex = 0;
824
+ }
825
+ return e;
826
+ }
827
+ }
828
+ const Xe = (r) => {
829
+ let e = r.toLowerCase().trim();
830
+ const t = {};
831
+ if (r.indexOf("(") > -1) {
832
+ const s = r.split("(");
833
+ e = s[0].toLowerCase().trim();
834
+ const i = s[1].substring(0, s[1].length - 1);
835
+ e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((a) => {
836
+ if (a) {
837
+ const [o, ...l] = a.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), h = o.trim();
838
+ t[h] || (t[h] = u), u === "false" && (t[h] = !1), u === "true" && (t[h] = !0), isNaN(u) || (t[h] = parseInt(u, 10));
839
+ }
840
+ });
841
+ }
842
+ return {
843
+ formatName: e,
844
+ formatOptions: t
845
+ };
846
+ }, A = (r) => {
847
+ const e = {};
848
+ return (t, s, i) => {
849
+ let n = i;
850
+ i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (n = {
851
+ ...n,
852
+ [i.interpolationkey]: void 0
853
+ });
854
+ const a = s + JSON.stringify(n);
855
+ let o = e[a];
856
+ return o || (o = r(Q(s), i), e[a] = o), o(t);
857
+ };
858
+ };
859
+ class et {
860
+ constructor() {
861
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
862
+ this.logger = P.create("formatter"), this.options = e, this.formats = {
863
+ number: A((t, s) => {
864
+ const i = new Intl.NumberFormat(t, {
865
+ ...s
866
+ });
867
+ return (n) => i.format(n);
868
+ }),
869
+ currency: A((t, s) => {
870
+ const i = new Intl.NumberFormat(t, {
871
+ ...s,
872
+ style: "currency"
873
+ });
874
+ return (n) => i.format(n);
875
+ }),
876
+ datetime: A((t, s) => {
877
+ const i = new Intl.DateTimeFormat(t, {
878
+ ...s
879
+ });
880
+ return (n) => i.format(n);
881
+ }),
882
+ relativetime: A((t, s) => {
883
+ const i = new Intl.RelativeTimeFormat(t, {
884
+ ...s
885
+ });
886
+ return (n) => i.format(n, s.range || "day");
887
+ }),
888
+ list: A((t, s) => {
889
+ const i = new Intl.ListFormat(t, {
890
+ ...s
891
+ });
892
+ return (n) => i.format(n);
893
+ })
894
+ }, this.init(e);
895
+ }
896
+ init(e) {
897
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
898
+ interpolation: {}
899
+ };
900
+ this.formatSeparator = t.interpolation.formatSeparator || ",";
901
+ }
902
+ add(e, t) {
903
+ this.formats[e.toLowerCase().trim()] = t;
904
+ }
905
+ addCached(e, t) {
906
+ this.formats[e.toLowerCase().trim()] = A(t);
907
+ }
908
+ format(e, t, s) {
909
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
910
+ const n = t.split(this.formatSeparator);
911
+ if (n.length > 1 && n[0].indexOf("(") > 1 && n[0].indexOf(")") < 0 && n.find((o) => o.indexOf(")") > -1)) {
912
+ const o = n.findIndex((l) => l.indexOf(")") > -1);
913
+ n[0] = [n[0], ...n.splice(1, o)].join(this.formatSeparator);
914
+ }
915
+ return n.reduce((o, l) => {
916
+ var f;
917
+ const {
918
+ formatName: u,
919
+ formatOptions: h
920
+ } = Xe(l);
921
+ if (this.formats[u]) {
922
+ let c = o;
923
+ try {
924
+ const p = ((f = i == null ? void 0 : i.formatParams) == null ? void 0 : f[i.interpolationkey]) || {}, g = p.locale || p.lng || i.locale || i.lng || s;
925
+ c = this.formats[u](o, g, {
926
+ ...h,
927
+ ...i,
928
+ ...p
929
+ });
930
+ } catch (p) {
931
+ this.logger.warn(p);
932
+ }
933
+ return c;
934
+ } else
935
+ this.logger.warn(`there was no format function for ${u}`);
936
+ return o;
937
+ }, e);
938
+ }
939
+ }
940
+ const tt = (r, e) => {
941
+ r.pending[e] !== void 0 && (delete r.pending[e], r.pendingCount--);
942
+ };
943
+ class st extends X {
944
+ constructor(e, t, s) {
945
+ var n, a;
946
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
947
+ super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = i, this.logger = P.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (a = (n = this.backend) == null ? void 0 : n.init) == null || a.call(n, s, i.backend, i);
948
+ }
949
+ queueLoad(e, t, s, i) {
950
+ const n = {}, a = {}, o = {}, l = {};
951
+ return e.forEach((u) => {
952
+ let h = !0;
953
+ t.forEach((f) => {
954
+ const c = `${u}|${f}`;
955
+ !s.reload && this.store.hasResourceBundle(u, f) ? this.state[c] = 2 : this.state[c] < 0 || (this.state[c] === 1 ? a[c] === void 0 && (a[c] = !0) : (this.state[c] = 1, h = !1, a[c] === void 0 && (a[c] = !0), n[c] === void 0 && (n[c] = !0), l[f] === void 0 && (l[f] = !0)));
956
+ }), h || (o[u] = !0);
957
+ }), (Object.keys(n).length || Object.keys(a).length) && this.queue.push({
958
+ pending: a,
959
+ pendingCount: Object.keys(a).length,
960
+ loaded: {},
961
+ errors: [],
962
+ callback: i
963
+ }), {
964
+ toLoad: Object.keys(n),
965
+ pending: Object.keys(a),
966
+ toLoadLanguages: Object.keys(o),
967
+ toLoadNamespaces: Object.keys(l)
968
+ };
969
+ }
970
+ loaded(e, t, s) {
971
+ const i = e.split("|"), n = i[0], a = i[1];
972
+ t && this.emit("failedLoading", n, a, t), !t && s && this.store.addResourceBundle(n, a, s, void 0, void 0, {
973
+ skipCopy: !0
974
+ }), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
975
+ const o = {};
976
+ this.queue.forEach((l) => {
977
+ He(l.loaded, [n], a), tt(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
978
+ o[u] || (o[u] = {});
979
+ const h = l.loaded[u];
980
+ h.length && h.forEach((f) => {
981
+ o[u][f] === void 0 && (o[u][f] = !0);
982
+ });
983
+ }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
984
+ }), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
985
+ }
986
+ read(e, t, s) {
987
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, a = arguments.length > 5 ? arguments[5] : void 0;
988
+ if (!e.length) return a(null, {});
989
+ if (this.readingCalls >= this.maxParallelReads) {
990
+ this.waitingReads.push({
991
+ lng: e,
992
+ ns: t,
993
+ fcName: s,
994
+ tried: i,
995
+ wait: n,
996
+ callback: a
997
+ });
998
+ return;
999
+ }
1000
+ this.readingCalls++;
1001
+ const o = (u, h) => {
1002
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1003
+ const f = this.waitingReads.shift();
1004
+ this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
1005
+ }
1006
+ if (u && h && i < this.maxRetries) {
1007
+ setTimeout(() => {
1008
+ this.read.call(this, e, t, s, i + 1, n * 2, a);
1009
+ }, n);
1010
+ return;
1011
+ }
1012
+ a(u, h);
1013
+ }, l = this.backend[s].bind(this.backend);
1014
+ if (l.length === 2) {
1015
+ try {
1016
+ const u = l(e, t);
1017
+ u && typeof u.then == "function" ? u.then((h) => o(null, h)).catch(o) : o(null, u);
1018
+ } catch (u) {
1019
+ o(u);
1020
+ }
1021
+ return;
1022
+ }
1023
+ return l(e, t, o);
1024
+ }
1025
+ prepareLoading(e, t) {
1026
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
1027
+ if (!this.backend)
1028
+ return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
1029
+ d(e) && (e = this.languageUtils.toResolveHierarchy(e)), d(t) && (t = [t]);
1030
+ const n = this.queueLoad(e, t, s, i);
1031
+ if (!n.toLoad.length)
1032
+ return n.pending.length || i(), null;
1033
+ n.toLoad.forEach((a) => {
1034
+ this.loadOne(a);
1035
+ });
1036
+ }
1037
+ load(e, t, s) {
1038
+ this.prepareLoading(e, t, {}, s);
1039
+ }
1040
+ reload(e, t, s) {
1041
+ this.prepareLoading(e, t, {
1042
+ reload: !0
1043
+ }, s);
1044
+ }
1045
+ loadOne(e) {
1046
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
1047
+ const s = e.split("|"), i = s[0], n = s[1];
1048
+ this.read(i, n, "read", void 0, void 0, (a, o) => {
1049
+ a && this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`, a), !a && o && this.logger.log(`${t}loaded namespace ${n} for language ${i}`, o), this.loaded(e, a, o);
1050
+ });
1051
+ }
1052
+ saveMissing(e, t, s, i, n) {
1053
+ var l, u, h, f, c;
1054
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
1055
+ };
1056
+ if ((u = (l = this.services) == null ? void 0 : l.utils) != null && u.hasLoadedNamespace && !((f = (h = this.services) == null ? void 0 : h.utils) != null && f.hasLoadedNamespace(t))) {
1057
+ this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
1058
+ return;
1059
+ }
1060
+ if (!(s == null || s === "")) {
1061
+ if ((c = this.backend) != null && c.create) {
1062
+ const p = {
1063
+ ...a,
1064
+ isUpdate: n
1065
+ }, g = this.backend.create.bind(this.backend);
1066
+ if (g.length < 6)
1067
+ try {
1068
+ let m;
1069
+ g.length === 5 ? m = g(e, t, s, i, p) : m = g(e, t, s, i), m && typeof m.then == "function" ? m.then((v) => o(null, v)).catch(o) : o(null, m);
1070
+ } catch (m) {
1071
+ o(m);
1072
+ }
1073
+ else
1074
+ g(e, t, s, i, o, p);
1075
+ }
1076
+ !e || !e[0] || this.store.addResource(e[0], t, s, i);
1077
+ }
1078
+ }
1079
+ }
1080
+ const $e = () => ({
1081
+ debug: !1,
1082
+ initAsync: !0,
1083
+ ns: ["translation"],
1084
+ defaultNS: ["translation"],
1085
+ fallbackLng: ["dev"],
1086
+ fallbackNS: !1,
1087
+ supportedLngs: !1,
1088
+ nonExplicitSupportedLngs: !1,
1089
+ load: "all",
1090
+ preload: !1,
1091
+ simplifyPluralSuffix: !0,
1092
+ keySeparator: ".",
1093
+ nsSeparator: ":",
1094
+ pluralSeparator: "_",
1095
+ contextSeparator: "_",
1096
+ partialBundledLanguages: !1,
1097
+ saveMissing: !1,
1098
+ updateMissing: !1,
1099
+ saveMissingTo: "fallback",
1100
+ saveMissingPlurals: !0,
1101
+ missingKeyHandler: !1,
1102
+ missingInterpolationHandler: !1,
1103
+ postProcess: !1,
1104
+ postProcessPassResolved: !1,
1105
+ returnNull: !1,
1106
+ returnEmptyString: !0,
1107
+ returnObjects: !1,
1108
+ joinArrays: !1,
1109
+ returnedObjectHandler: !1,
1110
+ parseMissingKeyHandler: !1,
1111
+ appendNamespaceToMissingKey: !1,
1112
+ appendNamespaceToCIMode: !1,
1113
+ overloadTranslationOptionHandler: (r) => {
1114
+ let e = {};
1115
+ if (typeof r[1] == "object" && (e = r[1]), d(r[1]) && (e.defaultValue = r[1]), d(r[2]) && (e.tDescription = r[2]), typeof r[2] == "object" || typeof r[3] == "object") {
1116
+ const t = r[3] || r[2];
1117
+ Object.keys(t).forEach((s) => {
1118
+ e[s] = t[s];
1119
+ });
1120
+ }
1121
+ return e;
1122
+ },
1123
+ interpolation: {
1124
+ escapeValue: !0,
1125
+ format: (r) => r,
1126
+ prefix: "{{",
1127
+ suffix: "}}",
1128
+ formatSeparator: ",",
1129
+ unescapePrefix: "-",
1130
+ nestingPrefix: "$t(",
1131
+ nestingSuffix: ")",
1132
+ nestingOptionsSeparator: ",",
1133
+ maxReplaces: 1e3,
1134
+ skipOnVariables: !0
1135
+ }
1136
+ }), Ce = (r) => {
1137
+ var e, t;
1138
+ return d(r.ns) && (r.ns = [r.ns]), d(r.fallbackLng) && (r.fallbackLng = [r.fallbackLng]), d(r.fallbackNS) && (r.fallbackNS = [r.fallbackNS]), ((t = (e = r.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (r.supportedLngs = r.supportedLngs.concat(["cimode"])), typeof r.initImmediate == "boolean" && (r.initAsync = r.initImmediate), r;
1139
+ }, W = () => {
1140
+ }, it = (r) => {
1141
+ Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t) => {
1142
+ typeof r[t] == "function" && (r[t] = r[t].bind(r));
1143
+ });
1144
+ };
1145
+ class B extends X {
1146
+ constructor() {
1147
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1148
+ if (super(), this.options = Ce(e), this.services = {}, this.logger = P, this.modules = {
1149
+ external: []
1150
+ }, it(this), t && !this.isInitialized && !e.isClone) {
1151
+ if (!this.options.initAsync)
1152
+ return this.init(e, t), this;
1153
+ setTimeout(() => {
1154
+ this.init(e, t);
1155
+ }, 0);
1156
+ }
1157
+ }
1158
+ init() {
1159
+ var e = this;
1160
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0;
1161
+ this.isInitializing = !0, typeof t == "function" && (s = t, t = {}), t.defaultNS == null && t.ns && (d(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
1162
+ const i = $e();
1163
+ this.options = {
1164
+ ...i,
1165
+ ...this.options,
1166
+ ...Ce(t)
1167
+ }, this.options.interpolation = {
1168
+ ...i.interpolation,
1169
+ ...this.options.interpolation
1170
+ }, t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
1171
+ const n = (h) => h ? typeof h == "function" ? new h() : h : null;
1172
+ if (!this.options.isClone) {
1173
+ this.modules.logger ? P.init(n(this.modules.logger), this.options) : P.init(null, this.options);
1174
+ let h;
1175
+ this.modules.formatter ? h = this.modules.formatter : h = et;
1176
+ const f = new Se(this.options);
1177
+ this.store = new ye(this.options.resources, this.options);
1178
+ const c = this.services;
1179
+ c.logger = P, c.resourceStore = this.store, c.languageUtils = f, c.pluralResolver = new Ge(f, {
1180
+ prepend: this.options.pluralSeparator,
1181
+ simplifyPluralSuffix: this.options.simplifyPluralSuffix
1182
+ }), h && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (c.formatter = n(h), c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new qe(this.options), c.utils = {
1183
+ hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1184
+ }, c.backendConnector = new st(n(this.modules.backend), c.resourceStore, c, this.options), c.backendConnector.on("*", function(p) {
1185
+ for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), v = 1; v < g; v++)
1186
+ m[v - 1] = arguments[v];
1187
+ e.emit(p, ...m);
1188
+ }), this.modules.languageDetector && (c.languageDetector = n(this.modules.languageDetector), c.languageDetector.init && c.languageDetector.init(c, this.options.detection, this.options)), this.modules.i18nFormat && (c.i18nFormat = n(this.modules.i18nFormat), c.i18nFormat.init && c.i18nFormat.init(this)), this.translator = new q(this.services, this.options), this.translator.on("*", function(p) {
1189
+ for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), v = 1; v < g; v++)
1190
+ m[v - 1] = arguments[v];
1191
+ e.emit(p, ...m);
1192
+ }), this.modules.external.forEach((p) => {
1193
+ p.init && p.init(this);
1194
+ });
1195
+ }
1196
+ if (this.format = this.options.interpolation.format, s || (s = W), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1197
+ const h = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1198
+ h.length > 0 && h[0] !== "dev" && (this.options.lng = h[0]);
1199
+ }
1200
+ !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((h) => {
1201
+ this[h] = function() {
1202
+ return e.store[h](...arguments);
1203
+ };
1204
+ }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((h) => {
1205
+ this[h] = function() {
1206
+ return e.store[h](...arguments), e;
1207
+ };
1208
+ });
1209
+ const l = H(), u = () => {
1210
+ const h = (f, c) => {
1211
+ this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), l.resolve(c), s(f, c);
1212
+ };
1213
+ if (this.languages && !this.isInitialized) return h(null, this.t.bind(this));
1214
+ this.changeLanguage(this.options.lng, h);
1215
+ };
1216
+ return this.options.resources || !this.options.initAsync ? u() : setTimeout(u, 0), l;
1217
+ }
1218
+ loadResources(e) {
1219
+ var n, a;
1220
+ let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : W;
1221
+ const i = d(e) ? e : this.language;
1222
+ if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
1223
+ if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
1224
+ const o = [], l = (u) => {
1225
+ if (!u || u === "cimode") return;
1226
+ this.services.languageUtils.toResolveHierarchy(u).forEach((f) => {
1227
+ f !== "cimode" && o.indexOf(f) < 0 && o.push(f);
1228
+ });
1229
+ };
1230
+ i ? l(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((h) => l(h)), (a = (n = this.options.preload) == null ? void 0 : n.forEach) == null || a.call(n, (u) => l(u)), this.services.backendConnector.load(o, this.options.ns, (u) => {
1231
+ !u && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(u);
1232
+ });
1233
+ } else
1234
+ s(null);
1235
+ }
1236
+ reloadResources(e, t, s) {
1237
+ const i = H();
1238
+ return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = W), this.services.backendConnector.reload(e, t, (n) => {
1239
+ i.resolve(), s(n);
1240
+ }), i;
1241
+ }
1242
+ use(e) {
1243
+ if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1244
+ if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1245
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Ve.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1246
+ }
1247
+ setResolvedLanguage(e) {
1248
+ if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
1249
+ for (let t = 0; t < this.languages.length; t++) {
1250
+ const s = this.languages[t];
1251
+ if (!(["cimode", "dev"].indexOf(s) > -1) && this.store.hasLanguageSomeTranslations(s)) {
1252
+ this.resolvedLanguage = s;
1253
+ break;
1254
+ }
1255
+ }
1256
+ }
1257
+ changeLanguage(e, t) {
1258
+ var s = this;
1259
+ this.isLanguageChangingTo = e;
1260
+ const i = H();
1261
+ this.emit("languageChanging", e);
1262
+ const n = (l) => {
1263
+ this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l);
1264
+ }, a = (l, u) => {
1265
+ u ? (n(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, i.resolve(function() {
1266
+ return s.t(...arguments);
1267
+ }), t && t(l, function() {
1268
+ return s.t(...arguments);
1269
+ });
1270
+ }, o = (l) => {
1271
+ var h, f;
1272
+ !e && !l && this.services.languageDetector && (l = []);
1273
+ const u = d(l) ? l : this.services.languageUtils.getBestMatchFromCodes(l);
1274
+ u && (this.language || n(u), this.translator.language || this.translator.changeLanguage(u), (f = (h = this.services.languageDetector) == null ? void 0 : h.cacheUserLanguage) == null || f.call(h, u)), this.loadResources(u, (c) => {
1275
+ a(c, u);
1276
+ });
1277
+ };
1278
+ return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e), i;
1279
+ }
1280
+ getFixedT(e, t, s) {
1281
+ var i = this;
1282
+ const n = function(a, o) {
1283
+ let l;
1284
+ if (typeof o != "object") {
1285
+ for (var u = arguments.length, h = new Array(u > 2 ? u - 2 : 0), f = 2; f < u; f++)
1286
+ h[f - 2] = arguments[f];
1287
+ l = i.options.overloadTranslationOptionHandler([a, o].concat(h));
1288
+ } else
1289
+ l = {
1290
+ ...o
1291
+ };
1292
+ l.lng = l.lng || n.lng, l.lngs = l.lngs || n.lngs, l.ns = l.ns || n.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || s || n.keyPrefix);
1293
+ const c = i.options.keySeparator || ".";
1294
+ let p;
1295
+ return l.keyPrefix && Array.isArray(a) ? p = a.map((g) => `${l.keyPrefix}${c}${g}`) : p = l.keyPrefix ? `${l.keyPrefix}${c}${a}` : a, i.t(p, l);
1296
+ };
1297
+ return d(e) ? n.lng = e : n.lngs = e, n.ns = t, n.keyPrefix = s, n;
1298
+ }
1299
+ t() {
1300
+ var i;
1301
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
1302
+ t[s] = arguments[s];
1303
+ return (i = this.translator) == null ? void 0 : i.translate(...t);
1304
+ }
1305
+ exists() {
1306
+ var i;
1307
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
1308
+ t[s] = arguments[s];
1309
+ return (i = this.translator) == null ? void 0 : i.exists(...t);
1310
+ }
1311
+ setDefaultNamespace(e) {
1312
+ this.options.defaultNS = e;
1313
+ }
1314
+ hasLoadedNamespace(e) {
1315
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1316
+ if (!this.isInitialized)
1317
+ return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
1318
+ if (!this.languages || !this.languages.length)
1319
+ return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
1320
+ const s = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, n = this.languages[this.languages.length - 1];
1321
+ if (s.toLowerCase() === "cimode") return !0;
1322
+ const a = (o, l) => {
1323
+ const u = this.services.backendConnector.state[`${o}|${l}`];
1324
+ return u === -1 || u === 0 || u === 2;
1325
+ };
1326
+ if (t.precheck) {
1327
+ const o = t.precheck(this, a);
1328
+ if (o !== void 0) return o;
1329
+ }
1330
+ return !!(this.hasResourceBundle(s, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(s, e) && (!i || a(n, e)));
1331
+ }
1332
+ loadNamespaces(e, t) {
1333
+ const s = H();
1334
+ return this.options.ns ? (d(e) && (e = [e]), e.forEach((i) => {
1335
+ this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
1336
+ }), this.loadResources((i) => {
1337
+ s.resolve(), t && t(i);
1338
+ }), s) : (t && t(), Promise.resolve());
1339
+ }
1340
+ loadLanguages(e, t) {
1341
+ const s = H();
1342
+ d(e) && (e = [e]);
1343
+ const i = this.options.preload || [], n = e.filter((a) => i.indexOf(a) < 0 && this.services.languageUtils.isSupportedCode(a));
1344
+ return n.length ? (this.options.preload = i.concat(n), this.loadResources((a) => {
1345
+ s.resolve(), t && t(a);
1346
+ }), s) : (t && t(), Promise.resolve());
1347
+ }
1348
+ dir(e) {
1349
+ var i, n;
1350
+ if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
1351
+ const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], s = ((n = this.services) == null ? void 0 : n.languageUtils) || new Se($e());
1352
+ return t.indexOf(s.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1353
+ }
1354
+ static createInstance() {
1355
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1356
+ return new B(e, t);
1357
+ }
1358
+ cloneInstance() {
1359
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : W;
1360
+ const s = e.forkResourceStore;
1361
+ s && delete e.forkResourceStore;
1362
+ const i = {
1363
+ ...this.options,
1364
+ ...e,
1365
+ isClone: !0
1366
+ }, n = new B(i);
1367
+ if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
1368
+ n[o] = this[o];
1369
+ }), n.services = {
1370
+ ...this.services
1371
+ }, n.services.utils = {
1372
+ hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
1373
+ }, s) {
1374
+ const o = Object.keys(this.store.data).reduce((l, u) => (l[u] = {
1375
+ ...this.store.data[u]
1376
+ }, Object.keys(l[u]).reduce((h, f) => (h[f] = {
1377
+ ...l[u][f]
1378
+ }, h), {})), {});
1379
+ n.store = new ye(o, i), n.services.resourceStore = n.store;
1380
+ }
1381
+ return n.translator = new q(n.services, i), n.translator.on("*", function(o) {
1382
+ for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), h = 1; h < l; h++)
1383
+ u[h - 1] = arguments[h];
1384
+ n.emit(o, ...u);
1385
+ }), n.init(i, t), n.translator.options = i, n.translator.backendConnector.services.utils = {
1386
+ hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
1387
+ }, n;
1388
+ }
1389
+ toJSON() {
1390
+ return {
1391
+ options: this.options,
1392
+ store: this.store,
1393
+ language: this.language,
1394
+ languages: this.languages,
1395
+ resolvedLanguage: this.resolvedLanguage
1396
+ };
1397
+ }
1398
+ }
1399
+ const S = B.createInstance();
1400
+ S.createInstance = B.createInstance;
1401
+ S.createInstance;
1402
+ S.dir;
1403
+ S.init;
1404
+ S.loadResources;
1405
+ S.reloadResources;
1406
+ S.use;
1407
+ S.changeLanguage;
1408
+ S.getFixedT;
1409
+ S.t;
1410
+ S.exists;
1411
+ S.setDefaultNamespace;
1412
+ S.hasLoadedNamespace;
1413
+ S.loadNamespaces;
1414
+ S.loadLanguages;
1415
+ var rt = (r, e) => typeof e == "bigint" ? e.toString() : e;
1416
+ function te(r, e = " | ") {
1417
+ return r.map((t) => typeof t == "string" ? `'${t}'` : t).join(e);
1418
+ }
1419
+ var Pe = (r) => {
1420
+ if (typeof r != "object" || r === null)
1421
+ return !1;
1422
+ for (const e in r)
1423
+ if (!Object.prototype.hasOwnProperty.call(r, e))
1424
+ return !1;
1425
+ return !0;
1426
+ }, nt = (r, e) => {
1427
+ if (typeof r == "string")
1428
+ return { key: r, values: {} };
1429
+ if (Pe(r)) {
1430
+ const t = "key" in r && typeof r.key == "string" ? r.key : e, s = "values" in r && Pe(r.values) ? r.values : {};
1431
+ return { key: t, values: s };
1432
+ }
1433
+ return { key: e, values: {} };
1434
+ }, Re = "zod", at = (r) => (e, t) => {
1435
+ var l;
1436
+ const { t: s, ns: i, handlePath: n } = {
1437
+ t: S.t,
1438
+ ns: Re,
1439
+ ...r,
1440
+ handlePath: (r == null ? void 0 : r.handlePath) !== !1 ? {
1441
+ context: "with_path",
1442
+ ns: (r == null ? void 0 : r.ns) ?? Re,
1443
+ keyPrefix: void 0,
1444
+ ...r == null ? void 0 : r.handlePath
1445
+ } : null
1446
+ };
1447
+ let a;
1448
+ a = Ae(e, t).message;
1449
+ const o = e.path.length > 0 && n ? {
1450
+ context: n.context,
1451
+ path: s(
1452
+ [n.keyPrefix, e.path.join(".")].filter(Boolean).join("."),
1453
+ {
1454
+ ns: n.ns,
1455
+ defaultValue: e.path.join(".")
1456
+ }
1457
+ )
1458
+ } : {};
1459
+ switch (e.code) {
1460
+ case O.invalid_type:
1461
+ e.received === de.undefined ? a = s("errors.invalid_type_received_undefined", {
1462
+ ns: i,
1463
+ defaultValue: a,
1464
+ ...o
1465
+ }) : e.received === de.null ? a = s("errors.invalid_type_received_null", {
1466
+ ns: i,
1467
+ defaultValue: a,
1468
+ ...o
1469
+ }) : a = s("errors.invalid_type", {
1470
+ expected: s(`types.${e.expected}`, {
1471
+ defaultValue: e.expected,
1472
+ ns: i
1473
+ }),
1474
+ received: s(`types.${e.received}`, {
1475
+ defaultValue: e.received,
1476
+ ns: i
1477
+ }),
1478
+ ns: i,
1479
+ defaultValue: a,
1480
+ ...o
1481
+ });
1482
+ break;
1483
+ case O.invalid_literal:
1484
+ a = s("errors.invalid_literal", {
1485
+ expected: JSON.stringify(e.expected, rt),
1486
+ ns: i,
1487
+ defaultValue: a,
1488
+ ...o
1489
+ });
1490
+ break;
1491
+ case O.unrecognized_keys:
1492
+ a = s("errors.unrecognized_keys", {
1493
+ keys: te(e.keys, ", "),
1494
+ count: e.keys.length,
1495
+ ns: i,
1496
+ defaultValue: a,
1497
+ ...o
1498
+ });
1499
+ break;
1500
+ case O.invalid_union:
1501
+ a = s("errors.invalid_union", {
1502
+ ns: i,
1503
+ defaultValue: a,
1504
+ ...o
1505
+ });
1506
+ break;
1507
+ case O.invalid_union_discriminator:
1508
+ a = s("errors.invalid_union_discriminator", {
1509
+ options: te(e.options),
1510
+ ns: i,
1511
+ defaultValue: a,
1512
+ ...o
1513
+ });
1514
+ break;
1515
+ case O.invalid_enum_value:
1516
+ a = s("errors.invalid_enum_value", {
1517
+ options: te(e.options),
1518
+ received: e.received,
1519
+ ns: i,
1520
+ defaultValue: a,
1521
+ ...o
1522
+ });
1523
+ break;
1524
+ case O.invalid_arguments:
1525
+ a = s("errors.invalid_arguments", {
1526
+ ns: i,
1527
+ defaultValue: a,
1528
+ ...o
1529
+ });
1530
+ break;
1531
+ case O.invalid_return_type:
1532
+ a = s("errors.invalid_return_type", {
1533
+ ns: i,
1534
+ defaultValue: a,
1535
+ ...o
1536
+ });
1537
+ break;
1538
+ case O.invalid_date:
1539
+ a = s("errors.invalid_date", {
1540
+ ns: i,
1541
+ defaultValue: a,
1542
+ ...o
1543
+ });
1544
+ break;
1545
+ case O.invalid_string:
1546
+ typeof e.validation == "object" ? "startsWith" in e.validation ? a = s("errors.invalid_string.startsWith", {
1547
+ startsWith: e.validation.startsWith,
1548
+ ns: i,
1549
+ defaultValue: a,
1550
+ ...o
1551
+ }) : "endsWith" in e.validation && (a = s("errors.invalid_string.endsWith", {
1552
+ endsWith: e.validation.endsWith,
1553
+ ns: i,
1554
+ defaultValue: a,
1555
+ ...o
1556
+ })) : a = s(`errors.invalid_string.${e.validation}`, {
1557
+ validation: s(`validations.${e.validation}`, {
1558
+ defaultValue: e.validation,
1559
+ ns: i
1560
+ }),
1561
+ ns: i,
1562
+ defaultValue: a,
1563
+ ...o
1564
+ });
1565
+ break;
1566
+ case O.too_small:
1567
+ const u = e.type === "date" ? new Date(e.minimum) : e.minimum;
1568
+ a = s(
1569
+ `errors.too_small.${e.type}.${e.exact ? "exact" : e.inclusive ? "inclusive" : "not_inclusive"}`,
1570
+ {
1571
+ minimum: u,
1572
+ count: typeof u == "number" ? u : void 0,
1573
+ ns: i,
1574
+ defaultValue: a,
1575
+ ...o
1576
+ }
1577
+ );
1578
+ break;
1579
+ case O.too_big:
1580
+ const h = e.type === "date" ? new Date(e.maximum) : e.maximum;
1581
+ a = s(
1582
+ `errors.too_big.${e.type}.${e.exact ? "exact" : e.inclusive ? "inclusive" : "not_inclusive"}`,
1583
+ {
1584
+ maximum: h,
1585
+ count: typeof h == "number" ? h : void 0,
1586
+ ns: i,
1587
+ defaultValue: a,
1588
+ ...o
1589
+ }
1590
+ );
1591
+ break;
1592
+ case O.custom:
1593
+ const { key: f, values: c } = nt(
1594
+ (l = e.params) == null ? void 0 : l.i18n,
1595
+ "errors.custom"
1596
+ );
1597
+ a = s(f, {
1598
+ ...c,
1599
+ ns: i,
1600
+ defaultValue: a,
1601
+ ...o
1602
+ });
1603
+ break;
1604
+ case O.invalid_intersection_types:
1605
+ a = s("errors.invalid_intersection_types", {
1606
+ ns: i,
1607
+ defaultValue: a,
1608
+ ...o
1609
+ });
1610
+ break;
1611
+ case O.not_multiple_of:
1612
+ a = s("errors.not_multiple_of", {
1613
+ multipleOf: e.multipleOf,
1614
+ ns: i,
1615
+ defaultValue: a,
1616
+ ...o
1617
+ });
1618
+ break;
1619
+ case O.not_finite:
1620
+ a = s("errors.not_finite", {
1621
+ ns: i,
1622
+ defaultValue: a,
1623
+ ...o
1624
+ });
1625
+ break;
1626
+ }
1627
+ return { message: a };
1628
+ };
1629
+ const le = Te(), D = Ke({
1630
+ locale: le,
1631
+ messages: ke
1632
+ });
1633
+ console.info("Current locale:", le);
1634
+ S.init({
1635
+ lng: le,
1636
+ resources: ke
1637
+ });
1638
+ De.setErrorMap(at({ ns: ["connectZod", "connectZodCustom"] }));
1639
+ var b = [];
1640
+ for (var se = 0; se < 256; ++se)
1641
+ b.push((se + 256).toString(16).slice(1));
1642
+ function ot(r, e = 0) {
1643
+ return (b[r[e + 0]] + b[r[e + 1]] + b[r[e + 2]] + b[r[e + 3]] + "-" + b[r[e + 4]] + b[r[e + 5]] + "-" + b[r[e + 6]] + b[r[e + 7]] + "-" + b[r[e + 8]] + b[r[e + 9]] + "-" + b[r[e + 10]] + b[r[e + 11]] + b[r[e + 12]] + b[r[e + 13]] + b[r[e + 14]] + b[r[e + 15]]).toLowerCase();
1644
+ }
1645
+ var _, lt = new Uint8Array(16);
1646
+ function ut() {
1647
+ if (!_ && (_ = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !_))
1648
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1649
+ return _(lt);
1650
+ }
1651
+ var ie, Z, re = 0, ne = 0;
1652
+ function ct(r, e, t) {
1653
+ var s = e && t || 0, i = e || new Array(16);
1654
+ r = r || {};
1655
+ var n = r.node, a = r.clockseq;
1656
+ if (r._v6 || (n || (n = ie), a == null && (a = Z)), n == null || a == null) {
1657
+ var o = r.random || (r.rng || ut)();
1658
+ n == null && (n = [o[0], o[1], o[2], o[3], o[4], o[5]], !ie && !r._v6 && (n[0] |= 1, ie = n)), a == null && (a = (o[6] << 8 | o[7]) & 16383, Z === void 0 && !r._v6 && (Z = a));
1659
+ }
1660
+ var l = r.msecs !== void 0 ? r.msecs : Date.now(), u = r.nsecs !== void 0 ? r.nsecs : ne + 1, h = l - re + (u - ne) / 1e4;
1661
+ if (h < 0 && r.clockseq === void 0 && (a = a + 1 & 16383), (h < 0 || l > re) && r.nsecs === void 0 && (u = 0), u >= 1e4)
1662
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
1663
+ re = l, ne = u, Z = a, l += 122192928e5;
1664
+ var f = ((l & 268435455) * 1e4 + u) % 4294967296;
1665
+ i[s++] = f >>> 24 & 255, i[s++] = f >>> 16 & 255, i[s++] = f >>> 8 & 255, i[s++] = f & 255;
1666
+ var c = l / 4294967296 * 1e4 & 268435455;
1667
+ i[s++] = c >>> 8 & 255, i[s++] = c & 255, i[s++] = c >>> 24 & 15 | 16, i[s++] = c >>> 16 & 255, i[s++] = a >>> 8 | 128, i[s++] = a & 255;
1668
+ for (var p = 0; p < 6; ++p)
1669
+ i[s + p] = n[p];
1670
+ return e || ot(i);
1671
+ }
1672
+ async function bt(r, e) {
1673
+ await new Promise((t) => {
1674
+ const s = document.createElement("input");
1675
+ s.value = r, document.body.appendChild(s), s.select(), document.execCommand("copy"), document.body.removeChild(s), t("");
1676
+ }).then(() => {
1677
+ var t;
1678
+ (t = oe().snackbar) == null || t.open({
1679
+ message: (e == null ? void 0 : e.successMessage) || "Copied to clipboard",
1680
+ type: "success",
1681
+ dismissable: !0
1682
+ });
1683
+ });
1684
+ }
1685
+ const St = {
1686
+ fileExtension(r) {
1687
+ return (r == null ? void 0 : r.type.replace(/video\/|image\//, "")) || void 0;
1688
+ },
1689
+ generateId(r) {
1690
+ return [ct(), this.fileExtension(r)].filter(Boolean).join(".");
1691
+ },
1692
+ campaignPath(r) {
1693
+ return `business/${k.getBusinessId()}/campaigns/${r || this.generateId()}`;
1694
+ },
1695
+ coverImagePath() {
1696
+ return `business/${k.getBusinessId()}/membership/design/image.png`;
1697
+ },
1698
+ advertisementPath(r, e) {
1699
+ return `business/${k.getBusinessId()}/membership/advertisement/${r}.${this.fileExtension(e)}`;
1700
+ },
1701
+ designPath(r, e) {
1702
+ return `business/${k.getBusinessId()}/membership/design/${r}.${this.fileExtension(e)}`;
1703
+ },
1704
+ bundleImagePath(r, e) {
1705
+ return `business/${k.getBusinessId()}/membership/bundles/${r || this.generateId(e)}`;
1706
+ },
1707
+ collectibleImagePath(r, e) {
1708
+ return `business/${k.getBusinessId()}/membership/collectibles/${r || this.generateId(e)}`;
1709
+ },
1710
+ tierImagePath(r, e) {
1711
+ return `business/${k.getBusinessId()}/membership/tiers/${r || this.generateId(e)}`;
1712
+ },
1713
+ referralTermAndConditionPath() {
1714
+ return `business/${k.getBusinessId()}/membership/referral/term_and_condition.pdf`;
1715
+ },
1716
+ async update(r, e, t) {
1717
+ const s = fe(void 0, t), i = ge(s, r);
1718
+ return await Ee(i, e), Ie(i);
1719
+ },
1720
+ async delete(r, e) {
1721
+ const t = fe(void 0, e), s = ge(t, r);
1722
+ await Fe(s);
1723
+ }
1724
+ }, Ot = {
1725
+ get dialog() {
1726
+ return oe().dialog;
1727
+ },
1728
+ confirm(r, e = D.global.t("connect.common.confirm"), t = D.global.t("connect.common.confirm"), s = D.global.t("connect.common.cancel")) {
1729
+ return new Promise((i) => {
1730
+ var n;
1731
+ (n = this.dialog) == null || n.open({
1732
+ title: e,
1733
+ message: r,
1734
+ closeButton: !0,
1735
+ overlay: !0,
1736
+ primaryActions: {
1737
+ close: !0,
1738
+ text: t
1739
+ },
1740
+ secondaryActions: {
1741
+ variant: "tertiary",
1742
+ close: !0,
1743
+ text: s
1744
+ }
1745
+ }).onPrimary(() => {
1746
+ i(!0);
1747
+ }).onSecondary(() => {
1748
+ i(!1);
1749
+ }).onClose(() => {
1750
+ i(!1);
1751
+ });
1752
+ });
1753
+ },
1754
+ remove(r, e = D.global.t("connect.common.remove"), t = D.global.t("connect.common.remove"), s = D.global.t("connect.common.cancel")) {
1755
+ return new Promise((i) => {
1756
+ var n;
1757
+ (n = this.dialog) == null || n.open({
1758
+ title: e,
1759
+ message: r,
1760
+ closeButton: !0,
1761
+ overlay: !0,
1762
+ primaryActions: {
1763
+ close: !0,
1764
+ variant: "destructive",
1765
+ text: t
1766
+ },
1767
+ secondaryActions: {
1768
+ variant: "tertiary",
1769
+ close: !0,
1770
+ text: s
1771
+ }
1772
+ }).onPrimary(() => {
1773
+ i(!0);
1774
+ }).onClose(() => {
1775
+ i(!1);
1776
+ });
1777
+ });
1778
+ }
1779
+ }, Lt = {
1780
+ get snackbar() {
1781
+ return oe().snackbar;
1782
+ },
1783
+ success(r, e = 2e3) {
1784
+ var t;
1785
+ return (t = this.snackbar) == null ? void 0 : t.open({ message: r, type: "success" }, e);
1786
+ },
1787
+ error(r, e = 2e3) {
1788
+ var t;
1789
+ return (t = this.snackbar) == null ? void 0 : t.open({ message: r, type: "error" }, e);
1790
+ },
1791
+ info(r, e = 2e3, t = !1) {
1792
+ var s;
1793
+ return (s = this.snackbar) == null ? void 0 : s.open(
1794
+ {
1795
+ message: r,
1796
+ type: "info",
1797
+ dismissable: e !== null,
1798
+ spinner: t
1799
+ },
1800
+ e
1801
+ );
1802
+ },
1803
+ close(r) {
1804
+ var e;
1805
+ return (e = this.snackbar) == null ? void 0 : e.close(r);
1806
+ }
1807
+ };
1808
+ export {
1809
+ bt as a,
1810
+ xt as b,
1811
+ yt as c,
1812
+ St as f,
1813
+ D as i,
1814
+ Lt as n,
1815
+ Ot as p,
1816
+ vt as r
1817
+ };