@wix/blog 1.0.691 → 1.0.692

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 (85) hide show
  1. package/_sdk-exports/context-blog-feed-context-provider/runtime.d.ts +483 -0
  2. package/_sdk-exports/context-blog-feed-context-provider/runtime.js +5 -0
  3. package/_sdk-exports/context-category-item-context-provider/runtime.d.ts +189 -0
  4. package/_sdk-exports/context-category-item-context-provider/runtime.js +2 -0
  5. package/_sdk-exports/context-post-by-id-context-provider/runtime.d.ts +31 -0
  6. package/_sdk-exports/context-post-by-id-context-provider/runtime.js +5 -0
  7. package/_sdk-exports/context-post-context-provider/runtime.d.ts +3213 -0
  8. package/_sdk-exports/context-post-context-provider/runtime.js +5 -0
  9. package/_sdk-exports/context-post-item-context-provider/runtime.d.ts +386 -0
  10. package/_sdk-exports/context-post-item-context-provider/runtime.js +5 -0
  11. package/_sdk-exports/context-related-posts-context-provider/runtime.d.ts +341 -0
  12. package/_sdk-exports/context-related-posts-context-provider/runtime.js +5 -0
  13. package/_sdk-exports/context-tag-item-context-provider/runtime.d.ts +185 -0
  14. package/_sdk-exports/context-tag-item-context-provider/runtime.js +2 -0
  15. package/blog-feed-context-provider/package.json +3 -0
  16. package/build/cjs/context-blog-feed-context-provider.d.ts +483 -0
  17. package/build/cjs/context-blog-feed-context-provider.js +4601 -0
  18. package/build/cjs/context-blog-feed-context-provider.js.map +1 -0
  19. package/build/cjs/context-category-item-context-provider.d.ts +189 -0
  20. package/build/cjs/context-category-item-context-provider.js +578 -0
  21. package/build/cjs/context-category-item-context-provider.js.map +1 -0
  22. package/build/cjs/context-post-by-id-context-provider.d.ts +31 -0
  23. package/build/cjs/context-post-by-id-context-provider.js +4531 -0
  24. package/build/cjs/context-post-by-id-context-provider.js.map +1 -0
  25. package/build/cjs/context-post-context-provider.d.ts +3213 -0
  26. package/build/cjs/context-post-context-provider.js +5404 -0
  27. package/build/cjs/context-post-context-provider.js.map +1 -0
  28. package/build/cjs/context-post-item-context-provider.d.ts +386 -0
  29. package/build/cjs/context-post-item-context-provider.js +3682 -0
  30. package/build/cjs/context-post-item-context-provider.js.map +1 -0
  31. package/build/cjs/context-related-posts-context-provider.d.ts +341 -0
  32. package/build/cjs/context-related-posts-context-provider.js +4355 -0
  33. package/build/cjs/context-related-posts-context-provider.js.map +1 -0
  34. package/build/cjs/context-tag-item-context-provider.d.ts +185 -0
  35. package/build/cjs/context-tag-item-context-provider.js +578 -0
  36. package/build/cjs/context-tag-item-context-provider.js.map +1 -0
  37. package/build/es/context-blog-feed-context-provider.d.mts +483 -0
  38. package/build/es/context-blog-feed-context-provider.mjs +4571 -0
  39. package/build/es/context-blog-feed-context-provider.mjs.map +1 -0
  40. package/build/es/context-category-item-context-provider.d.mts +189 -0
  41. package/build/es/context-category-item-context-provider.mjs +549 -0
  42. package/build/es/context-category-item-context-provider.mjs.map +1 -0
  43. package/build/es/context-post-by-id-context-provider.d.mts +31 -0
  44. package/build/es/context-post-by-id-context-provider.mjs +4491 -0
  45. package/build/es/context-post-by-id-context-provider.mjs.map +1 -0
  46. package/build/es/context-post-context-provider.d.mts +3213 -0
  47. package/build/es/context-post-context-provider.mjs +5374 -0
  48. package/build/es/context-post-context-provider.mjs.map +1 -0
  49. package/build/es/context-post-item-context-provider.d.mts +386 -0
  50. package/build/es/context-post-item-context-provider.mjs +3652 -0
  51. package/build/es/context-post-item-context-provider.mjs.map +1 -0
  52. package/build/es/context-related-posts-context-provider.d.mts +341 -0
  53. package/build/es/context-related-posts-context-provider.mjs +4325 -0
  54. package/build/es/context-related-posts-context-provider.mjs.map +1 -0
  55. package/build/es/context-tag-item-context-provider.d.mts +185 -0
  56. package/build/es/context-tag-item-context-provider.mjs +549 -0
  57. package/build/es/context-tag-item-context-provider.mjs.map +1 -0
  58. package/build/internal/cjs/context-blog-feed-context-provider.d.ts +483 -0
  59. package/build/internal/cjs/context-category-item-context-provider.d.ts +189 -0
  60. package/build/internal/cjs/context-post-by-id-context-provider.d.ts +31 -0
  61. package/build/internal/cjs/context-post-context-provider.d.ts +3213 -0
  62. package/build/internal/cjs/context-post-item-context-provider.d.ts +386 -0
  63. package/build/internal/cjs/context-related-posts-context-provider.d.ts +341 -0
  64. package/build/internal/cjs/context-tag-item-context-provider.d.ts +185 -0
  65. package/build/internal/es/context-blog-feed-context-provider.d.mts +483 -0
  66. package/build/internal/es/context-category-item-context-provider.d.mts +189 -0
  67. package/build/internal/es/context-post-by-id-context-provider.d.mts +31 -0
  68. package/build/internal/es/context-post-context-provider.d.mts +3213 -0
  69. package/build/internal/es/context-post-item-context-provider.d.mts +386 -0
  70. package/build/internal/es/context-related-posts-context-provider.d.mts +341 -0
  71. package/build/internal/es/context-tag-item-context-provider.d.mts +185 -0
  72. package/category-item-context-provider/package.json +3 -0
  73. package/context/blog-feed-context-provider/package.json +3 -0
  74. package/context/category-item-context-provider/package.json +3 -0
  75. package/context/post-by-id-context-provider/package.json +3 -0
  76. package/context/post-context-provider/package.json +3 -0
  77. package/context/post-item-context-provider/package.json +3 -0
  78. package/context/related-posts-context-provider/package.json +3 -0
  79. package/context/tag-item-context-provider/package.json +3 -0
  80. package/package.json +103 -4
  81. package/post-by-id-context-provider/package.json +3 -0
  82. package/post-context-provider/package.json +3 -0
  83. package/post-item-context-provider/package.json +3 -0
  84. package/related-posts-context-provider/package.json +3 -0
  85. package/tag-item-context-provider/package.json +3 -0
@@ -0,0 +1,4355 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to2, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to2, key) && key !== except)
14
+ __defProp(to2, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to2;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // context-related-posts-context-provider.ts
21
+ var context_related_posts_context_provider_exports = {};
22
+ __export(context_related_posts_context_provider_exports, {
23
+ RelatedPostsProvider: () => pu,
24
+ default: () => pu,
25
+ injectAccessTokenGetter: () => mu,
26
+ useRelatedPostsContext: () => tu
27
+ });
28
+ module.exports = __toCommonJS(context_related_posts_context_provider_exports);
29
+
30
+ // _sdk-exports/context-related-posts-context-provider/runtime.js
31
+ var import_react = require("react");
32
+ var import_services_manager_react = require("@wix/services-manager-react");
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_meta = {};
35
+ var h = Object.defineProperty;
36
+ var g = (e6, t2) => {
37
+ let n2 = {};
38
+ for (var r2 in e6) h(n2, r2, { get: e6[r2], enumerable: true });
39
+ return t2 || h(n2, Symbol.toStringTag, { value: `Module` }), n2;
40
+ };
41
+ var _ = {};
42
+ function v(e6, t2 = false, n2 = (e7) => e7) {
43
+ return () => ({ __type: `event-definition`, type: e6, isDomainEvent: t2, transformations: n2 });
44
+ }
45
+ var y = (e6) => {
46
+ switch (e6) {
47
+ case `get`:
48
+ case `GET`:
49
+ return `GET`;
50
+ case `post`:
51
+ case `POST`:
52
+ return `POST`;
53
+ case `put`:
54
+ case `PUT`:
55
+ return `PUT`;
56
+ case `delete`:
57
+ case `DELETE`:
58
+ return `DELETE`;
59
+ case `patch`:
60
+ case `PATCH`:
61
+ return `PATCH`;
62
+ case `head`:
63
+ case `HEAD`:
64
+ return `HEAD`;
65
+ case `options`:
66
+ case `OPTIONS`:
67
+ return `OPTIONS`;
68
+ default:
69
+ throw Error(`Unknown method: ${e6}`);
70
+ }
71
+ };
72
+ var b = (e6) => (t2) => async (n2) => {
73
+ let r2, i2 = (t3) => {
74
+ if (r2 = e6(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
75
+ let { method: i3, url: a2, params: o2 } = r2;
76
+ return { ...r2, method: y(i3), url: a2, data: r2.data, params: o2 };
77
+ };
78
+ try {
79
+ let e7 = await t2.request(i2);
80
+ if (r2 === void 0) throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);
81
+ let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e7.data;
82
+ return n3.forEach((t3) => {
83
+ t3 && (a2 = t3(e7.data, e7.headers));
84
+ }), a2;
85
+ } catch (e7) {
86
+ throw typeof e7 == `object` && e7 && `response` in e7 && typeof e7.response == `object` && e7.response !== null && `data` in e7.response ? e7.response.data : e7;
87
+ }
88
+ };
89
+ var x = (e6) => e6.__isAmbassador ? true : !!e6().__isAmbassador;
90
+ var S = `__metadata`;
91
+ var C = `edge.wixapis.com`;
92
+ var ee = class extends Error {
93
+ message;
94
+ response;
95
+ constructor(e6, t2) {
96
+ super(e6), this.message = e6, this.response = t2;
97
+ }
98
+ async details() {
99
+ let e6 = await this.response.json();
100
+ return w(this.response.status, e6?.message, e6?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e6 });
101
+ }
102
+ };
103
+ var w = (e6, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
104
+ var T = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
105
+ var te = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
106
+ var ne = (e6) => e6.__type === `host`;
107
+ function re(e6, t2) {
108
+ return e6.create(t2);
109
+ }
110
+ var ie = `x-wix-bi-gateway`;
111
+ function ae(e6, t2, n2) {
112
+ return { [ie]: oe({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
113
+ }
114
+ function oe(e6) {
115
+ return Object.entries(e6).filter(([e7, t2]) => !!t2).map(([e7, t2]) => `${e7}=${t2}`).join(`,`);
116
+ }
117
+ function se(e6) {
118
+ let t2 = globalThis.__wix_context__, n2 = { client: _.client, elevatedClient: _.elevatedClient }, r2;
119
+ globalThis.__wix_context__ = void 0, _.client = void 0, _.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
120
+ try {
121
+ return e6();
122
+ } finally {
123
+ globalThis.__wix_context__ = t2, _.client = n2.client, _.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
124
+ }
125
+ }
126
+ var ce = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
127
+ function le(e6) {
128
+ return me(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
129
+ }
130
+ var ue = /([\p{Ll}\d])(\p{Lu})/gu;
131
+ var de = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
132
+ var fe = `$1\0$2`;
133
+ var pe = /[^\p{L}\d]+/giu;
134
+ function me(e6) {
135
+ let t2 = e6.trim();
136
+ t2 = t2.replace(ue, fe).replace(de, fe), t2 = t2.replace(pe, `\0`);
137
+ let n2 = 0, r2 = t2.length;
138
+ for (; t2.charAt(n2) === `\0`; ) n2++;
139
+ if (n2 === r2) return [];
140
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
141
+ return t2.slice(n2, r2).split(/\0/g);
142
+ }
143
+ var he = (e6) => `validationError` in (e6.response?.data?.details ?? {});
144
+ var ge = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
145
+ var _e = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
146
+ function ve(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
147
+ if (typeof e6 != `object` || !e6) throw e6;
148
+ if (he(e6)) return ye(e6, t2, n2);
149
+ if (ge(e6)) return xe(e6);
150
+ if (_e(e6)) {
151
+ let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: le(n3), data: {} }, requestId: e6.requestId };
152
+ return be(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
153
+ }
154
+ return Se(e6);
155
+ }
156
+ var ye = (e6, t2, n2) => {
157
+ let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Ce(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
158
+ return be(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
159
+ };
160
+ var be = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
161
+ var xe = (e6) => {
162
+ let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? le(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
163
+ return be(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
164
+ };
165
+ var Se = (e6) => be(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: le(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
166
+ var Ce = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
167
+ let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
168
+ return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
169
+ let r3 = t2[e7.field];
170
+ if (r3) return { ...e7, field: we(r3, i2) };
171
+ let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
172
+ if (s2) {
173
+ let t3 = a2[s2];
174
+ if (t3) return { ...e7, field: e7.field.replace(s2, we(t3, i2)) };
175
+ }
176
+ return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
177
+ });
178
+ };
179
+ var we = (e6, t2) => {
180
+ let n2 = Te(e6);
181
+ return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
182
+ };
183
+ var Te = (e6) => {
184
+ let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
185
+ return t2 && t2.groups && Number(t2.groups.argIndex);
186
+ };
187
+ function Ee(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
188
+ return se(() => e6({ request: async (e7) => {
189
+ let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
190
+ a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
191
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? C : o3}${a3.url}`;
192
+ a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
193
+ try {
194
+ let e8 = ae(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
195
+ if (s3.status !== 200) {
196
+ let e9 = null;
197
+ try {
198
+ e9 = await s3.json();
199
+ } catch {
200
+ }
201
+ let t3 = Oe(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = ve(t3);
202
+ throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
203
+ }
204
+ let l3 = await s3.json();
205
+ return { data: a3.migrationOptions?.optInTransformResponse && a3.transformResponse ? Array.isArray(a3.transformResponse) ? a3.transformResponse[0](l3) : a3.transformResponse(l3) : l3, headers: s3.headers, status: s3.status, statusText: s3.statusText };
206
+ } catch (e8) {
207
+ throw e8.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e8;
208
+ }
209
+ }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
210
+ }
211
+ var De = class extends Error {
212
+ response;
213
+ requestId;
214
+ constructor(e6) {
215
+ super(), this.response = e6.response, this.requestId = e6.requestId;
216
+ }
217
+ };
218
+ var Oe = (e6, t2, n2, r2) => new De({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
219
+ var ke = `.`;
220
+ function Ae(e6, t2, n2) {
221
+ if (e6 == null) throw Error(`Cannot set value on null or undefined`);
222
+ let r2 = je(t2), i2 = e6;
223
+ for (let e7 = 0; e7 < r2.length; e7++) {
224
+ let t3 = r2[e7];
225
+ if (e7 === r2.length - 1) {
226
+ i2[t3] = n2;
227
+ break;
228
+ }
229
+ let a2 = r2[e7 + 1];
230
+ (!(t3 in i2) || i2[t3] == null || typeof i2[t3] != `object` || i2[t3] === null) && (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
231
+ }
232
+ return e6;
233
+ }
234
+ function je(e6) {
235
+ return Array.isArray(e6) ? e6 : e6.split(ke).map((e7) => Me(e7) ? Number(e7) : e7);
236
+ }
237
+ function Me(e6) {
238
+ return /^\d+$/.test(e6);
239
+ }
240
+ function Ne(e6) {
241
+ let t2 = {};
242
+ for (let [n2, r2] of Object.entries(e6)) Pe(n2) || Ae(t2, je(n2), r2);
243
+ return t2;
244
+ }
245
+ function Pe(e6) {
246
+ return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
247
+ }
248
+ var Fe = class {
249
+ BRACKET_PATTERN = /\[(\d+)\]/g;
250
+ NUMERIC_PATTERN = /^\d+$/;
251
+ ESCAPED_DOT_PATTERN = /\\\./g;
252
+ ESCAPED_LEFT_BRACKET_PATTERN = /\\\[/g;
253
+ ESCAPED_RIGHT_BRACKET_PATTERN = /\\\]/g;
254
+ SPLIT_PATTERN = /\.|\[(\d+)\]/g;
255
+ DOT_BEFORE_BRACKET_PATTERN = /\.\[/g;
256
+ ESCAPED_DOT_PLACEHOLDER = `__DOT__`;
257
+ ESCAPED_RIGHT_BRACKET_PLACEHOLDER = `__RB__`;
258
+ ESCAPED_LEFT_BRACKET_PLACEHOLDER = `__LB__`;
259
+ modifiedFields;
260
+ cleanedModifiedFields;
261
+ constructor(e6) {
262
+ this.modifiedFields = e6;
263
+ }
264
+ replaceEscapedCharacters(e6) {
265
+ return e6.replace(this.ESCAPED_DOT_PATTERN, this.ESCAPED_DOT_PLACEHOLDER).replace(this.ESCAPED_LEFT_BRACKET_PATTERN, this.ESCAPED_LEFT_BRACKET_PLACEHOLDER).replace(this.ESCAPED_RIGHT_BRACKET_PATTERN, this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER);
266
+ }
267
+ restoreEscapedCharacters(e6) {
268
+ return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
269
+ }
270
+ unflatten() {
271
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Ne(this.cleanedModifiedFields);
272
+ }
273
+ flatten(e6) {
274
+ let t2 = {};
275
+ for (let n2 of Object.keys(this.cleanedModifiedFields)) {
276
+ let r2 = this.splitPath(n2), i2 = this.navigatePath(e6, r2);
277
+ t2 = { ...t2, ...i2 };
278
+ }
279
+ return Object.fromEntries(Object.entries(t2).map(([e7, t3]) => [this.restoreEscapedCharacters(e7), t3]));
280
+ }
281
+ splitPath(e6) {
282
+ let t2 = [], n2 = 0, r2 = Array.from(e6.matchAll(this.SPLIT_PATTERN));
283
+ for (let i2 of r2) i2.index > n2 && t2.push(e6.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
284
+ return n2 < e6.length && t2.push(e6.substring(n2)), t2;
285
+ }
286
+ navigatePath(e6, t2) {
287
+ let n2 = e6, r2 = [], i2 = (e7) => {
288
+ if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
289
+ r2.push(`[${e7}]`), n2 = n2[parseInt(e7, 10)];
290
+ }, a2 = (e7, t3) => {
291
+ let i3 = e7 in ce ? ce[e7] : void 0;
292
+ if (i3 && i3 in t3) {
293
+ r2.push(i3), n2 = t3[i3];
294
+ return;
295
+ }
296
+ let a3 = ze(e7);
297
+ if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
298
+ else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
299
+ }, o2 = (e7, t3) => {
300
+ r2.push(e7), n2 = t3[e7];
301
+ };
302
+ for (let e7 of t2) {
303
+ if (this.NUMERIC_PATTERN.test(e7)) {
304
+ i2(e7);
305
+ continue;
306
+ }
307
+ if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e7}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
308
+ let t3 = n2;
309
+ e7 in n2 ? o2(e7, t3) : a2(e7, t3);
310
+ }
311
+ return { [this.buildPathString(r2)]: n2 };
312
+ }
313
+ buildPathString(e6) {
314
+ return e6.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
315
+ }
316
+ bracketToDotNotation(e6) {
317
+ return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
318
+ }
319
+ };
320
+ function Ie(e6, t2) {
321
+ let n2 = e6?.modifiedFields;
322
+ if (!n2) return null;
323
+ let r2 = Le(n2);
324
+ if (!r2) return null;
325
+ let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
326
+ e6 = { ...e6, modifiedFields: i2 };
327
+ let o2 = t2(e6), s2 = o2?.modifiedFields;
328
+ if (!s2) return null;
329
+ let c2 = Re(s2, a2);
330
+ return c2 === null ? null : (o2.modifiedFields = c2, o2);
331
+ }
332
+ function Le(e6) {
333
+ if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
334
+ let t2 = new Fe(e6);
335
+ return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
336
+ } catch {
337
+ return null;
338
+ }
339
+ return null;
340
+ }
341
+ function Re(e6, t2) {
342
+ if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
343
+ return t2.flatten(e6);
344
+ } catch {
345
+ return null;
346
+ }
347
+ return null;
348
+ }
349
+ function ze(e6) {
350
+ return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
351
+ }
352
+ function Be() {
353
+ return { emit(e6, ...t2) {
354
+ for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
355
+ }, events: {}, on(e6, t2) {
356
+ return (this.events[e6] ||= []).push(t2), () => {
357
+ this.events[e6] = this.events[e6]?.filter((e7) => t2 !== e7);
358
+ };
359
+ } };
360
+ }
361
+ var Ve = (e6) => e6.__type === `event-definition`;
362
+ function He(e6, t2, n2, r2) {
363
+ let i2;
364
+ if (e6.isDomainEvent) {
365
+ let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
366
+ i2 = e7 ? e7?.deletedEntity ? { entity: e7?.deletedEntity, metadata: c2 } : { metadata: c2 } : t3 ? { data: t3.body, metadata: c2 } : o3 ? { entity: o3.currentEntity, metadata: c2, ...o3.modifiedFields ? { modifiedFields: o3.modifiedFields } : {} } : { entity: a3?.entity, metadata: c2 };
367
+ } else i2 = { data: n2, metadata: r2 };
368
+ let a2 = e6.transformations ?? ((e7) => e7), o2 = i2, s2 = i2;
369
+ if (s2.modifiedFields) {
370
+ let e7 = s2.modifiedFields;
371
+ if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
372
+ o2 = structuredClone(i2);
373
+ let e8 = Ie(s2, a2);
374
+ if (e8) return t2(e8);
375
+ }
376
+ }
377
+ return t2(a2(o2));
378
+ }
379
+ function Ue(e6) {
380
+ let t2 = /* @__PURE__ */ new Map(), n2 = Be();
381
+ return { initModule(e7) {
382
+ return (r2) => {
383
+ let i2 = t2.get(e7.type) ?? [];
384
+ i2.push({ eventDefinition: e7, handler: r2 }), t2.set(e7.type, i2), n2.emit(`registered`, e7);
385
+ };
386
+ }, client: { ...n2, getRegisteredEvents: () => t2, async process(e7, n3 = { expectedEvents: [] }) {
387
+ let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e7), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e8) => ({ type: e8 }))];
388
+ if (c2.length > 0 && !c2.some(({ type: e8 }) => e8 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e8) => e8.type).join(`, `)}`);
389
+ let l2 = t2.get(r2) ?? [];
390
+ return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => He(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
391
+ }, async processRequest(e7, t3) {
392
+ let n3 = await e7.text();
393
+ return this.process(n3, t3);
394
+ }, async parseJWT(t3) {
395
+ let n3 = e6();
396
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
397
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3);
398
+ if (!i2) throw Error(`JWT is not valid`);
399
+ if (typeof r2.data != `string`) throw Error(`Unexpected type of JWT data: expected string, got ${typeof r2.data}`);
400
+ let a2 = JSON.parse(r2.data), o2 = a2.eventType, s2 = a2.accountInfo, c2 = a2.instanceId, l2 = a2.identity ? JSON.parse(a2.identity) : void 0;
401
+ return { instanceId: c2, eventType: o2, payload: JSON.parse(a2.data), identity: l2, accountInfo: s2 };
402
+ }, async parseRequest(e7) {
403
+ let t3 = await e7.text();
404
+ return this.parseJWT(t3);
405
+ }, async executeHandlers(e7) {
406
+ let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
407
+ if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e7.eventType)) throw Error(`Unexpected event type: ${e7.eventType}. Expected one of: ${n3.map((e8) => e8.type).join(`, `)}`);
408
+ let r2 = t2.get(e7.eventType) ?? [];
409
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => He(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
410
+ }, apps: { AppInstalled: v(`AppInstalled`)(), AppRemoved: v(`AppRemoved`)() } } };
411
+ }
412
+ var We = (e6) => e6.__type === `service-plugin-definition`;
413
+ function Ge(e6) {
414
+ let t2 = /* @__PURE__ */ new Map(), n2 = Be();
415
+ return { initModule(e7) {
416
+ return (r2) => {
417
+ let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
418
+ i2.push({ servicePluginDefinition: e7, implementation: r2 }), t2.set(e7.componentType.toLowerCase(), i2), n2.emit(`registered`, e7);
419
+ };
420
+ }, client: { ...n2, getRegisteredServicePlugins: () => t2, async parseJWT(t3) {
421
+ let n3 = e6();
422
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
423
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3, true);
424
+ if (!i2) throw Error(`JWT is not valid`);
425
+ if (typeof r2.data != `object` || r2.data === null || !(`metadata` in r2.data) || typeof r2.data.metadata != `object` || r2.data.metadata === null || !(`appExtensionType` in r2.data.metadata) || typeof r2.data.metadata.appExtensionType != `string`) throw Error(`Unexpected JWT data: expected object with metadata.appExtensionType string`);
426
+ return r2.data;
427
+ }, async process(e7) {
428
+ let t3 = await this.parseJWT(e7.body);
429
+ return this.executeHandler(t3, e7.url);
430
+ }, async parseRequest(e7) {
431
+ let t3 = await e7.text();
432
+ return this.parseJWT(t3);
433
+ }, async processRequest(e7) {
434
+ let t3 = await this.parseRequest(e7);
435
+ return this.processParsedRequest(t3, e7.url);
436
+ }, async processParsedRequest(e7, t3) {
437
+ try {
438
+ let n3 = await this.executeHandler(e7, t3);
439
+ return Response.json(n3);
440
+ } catch (e8) {
441
+ if (e8.errorType === `SPI` && e8.applicationCode && e8.httpCode) return Response.json({ applicationError: { code: e8.applicationCode, data: e8.data } }, { status: e8.httpCode });
442
+ throw e8;
443
+ }
444
+ }, async executeHandler(e7, n3) {
445
+ let r2 = e7.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
446
+ if (i2.length === 0) throw Error(`No service plugin implementations found for component type ${r2}`);
447
+ if (i2.length > 1) throw Error(`Multiple service plugin implementations found for component type ${r2}. This is currently not supported`);
448
+ let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e8) => n3.endsWith(e8.primaryHttpMappingPath));
449
+ if (!s2) throw Error(`Unexpect request: request url did not match any method: ` + n3);
450
+ let c2 = a2[s2.name];
451
+ if (!c2) throw Error(`Got request for service plugin method ${s2.name} but no implementation was provided. Available methods: ${Object.keys(a2).join(`, `)}`);
452
+ return s2.transformations.toREST(await c2(s2.transformations.fromREST(e7)));
453
+ } } };
454
+ }
455
+ var E = `X-Wix-Consistent`;
456
+ function Ke(e6) {
457
+ let t2 = e6.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e7) => Promise.resolve({ headers: {} }) }, r2 = e6.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e6.host), o2 = () => e6.fetch ?? fetch, s2 = async (n3, r3) => {
458
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} }, l3 = e6.host?.getErrorHandler?.();
459
+ try {
460
+ if (typeof n3 == `string` || n3 instanceof URL) {
461
+ let e7 = await i3(n3, { ...r3, headers: c3 });
462
+ l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
463
+ let a3 = qe(e7);
464
+ return a3 && (t2[E] = a3), e7;
465
+ }
466
+ {
467
+ for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
468
+ let e7 = await i3(n3, r3);
469
+ l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
470
+ let a3 = qe(e7);
471
+ return a3 && (t2[E] = a3), e7;
472
+ }
473
+ } catch (e7) {
474
+ throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
475
+ }
476
+ }, { client: c2, initModule: l2 } = Ge(i2), { client: u2, initModule: d2 } = Ue(i2), f2 = async (n3, r3) => {
477
+ let i3 = o2(), s3 = await a2(), c3 = T(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} } }), u3 = qe(l3);
478
+ return u3 && (t2[E] = u3), l3;
479
+ }, p2 = (t3, n3) => {
480
+ if (Ve(t3)) return d2(t3);
481
+ if (We(t3)) return l2(t3);
482
+ if (ne(t3) && e6.host) return re(t3, e6.host);
483
+ if (typeof t3 == `function`) {
484
+ if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
485
+ let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
486
+ return Ee(se(() => x(t3)) ? b(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
487
+ let n4 = new URL(e7, `https://${r3}`);
488
+ return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
489
+ }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
490
+ }
491
+ return te(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[S])])) : t3;
492
+ }, m2 = (e7) => {
493
+ for (let n3 in e7) t2[n3] = e7[n3];
494
+ };
495
+ return { ...e6.modules ? p2(e6.modules) : {}, get auth() {
496
+ let t3 = i2();
497
+ return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e6.host), t3;
498
+ }, setHeaders: m2, use: p2, enableContext(e7, t3 = { elevated: false }) {
499
+ e7 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? _.elevatedClient = this : _.client = this;
500
+ }, fetch: (t3, n3) => {
501
+ let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
502
+ return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
503
+ }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
504
+ let i3 = e6?.host?.apiBaseUrl ?? `www.wixapis.com`, a3 = await f2(`https://${i3}/graphql/${r3.apiVersion}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ query: t3, variables: n3 }) });
505
+ if (a3.status !== 200) throw new ee(`GraphQL request failed with status ${a3.status}`, a3);
506
+ let { data: o3, errors: s3 } = await a3.json();
507
+ return { data: o3 ?? {}, errors: s3 };
508
+ }, webhooks: u2, servicePlugins: c2 };
509
+ }
510
+ function qe(e6) {
511
+ return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
512
+ }
513
+ var Je = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
514
+ var Ye = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
515
+ var Xe = `items`;
516
+ var Ze = `pagingMetadata`;
517
+ var Qe = Je;
518
+ function $e(e6, t2) {
519
+ return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
520
+ }
521
+ var et = `sort.fieldName`;
522
+ function tt(e6, t2, n2) {
523
+ return (e6 === et || e6.endsWith(`.${et}`)) && typeof t2 == `string` ? $e(t2, n2) : t2;
524
+ }
525
+ function nt(e6, t2, n2) {
526
+ let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
527
+ if (Array.isArray(e7)) e7.forEach((e8) => {
528
+ i2(e8, n3);
529
+ });
530
+ else if (typeof e7 == `object` && e7) {
531
+ let a2 = e7;
532
+ Object.keys(a2).forEach((e8) => {
533
+ let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
534
+ if (r2(o2)) return;
535
+ let s2 = rt(e8, t2);
536
+ s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = tt(o2, a2[s2], t2), i2(a2[s2], o2);
537
+ });
538
+ }
539
+ };
540
+ return i2(e6, ``), e6;
541
+ }
542
+ function rt(e6, t2) {
543
+ let n2;
544
+ return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
545
+ }
546
+ function D(e6, t2 = []) {
547
+ return nt(e6, Je, t2);
548
+ }
549
+ function O(e6, t2 = []) {
550
+ return nt(e6, Ye, t2);
551
+ }
552
+ function k(e6) {
553
+ return e6 ? new Date(e6) : void 0;
554
+ }
555
+ var it = /* @__PURE__ */ new WeakMap();
556
+ function at() {
557
+ return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
558
+ }
559
+ function ot(e6, t2) {
560
+ let n2 = e6.get(t2);
561
+ return n2 || (n2 = at(), e6.set(t2, n2)), n2;
562
+ }
563
+ function st(e6, t2) {
564
+ return t2 === `*` ? (e6.anyField ??= at(), e6.anyField) : t2.endsWith(`{}`) ? (e6.mapFields ??= /* @__PURE__ */ new Map(), ot(e6.mapFields, t2.slice(0, -2))) : (e6.fields ??= /* @__PURE__ */ new Map(), ot(e6.fields, t2));
565
+ }
566
+ function ct(e6) {
567
+ let t2 = at();
568
+ for (let n2 of e6) {
569
+ let e7 = n2.path.split(`.`).reduce(st, t2);
570
+ e7.leaves ??= [], e7.leaves.push(n2);
571
+ }
572
+ return t2;
573
+ }
574
+ function lt(e6) {
575
+ let t2 = it.get(e6);
576
+ return t2 || (t2 = ct(e6), it.set(e6, t2)), t2;
577
+ }
578
+ function ut(e6) {
579
+ return typeof e6 == `object` && !!e6;
580
+ }
581
+ function dt(e6, { isRepeated: t2, isMap: n2 }, r2) {
582
+ return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? ut(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
583
+ }
584
+ function ft(e6, t2, n2) {
585
+ ut(e6) && ht(e6, t2, n2);
586
+ }
587
+ function pt(e6, t2, n2) {
588
+ for (let [r2, i2] of t2) {
589
+ if (!(r2 in e6)) continue;
590
+ if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = dt(e6[r2], t4, n2);
591
+ let t3 = e6[r2];
592
+ Array.isArray(t3) ? t3.forEach((e7) => ft(e7, i2, n2)) : ft(t3, i2, n2);
593
+ }
594
+ }
595
+ function mt(e6, t2, n2) {
596
+ for (let [r2, i2] of t2) {
597
+ let t3 = e6[r2];
598
+ ut(t3) && Object.values(t3).forEach((e7) => ft(e7, i2, n2));
599
+ }
600
+ }
601
+ function ht(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
602
+ t2 && pt(e6, t2, i2), n2 && mt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => ft(e7, r2, i2));
603
+ }
604
+ function A(e6, t2) {
605
+ if (!ut(e6)) return e6;
606
+ for (let { paths: n2, transformFn: r2 } of t2) ht(e6, lt(n2), r2);
607
+ return e6;
608
+ }
609
+ function gt(e6) {
610
+ return xt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
611
+ }
612
+ var _t = /([\p{Ll}\d])(\p{Lu})/gu;
613
+ var vt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
614
+ var yt = `$1\0$2`;
615
+ var bt = /[^\p{L}\d]+/giu;
616
+ function xt(e6) {
617
+ let t2 = e6.trim();
618
+ t2 = t2.replace(_t, yt).replace(vt, yt), t2 = t2.replace(bt, `\0`);
619
+ let n2 = 0, r2 = t2.length;
620
+ for (; t2.charAt(n2) === `\0`; ) n2++;
621
+ if (n2 === r2) return [];
622
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
623
+ return t2.slice(n2, r2).split(/\0/g);
624
+ }
625
+ var St = (e6) => `validationError` in (e6.response?.data?.details ?? {});
626
+ var Ct = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
627
+ var wt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
628
+ function j(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
629
+ if (typeof e6 != `object` || !e6) throw e6;
630
+ if (St(e6)) return Tt(e6, t2, n2);
631
+ if (Ct(e6)) return Dt(e6);
632
+ if (wt(e6)) {
633
+ let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: gt(n3), data: {} }, requestId: e6.requestId };
634
+ return Et(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
635
+ }
636
+ return Ot(e6);
637
+ }
638
+ var Tt = (e6, t2, n2) => {
639
+ let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = kt(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
640
+ return Et(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
641
+ };
642
+ var Et = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
643
+ var Dt = (e6) => {
644
+ let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? gt(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
645
+ return Et(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
646
+ };
647
+ var Ot = (e6) => Et(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: gt(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
648
+ var kt = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
649
+ let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
650
+ return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
651
+ let r3 = t2[e7.field];
652
+ if (r3) return { ...e7, field: At(r3, i2) };
653
+ let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
654
+ if (s2) {
655
+ let t3 = a2[s2];
656
+ if (t3) return { ...e7, field: e7.field.replace(s2, At(t3, i2)) };
657
+ }
658
+ return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
659
+ });
660
+ };
661
+ var At = (e6, t2) => {
662
+ let n2 = jt(e6);
663
+ return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
664
+ };
665
+ var jt = (e6) => {
666
+ let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
667
+ return t2 && t2.groups && Number(t2.groups.argIndex);
668
+ };
669
+ function Mt() {
670
+ let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
671
+ if (e6) return { initWixModules(t3, n3) {
672
+ return Nt(() => e6(t3, n3));
673
+ }, fetchWithAuth() {
674
+ throw Error(`fetchWithAuth is not available in this context`);
675
+ }, graphql() {
676
+ throw Error(`graphql is not available in this context`);
677
+ } };
678
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : _.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : _.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : _.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : _.elevatedClient;
679
+ if (t2 || n2) return { initWixModules(e7, r2) {
680
+ if (r2) {
681
+ if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
682
+ return Nt(() => n2.use(e7));
683
+ }
684
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
685
+ return Nt(() => t2.use(e7));
686
+ }, fetchWithAuth: (e7, n3) => {
687
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
688
+ return t2.fetchWithAuth(e7, n3);
689
+ }, getAuth() {
690
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
691
+ return t2.auth;
692
+ }, async graphql(e7, n3, r2) {
693
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
694
+ return t2.graphql(e7, n3, r2);
695
+ } };
696
+ }
697
+ function Nt(e6) {
698
+ let t2 = globalThis.__wix_context__, n2 = { client: _.client, elevatedClient: _.elevatedClient }, r2;
699
+ globalThis.__wix_context__ = void 0, _.client = void 0, _.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
700
+ try {
701
+ return e6();
702
+ } finally {
703
+ globalThis.__wix_context__ = t2, _.client = n2.client, _.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
704
+ }
705
+ }
706
+ function Pt(e6, t2) {
707
+ return (...n2) => {
708
+ let r2 = Mt();
709
+ return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
710
+ };
711
+ }
712
+ function M(e6, t2 = false) {
713
+ return Pt(e6, t2);
714
+ }
715
+ function Ft(e6, t2) {
716
+ let n2 = Lt(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
717
+ return t2 && r2 ? new URLSearchParams({ ".r": zt(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
718
+ r3 == null || Array.isArray(n3) && typeof r3 == `object` || e7.append(t3, r3);
719
+ }), e7), new URLSearchParams());
720
+ }
721
+ function It(e6) {
722
+ let t2 = Qt(Xt(e6.host), e6.domainToMappings);
723
+ return cn(an(e6.protoPath, e6.data || {}), t2);
724
+ }
725
+ function Lt(e6, t2 = ``) {
726
+ let n2 = {};
727
+ return Object.entries(e6).forEach(([e7, r2]) => {
728
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Rt(t2, e7);
729
+ if (i2) {
730
+ let e8 = Lt(r2, a2);
731
+ Object.assign(n2, e8);
732
+ } else n2[a2] = r2;
733
+ }), n2;
734
+ }
735
+ function Rt(e6, t2) {
736
+ return `${e6}${e6 ? `.` : ``}${t2}`;
737
+ }
738
+ var zt = (e6) => {
739
+ let t2 = new TextEncoder().encode(e6);
740
+ return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e6, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
741
+ };
742
+ var Bt = [`wix.com`, `editorx.com`];
743
+ var Vt = `_`;
744
+ var Ht = `*.`;
745
+ var Ut = RegExp(`\\.(${Bt.join(`|`)})$`);
746
+ var Wt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
747
+ var Gt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
748
+ var Kt = `dev.wix-code.com`;
749
+ var qt = /{(.*)}/;
750
+ var Jt = RegExp(`\\.(${Wt.join(`|`)})$`);
751
+ var Yt = RegExp(`.*\\.${Kt}$`);
752
+ function Xt(e6) {
753
+ return Zt(e6).replace(Ut, `._base_domain_`).replace(Jt, `._api_base_domain_`).replace(Yt, `*.dev.wix-code.com`);
754
+ }
755
+ function Zt(e6) {
756
+ return Gt[e6] ?? e6;
757
+ }
758
+ function Qt(e6, t2) {
759
+ let n2 = t2[e6];
760
+ if (n2) return n2;
761
+ let r2 = $t(e6, t2) ?? en(e6, t2);
762
+ if (!r2) {
763
+ if (nn(e6)) {
764
+ let e7 = t2[rn];
765
+ if (e7) return e7;
766
+ }
767
+ let n3 = t2[Vt];
768
+ if (n3) return n3;
769
+ }
770
+ return r2 ?? [];
771
+ }
772
+ function $t(e6, t2) {
773
+ return Object.entries(t2).find(([t3]) => {
774
+ let [, ...n2] = e6.split(`.`);
775
+ return n2.join(`.`) === t3;
776
+ })?.[1];
777
+ }
778
+ function en(e6, t2) {
779
+ let [n2] = Object.entries(t2).filter(([t3]) => tn(e6, t3)).sort(([e7], [t3]) => t3.length - e7.length);
780
+ if (!n2) return;
781
+ let [, r2] = n2;
782
+ return r2;
783
+ }
784
+ function tn(e6, t2) {
785
+ if (!t2.startsWith(Ht)) return false;
786
+ let n2 = t2.slice(1);
787
+ return e6.length > n2.length && e6.endsWith(n2);
788
+ }
789
+ function nn(e6) {
790
+ return !!e6.match(/\._base_domain_$/);
791
+ }
792
+ var rn = `www._base_domain_`;
793
+ function an(e6, t2) {
794
+ return e6.split(`/`).map((e7) => on(e7, t2)).join(`/`);
795
+ }
796
+ function on(e6, t2) {
797
+ let n2 = e6.match(qt) || [], r2 = n2[1];
798
+ return r2 ? sn(t2, r2, e6, e6.replace(n2[0], ``)) : e6;
799
+ }
800
+ function sn(e6, t2, n2, r2) {
801
+ let i2 = e6;
802
+ for (let e7 of t2.split(`.`)) {
803
+ if (!i2) return n2;
804
+ i2 = i2[e7];
805
+ }
806
+ return `${i2}${r2}`;
807
+ }
808
+ function cn(e6, t2) {
809
+ let n2 = t2?.find((t3) => e6.startsWith(t3.destPath));
810
+ return n2 ? n2.srcPath + e6.slice(n2.destPath.length) : e6;
811
+ }
812
+ function ln(e6) {
813
+ return isFinite(e6) ? e6 : e6.toString();
814
+ }
815
+ function N(e6) {
816
+ return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
817
+ }
818
+ function un(e6) {
819
+ return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
820
+ }
821
+ var dn = `modulepreload`;
822
+ var fn = function(e6, t2) {
823
+ return new URL(e6, t2).href;
824
+ };
825
+ var pn = {};
826
+ var mn = function(e6) {
827
+ return e6.pathname.endsWith(`.css`);
828
+ };
829
+ var hn = function(e6, t2, n2) {
830
+ if (t2 in e6) return e6[t2];
831
+ let r2 = n2();
832
+ if (!r2) {
833
+ e6[t2] = void 0;
834
+ return;
835
+ }
836
+ let i2 = r2.then(() => {
837
+ e6[t2] = void 0;
838
+ }, (n3) => {
839
+ throw e6[t2] = void 0, n3;
840
+ });
841
+ return e6[t2] = i2, i2;
842
+ };
843
+ var gn = function(e6, t2, n2) {
844
+ let r2 = Promise.resolve();
845
+ if (t2 && t2.length > 0) {
846
+ let o3 = function(e8) {
847
+ return Promise.all(e8.map((e9) => Promise.resolve(e9).then((e10) => ({ status: `fulfilled`, value: e10 }), (e10) => ({ status: `rejected`, reason: e10 }))));
848
+ }, s3 = function(e8) {
849
+ return import_meta.resolve ? new URL(import_meta.resolve(e8)) : new URL(e8, import_meta.url);
850
+ };
851
+ var o2 = o3, s2 = s3;
852
+ let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
853
+ r2 = o3(t2.map((t3) => {
854
+ t3 = fn(t3, n2);
855
+ let r3 = s3(t3), i4 = mn(r3);
856
+ return hn(pn, r3.href, () => {
857
+ if (e7 === void 0) {
858
+ e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
859
+ let t5 = document.getElementsByTagName(`link`);
860
+ for (let n3 = t5.length - 1; n3 >= 0; n3--) {
861
+ let r4 = t5[n3];
862
+ e7.all.add(r4.href), r4.rel === `stylesheet` && e7.styles.add(r4.href);
863
+ }
864
+ }
865
+ if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
866
+ let t4 = document.createElement(`link`);
867
+ if (t4.rel = i4 ? `stylesheet` : dn, i4 || (t4.as = `script`), t4.crossOrigin = ``, t4.href = r3.href, a2 && t4.setAttribute(`nonce`, a2), document.head.appendChild(t4), i4) return new Promise((e8, n3) => {
868
+ t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
869
+ });
870
+ });
871
+ }).filter((e8) => e8 !== void 0));
872
+ }
873
+ function i2(e7) {
874
+ let t3 = new Event(`vite:preloadError`, { cancelable: true });
875
+ if (t3.payload = e7, window.dispatchEvent(t3), !t3.defaultPrevented) throw e7;
876
+ }
877
+ return r2.then((t3) => {
878
+ for (let e7 of t3 || []) e7.status === `rejected` && i2(e7.reason);
879
+ return e6().catch(i2);
880
+ });
881
+ };
882
+ var _n = `x-wix-linguist`;
883
+ var vn = `00000000-0000-0000-0000-000000000000`;
884
+ var yn = `false`;
885
+ var bn = () => {
886
+ let e6 = Cn(`language`), t2 = Cn(`locale`);
887
+ if (e6) return { [_n]: [e6, t2 || e6, yn, vn].join(`|`) };
888
+ };
889
+ function xn() {
890
+ let e6 = null, t2 = null;
891
+ return { promise: new Promise((n2, r2) => {
892
+ e6 = n2, t2 = r2;
893
+ }), resolve: e6, reject: t2 };
894
+ }
895
+ var Sn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
896
+ var Cn = (e6) => Sn()?.[e6];
897
+ var wn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
898
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = En();
899
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Cn(`language`), locale: Cn(`locale`), get passThroughHeaders() {
900
+ return bn();
901
+ } } };
902
+ }, auth: (e7) => {
903
+ let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
904
+ !e7 && Tn() && (e7 = t2?.getAccessTokenFunction?.());
905
+ let n2 = false, { resolve: r2, promise: i2 } = xn();
906
+ return { getAuthHeaders: async () => {
907
+ if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
908
+ return { headers: { Authorization: await e7() } };
909
+ }, getAccessTokenInjector: () => (n2 = true, (e8) => {
910
+ r2(e8);
911
+ }) };
912
+ } });
913
+ function Tn() {
914
+ return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
915
+ }
916
+ function En() {
917
+ let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
918
+ if (!e6) return;
919
+ let t2 = new URL(e6);
920
+ return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
921
+ }
922
+ var Dn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
923
+ if (!e6) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
924
+ return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
925
+ }, getAccessToken: () => {
926
+ throw Error(`Not implemented`);
927
+ }, observeState: () => ({ disconnect: () => {
928
+ } }) });
929
+ var On = wn({ createHost: function(e6) {
930
+ let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
931
+ if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
932
+ return { channel: Dn({ clientSdk: t2, applicationId: n2 }), close: () => {
933
+ } };
934
+ } });
935
+ var kn = (e6, t2) => {
936
+ let n2 = On.host({ applicationId: e6, componentId: t2 }), r2 = On.auth();
937
+ return Ke({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
938
+ };
939
+ var An = (e6) => kn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
940
+ function jn() {
941
+ let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
942
+ if (e6) return { initWixModules(t3, n3) {
943
+ return Mn(() => e6(t3, n3));
944
+ }, fetchWithAuth() {
945
+ throw Error(`fetchWithAuth is not available in this context`);
946
+ }, graphql() {
947
+ throw Error(`graphql is not available in this context`);
948
+ } };
949
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : _.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : _.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : _.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : _.elevatedClient;
950
+ if (t2 || n2) return { initWixModules(e7, r2) {
951
+ if (r2) {
952
+ if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
953
+ return Mn(() => n2.use(e7));
954
+ }
955
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
956
+ return Mn(() => t2.use(e7));
957
+ }, fetchWithAuth: (e7, n3) => {
958
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
959
+ return t2.fetchWithAuth(e7, n3);
960
+ }, getAuth() {
961
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
962
+ return t2.auth;
963
+ }, async graphql(e7, n3, r2) {
964
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
965
+ return t2.graphql(e7, n3, r2);
966
+ } };
967
+ }
968
+ function Mn(e6) {
969
+ let t2 = globalThis.__wix_context__, n2 = { client: _.client, elevatedClient: _.elevatedClient }, r2;
970
+ globalThis.__wix_context__ = void 0, _.client = void 0, _.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
971
+ try {
972
+ return e6();
973
+ } finally {
974
+ globalThis.__wix_context__ = t2, _.client = n2.client, _.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
975
+ }
976
+ }
977
+ function Nn(e6, t2) {
978
+ return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
979
+ let r2 = jn();
980
+ if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
981
+ return r2.initWixModules(e6)[t3].apply(void 0, n2);
982
+ }])) };
983
+ }
984
+ function Pn(e6) {
985
+ return Nn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
986
+ }
987
+ var Fn = class {
988
+ constructor(e6) {
989
+ this.message = e6, this.captureException = () => {
990
+ console.error(this.message);
991
+ }, this.captureMessage = () => {
992
+ console.error(this.message);
993
+ }, this.startSpan = (e7, t2) => (console.error(this.message), t2(void 0)), this.startSpanManual = () => (console.error(this.message), { end: () => {
994
+ }, fail: () => {
995
+ } }), this.endSpanManual = () => {
996
+ console.error(this.message);
997
+ }, this.addBreadcrumb = () => {
998
+ console.error(this.message);
999
+ };
1000
+ }
1001
+ };
1002
+ var In = (e6) => new Fn(e6);
1003
+ var Ln = Pn({ getMonitoringClient: (e6) => () => e6.getMonitoringClient ? e6.getMonitoringClient() : In(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
1004
+ function Rn(e6) {
1005
+ let t2 = Promise.resolve(e6);
1006
+ return t2.status = `fulfilled`, t2.value = e6, t2;
1007
+ }
1008
+ function zn(e6) {
1009
+ if (e6.status === `fulfilled`) return e6.value;
1010
+ throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
1011
+ e6.status = `fulfilled`, e6.value = t2;
1012
+ }, (t2) => {
1013
+ e6.status = `rejected`, e6.reason = t2;
1014
+ })), e6);
1015
+ }
1016
+ var Bn = /* @__PURE__ */ new WeakMap();
1017
+ function Vn(e6, t2, n2) {
1018
+ let r2 = Bn.get(e6);
1019
+ r2 || (r2 = /* @__PURE__ */ new WeakMap(), Bn.set(e6, r2));
1020
+ let i2 = r2.get(t2);
1021
+ i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
1022
+ let a2 = i2.get(n2);
1023
+ if (!a2) {
1024
+ if (e6.status === `fulfilled`) a2 = Rn(t2(e6.value));
1025
+ else if (e6.status === `rejected`) try {
1026
+ a2 = Rn(n2(e6.reason));
1027
+ } catch {
1028
+ a2 = e6.then(t2, n2);
1029
+ }
1030
+ else a2 = e6.then(t2, n2);
1031
+ i2.set(n2, a2);
1032
+ }
1033
+ return a2;
1034
+ }
1035
+ var Hn = 1e4;
1036
+ function Un(e6) {
1037
+ let [t2, n2] = (0, import_react.useState)(void 0);
1038
+ return (0, import_react.useEffect)(() => {
1039
+ let t3 = Date.now();
1040
+ t3 - e6 > Hn && (0, import_react.startTransition)(() => n2(t3));
1041
+ }, []), t2 ?? e6;
1042
+ }
1043
+ function P(e6) {
1044
+ return e6;
1045
+ }
1046
+ var Wn = P(`@wix/site-service-rendering-context`);
1047
+ var Gn = () => {
1048
+ try {
1049
+ return (0, import_services_manager_react.useService)(Wn).SSR;
1050
+ } catch {
1051
+ return false;
1052
+ }
1053
+ };
1054
+ var Kn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
1055
+ function qn(e6, t2) {
1056
+ let [n2, r2] = (0, import_react.useState)(() => ({ deps: t2, value: e6() }));
1057
+ return (0, import_react.useEffect)(() => {
1058
+ if (Kn(n2.deps, t2)) return;
1059
+ let a2 = e6();
1060
+ (0, import_react.startTransition)(() => r2({ deps: t2, value: a2 }));
1061
+ }, t2), n2.value;
1062
+ }
1063
+ var Jn = P(`@wix/site-service-url`);
1064
+ var Yn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
1065
+ var Xn = `post`;
1066
+ var Zn = `builder-post`;
1067
+ var Qn = `__blog_unknown_section__`;
1068
+ var $n = (e6) => {
1069
+ let t2;
1070
+ try {
1071
+ let n3 = e6.appSectionRelativeUrl(Yn, Zn);
1072
+ if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, Qn) && !n3?.endsWith(`/post-page`)) return;
1073
+ t2 = e6.appSectionRelativeUrl(Yn, Zn, true);
1074
+ } catch {
1075
+ return;
1076
+ }
1077
+ if (!t2) return;
1078
+ let n2 = t2.split(`/`).filter(Boolean);
1079
+ return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
1080
+ };
1081
+ var er = (e6) => `${e6}/${Xn}`;
1082
+ var tr = (e6) => {
1083
+ let t2 = $n(e6);
1084
+ if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${er(t2)}`;
1085
+ };
1086
+ var nr = (e6, t2) => {
1087
+ if (!e6 || !t2) return;
1088
+ let n2;
1089
+ try {
1090
+ n2 = new URL(e6);
1091
+ } catch {
1092
+ return;
1093
+ }
1094
+ let r2 = n2.pathname.replace(/\/+$/, ``);
1095
+ for (let e7 of [t2, encodeURIComponent(t2)]) {
1096
+ let t3 = `/${e7}`, i2 = r2.slice(0, -t3.length);
1097
+ if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
1098
+ }
1099
+ };
1100
+ var rr = (e6) => {
1101
+ if (!e6) return;
1102
+ if (typeof e6 == `string`) return e6;
1103
+ let { base: t2, path: n2 } = e6;
1104
+ return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
1105
+ };
1106
+ var ir = (e6, t2) => {
1107
+ let n2 = rr(e6.url), r2 = `/${Xn}`;
1108
+ if (!n2 || !t2?.endsWith(r2)) return;
1109
+ let i2, a2;
1110
+ try {
1111
+ i2 = new URL(n2).pathname, a2 = new URL(t2).pathname;
1112
+ } catch {
1113
+ return;
1114
+ }
1115
+ let o2 = a2.slice(0, -r2.length);
1116
+ return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
1117
+ };
1118
+ var ar = (e6, t2) => {
1119
+ let n2 = ir(e6, t2);
1120
+ if (n2) return { href: n2, target: `_self` };
1121
+ if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
1122
+ let r2 = rr(e6.url);
1123
+ return r2 ? { href: r2, target: `_self` } : void 0;
1124
+ };
1125
+ var or = (e6) => {
1126
+ let t2;
1127
+ try {
1128
+ t2 = (0, import_services_manager_react.useService)(Jn);
1129
+ } catch {
1130
+ return;
1131
+ }
1132
+ return tr(t2) ?? nr(t2.currentUrl, e6);
1133
+ };
1134
+ var sr = (e6, t2) => {
1135
+ let n2;
1136
+ try {
1137
+ n2 = new URL(e6).pathname.split(`/`).filter(Boolean);
1138
+ } catch {
1139
+ return;
1140
+ }
1141
+ let r2 = t2?.split(`/`).filter(Boolean) ?? [];
1142
+ if (r2.length > 0) {
1143
+ for (let e7 = 0; e7 + r2.length <= n2.length; e7++) if (r2.every((t3, r3) => n2[e7 + r3] === t3)) return n2[e7 + r2.length];
1144
+ }
1145
+ return n2[n2.length - 1];
1146
+ };
1147
+ var cr = () => {
1148
+ let e6;
1149
+ try {
1150
+ e6 = (0, import_services_manager_react.useService)(Jn);
1151
+ } catch {
1152
+ return;
1153
+ }
1154
+ if (!e6.currentUrl) return;
1155
+ let t2 = $n(e6);
1156
+ return sr(e6.currentUrl, t2 && er(t2));
1157
+ };
1158
+ var lr = { categoryHeader: `WixBlog.CategoryHeader`, coverMedia: `WixBlog.PostCoverMedia`, postActions: `WixBlog.PostActionBar`, postCategories: `WixBlog.PostCategoryList`, postCounters: `WixBlog.PostCounterBar`, postMetadata: `WixBlog.PostMetadataBar`, postTags: `WixBlog.PostTagList`, feedProvider: `WixBlog.BlogFeedContextProvider`, postProvider: `WixBlog.PostContextProvider`, postByIdProvider: `WixBlog.PostByIdContextProvider`, relatedPostsProvider: `WixBlog.RelatedPostsContextProvider` };
1159
+ var ur = (e6) => `${e6} rendered`;
1160
+ var dr = (e6, t2, n2) => {
1161
+ (0, import_react.useEffect)(() => {
1162
+ if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
1163
+ performance.mark(ur(e6), { detail: { state: t2, compId: n2 } });
1164
+ } catch {
1165
+ }
1166
+ }, [e6, t2, n2]);
1167
+ };
1168
+ var fr = P(`@wix/site-service-locale`);
1169
+ var pr = P(`@wix/site-service-renderer-configuration`);
1170
+ var mr = () => {
1171
+ let e6, t2;
1172
+ try {
1173
+ e6 = (0, import_services_manager_react.useService)(pr).languageCode;
1174
+ } catch {
1175
+ }
1176
+ try {
1177
+ t2 = (0, import_services_manager_react.useService)(fr).language;
1178
+ } catch {
1179
+ }
1180
+ return e6 || t2;
1181
+ };
1182
+ var hr = () => {
1183
+ try {
1184
+ let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(fr);
1185
+ return e6 || t2;
1186
+ } catch {
1187
+ return;
1188
+ }
1189
+ };
1190
+ var gr = P(`@wix/site-service-warmup-data`);
1191
+ function _r() {
1192
+ let e6 = Gn(), t2 = null;
1193
+ try {
1194
+ t2 = (0, import_services_manager_react.useGetService)()(gr);
1195
+ } catch {
1196
+ }
1197
+ return (0, import_react.useMemo)(() => ({ isServer: e6, scope: t2 ?? void 0, get: async (n2) => {
1198
+ if (e6 || !t2) return null;
1199
+ try {
1200
+ return await t2.get(n2);
1201
+ } catch {
1202
+ return null;
1203
+ }
1204
+ }, set: (n2, r2) => {
1205
+ if (e6 && t2) try {
1206
+ t2.set(n2, r2);
1207
+ } catch {
1208
+ }
1209
+ } }), [e6, t2]);
1210
+ }
1211
+ var vr = () => {
1212
+ let e6 = /* @__PURE__ */ new Map();
1213
+ return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
1214
+ e6.delete(t2);
1215
+ })), e6.get(t2)) };
1216
+ };
1217
+ var yr = async (e6) => {
1218
+ try {
1219
+ let { default: t2 } = await e6();
1220
+ return t2;
1221
+ } catch {
1222
+ return;
1223
+ }
1224
+ };
1225
+ var br = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1226
+ let r2 = vr(), i2 = async (r3) => {
1227
+ let [i3, a2] = await Promise.all([yr(() => t2(r3)), !e6 || !n2 ? void 0 : yr(() => n2(r3))]);
1228
+ if (i3 && a2) return { ...i3, ...a2 };
1229
+ if (i3) return i3;
1230
+ if (a2) return a2;
1231
+ throw Error(`No translation files found for ${r3}`);
1232
+ };
1233
+ return (e7) => r2.getOrInsert(e7, () => i2(e7));
1234
+ };
1235
+ var F = (e6) => typeof e6 == `string`;
1236
+ var I = () => {
1237
+ let e6, t2, n2 = new Promise((n3, r2) => {
1238
+ e6 = n3, t2 = r2;
1239
+ });
1240
+ return n2.resolve = e6, n2.reject = t2, n2;
1241
+ };
1242
+ var xr = (e6) => e6 == null ? `` : String(e6);
1243
+ var Sr = (e6, t2, n2) => {
1244
+ e6.forEach((e7) => {
1245
+ t2[e7] && (n2[e7] = t2[e7]);
1246
+ });
1247
+ };
1248
+ var Cr = /###/g;
1249
+ var wr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Cr, `.`) : e6;
1250
+ var Tr = (e6) => !e6 || F(e6);
1251
+ var Er = (e6, t2, n2) => {
1252
+ let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
1253
+ for (; i2 < r2.length - 1; ) {
1254
+ if (Tr(e6)) return {};
1255
+ let t3 = wr(r2[i2]);
1256
+ !e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
1257
+ }
1258
+ return Tr(e6) ? {} : { obj: e6, k: wr(r2[i2]) };
1259
+ };
1260
+ var Dr = (e6, t2, n2) => {
1261
+ let { obj: r2, k: i2 } = Er(e6, t2, Object);
1262
+ if (r2 !== void 0 || t2.length === 1) {
1263
+ r2[i2] = n2;
1264
+ return;
1265
+ }
1266
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Er(e6, o2, Object);
1267
+ for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Er(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1268
+ s2.obj[`${s2.k}.${a2}`] = n2;
1269
+ };
1270
+ var Or = (e6, t2, n2, r2) => {
1271
+ let { obj: i2, k: a2 } = Er(e6, t2, Object);
1272
+ i2[a2] = i2[a2] || [], i2[a2].push(n2);
1273
+ };
1274
+ var kr = (e6, t2) => {
1275
+ let { obj: n2, k: r2 } = Er(e6, t2);
1276
+ if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1277
+ };
1278
+ var Ar = (e6, t2, n2) => {
1279
+ let r2 = kr(e6, n2);
1280
+ return r2 === void 0 ? kr(t2, n2) : r2;
1281
+ };
1282
+ var jr = (e6, t2, n2) => {
1283
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? F(e6[r2]) || e6[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : jr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
1284
+ return e6;
1285
+ };
1286
+ var L = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1287
+ var Mr = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1288
+ var Nr = (e6) => F(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Mr[e7]) : e6;
1289
+ var Pr = class {
1290
+ constructor(e6) {
1291
+ this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1292
+ }
1293
+ getRegExp(e6) {
1294
+ let t2 = this.regExpMap.get(e6);
1295
+ if (t2 !== void 0) return t2;
1296
+ let n2 = new RegExp(e6);
1297
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
1298
+ }
1299
+ };
1300
+ var Fr = [` `, `,`, `?`, `!`, `;`];
1301
+ var Ir = new Pr(20);
1302
+ var Lr = (e6, t2, n2) => {
1303
+ t2 ||= ``, n2 ||= ``;
1304
+ let r2 = Fr.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
1305
+ if (r2.length === 0) return true;
1306
+ let i2 = Ir.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
1307
+ if (!a2) {
1308
+ let t3 = e6.indexOf(n2);
1309
+ t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
1310
+ }
1311
+ return a2;
1312
+ };
1313
+ var Rr = (e6, t2, n2 = `.`) => {
1314
+ if (!e6) return;
1315
+ if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
1316
+ let r2 = t2.split(n2), i2 = e6;
1317
+ for (let e7 = 0; e7 < r2.length; ) {
1318
+ if (!i2 || typeof i2 != `object`) return;
1319
+ let t3, a2 = ``;
1320
+ for (let o2 = e7; o2 < r2.length; ++o2) if (o2 !== e7 && (a2 += n2), a2 += r2[o2], t3 = i2[a2], t3 !== void 0) {
1321
+ if ([`string`, `number`, `boolean`].includes(typeof t3) && o2 < r2.length - 1) continue;
1322
+ e7 += o2 - e7 + 1;
1323
+ break;
1324
+ }
1325
+ i2 = t3;
1326
+ }
1327
+ return i2;
1328
+ };
1329
+ var R = (e6) => e6?.replace(/_/g, `-`);
1330
+ var zr = { type: `logger`, log(e6) {
1331
+ this.output(`log`, e6);
1332
+ }, warn(e6) {
1333
+ this.output(`warn`, e6);
1334
+ }, error(e6) {
1335
+ this.output(`error`, e6);
1336
+ }, output(e6, t2) {
1337
+ console?.[e6]?.apply?.(console, t2);
1338
+ } };
1339
+ var z = new class e2 {
1340
+ constructor(e6, t2 = {}) {
1341
+ this.init(e6, t2);
1342
+ }
1343
+ init(e6, t2 = {}) {
1344
+ this.prefix = t2.prefix || `i18next:`, this.logger = e6 || zr, this.options = t2, this.debug = t2.debug;
1345
+ }
1346
+ log(...e6) {
1347
+ return this.forward(e6, `log`, ``, true);
1348
+ }
1349
+ warn(...e6) {
1350
+ return this.forward(e6, `warn`, ``, true);
1351
+ }
1352
+ error(...e6) {
1353
+ return this.forward(e6, `error`, ``);
1354
+ }
1355
+ deprecate(...e6) {
1356
+ return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
1357
+ }
1358
+ forward(e6, t2, n2, r2) {
1359
+ return r2 && !this.debug ? null : (e6 = e6.map((e7) => F(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), F(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
1360
+ }
1361
+ create(t2) {
1362
+ return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
1363
+ }
1364
+ clone(t2) {
1365
+ return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1366
+ }
1367
+ }();
1368
+ var Br = class {
1369
+ constructor() {
1370
+ this.observers = {};
1371
+ }
1372
+ on(e6, t2) {
1373
+ return e6.split(` `).forEach((e7) => {
1374
+ this.observers[e7] || (this.observers[e7] = /* @__PURE__ */ new Map());
1375
+ let n2 = this.observers[e7].get(t2) || 0;
1376
+ this.observers[e7].set(t2, n2 + 1);
1377
+ }), this;
1378
+ }
1379
+ off(e6, t2) {
1380
+ this.observers[e6] && (t2 ? this.observers[e6].delete(t2) : delete this.observers[e6]);
1381
+ }
1382
+ once(e6, t2) {
1383
+ let n2 = (...r2) => {
1384
+ t2(...r2), this.off(e6, n2);
1385
+ };
1386
+ return this.on(e6, n2), this;
1387
+ }
1388
+ emit(e6, ...t2) {
1389
+ this.observers[e6] && Array.from(this.observers[e6].entries()).forEach(([e7, n2]) => {
1390
+ for (let r2 = 0; r2 < n2; r2++) e7(...t2);
1391
+ }), this.observers[`*`] && Array.from(this.observers[`*`].entries()).forEach(([n2, r2]) => {
1392
+ for (let i2 = 0; i2 < r2; i2++) n2(e6, ...t2);
1393
+ });
1394
+ }
1395
+ };
1396
+ var Vr = /* @__PURE__ */ new WeakSet();
1397
+ var Hr = class extends Br {
1398
+ constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1399
+ super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1400
+ }
1401
+ addNamespaces(e6) {
1402
+ this.options.ns.includes(e6) || this.options.ns.push(e6);
1403
+ }
1404
+ removeNamespaces(e6) {
1405
+ let t2 = this.options.ns.indexOf(e6);
1406
+ t2 > -1 && this.options.ns.splice(t2, 1);
1407
+ }
1408
+ getResource(e6, t2, n2, r2 = {}) {
1409
+ let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1410
+ e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1411
+ let s2 = kr(this.data, o2);
1412
+ return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : Rr(this.data?.[e6]?.[t2], n2, i2);
1413
+ }
1414
+ addResource(e6, t2, n2, r2, i2 = { silent: false }) {
1415
+ let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
1416
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Dr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
1417
+ }
1418
+ addResources(e6, t2, n2, r2 = { silent: false }) {
1419
+ for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
1420
+ r2.silent || this.emit(`added`, e6, t2, n2);
1421
+ }
1422
+ addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1423
+ let o2 = [e6, t2];
1424
+ e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1425
+ let s2 = kr(this.data, o2) || {};
1426
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? jr(s2, n2, i2) : s2 = { ...s2, ...n2 }, Dr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
1427
+ }
1428
+ removeResourceBundle(e6, t2) {
1429
+ this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
1430
+ }
1431
+ hasResourceBundle(e6, t2) {
1432
+ return this.getResource(e6, t2) !== void 0;
1433
+ }
1434
+ getResourceBundle(e6, t2) {
1435
+ return t2 ||= this.options.defaultNS, this.getResource(e6, t2);
1436
+ }
1437
+ getDataByLanguage(e6) {
1438
+ return this.data[e6];
1439
+ }
1440
+ hasLanguageSomeTranslations(e6) {
1441
+ let t2 = this.getDataByLanguage(e6);
1442
+ return !!(t2 && Object.keys(t2) || []).find((e7) => {
1443
+ let n2 = t2[e7];
1444
+ return Vr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Vr.add(n2), true);
1445
+ });
1446
+ }
1447
+ toJSON() {
1448
+ return this.data;
1449
+ }
1450
+ };
1451
+ var Ur = { processors: {}, addPostProcessor(e6) {
1452
+ this.processors[e6.name] = e6;
1453
+ }, handle(e6, t2, n2, r2, i2) {
1454
+ return e6.forEach((e7) => {
1455
+ t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
1456
+ }), t2;
1457
+ } };
1458
+ var Wr = Symbol(`i18next/PATH_KEY`);
1459
+ function Gr() {
1460
+ let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1461
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Wr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1462
+ }
1463
+ function B(e6, t2) {
1464
+ let { [Wr]: n2 } = e6(Gr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
1465
+ if (n2.length > 1 && i2) {
1466
+ let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
1467
+ if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1468
+ }
1469
+ return n2.join(r2);
1470
+ }
1471
+ var Kr = (e6) => !F(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
1472
+ var qr = class e3 extends Br {
1473
+ constructor(e6, t2 = {}) {
1474
+ super(), Sr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = z.create(`translator`), this.checkedLoadedFor = {};
1475
+ }
1476
+ changeLanguage(e6) {
1477
+ e6 && (this.language = e6);
1478
+ }
1479
+ exists(e6, t2 = { interpolation: {} }) {
1480
+ let n2 = { ...t2 };
1481
+ if (e6 == null) return false;
1482
+ let r2 = this.resolve(e6, n2);
1483
+ if (r2?.res === void 0) return false;
1484
+ let i2 = Kr(r2.res);
1485
+ return !(n2.returnObjects === false && i2);
1486
+ }
1487
+ extractFromKey(e6, t2) {
1488
+ let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1489
+ n2 === void 0 && (n2 = `:`);
1490
+ let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Lr(e6, n2, r2);
1491
+ if (a2 && !o2) {
1492
+ let t3 = e6.match(this.interpolator.nestingRegexp);
1493
+ if (t3 && t3.length > 0) return { key: e6, namespaces: F(i2) ? [i2] : i2 };
1494
+ let a3 = e6.split(n2);
1495
+ (n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
1496
+ }
1497
+ return { key: e6, namespaces: F(i2) ? [i2] : i2 };
1498
+ }
1499
+ translate(t2, n2, r2) {
1500
+ let i2 = typeof n2 == `object` ? { ...n2 } : n2;
1501
+ if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
1502
+ typeof t2 == `function` && (t2 = B(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? B(e6, { ...this.options, ...i2 }) : String(e6));
1503
+ let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
1504
+ u2 === void 0 && (u2 = `:`);
1505
+ let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1506
+ if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
1507
+ let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !F(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, ee2 = b2 && !i2.ordinal && i2.count === 0, w2 = ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, T2 = m2;
1508
+ y2 && !m2 && x2 && (T2 = w2);
1509
+ let te2 = Kr(T2), ne2 = Object.prototype.toString.apply(T2);
1510
+ if (y2 && T2 && te2 && !_2.includes(ne2) && !(F(v2) && Array.isArray(T2))) {
1511
+ if (!i2.returnObjects && !this.options.returnObjects) {
1512
+ this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1513
+ let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
1514
+ return a2 ? (p2.res = e6, p2.usedParams = this.getUsedParamsDetails(i2), p2) : e6;
1515
+ }
1516
+ if (o2) {
1517
+ let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
1518
+ for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
1519
+ let r3 = `${n3}${o2}${e7}`;
1520
+ t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Kr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
1521
+ }
1522
+ m2 = t3;
1523
+ }
1524
+ } else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1525
+ else {
1526
+ let e6 = false, n3 = false;
1527
+ !this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
1528
+ let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && w2 !== m2 && this.options.updateMissing;
1529
+ if (n3 || e6 || c3) {
1530
+ if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, b2 && !c3 ? `${s2}${this.pluralResolver.getSuffix(d2, i2.count, i2)}` : s2, c3 ? w2 : m2), o2) {
1531
+ let e8 = this.resolve(s2, { ...i2, keySeparator: false });
1532
+ e8 && e8.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.`);
1533
+ }
1534
+ let e7 = [], t3 = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i2.lng || this.language);
1535
+ if (this.options.saveMissingTo === `fallback` && t3 && t3[0]) for (let n5 = 0; n5 < t3.length; n5++) e7.push(t3[n5]);
1536
+ else this.options.saveMissingTo === `all` ? e7 = this.languageUtils.toResolveHierarchy(i2.lng || this.language) : e7.push(i2.lng || this.language);
1537
+ let n4 = (e8, t4, n5) => {
1538
+ let r3 = x2 && n5 !== m2 ? n5 : a3;
1539
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(e8, l2, t4, r3, c3, i2) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(e8, l2, t4, r3, c3, i2), this.emit(`missingKey`, e8, l2, t4, m2);
1540
+ };
1541
+ this.options.saveMissing && (this.options.saveMissingPlurals && b2 ? e7.forEach((e8) => {
1542
+ let t4 = this.pluralResolver.getSuffixes(e8, i2);
1543
+ ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && !t4.includes(`${this.options.pluralSeparator}zero`) && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
1544
+ n4([e8], s2 + t5, i2[`defaultValue${t5}`] || w2);
1545
+ });
1546
+ }) : n4(e7, s2, w2));
1547
+ }
1548
+ m2 = this.extendTranslation(m2, t2, i2, p2, r2), n3 && m2 === s2 && this.options.appendNamespaceToMissingKey && (m2 = `${l2}${u2}${s2}`), (n3 || e6) && this.options.parseMissingKeyHandler && (m2 = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l2}${u2}${s2}` : s2, e6 ? m2 : void 0, i2));
1549
+ }
1550
+ return a2 ? (p2.res = m2, p2.usedParams = this.getUsedParamsDetails(i2), p2) : m2;
1551
+ }
1552
+ extendTranslation(e6, t2, n2, r2, i2) {
1553
+ if (this.i18nFormat?.parse) e6 = this.i18nFormat.parse(e6, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
1554
+ else if (!n2.skipInterpolation) {
1555
+ n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1556
+ let a3 = F(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1557
+ if (a3) {
1558
+ let t3 = e6.match(this.interpolator.nestingRegexp);
1559
+ o3 = t3 && t3.length;
1560
+ }
1561
+ let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
1562
+ if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e6 = this.interpolator.interpolate(e6, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
1563
+ let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1564
+ o3 < r3 && (n2.nest = false);
1565
+ }
1566
+ !n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e6 = this.interpolator.nest(e6, (...e7) => i2?.[0] === e7[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e7[0]} in key: ${t2[0]}`), null) : this.translate(...e7, t2), n2)), n2.interpolation && this.interpolator.reset();
1567
+ }
1568
+ let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
1569
+ return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Ur.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
1570
+ }
1571
+ resolve(e6, t2 = {}) {
1572
+ let n2, r2, i2, a2, o2;
1573
+ return F(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? B(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
1574
+ if (this.isValidLookup(n2)) return;
1575
+ let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
1576
+ r2 = c2;
1577
+ let l2 = s2.namespaces;
1578
+ this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1579
+ let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1580
+ l2.forEach((e8) => {
1581
+ this.isValidLookup(n2) || (o2 = e8, !this.checkedLoadedFor[`${p2[0]}-${e8}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (this.checkedLoadedFor[`${p2[0]}-${e8}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" 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!!!`)), p2.forEach((r3) => {
1582
+ if (this.isValidLookup(n2)) return;
1583
+ a2 = r3;
1584
+ let o3 = [c2];
1585
+ if (this.i18nFormat?.addLookupKeys) this.i18nFormat.addLookupKeys(o3, c2, r3, e8, t2);
1586
+ else {
1587
+ let e9;
1588
+ u2 && (e9 = this.pluralResolver.getSuffix(r3, t2.count, t2));
1589
+ let n3 = `${this.options.pluralSeparator}zero`, i3 = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1590
+ if (u2 && (t2.ordinal && e9.startsWith(i3) && o3.push(c2 + e9.replace(i3, this.options.pluralSeparator)), o3.push(c2 + e9), d2 && o3.push(c2 + n3)), f2) {
1591
+ let r4 = `${c2}${this.options.contextSeparator || `_`}${t2.context}`;
1592
+ o3.push(r4), u2 && (t2.ordinal && e9.startsWith(i3) && o3.push(r4 + e9.replace(i3, this.options.pluralSeparator)), o3.push(r4 + e9), d2 && o3.push(r4 + n3));
1593
+ }
1594
+ }
1595
+ let s3;
1596
+ for (; s3 = o3.pop(); ) this.isValidLookup(n2) || (i2 = s3, n2 = this.getResource(r3, e8, s3, t2));
1597
+ }));
1598
+ });
1599
+ }), { res: n2, usedKey: r2, exactUsedKey: i2, usedLng: a2, usedNS: o2 };
1600
+ }
1601
+ isValidLookup(e6) {
1602
+ return e6 !== void 0 && !(!this.options.returnNull && e6 === null) && !(!this.options.returnEmptyString && e6 === ``);
1603
+ }
1604
+ getResource(e6, t2, n2, r2 = {}) {
1605
+ return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
1606
+ }
1607
+ getUsedParamsDetails(e6 = {}) {
1608
+ let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !F(e6.replace), r2 = n2 ? e6.replace : e6;
1609
+ if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1610
+ r2 = { ...r2 };
1611
+ for (let e7 of t2) delete r2[e7];
1612
+ }
1613
+ return r2;
1614
+ }
1615
+ static hasDefaultValue(e6) {
1616
+ for (let t2 in e6) if (Object.prototype.hasOwnProperty.call(e6, t2) && t2.startsWith(`defaultValue`) && e6[t2] !== void 0) return true;
1617
+ return false;
1618
+ }
1619
+ };
1620
+ var Jr = class {
1621
+ constructor(e6) {
1622
+ this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = z.create(`languageUtils`), this.resolveHierarchyCache = {};
1623
+ }
1624
+ clearCache() {
1625
+ this.resolveHierarchyCache = {};
1626
+ }
1627
+ getScriptPartFromCode(e6) {
1628
+ if (e6 = R(e6), !e6 || !e6.includes(`-`)) return null;
1629
+ let t2 = e6.split(`-`);
1630
+ return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
1631
+ }
1632
+ getLanguagePartFromCode(e6) {
1633
+ if (e6 = R(e6), !e6 || !e6.includes(`-`)) return e6;
1634
+ let t2 = e6.split(`-`);
1635
+ return this.formatLanguageCode(t2[0]);
1636
+ }
1637
+ formatLanguageCode(e6) {
1638
+ if (F(e6) && e6.includes(`-`)) {
1639
+ let t2;
1640
+ try {
1641
+ t2 = Intl.getCanonicalLocales(e6)[0];
1642
+ } catch {
1643
+ }
1644
+ return t2 && this.options.lowerCaseLng && (t2 = t2.toLowerCase()), t2 || (this.options.lowerCaseLng ? e6.toLowerCase() : e6);
1645
+ }
1646
+ return this.options.cleanCode || this.options.lowerCaseLng ? e6.toLowerCase() : e6;
1647
+ }
1648
+ isSupportedCode(e6) {
1649
+ return (this.options.load === `languageOnly` || this.options.nonExplicitSupportedLngs) && (e6 = this.getLanguagePartFromCode(e6)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(e6);
1650
+ }
1651
+ getBestMatchFromCodes(e6) {
1652
+ if (!e6) return null;
1653
+ let t2;
1654
+ return e6.forEach((e7) => {
1655
+ if (t2) return;
1656
+ let n2 = this.formatLanguageCode(e7);
1657
+ (!this.options.supportedLngs || this.isSupportedCode(n2)) && (t2 = n2);
1658
+ }), !t2 && this.options.supportedLngs && e6.forEach((e7) => {
1659
+ if (t2) return;
1660
+ let n2 = this.getScriptPartFromCode(e7);
1661
+ if (this.isSupportedCode(n2)) return t2 = n2;
1662
+ let r2 = this.getLanguagePartFromCode(e7);
1663
+ if (this.isSupportedCode(r2)) return t2 = r2;
1664
+ t2 = this.options.supportedLngs.find((e8) => e8 === r2 ? true : !e8.includes(`-`) && !r2.includes(`-`) ? false : !!(e8.includes(`-`) && !r2.includes(`-`) && e8.slice(0, e8.indexOf(`-`)) === r2 || e8.startsWith(r2) && r2.length > 1));
1665
+ }), t2 ||= this.getFallbackCodes(this.options.fallbackLng)[0], t2;
1666
+ }
1667
+ getFallbackCodes(e6, t2) {
1668
+ if (!e6) return [];
1669
+ if (typeof e6 == `function` && (e6 = e6(t2)), F(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
1670
+ if (!t2) return e6.default || [];
1671
+ let n2 = e6[t2];
1672
+ return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
1673
+ }
1674
+ toResolveHierarchy(e6, t2) {
1675
+ let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
1676
+ r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
1677
+ let i2 = t2 === void 0 || t2 === false || F(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = F(e6) && i2 && !a2, s2 = null;
1678
+ if (o2) {
1679
+ let n3;
1680
+ n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
1681
+ }
1682
+ if (s2 !== null) {
1683
+ let e7 = this.resolveHierarchyCache[s2];
1684
+ if (e7 !== void 0) return e7.slice();
1685
+ }
1686
+ let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
1687
+ e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
1688
+ };
1689
+ return F(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : F(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
1690
+ l2.includes(e7) || u2(this.formatLanguageCode(e7));
1691
+ }), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
1692
+ }
1693
+ };
1694
+ var Yr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1695
+ var Xr = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1696
+ var Zr = class {
1697
+ constructor(e6, t2 = {}) {
1698
+ this.languageUtils = e6, this.options = t2, this.logger = z.create(`pluralResolver`), this.pluralRulesCache = {};
1699
+ }
1700
+ clearCache() {
1701
+ this.pluralRulesCache = {};
1702
+ }
1703
+ getRule(e6, t2 = {}) {
1704
+ let n2 = R(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1705
+ if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
1706
+ let a2;
1707
+ try {
1708
+ a2 = new Intl.PluralRules(n2, { type: r2 });
1709
+ } catch {
1710
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Xr;
1711
+ if (!e6.match(/-|_/)) return Xr;
1712
+ let n3 = this.languageUtils.getLanguagePartFromCode(e6);
1713
+ a2 = this.getRule(n3, t2);
1714
+ }
1715
+ return this.pluralRulesCache[i2] = a2, a2;
1716
+ }
1717
+ needsPlural(e6, t2 = {}) {
1718
+ let n2 = this.getRule(e6, t2);
1719
+ return n2 ||= this.getRule(`dev`, t2), n2?.resolvedOptions().pluralCategories.length > 1;
1720
+ }
1721
+ getPluralFormsOfKey(e6, t2, n2 = {}) {
1722
+ return this.getSuffixes(e6, n2).map((e7) => `${t2}${e7}`);
1723
+ }
1724
+ getSuffixes(e6, t2 = {}) {
1725
+ let n2 = this.getRule(e6, t2);
1726
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => Yr[e7] - Yr[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
1727
+ }
1728
+ getSuffix(e6, t2, n2 = {}) {
1729
+ let r2 = this.getRule(e6, n2);
1730
+ return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e6}`), this.getSuffix(`dev`, t2, n2));
1731
+ }
1732
+ };
1733
+ var Qr = (e6, t2, n2, r2 = `.`, i2 = true) => {
1734
+ let a2 = Ar(e6, t2, n2);
1735
+ return !a2 && i2 && F(n2) && (a2 = Rr(e6, n2, r2), a2 === void 0 && (a2 = Rr(t2, n2, r2))), a2;
1736
+ };
1737
+ var $r = (e6) => e6.replace(/\$/g, `$$$$`);
1738
+ var ei = class {
1739
+ constructor(e6 = {}) {
1740
+ this.logger = z.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
1741
+ }
1742
+ init(e6 = {}) {
1743
+ e6.interpolation ||= { escapeValue: true };
1744
+ let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e6.interpolation;
1745
+ this.escape = t2 === void 0 ? Nr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? L(i2) : a2 || `{{`, this.suffix = o2 ? L(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? L(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? L(l2) : ``, this.nestingPrefix = d2 ? L(d2) : f2 || L(`$t(`), this.nestingSuffix = p2 ? L(p2) : m2 || L(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1746
+ }
1747
+ reset() {
1748
+ this.options && this.init(this.options);
1749
+ }
1750
+ resetRegExp() {
1751
+ let e6 = (e7, t2) => e7?.source === t2 ? (e7.lastIndex = 0, e7) : new RegExp(t2, `g`);
1752
+ this.regexp = e6(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e6(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e6(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
1753
+ }
1754
+ interpolate(e6, t2, n2, r2) {
1755
+ let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
1756
+ if (!e7.includes(this.formatSeparator)) {
1757
+ let i4 = Qr(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
1758
+ return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
1759
+ }
1760
+ let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1761
+ return this.format(Qr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1762
+ };
1763
+ this.resetRegExp(), !this.escapeValue && typeof e6 == `string` && /\$t\([^)]*\{[^}]*\{\{/.test(e6) && this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);
1764
+ let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
1765
+ return [{ regex: this.regexpUnescape, safeValue: (e7) => e7 }, { regex: this.regexp, safeValue: (e7) => this.escapeValue ? this.escape(e7) : e7 }].forEach((t3) => {
1766
+ for (o2 = 0; i2 = t3.regex.exec(e6); ) {
1767
+ let n3 = i2[1].trim();
1768
+ if (a2 = c2(n3), a2 === void 0) {
1769
+ if (typeof l2 == `function`) {
1770
+ let t4 = l2(e6, i2, r2);
1771
+ a2 = F(t4) ? t4 : ``;
1772
+ } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
1773
+ else if (u2) {
1774
+ a2 = i2[0];
1775
+ continue;
1776
+ } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
1777
+ } else !F(a2) && !this.useRawValueToEscape && (a2 = xr(a2));
1778
+ let s3 = t3.safeValue(a2);
1779
+ if (e6 = e6.replace(i2[0], $r(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1780
+ }
1781
+ }), e6;
1782
+ }
1783
+ nest(e6, t2, n2 = {}) {
1784
+ let r2, i2, a2, o2 = (e7, t3) => {
1785
+ let n3 = this.nestingOptionsSeparator;
1786
+ if (!e7.includes(n3)) return e7;
1787
+ let r3 = e7.split(RegExp(`${L(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1788
+ e7 = r3[0], i3 = this.interpolate(i3, a2);
1789
+ let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
1790
+ ((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
1791
+ try {
1792
+ a2 = JSON.parse(i3), t3 && (a2 = { ...t3, ...a2 });
1793
+ } catch (t4) {
1794
+ return this.logger.warn(`failed parsing options string in nesting for key ${e7}`, t4), `${e7}${n3}${i3}`;
1795
+ }
1796
+ return a2.defaultValue && a2.defaultValue.includes(this.prefix) && delete a2.defaultValue, e7;
1797
+ }, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
1798
+ for (; r2 = s2.exec(e6); ) {
1799
+ let u2 = [];
1800
+ a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1801
+ let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1802
+ if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !F(i2)) return i2;
1803
+ F(i2) || (i2 = xr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + xr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
1804
+ }
1805
+ return l2 ? c2 + e6.slice(l2) : e6;
1806
+ }
1807
+ };
1808
+ var ti = (e6) => {
1809
+ let t2 = e6.toLowerCase().trim(), n2 = {};
1810
+ if (e6.includes(`(`)) {
1811
+ let r2 = e6.split(`(`);
1812
+ t2 = r2[0].toLowerCase().trim();
1813
+ let i2 = r2[1].slice(0, -1);
1814
+ t2 === `currency` && !i2.includes(`:`) ? n2.currency ||= i2.trim() : t2 === `relativetime` && !i2.includes(`:`) ? n2.range ||= i2.trim() : i2.split(`;`).forEach((e7) => {
1815
+ if (e7) {
1816
+ let [t3, ...r3] = e7.split(`:`), i3 = r3.join(`:`).trim().replace(/^'+|'+$/g, ``), a2 = t3.trim();
1817
+ n2[a2] || (n2[a2] = i3), i3 === `false` && (n2[a2] = false), i3 === `true` && (n2[a2] = true), isNaN(i3) || (n2[a2] = parseInt(i3, 10));
1818
+ }
1819
+ });
1820
+ }
1821
+ return { formatName: t2, formatOptions: n2 };
1822
+ };
1823
+ var ni = (e6) => {
1824
+ let t2 = {};
1825
+ return (n2, r2, i2) => {
1826
+ let a2 = i2;
1827
+ i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
1828
+ let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
1829
+ return s2 || (s2 = e6(R(r2), i2), t2[o2] = s2), s2(n2);
1830
+ };
1831
+ };
1832
+ var ri = (e6) => (t2, n2, r2) => e6(R(n2), r2)(t2);
1833
+ var ii = class {
1834
+ constructor(e6 = {}) {
1835
+ this.logger = z.create(`formatter`), this.options = e6, this.init(e6);
1836
+ }
1837
+ init(e6, t2 = { interpolation: {} }) {
1838
+ this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1839
+ let n2 = t2.cacheInBuiltFormats ? ni : ri;
1840
+ this.formats = { number: n2((e7, t3) => {
1841
+ let n3 = new Intl.NumberFormat(e7, { ...t3 });
1842
+ return (e8) => n3.format(e8);
1843
+ }), currency: n2((e7, t3) => {
1844
+ let n3 = new Intl.NumberFormat(e7, { ...t3, style: `currency` });
1845
+ return (e8) => n3.format(e8);
1846
+ }), datetime: n2((e7, t3) => {
1847
+ let n3 = new Intl.DateTimeFormat(e7, { ...t3 });
1848
+ return (e8) => n3.format(e8);
1849
+ }), relativetime: n2((e7, t3) => {
1850
+ let n3 = new Intl.RelativeTimeFormat(e7, { ...t3 });
1851
+ return (e8) => n3.format(e8, t3.range || `day`);
1852
+ }), list: n2((e7, t3) => {
1853
+ let n3 = new Intl.ListFormat(e7, { ...t3 });
1854
+ return (e8) => n3.format(e8);
1855
+ }) };
1856
+ }
1857
+ add(e6, t2) {
1858
+ this.formats[e6.toLowerCase().trim()] = t2;
1859
+ }
1860
+ addCached(e6, t2) {
1861
+ this.formats[e6.toLowerCase().trim()] = ni(t2);
1862
+ }
1863
+ format(e6, t2, n2, r2 = {}) {
1864
+ if (!t2 || e6 == null) return e6;
1865
+ let i2 = t2.split(this.formatSeparator), a2 = [];
1866
+ for (let e7 = 0; e7 < i2.length; e7++) {
1867
+ let t3 = i2[e7];
1868
+ for (; t3.indexOf(`(`) > -1 && !t3.includes(`)`) && e7 + 1 < i2.length; ) t3 = `${t3}${this.formatSeparator}${i2[++e7]}`;
1869
+ a2.push(t3);
1870
+ }
1871
+ return a2.reduce((e7, t3) => {
1872
+ let { formatName: i3, formatOptions: a3 } = ti(t3);
1873
+ if (this.formats[i3]) {
1874
+ let t4 = e7;
1875
+ try {
1876
+ let o2 = r2?.formatParams?.[r2.interpolationkey] || {}, s2 = o2.locale || o2.lng || r2.locale || r2.lng || n2;
1877
+ t4 = this.formats[i3](e7, s2, { ...a3, ...r2, ...o2 });
1878
+ } catch (e8) {
1879
+ this.logger.warn(e8);
1880
+ }
1881
+ return t4;
1882
+ }
1883
+ return this.logger.warn(`there was no format function for ${i3}`), e7;
1884
+ }, e6);
1885
+ }
1886
+ };
1887
+ var ai = (e6, t2) => {
1888
+ e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
1889
+ };
1890
+ var oi = class extends Br {
1891
+ constructor(e6, t2, n2, r2 = {}) {
1892
+ super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = z.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
1893
+ }
1894
+ queueLoad(e6, t2, n2, r2) {
1895
+ let i2 = {}, a2 = {}, o2 = {}, s2 = {};
1896
+ return e6.forEach((e7) => {
1897
+ let r3 = true;
1898
+ t2.forEach((t3) => {
1899
+ let o3 = `${e7}|${t3}`;
1900
+ !n2.reload && this.store.hasResourceBundle(e7, t3) ? this.state[o3] = 2 : this.state[o3] < 0 || (this.state[o3] === 1 ? a2[o3] === void 0 && (a2[o3] = true) : (this.state[o3] = 1, r3 = false, a2[o3] === void 0 && (a2[o3] = true), i2[o3] === void 0 && (i2[o3] = true), s2[t3] === void 0 && (s2[t3] = true)));
1901
+ }), r3 || (o2[e7] = true);
1902
+ }), (Object.keys(i2).length || Object.keys(a2).length) && this.queue.push({ pending: a2, pendingCount: Object.keys(a2).length, loaded: {}, errors: [], callback: r2 }), { toLoad: Object.keys(i2), pending: Object.keys(a2), toLoadLanguages: Object.keys(o2), toLoadNamespaces: Object.keys(s2) };
1903
+ }
1904
+ loaded(e6, t2, n2) {
1905
+ let r2 = e6.split(`|`), i2 = r2[0], a2 = r2[1];
1906
+ t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e6] = t2 ? -1 : 2, t2 && n2 && (this.state[e6] = 0);
1907
+ let o2 = {};
1908
+ this.queue.forEach((n3) => {
1909
+ Or(n3.loaded, [i2], a2), ai(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
1910
+ o2[e7] || (o2[e7] = {});
1911
+ let t3 = n3.loaded[e7];
1912
+ t3.length && t3.forEach((t4) => {
1913
+ o2[e7][t4] === void 0 && (o2[e7][t4] = true);
1914
+ });
1915
+ }), n3.done = true, n3.errors.length ? n3.callback(n3.errors) : n3.callback());
1916
+ }), this.emit(`loaded`, o2), this.queue = this.queue.filter((e7) => !e7.done);
1917
+ }
1918
+ read(e6, t2, n2, r2 = 0, i2 = this.retryTimeout, a2) {
1919
+ if (!e6.length) return a2(null, {});
1920
+ if (this.readingCalls >= this.maxParallelReads) {
1921
+ this.waitingReads.push({ lng: e6, ns: t2, fcName: n2, tried: r2, wait: i2, callback: a2 });
1922
+ return;
1923
+ }
1924
+ this.readingCalls++;
1925
+ let o2 = (o3, s3) => {
1926
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1927
+ let e7 = this.waitingReads.shift();
1928
+ this.read(e7.lng, e7.ns, e7.fcName, e7.tried, e7.wait, e7.callback);
1929
+ }
1930
+ o3 && s3 && r2 < this.maxRetries ? setTimeout(() => {
1931
+ this.read(e6, t2, n2, r2 + 1, i2 * 2, a2);
1932
+ }, i2) : a2(o3, s3);
1933
+ }, s2 = this.backend[n2].bind(this.backend);
1934
+ if (s2.length === 2) try {
1935
+ let n3 = s2(e6, t2);
1936
+ n3 && typeof n3.then == `function` ? n3.then((e7) => o2(null, e7)).catch(o2) : o2(null, n3);
1937
+ } catch (e7) {
1938
+ o2(e7);
1939
+ }
1940
+ else return s2(e6, t2, o2);
1941
+ }
1942
+ prepareLoading(e6, t2, n2 = {}, r2) {
1943
+ if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
1944
+ F(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), F(t2) && (t2 = [t2]);
1945
+ let i2 = this.queueLoad(e6, t2, n2, r2);
1946
+ if (!i2.toLoad.length) return i2.pending.length || r2(), null;
1947
+ i2.toLoad.forEach((e7) => {
1948
+ this.loadOne(e7);
1949
+ });
1950
+ }
1951
+ load(e6, t2, n2) {
1952
+ this.prepareLoading(e6, t2, {}, n2);
1953
+ }
1954
+ reload(e6, t2, n2) {
1955
+ this.prepareLoading(e6, t2, { reload: true }, n2);
1956
+ }
1957
+ loadOne(e6, t2 = ``) {
1958
+ let n2 = e6.split(`|`), r2 = n2[0], i2 = n2[1];
1959
+ this.read(r2, i2, `read`, void 0, void 0, (n3, a2) => {
1960
+ n3 && this.logger.warn(`${t2}loading namespace ${i2} for language ${r2} failed`, n3), !n3 && a2 && this.logger.log(`${t2}loaded namespace ${i2} for language ${r2}`, a2), this.loaded(e6, n3, a2);
1961
+ });
1962
+ }
1963
+ saveMissing(e6, t2, n2, r2, i2, a2 = {}, o2 = () => {
1964
+ }) {
1965
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t2)) this.logger.warn(`did not save key "${n2}" as the namespace "${t2}" 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!!!`);
1966
+ else if (n2 != null && n2 !== ``) {
1967
+ if (this.backend?.create) {
1968
+ let s2 = { ...a2, isUpdate: i2 }, c2 = this.backend.create.bind(this.backend);
1969
+ if (c2.length < 6) try {
1970
+ let i3;
1971
+ i3 = c2.length === 5 ? c2(e6, t2, n2, r2, s2) : c2(e6, t2, n2, r2), i3 && typeof i3.then == `function` ? i3.then((e7) => o2(null, e7)).catch(o2) : o2(null, i3);
1972
+ } catch (e7) {
1973
+ o2(e7);
1974
+ }
1975
+ else c2(e6, t2, n2, r2, o2, s2);
1976
+ }
1977
+ e6 && e6[0] && this.store.addResource(e6[0], t2, n2, r2);
1978
+ }
1979
+ }
1980
+ };
1981
+ var si = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, enableSelector: false, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e6) => {
1982
+ let t2 = {};
1983
+ if (typeof e6[1] == `object` && (t2 = e6[1]), F(e6[1]) && (t2.defaultValue = e6[1]), F(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
1984
+ let n2 = e6[3] || e6[2];
1985
+ Object.keys(n2).forEach((e7) => {
1986
+ t2[e7] = n2[e7];
1987
+ });
1988
+ }
1989
+ return t2;
1990
+ }, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
1991
+ var ci = (e6) => (F(e6.ns) && (e6.ns = [e6.ns]), F(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), F(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
1992
+ var li = () => {
1993
+ };
1994
+ var ui = (e6) => {
1995
+ Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
1996
+ typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
1997
+ });
1998
+ };
1999
+ var V = class e4 extends Br {
2000
+ constructor(e6 = {}, t2) {
2001
+ if (super(), this.options = ci(e6), this.services = {}, this.logger = z, this.modules = { external: [] }, ui(this), t2 && !this.isInitialized && !e6.isClone) {
2002
+ if (!this.options.initAsync) return this.init(e6, t2), this;
2003
+ setTimeout(() => {
2004
+ this.init(e6, t2);
2005
+ }, 0);
2006
+ }
2007
+ }
2008
+ init(e6 = {}, t2) {
2009
+ this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (F(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
2010
+ let n2 = si();
2011
+ this.options = { ...n2, ...this.options, ...ci(e6) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e6.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e6.keySeparator), e6.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e6.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler);
2012
+ let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
2013
+ if (!this.options.isClone) {
2014
+ this.modules.logger ? z.init(r2(this.modules.logger), this.options) : z.init(null, this.options);
2015
+ let e7;
2016
+ e7 = this.modules.formatter ? this.modules.formatter : ii;
2017
+ let t3 = new Jr(this.options);
2018
+ this.store = new Hr(this.options.resources, this.options);
2019
+ let n3 = this.services;
2020
+ n3.logger = z, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new Zr(t3, { prepend: this.options.pluralSeparator }), e7 && (n3.formatter = r2(e7), n3.formatter.init && n3.formatter.init(n3, this.options), this.options.interpolation.format = n3.formatter.format.bind(n3.formatter)), n3.interpolator = new ei(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new oi(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
2021
+ this.emit(e8, ...t4);
2022
+ }), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new qr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
2023
+ this.emit(e8, ...t4);
2024
+ }), this.modules.external.forEach((e8) => {
2025
+ e8.init && e8.init(this);
2026
+ });
2027
+ }
2028
+ if (this.format = this.options.interpolation.format, t2 ||= li, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2029
+ let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2030
+ e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
2031
+ }
2032
+ !this.services.languageDetector && !this.options.lng && this.logger.warn(`init: no languageDetector is used and no lng is defined`), [`getResource`, `hasResourceBundle`, `getResourceBundle`, `getDataByLanguage`].forEach((e7) => {
2033
+ this[e7] = (...t3) => this.store[e7](...t3);
2034
+ }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
2035
+ this[e7] = (...t3) => (this.store[e7](...t3), this);
2036
+ });
2037
+ let i2 = I(), a2 = () => {
2038
+ let e7 = (e8, n3) => {
2039
+ this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e8, n3);
2040
+ };
2041
+ if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return e7(null, this.t.bind(this));
2042
+ this.changeLanguage(this.options.lng, e7);
2043
+ };
2044
+ return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
2045
+ }
2046
+ loadResources(e6, t2 = li) {
2047
+ let n2 = t2, r2 = F(e6) ? e6 : this.language;
2048
+ if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
2049
+ if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
2050
+ let e7 = [], t3 = (t4) => {
2051
+ t4 && t4 !== `cimode` && this.services.languageUtils.toResolveHierarchy(t4).forEach((t5) => {
2052
+ t5 !== `cimode` && (e7.includes(t5) || e7.push(t5));
2053
+ });
2054
+ };
2055
+ r2 ? t3(r2) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e8) => t3(e8)), this.options.preload?.forEach?.((e8) => t3(e8)), this.services.backendConnector.load(e7, this.options.ns, (e8) => {
2056
+ !e8 && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), n2(e8);
2057
+ });
2058
+ } else n2(null);
2059
+ }
2060
+ reloadResources(e6, t2, n2) {
2061
+ let r2 = I();
2062
+ return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= li, this.services.backendConnector.reload(e6, t2, (e7) => {
2063
+ r2.resolve(), n2(e7);
2064
+ }), r2;
2065
+ }
2066
+ use(e6) {
2067
+ if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
2068
+ if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
2069
+ return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && Ur.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
2070
+ }
2071
+ setResolvedLanguage(e6) {
2072
+ if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
2073
+ for (let e7 = 0; e7 < this.languages.length; e7++) {
2074
+ let t2 = this.languages[e7];
2075
+ if (![`cimode`, `dev`].includes(t2) && this.store.hasLanguageSomeTranslations(t2)) {
2076
+ this.resolvedLanguage = t2;
2077
+ break;
2078
+ }
2079
+ }
2080
+ !this.resolvedLanguage && !this.languages.includes(e6) && this.store.hasLanguageSomeTranslations(e6) && (this.resolvedLanguage = e6, this.languages.unshift(e6));
2081
+ }
2082
+ }
2083
+ changeLanguage(e6, t2) {
2084
+ this.isLanguageChangingTo = e6;
2085
+ let n2 = I();
2086
+ this.emit(`languageChanging`, e6);
2087
+ let r2 = (e7) => {
2088
+ this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
2089
+ }, i2 = (i3, a3) => {
2090
+ a3 ? this.isLanguageChangingTo === e6 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e7) => this.t(...e7)), t2 && t2(i3, (...e7) => this.t(...e7));
2091
+ }, a2 = (t3) => {
2092
+ !e6 && !t3 && this.services.languageDetector && (t3 = []);
2093
+ let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
2094
+ a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
2095
+ i2(e7, a3);
2096
+ });
2097
+ };
2098
+ return !e6 && this.services.languageDetector && !this.services.languageDetector.async ? a2(this.services.languageDetector.detect()) : !e6 && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a2) : this.services.languageDetector.detect(a2) : a2(e6), n2;
2099
+ }
2100
+ getFixedT(e6, t2, n2, r2) {
2101
+ let i2 = r2?.scopeNs, a2 = (e7, t3, ...r3) => {
2102
+ let o2;
2103
+ o2 = typeof t3 == `object` ? { ...t3 } : this.options.overloadTranslationOptionHandler([e7, t3].concat(r3)), o2.lng = o2.lng || a2.lng, o2.lngs = o2.lngs || a2.lngs;
2104
+ let s2 = o2.ns !== void 0 && o2.ns !== null;
2105
+ o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
2106
+ let c2 = { ...this.options, ...o2 };
2107
+ Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = B(o2.keyPrefix, c2));
2108
+ let l2 = this.options.keySeparator || `.`, u2;
2109
+ return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = B(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = B(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
2110
+ };
2111
+ return F(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
2112
+ }
2113
+ t(...e6) {
2114
+ return this.translator?.translate(...e6);
2115
+ }
2116
+ exists(...e6) {
2117
+ return this.translator?.exists(...e6);
2118
+ }
2119
+ setDefaultNamespace(e6) {
2120
+ this.options.defaultNS = e6;
2121
+ }
2122
+ hasLoadedNamespace(e6, t2 = {}) {
2123
+ if (!this.isInitialized) return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`, this.languages), false;
2124
+ if (!this.languages || !this.languages.length) return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`, this.languages), false;
2125
+ let n2 = t2.lng || this.resolvedLanguage || this.languages[0], r2 = this.options ? this.options.fallbackLng : false, i2 = this.languages[this.languages.length - 1];
2126
+ if (n2.toLowerCase() === `cimode`) return true;
2127
+ let a2 = (e7, t3) => {
2128
+ let n3 = this.services.backendConnector.state[`${e7}|${t3}`];
2129
+ return n3 === -1 || n3 === 0 || n3 === 2;
2130
+ };
2131
+ if (t2.precheck) {
2132
+ let e7 = t2.precheck(this, a2);
2133
+ if (e7 !== void 0) return e7;
2134
+ }
2135
+ return !!(this.hasResourceBundle(n2, e6) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a2(n2, e6) && (!r2 || a2(i2, e6)));
2136
+ }
2137
+ loadNamespaces(e6, t2) {
2138
+ let n2 = I();
2139
+ return this.options.ns ? (F(e6) && (e6 = [e6]), e6.forEach((e7) => {
2140
+ this.options.ns.includes(e7) || this.options.ns.push(e7);
2141
+ }), this.loadResources((e7) => {
2142
+ n2.resolve(), t2 && t2(e7);
2143
+ }), n2) : (t2 && t2(), Promise.resolve());
2144
+ }
2145
+ loadLanguages(e6, t2) {
2146
+ let n2 = I();
2147
+ F(e6) && (e6 = [e6]);
2148
+ let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
2149
+ return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
2150
+ n2.resolve(), t2 && t2(e7);
2151
+ }), n2) : (t2 && t2(), Promise.resolve());
2152
+ }
2153
+ dir(e6) {
2154
+ if (e6 ||= this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language), !e6) return `rtl`;
2155
+ try {
2156
+ let t3 = new Intl.Locale(e6);
2157
+ if (t3 && t3.getTextInfo) {
2158
+ let e7 = t3.getTextInfo();
2159
+ if (e7 && e7.direction) return e7.direction;
2160
+ }
2161
+ } catch {
2162
+ }
2163
+ let t2 = `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`.split(`.`), n2 = this.services?.languageUtils || new Jr(si());
2164
+ return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
2165
+ }
2166
+ static createInstance(t2 = {}, n2) {
2167
+ let r2 = new e4(t2, n2);
2168
+ return r2.createInstance = e4.createInstance, r2;
2169
+ }
2170
+ cloneInstance(t2 = {}, n2 = li) {
2171
+ let r2 = t2.forkResourceStore;
2172
+ r2 && delete t2.forkResourceStore;
2173
+ let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
2174
+ if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
2175
+ a2[e6] = this[e6];
2176
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Hr(Object.keys(this.store.data).reduce((e6, t3) => (e6[t3] = { ...this.store.data[t3] }, e6[t3] = Object.keys(e6[t3]).reduce((n3, r3) => (n3[r3] = { ...e6[t3][r3] }, n3), e6[t3]), e6), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
2177
+ let e6 = { ...si().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
2178
+ a2.services.interpolator = new ei(n3);
2179
+ }
2180
+ return a2.translator = new qr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
2181
+ a2.emit(e6, ...t3);
2182
+ }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
2183
+ }
2184
+ toJSON() {
2185
+ return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
2186
+ }
2187
+ }.createInstance();
2188
+ V.createInstance, V.dir, V.init, V.loadResources, V.reloadResources, V.use, V.changeLanguage, V.getFixedT, V.t, V.exists, V.setDefaultNamespace, V.hasLoadedNamespace, V.loadNamespaces, V.loadLanguages;
2189
+ var di = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
2190
+ let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = V.createInstance(i2 ? s2 : void 0);
2191
+ return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
2192
+ try {
2193
+ return r3(null, await t2(e7));
2194
+ } catch (e8) {
2195
+ return r3(e8, null);
2196
+ }
2197
+ } }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
2198
+ };
2199
+ var fi = [`__proto__`, `constructor`, `prototype`];
2200
+ function pi(e6, t2, n2) {
2201
+ function r2(e7) {
2202
+ return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
2203
+ }
2204
+ function i2() {
2205
+ return !e6 || typeof e6 == `string`;
2206
+ }
2207
+ for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
2208
+ if (i2()) return {};
2209
+ var o2 = r2(a2.shift());
2210
+ if (fi.indexOf(o2) > -1) return {};
2211
+ !e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
2212
+ }
2213
+ if (i2()) return {};
2214
+ var s2 = r2(a2.shift());
2215
+ return fi.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
2216
+ }
2217
+ function mi(e6, t2, n2) {
2218
+ var r2 = pi(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
2219
+ i2 !== void 0 && (i2[a2] = n2);
2220
+ }
2221
+ function hi(e6, t2) {
2222
+ var n2 = pi(e6, t2), r2 = n2.obj, i2 = n2.k;
2223
+ if (r2) return r2[i2];
2224
+ }
2225
+ var gi = [];
2226
+ var _i = gi.forEach;
2227
+ var vi = gi.slice;
2228
+ function yi(e6) {
2229
+ return _i.call(vi.call(arguments, 1), function(t2) {
2230
+ if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
2231
+ var i2 = r2[n2];
2232
+ fi.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
2233
+ }
2234
+ }), e6;
2235
+ }
2236
+ function bi(e6, t2) {
2237
+ let n2 = t2 && t2.cache ? t2.cache : Ai, r2 = t2 && t2.serializer ? t2.serializer : Oi;
2238
+ return (t2 && t2.strategy ? t2.strategy : Ti)(e6, { cache: n2, serializer: r2 });
2239
+ }
2240
+ function xi(e6) {
2241
+ return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
2242
+ }
2243
+ function Si(e6, t2, n2, r2) {
2244
+ let i2 = xi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
2245
+ return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
2246
+ }
2247
+ function Ci(e6, t2, n2) {
2248
+ let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
2249
+ return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
2250
+ }
2251
+ function wi(e6, t2, n2, r2, i2) {
2252
+ return n2.bind(t2, e6, r2, i2);
2253
+ }
2254
+ function Ti(e6, t2) {
2255
+ let n2 = e6.length === 1 ? Si : Ci;
2256
+ return wi(e6, this, n2, t2.cache.create(), t2.serializer);
2257
+ }
2258
+ function Ei(e6, t2) {
2259
+ return wi(e6, this, Ci, t2.cache.create(), t2.serializer);
2260
+ }
2261
+ function Di(e6, t2) {
2262
+ return wi(e6, this, Si, t2.cache.create(), t2.serializer);
2263
+ }
2264
+ var Oi = function() {
2265
+ return JSON.stringify(arguments);
2266
+ };
2267
+ var ki = class {
2268
+ constructor() {
2269
+ this.cache = /* @__PURE__ */ Object.create(null);
2270
+ }
2271
+ get(e6) {
2272
+ return this.cache[e6];
2273
+ }
2274
+ set(e6, t2) {
2275
+ this.cache[e6] = t2;
2276
+ }
2277
+ };
2278
+ var Ai = { create: function() {
2279
+ return new ki();
2280
+ } };
2281
+ var ji = { variadic: Ei, monadic: Di };
2282
+ var Mi = /(?:[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;
2283
+ function Ni(e6) {
2284
+ let t2 = {};
2285
+ return e6.replace(Mi, (e7) => {
2286
+ let n2 = e7.length;
2287
+ switch (e7[0]) {
2288
+ case `G`:
2289
+ t2.era = n2 === 4 ? `long` : n2 === 5 ? `narrow` : `short`;
2290
+ break;
2291
+ case `y`:
2292
+ t2.year = n2 === 2 ? `2-digit` : `numeric`;
2293
+ break;
2294
+ case `Y`:
2295
+ case `u`:
2296
+ case `U`:
2297
+ case `r`:
2298
+ throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
2299
+ case `q`:
2300
+ case `Q`:
2301
+ throw RangeError("`q/Q` (quarter) patterns are not supported");
2302
+ case `M`:
2303
+ case `L`:
2304
+ t2.month = [`numeric`, `2-digit`, `short`, `long`, `narrow`][n2 - 1];
2305
+ break;
2306
+ case `w`:
2307
+ case `W`:
2308
+ throw RangeError("`w/W` (week) patterns are not supported");
2309
+ case `d`:
2310
+ t2.day = [`numeric`, `2-digit`][n2 - 1];
2311
+ break;
2312
+ case `D`:
2313
+ case `F`:
2314
+ case `g`:
2315
+ throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
2316
+ case `E`:
2317
+ t2.weekday = n2 === 4 ? `long` : n2 === 5 ? `narrow` : `short`;
2318
+ break;
2319
+ case `e`:
2320
+ if (n2 < 4) throw RangeError("`e..eee` (weekday) patterns are not supported");
2321
+ t2.weekday = [`short`, `long`, `narrow`, `short`][n2 - 3];
2322
+ break;
2323
+ case `c`:
2324
+ if (n2 < 4) throw RangeError("`c..ccc` (weekday) patterns are not supported");
2325
+ t2.weekday = [`short`, `long`, `narrow`, `short`][n2 - 3];
2326
+ break;
2327
+ case `a`:
2328
+ t2.hour12 = true;
2329
+ break;
2330
+ case `b`:
2331
+ case `B`:
2332
+ throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");
2333
+ case `h`:
2334
+ t2.hourCycle = `h12`, t2.hour = [`numeric`, `2-digit`][n2 - 1];
2335
+ break;
2336
+ case `H`:
2337
+ t2.hourCycle = `h23`, t2.hour = [`numeric`, `2-digit`][n2 - 1];
2338
+ break;
2339
+ case `K`:
2340
+ t2.hourCycle = `h11`, t2.hour = [`numeric`, `2-digit`][n2 - 1];
2341
+ break;
2342
+ case `k`:
2343
+ t2.hourCycle = `h24`, t2.hour = [`numeric`, `2-digit`][n2 - 1];
2344
+ break;
2345
+ case `j`:
2346
+ case `J`:
2347
+ case `C`:
2348
+ throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
2349
+ case `m`:
2350
+ t2.minute = [`numeric`, `2-digit`][n2 - 1];
2351
+ break;
2352
+ case `s`:
2353
+ t2.second = [`numeric`, `2-digit`][n2 - 1];
2354
+ break;
2355
+ case `S`:
2356
+ case `A`:
2357
+ throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");
2358
+ case `z`:
2359
+ t2.timeZoneName = n2 < 4 ? `short` : `long`;
2360
+ break;
2361
+ case `Z`:
2362
+ case `O`:
2363
+ case `v`:
2364
+ case `V`:
2365
+ case `X`:
2366
+ case `x`:
2367
+ throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
2368
+ }
2369
+ return ``;
2370
+ }), t2;
2371
+ }
2372
+ var Pi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
2373
+ function Fi(e6) {
2374
+ if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
2375
+ let t2 = e6.split(Pi).filter((e7) => e7.length > 0), n2 = [];
2376
+ for (let e7 of t2) {
2377
+ let t3 = e7.split(`/`);
2378
+ if (t3.length === 0) throw Error(`Invalid number skeleton`);
2379
+ let [r2, ...i2] = t3;
2380
+ for (let e8 of i2) if (e8.length === 0) throw Error(`Invalid number skeleton`);
2381
+ n2.push({ stem: r2, options: i2 });
2382
+ }
2383
+ return n2;
2384
+ }
2385
+ function Ii(e6) {
2386
+ return e6.replace(/^(.*?)-/, ``);
2387
+ }
2388
+ var Li = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
2389
+ var Ri = /^(@+)?(\+|#+)?[rs]?$/g;
2390
+ var zi = /(\*)(0+)|(#+)(0+)|(0+)/g;
2391
+ var Bi = /^(0+)$/;
2392
+ function Vi(e6) {
2393
+ let t2 = {};
2394
+ return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Ri, function(e7, n2, r2) {
2395
+ return typeof r2 == `string` ? r2 === `+` ? t2.minimumSignificantDigits = n2.length : n2[0] === `#` ? t2.maximumSignificantDigits = n2.length : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length + (typeof r2 == `string` ? r2.length : 0)) : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length), ``;
2396
+ }), t2;
2397
+ }
2398
+ function Hi(e6) {
2399
+ switch (e6) {
2400
+ case `sign-auto`:
2401
+ return { signDisplay: `auto` };
2402
+ case `sign-accounting`:
2403
+ case `()`:
2404
+ return { currencySign: `accounting` };
2405
+ case `sign-always`:
2406
+ case `+!`:
2407
+ return { signDisplay: `always` };
2408
+ case `sign-accounting-always`:
2409
+ case `()!`:
2410
+ return { signDisplay: `always`, currencySign: `accounting` };
2411
+ case `sign-except-zero`:
2412
+ case `+?`:
2413
+ return { signDisplay: `exceptZero` };
2414
+ case `sign-accounting-except-zero`:
2415
+ case `()?`:
2416
+ return { signDisplay: `exceptZero`, currencySign: `accounting` };
2417
+ case `sign-never`:
2418
+ case `+_`:
2419
+ return { signDisplay: `never` };
2420
+ }
2421
+ }
2422
+ function Ui(e6) {
2423
+ let t2;
2424
+ if (e6[0] === `E` && e6[1] === `E` ? (t2 = { notation: `engineering` }, e6 = e6.slice(2)) : e6[0] === `E` && (t2 = { notation: `scientific` }, e6 = e6.slice(1)), t2) {
2425
+ let n2 = e6.slice(0, 2);
2426
+ if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Bi.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
2427
+ t2.minimumIntegerDigits = e6.length;
2428
+ }
2429
+ return t2;
2430
+ }
2431
+ function Wi(e6) {
2432
+ return Hi(e6) || {};
2433
+ }
2434
+ function Gi(e6) {
2435
+ let t2 = {};
2436
+ for (let n2 of e6) {
2437
+ switch (n2.stem) {
2438
+ case `percent`:
2439
+ case `%`:
2440
+ t2.style = `percent`;
2441
+ continue;
2442
+ case `%x100`:
2443
+ t2.style = `percent`, t2.scale = 100;
2444
+ continue;
2445
+ case `currency`:
2446
+ t2.style = `currency`, t2.currency = n2.options[0];
2447
+ continue;
2448
+ case `group-off`:
2449
+ case `,_`:
2450
+ t2.useGrouping = false;
2451
+ continue;
2452
+ case `precision-integer`:
2453
+ case `.`:
2454
+ t2.maximumFractionDigits = 0;
2455
+ continue;
2456
+ case `measure-unit`:
2457
+ case `unit`:
2458
+ t2.style = `unit`, t2.unit = Ii(n2.options[0]);
2459
+ continue;
2460
+ case `compact-short`:
2461
+ case `K`:
2462
+ t2.notation = `compact`, t2.compactDisplay = `short`;
2463
+ continue;
2464
+ case `compact-long`:
2465
+ case `KK`:
2466
+ t2.notation = `compact`, t2.compactDisplay = `long`;
2467
+ continue;
2468
+ case `scientific`:
2469
+ t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Wi(t3) }), {}) };
2470
+ continue;
2471
+ case `engineering`:
2472
+ t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Wi(t3) }), {}) };
2473
+ continue;
2474
+ case `notation-simple`:
2475
+ t2.notation = `standard`;
2476
+ continue;
2477
+ case `unit-width-narrow`:
2478
+ t2.currencyDisplay = `narrowSymbol`, t2.unitDisplay = `narrow`;
2479
+ continue;
2480
+ case `unit-width-short`:
2481
+ t2.currencyDisplay = `code`, t2.unitDisplay = `short`;
2482
+ continue;
2483
+ case `unit-width-full-name`:
2484
+ t2.currencyDisplay = `name`, t2.unitDisplay = `long`;
2485
+ continue;
2486
+ case `unit-width-iso-code`:
2487
+ t2.currencyDisplay = `symbol`;
2488
+ continue;
2489
+ case `scale`:
2490
+ t2.scale = parseFloat(n2.options[0]);
2491
+ continue;
2492
+ case `rounding-mode-floor`:
2493
+ t2.roundingMode = `floor`;
2494
+ continue;
2495
+ case `rounding-mode-ceiling`:
2496
+ t2.roundingMode = `ceil`;
2497
+ continue;
2498
+ case `rounding-mode-down`:
2499
+ t2.roundingMode = `trunc`;
2500
+ continue;
2501
+ case `rounding-mode-up`:
2502
+ t2.roundingMode = `expand`;
2503
+ continue;
2504
+ case `rounding-mode-half-even`:
2505
+ t2.roundingMode = `halfEven`;
2506
+ continue;
2507
+ case `rounding-mode-half-down`:
2508
+ t2.roundingMode = `halfTrunc`;
2509
+ continue;
2510
+ case `rounding-mode-half-up`:
2511
+ t2.roundingMode = `halfExpand`;
2512
+ continue;
2513
+ case `integer-width`:
2514
+ if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
2515
+ n2.options[0].replace(zi, function(e8, n3, r3, i2, a2, o2) {
2516
+ if (n3) t2.minimumIntegerDigits = r3.length;
2517
+ else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
2518
+ else if (o2) throw Error(`We currently do not support exact integer digits`);
2519
+ return ``;
2520
+ });
2521
+ continue;
2522
+ }
2523
+ if (Bi.test(n2.stem)) {
2524
+ t2.minimumIntegerDigits = n2.stem.length;
2525
+ continue;
2526
+ }
2527
+ if (Li.test(n2.stem)) {
2528
+ if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
2529
+ n2.stem.replace(Li, function(e9, n3, r3, i2, a2, o2) {
2530
+ return r3 === `*` ? t2.minimumFractionDigits = n3.length : i2 && i2[0] === `#` ? t2.maximumFractionDigits = i2.length : a2 && o2 ? (t2.minimumFractionDigits = a2.length, t2.maximumFractionDigits = a2.length + o2.length) : (t2.minimumFractionDigits = n3.length, t2.maximumFractionDigits = n3.length), ``;
2531
+ });
2532
+ let e8 = n2.options[0];
2533
+ e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Vi(e8) });
2534
+ continue;
2535
+ }
2536
+ if (Ri.test(n2.stem)) {
2537
+ t2 = { ...t2, ...Vi(n2.stem) };
2538
+ continue;
2539
+ }
2540
+ let e7 = Hi(n2.stem);
2541
+ e7 && (t2 = { ...t2, ...e7 });
2542
+ let r2 = Ui(n2.stem);
2543
+ r2 && (t2 = { ...t2, ...r2 });
2544
+ }
2545
+ return t2;
2546
+ }
2547
+ var Ki = function(e6) {
2548
+ return e6[e6.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e6[e6.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e6[e6.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e6[e6.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e6[e6.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e6[e6.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e6[e6.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e6[e6.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e6[e6.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e6[e6.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e6[e6.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e6[e6.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e6[e6.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e6[e6.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e6[e6.INVALID_TAG = 23] = `INVALID_TAG`, e6[e6.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e6[e6.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e6[e6.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`, e6;
2549
+ }({});
2550
+ function qi(e6) {
2551
+ return e6.type === 0;
2552
+ }
2553
+ function Ji(e6) {
2554
+ return e6.type === 1;
2555
+ }
2556
+ function Yi(e6) {
2557
+ return e6.type === 2;
2558
+ }
2559
+ function Xi(e6) {
2560
+ return e6.type === 3;
2561
+ }
2562
+ function Zi(e6) {
2563
+ return e6.type === 4;
2564
+ }
2565
+ function Qi(e6) {
2566
+ return e6.type === 5;
2567
+ }
2568
+ function $i(e6) {
2569
+ return e6.type === 6;
2570
+ }
2571
+ function ea(e6) {
2572
+ return e6.type === 7;
2573
+ }
2574
+ function ta(e6) {
2575
+ return e6.type === 8;
2576
+ }
2577
+ function na(e6) {
2578
+ return !!(e6 && typeof e6 == `object` && e6.type === 0);
2579
+ }
2580
+ function ra(e6) {
2581
+ return !!(e6 && typeof e6 == `object` && e6.type === 1);
2582
+ }
2583
+ var ia = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
2584
+ var H = { "001": [`H`, `h`], 419: [`h`, `H`, `hB`, `hb`], AC: [`H`, `h`, `hb`, `hB`], AD: [`H`, `hB`], AE: [`h`, `hB`, `hb`, `H`], AF: [`H`, `hb`, `hB`, `h`], AG: [`h`, `hb`, `H`, `hB`], AI: [`H`, `h`, `hb`, `hB`], AL: [`h`, `H`, `hB`], AM: [`H`, `hB`], AO: [`H`, `hB`], AR: [`h`, `H`, `hB`, `hb`], AS: [`h`, `H`], AT: [`H`, `hB`], AU: [`h`, `hb`, `H`, `hB`], AW: [`H`, `hB`], AX: [`H`], AZ: [`H`, `hB`, `h`], BA: [`H`, `hB`, `h`], BB: [`h`, `hb`, `H`, `hB`], BD: [`h`, `hB`, `H`], BE: [`H`, `hB`], BF: [`H`, `hB`], BG: [`H`, `hB`, `h`], BH: [`h`, `hB`, `hb`, `H`], BI: [`H`, `h`], BJ: [`H`, `hB`], BL: [`H`, `hB`], BM: [`h`, `hb`, `H`, `hB`], BN: [`hb`, `hB`, `h`, `H`], BO: [`h`, `H`, `hB`, `hb`], BQ: [`H`], BR: [`H`, `hB`], BS: [`h`, `hb`, `H`, `hB`], BT: [`h`, `H`], BW: [`H`, `h`, `hb`, `hB`], BY: [`H`, `h`], BZ: [`H`, `h`, `hb`, `hB`], CA: [`h`, `hb`, `H`, `hB`], CC: [`H`, `h`, `hb`, `hB`], CD: [`hB`, `H`], CF: [`H`, `h`, `hB`], CG: [`H`, `hB`], CH: [`H`, `hB`, `h`], CI: [`H`, `hB`], CK: [`H`, `h`, `hb`, `hB`], CL: [`h`, `H`, `hB`, `hb`], CM: [`H`, `h`, `hB`], CN: [`H`, `hB`, `hb`, `h`], CO: [`h`, `H`, `hB`, `hb`], CP: [`H`], CR: [`h`, `H`, `hB`, `hb`], CU: [`h`, `H`, `hB`, `hb`], CV: [`H`, `hB`], CW: [`H`, `hB`], CX: [`H`, `h`, `hb`, `hB`], CY: [`h`, `H`, `hb`, `hB`], CZ: [`H`], DE: [`H`, `hB`], DG: [`H`, `h`, `hb`, `hB`], DJ: [`h`, `H`], DK: [`H`], DM: [`h`, `hb`, `H`, `hB`], DO: [`h`, `H`, `hB`, `hb`], DZ: [`h`, `hB`, `hb`, `H`], EA: [`H`, `h`, `hB`, `hb`], EC: [`h`, `H`, `hB`, `hb`], EE: [`H`, `hB`], EG: [`h`, `hB`, `hb`, `H`], EH: [`h`, `hB`, `hb`, `H`], ER: [`h`, `H`], ES: [`H`, `hB`, `h`, `hb`], ET: [`hB`, `hb`, `h`, `H`], FI: [`H`], FJ: [`h`, `hb`, `H`, `hB`], FK: [`H`, `h`, `hb`, `hB`], FM: [`h`, `hb`, `H`, `hB`], FO: [`H`, `h`], FR: [`H`, `hB`], GA: [`H`, `hB`], GB: [`H`, `h`, `hb`, `hB`], GD: [`h`, `hb`, `H`, `hB`], GE: [`H`, `hB`, `h`], GF: [`H`, `hB`], GG: [`H`, `h`, `hb`, `hB`], GH: [`h`, `H`], GI: [`H`, `h`, `hb`, `hB`], GL: [`H`, `h`], GM: [`h`, `hb`, `H`, `hB`], GN: [`H`, `hB`], GP: [`H`, `hB`], GQ: [`H`, `hB`, `h`, `hb`], GR: [`h`, `H`, `hb`, `hB`], GS: [`H`, `h`, `hb`, `hB`], GT: [`h`, `H`, `hB`, `hb`], GU: [`h`, `hb`, `H`, `hB`], GW: [`H`, `hB`], GY: [`h`, `hb`, `H`, `hB`], HK: [`h`, `hB`, `hb`, `H`], HN: [`h`, `H`, `hB`, `hb`], HR: [`H`, `hB`], HU: [`H`, `h`], IC: [`H`, `h`, `hB`, `hb`], ID: [`H`], IE: [`H`, `h`, `hb`, `hB`], IL: [`H`, `hB`], IM: [`H`, `h`, `hb`, `hB`], IN: [`h`, `H`], IO: [`H`, `h`, `hb`, `hB`], IQ: [`h`, `hB`, `hb`, `H`], IR: [`hB`, `H`], IS: [`H`], IT: [`H`, `hB`], JE: [`H`, `h`, `hb`, `hB`], JM: [`h`, `hb`, `H`, `hB`], JO: [`h`, `hB`, `hb`, `H`], JP: [`H`, `K`, `h`], KE: [`hB`, `hb`, `H`, `h`], KG: [`H`, `h`, `hB`, `hb`], KH: [`hB`, `h`, `H`, `hb`], KI: [`h`, `hb`, `H`, `hB`], KM: [`H`, `h`, `hB`, `hb`], KN: [`h`, `hb`, `H`, `hB`], KP: [`h`, `H`, `hB`, `hb`], KR: [`h`, `H`, `hB`, `hb`], KW: [`h`, `hB`, `hb`, `H`], KY: [`h`, `hb`, `H`, `hB`], KZ: [`H`, `hB`], LA: [`H`, `hb`, `hB`, `h`], LB: [`h`, `hB`, `hb`, `H`], LC: [`h`, `hb`, `H`, `hB`], LI: [`H`, `hB`, `h`], LK: [`H`, `h`, `hB`, `hb`], LR: [`h`, `hb`, `H`, `hB`], LS: [`h`, `H`], LT: [`H`, `h`, `hb`, `hB`], LU: [`H`, `h`, `hB`], LV: [`H`, `hB`, `hb`, `h`], LY: [`h`, `hB`, `hb`, `H`], MA: [`H`, `h`, `hB`, `hb`], MC: [`H`, `hB`], MD: [`H`, `hB`], ME: [`H`, `hB`, `h`], MF: [`H`, `hB`], MG: [`H`, `h`], MH: [`h`, `hb`, `H`, `hB`], MK: [`H`, `h`, `hb`, `hB`], ML: [`H`], MM: [`hB`, `hb`, `H`, `h`], MN: [`H`, `h`, `hb`, `hB`], MO: [`h`, `hB`, `hb`, `H`], MP: [`h`, `hb`, `H`, `hB`], MQ: [`H`, `hB`], MR: [`h`, `hB`, `hb`, `H`], MS: [`H`, `h`, `hb`, `hB`], MT: [`H`, `h`], MU: [`H`, `h`], MV: [`H`, `h`], MW: [`h`, `hb`, `H`, `hB`], MX: [`h`, `H`, `hB`, `hb`], MY: [`hb`, `hB`, `h`, `H`], MZ: [`H`, `hB`], NA: [`h`, `H`, `hB`, `hb`], NC: [`H`, `hB`], NE: [`H`], NF: [`H`, `h`, `hb`, `hB`], NG: [`H`, `h`, `hb`, `hB`], NI: [`h`, `H`, `hB`, `hb`], NL: [`H`, `hB`], NO: [`H`, `h`], NP: [`H`, `h`, `hB`], NR: [`H`, `h`, `hb`, `hB`], NU: [`H`, `h`, `hb`, `hB`], NZ: [`h`, `hb`, `H`, `hB`], OM: [`h`, `hB`, `hb`, `H`], PA: [`h`, `H`, `hB`, `hb`], PE: [`h`, `H`, `hB`, `hb`], PF: [`H`, `h`, `hB`], PG: [`h`, `H`], PH: [`h`, `hB`, `hb`, `H`], PK: [`h`, `hB`, `H`], PL: [`H`, `h`], PM: [`H`, `hB`], PN: [`H`, `h`, `hb`, `hB`], PR: [`h`, `H`, `hB`, `hb`], PS: [`h`, `hB`, `hb`, `H`], PT: [`H`, `hB`], PW: [`h`, `H`], PY: [`h`, `H`, `hB`, `hb`], QA: [`h`, `hB`, `hb`, `H`], RE: [`H`, `hB`], RO: [`H`, `hB`], RS: [`H`, `hB`, `h`], RU: [`H`], RW: [`H`, `h`], SA: [`h`, `hB`, `hb`, `H`], SB: [`h`, `hb`, `H`, `hB`], SC: [`H`, `h`, `hB`], SD: [`h`, `hB`, `hb`, `H`], SE: [`H`], SG: [`h`, `hb`, `H`, `hB`], SH: [`H`, `h`, `hb`, `hB`], SI: [`H`, `hB`], SJ: [`H`], SK: [`H`], SL: [`h`, `hb`, `H`, `hB`], SM: [`H`, `h`, `hB`], SN: [`H`, `h`, `hB`], SO: [`h`, `H`], SR: [`H`, `hB`], SS: [`h`, `hb`, `H`, `hB`], ST: [`H`, `hB`], SV: [`h`, `H`, `hB`, `hb`], SX: [`H`, `h`, `hb`, `hB`], SY: [`h`, `hB`, `hb`, `H`], SZ: [`h`, `hb`, `H`, `hB`], TA: [`H`, `h`, `hb`, `hB`], TC: [`h`, `hb`, `H`, `hB`], TD: [`h`, `H`, `hB`], TF: [`H`, `h`, `hB`], TG: [`H`, `hB`], TH: [`H`, `h`], TJ: [`H`, `h`], TL: [`H`, `hB`, `hb`, `h`], TM: [`H`, `h`], TN: [`h`, `hB`, `hb`, `H`], TO: [`h`, `H`], TR: [`H`, `hB`], TT: [`h`, `hb`, `H`, `hB`], TW: [`hB`, `hb`, `h`, `H`], TZ: [`hB`, `hb`, `H`, `h`], UA: [`H`, `hB`, `h`], UG: [`hB`, `hb`, `H`, `h`], UM: [`h`, `hb`, `H`, `hB`], US: [`h`, `hb`, `H`, `hB`], UY: [`h`, `H`, `hB`, `hb`], UZ: [`H`, `hB`, `h`], VA: [`H`, `h`, `hB`], VC: [`h`, `hb`, `H`, `hB`], VE: [`h`, `H`, `hB`, `hb`], VG: [`h`, `hb`, `H`, `hB`], VI: [`h`, `hb`, `H`, `hB`], VN: [`H`, `h`], VU: [`h`, `H`], WF: [`H`, `hB`], WS: [`h`, `H`], XK: [`H`, `hB`, `h`], YE: [`h`, `hB`, `hb`, `H`], YT: [`H`, `hB`], ZA: [`H`, `h`, `hb`, `hB`], ZM: [`h`, `hb`, `H`, `hB`], ZW: [`H`, `h`], "af-ZA": [`H`, `h`, `hB`, `hb`], "ar-001": [`h`, `hB`, `hb`, `H`], "ca-ES": [`H`, `h`, `hB`], "en-001": [`h`, `hb`, `H`, `hB`], "en-HK": [`h`, `hb`, `H`, `hB`], "en-IL": [`H`, `h`, `hb`, `hB`], "en-MY": [`h`, `hb`, `H`, `hB`], "es-BR": [`H`, `h`, `hB`, `hb`], "es-ES": [`H`, `h`, `hB`, `hb`], "es-GQ": [`H`, `h`, `hB`, `hb`], "fr-CA": [`H`, `h`, `hB`], "gl-ES": [`H`, `h`, `hB`], "gu-IN": [`hB`, `hb`, `h`, `H`], "hi-IN": [`hB`, `h`, `H`], "it-CH": [`H`, `h`, `hB`], "it-IT": [`H`, `h`, `hB`], "kn-IN": [`hB`, `h`, `H`], "ku-SY": [`H`, `hB`], "ml-IN": [`hB`, `h`, `H`], "mr-IN": [`hB`, `hb`, `h`, `H`], "pa-IN": [`hB`, `hb`, `h`, `H`], "ta-IN": [`hB`, `h`, `hb`, `H`], "te-IN": [`hB`, `h`, `H`], "zu-ZA": [`H`, `hB`, `hb`, `h`] };
2585
+ function aa(e6, t2) {
2586
+ let n2 = ``;
2587
+ for (let r2 = 0; r2 < e6.length; r2++) {
2588
+ let i2 = e6.charAt(r2);
2589
+ if (i2 === `j`) {
2590
+ let a2 = 0;
2591
+ for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
2592
+ let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = oa(t2);
2593
+ for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
2594
+ for (; o2-- > 0; ) n2 = c2 + n2;
2595
+ } else n2 += i2 === `J` ? `H` : i2;
2596
+ }
2597
+ return n2;
2598
+ }
2599
+ function oa(e6) {
2600
+ let t2 = e6.hourCycle;
2601
+ if (t2 === void 0) {
2602
+ let n3 = e6;
2603
+ t2 = n3.getHourCycles?.()[0] ?? n3.hourCycles?.[0];
2604
+ }
2605
+ if (t2) switch (t2) {
2606
+ case `h24`:
2607
+ return `k`;
2608
+ case `h23`:
2609
+ return `H`;
2610
+ case `h12`:
2611
+ return `h`;
2612
+ case `h11`:
2613
+ return `K`;
2614
+ default:
2615
+ throw Error(`Invalid hourCycle`);
2616
+ }
2617
+ let n2 = e6.language, r2;
2618
+ return n2 !== `root` && (r2 = e6.maximize().region), (H[`${n2}-${r2}`] || H[r2 || ``] || H[n2 || ``] || H[`${n2}-001`] || H[`001`])[0].charAt(0);
2619
+ }
2620
+ var sa = RegExp(`^${ia.source}*`);
2621
+ var ca = RegExp(`${ia.source}*$`);
2622
+ function U(e6, t2) {
2623
+ return { start: e6, end: t2 };
2624
+ }
2625
+ var la = !!Object.fromEntries;
2626
+ var ua = !!String.prototype.trimStart;
2627
+ var da = !!String.prototype.trimEnd;
2628
+ var fa = la ? Object.fromEntries : function(e6) {
2629
+ let t2 = {};
2630
+ for (let [n2, r2] of e6) t2[n2] = r2;
2631
+ return t2;
2632
+ };
2633
+ var pa = ua ? function(e6) {
2634
+ return e6.trimStart();
2635
+ } : function(e6) {
2636
+ return e6.replace(sa, ``);
2637
+ };
2638
+ var ma = da ? function(e6) {
2639
+ return e6.trimEnd();
2640
+ } : function(e6) {
2641
+ return e6.replace(ca, ``);
2642
+ };
2643
+ var ha = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2644
+ function ga(e6, t2) {
2645
+ return ha.lastIndex = t2, ha.exec(e6)[1] ?? ``;
2646
+ }
2647
+ function _a(e6) {
2648
+ if (e6.length === 0) return null;
2649
+ let t2 = 1, n2 = 1;
2650
+ for (let r2 = 0; r2 < e6.length; ) {
2651
+ let i2 = e6.charCodeAt(r2);
2652
+ switch (i2) {
2653
+ case 35:
2654
+ case 39:
2655
+ case 60:
2656
+ case 123:
2657
+ case 125:
2658
+ return null;
2659
+ }
2660
+ if (i2 === 10) t2++, n2 = 1, r2++;
2661
+ else if (n2++, i2 >= 55296 && i2 <= 56319 && r2 + 1 < e6.length) {
2662
+ let t3 = e6.charCodeAt(r2 + 1);
2663
+ r2 += t3 >= 56320 && t3 <= 57343 ? 2 : 1;
2664
+ } else r2++;
2665
+ }
2666
+ return { offset: e6.length, line: t2, column: n2 };
2667
+ }
2668
+ var va = class {
2669
+ constructor(e6, t2 = {}) {
2670
+ this.message = e6, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!t2.ignoreTag, this.locale = t2.locale, this.requiresOtherClause = !!t2.requiresOtherClause, this.shouldParseSkeletons = !!t2.shouldParseSkeletons;
2671
+ }
2672
+ parse() {
2673
+ if (this.offset() !== 0) throw Error(`parser can only be used once`);
2674
+ if (this.message.length > 0) {
2675
+ let e6 = this.message.charCodeAt(0);
2676
+ if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
2677
+ let e7 = _a(this.message);
2678
+ if (e7) {
2679
+ let t2 = this.clonePosition();
2680
+ return this.position = e7, { val: [{ type: 0, value: this.message, location: U(t2, this.clonePosition()) }], err: null };
2681
+ }
2682
+ }
2683
+ }
2684
+ return this.parseMessage(0, ``, false);
2685
+ }
2686
+ parseMessage(e6, t2, n2) {
2687
+ let r2 = [];
2688
+ for (; !this.isEOF(); ) {
2689
+ let i2 = this.char();
2690
+ if (i2 === 123) {
2691
+ let t3 = this.parseArgument(e6, n2);
2692
+ if (t3.err) return t3;
2693
+ r2.push(t3.val);
2694
+ } else if (i2 === 125 && e6 > 0) break;
2695
+ else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
2696
+ let e7 = this.clonePosition();
2697
+ this.bump(), r2.push({ type: 7, location: U(e7, this.clonePosition()) });
2698
+ } else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
2699
+ if (n2) break;
2700
+ return this.error(26, U(this.clonePosition(), this.clonePosition()));
2701
+ } else if (i2 === 60 && !this.ignoreTag && ya(this.peek() || 0)) {
2702
+ let n3 = this.parseTag(e6, t2);
2703
+ if (n3.err) return n3;
2704
+ r2.push(n3.val);
2705
+ } else {
2706
+ let n3 = this.parseLiteral(e6, t2);
2707
+ if (n3.err) return n3;
2708
+ r2.push(n3.val);
2709
+ }
2710
+ }
2711
+ return { val: r2, err: null };
2712
+ }
2713
+ parseTag(e6, t2) {
2714
+ let n2 = this.clonePosition();
2715
+ this.bump();
2716
+ let r2 = this.parseTagName();
2717
+ if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: U(n2, this.clonePosition()) }, err: null };
2718
+ if (this.bumpIf(`>`)) {
2719
+ let i2 = this.parseMessage(e6 + 1, t2, true);
2720
+ if (i2.err) return i2;
2721
+ let a2 = i2.val, o2 = this.clonePosition();
2722
+ if (this.bumpIf(`</`)) {
2723
+ if (this.isEOF() || !ya(this.char())) return this.error(23, U(o2, this.clonePosition()));
2724
+ let e7 = this.clonePosition();
2725
+ return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: U(n2, this.clonePosition()) }, err: null } : this.error(23, U(o2, this.clonePosition()))) : this.error(26, U(e7, this.clonePosition()));
2726
+ }
2727
+ return this.error(27, U(n2, this.clonePosition()));
2728
+ }
2729
+ return this.error(23, U(n2, this.clonePosition()));
2730
+ }
2731
+ parseTagName() {
2732
+ let e6 = this.offset();
2733
+ for (this.bump(); !this.isEOF() && xa(this.char()); ) this.bump();
2734
+ return this.message.slice(e6, this.offset());
2735
+ }
2736
+ parseLiteral(e6, t2) {
2737
+ let n2 = this.clonePosition(), r2 = ``;
2738
+ for (; ; ) {
2739
+ let n3 = this.tryParseQuote(t2);
2740
+ if (n3) {
2741
+ r2 += n3;
2742
+ continue;
2743
+ }
2744
+ let i3 = this.tryParseUnquoted(e6, t2);
2745
+ if (i3) {
2746
+ r2 += i3;
2747
+ continue;
2748
+ }
2749
+ let a2 = this.tryParseLeftAngleBracket();
2750
+ if (a2) r2 += a2;
2751
+ else break;
2752
+ }
2753
+ let i2 = U(n2, this.clonePosition());
2754
+ return { val: { type: 0, value: r2, location: i2 }, err: null };
2755
+ }
2756
+ tryParseLeftAngleBracket() {
2757
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !ba(this.peek() || 0)) ? (this.bump(), `<`) : null;
2758
+ }
2759
+ tryParseQuote(e6) {
2760
+ if (this.isEOF() || this.char() !== 39) return null;
2761
+ switch (this.peek()) {
2762
+ case 39:
2763
+ return this.bump(), this.bump(), `'`;
2764
+ case 123:
2765
+ case 60:
2766
+ case 62:
2767
+ case 125:
2768
+ break;
2769
+ case 35:
2770
+ if (e6 === `plural` || e6 === `selectordinal`) break;
2771
+ return null;
2772
+ default:
2773
+ return null;
2774
+ }
2775
+ this.bump();
2776
+ let t2 = [this.char()];
2777
+ for (this.bump(); !this.isEOF(); ) {
2778
+ let e7 = this.char();
2779
+ if (e7 === 39) {
2780
+ if (this.peek() === 39) t2.push(39), this.bump();
2781
+ else {
2782
+ this.bump();
2783
+ break;
2784
+ }
2785
+ } else t2.push(e7);
2786
+ this.bump();
2787
+ }
2788
+ return String.fromCodePoint(...t2);
2789
+ }
2790
+ tryParseUnquoted(e6, t2) {
2791
+ if (this.isEOF()) return null;
2792
+ let n2 = this.char();
2793
+ return n2 === 60 || n2 === 123 || n2 === 35 && (t2 === `plural` || t2 === `selectordinal`) || n2 === 125 && e6 > 0 ? null : (this.bump(), String.fromCodePoint(n2));
2794
+ }
2795
+ parseArgument(e6, t2) {
2796
+ let n2 = this.clonePosition();
2797
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, U(n2, this.clonePosition()));
2798
+ if (this.char() === 125) return this.bump(), this.error(2, U(n2, this.clonePosition()));
2799
+ let r2 = this.parseIdentifierIfPossible().value;
2800
+ if (!r2) return this.error(3, U(n2, this.clonePosition()));
2801
+ if (this.bumpSpace(), this.isEOF()) return this.error(1, U(n2, this.clonePosition()));
2802
+ switch (this.char()) {
2803
+ case 125:
2804
+ return this.bump(), { val: { type: 1, value: r2, location: U(n2, this.clonePosition()) }, err: null };
2805
+ case 44:
2806
+ return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, U(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
2807
+ default:
2808
+ return this.error(3, U(n2, this.clonePosition()));
2809
+ }
2810
+ }
2811
+ parseIdentifierIfPossible() {
2812
+ let e6 = this.clonePosition(), t2 = this.offset(), n2 = ga(this.message, t2), r2 = t2 + n2.length;
2813
+ return this.bumpTo(r2), { value: n2, location: U(e6, this.clonePosition()) };
2814
+ }
2815
+ parseArgumentOptions(e6, t2, n2, r2) {
2816
+ let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
2817
+ switch (a2) {
2818
+ case ``:
2819
+ return this.error(4, U(i2, o2));
2820
+ case `number`:
2821
+ case `date`:
2822
+ case `time`: {
2823
+ this.bumpSpace();
2824
+ let e7 = null;
2825
+ if (this.bumpIf(`,`)) {
2826
+ this.bumpSpace();
2827
+ let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
2828
+ if (n3.err) return n3;
2829
+ let r3 = ma(n3.val);
2830
+ if (r3.length === 0) return this.error(6, U(this.clonePosition(), this.clonePosition()));
2831
+ e7 = { style: r3, styleLocation: U(t4, this.clonePosition()) };
2832
+ }
2833
+ let t3 = this.tryParseArgumentClose(r2);
2834
+ if (t3.err) return t3;
2835
+ let i3 = U(r2, this.clonePosition());
2836
+ if (e7 && e7.style.startsWith(`::`)) {
2837
+ let t4 = pa(e7.style.slice(2));
2838
+ if (a2 === `number`) {
2839
+ let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
2840
+ return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
2841
+ }
2842
+ {
2843
+ if (t4.length === 0) return this.error(10, i3);
2844
+ let r3 = t4;
2845
+ this.locale && (r3 = aa(t4, this.locale));
2846
+ let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ni(r3) : {} };
2847
+ return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
2848
+ }
2849
+ }
2850
+ return { val: { type: a2 === `number` ? 2 : a2 === `date` ? 3 : 4, value: n2, location: i3, style: e7?.style ?? null }, err: null };
2851
+ }
2852
+ case `plural`:
2853
+ case `selectordinal`:
2854
+ case `select`: {
2855
+ let i3 = this.clonePosition();
2856
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, U(i3, { ...i3 }));
2857
+ this.bumpSpace();
2858
+ let o3 = this.parseIdentifierIfPossible(), s2 = 0;
2859
+ if (a2 !== `select` && o3.value === `offset`) {
2860
+ if (!this.bumpIf(`:`)) return this.error(13, U(this.clonePosition(), this.clonePosition()));
2861
+ this.bumpSpace();
2862
+ let e7 = this.tryParseDecimalInteger(13, 14);
2863
+ if (e7.err) return e7;
2864
+ this.bumpSpace(), o3 = this.parseIdentifierIfPossible(), s2 = e7.val;
2865
+ }
2866
+ let c2 = this.tryParsePluralOrSelectOptions(e6, a2, t2, o3);
2867
+ if (c2.err) return c2;
2868
+ let l2 = this.tryParseArgumentClose(r2);
2869
+ if (l2.err) return l2;
2870
+ let u2 = U(r2, this.clonePosition());
2871
+ return a2 === `select` ? { val: { type: 5, value: n2, options: fa(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: fa(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
2872
+ }
2873
+ default:
2874
+ return this.error(5, U(i2, o2));
2875
+ }
2876
+ }
2877
+ tryParseArgumentClose(e6) {
2878
+ return this.isEOF() || this.char() !== 125 ? this.error(1, U(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
2879
+ }
2880
+ parseSimpleArgStyleIfPossible() {
2881
+ let e6 = 0, t2 = this.clonePosition();
2882
+ for (; !this.isEOF(); ) switch (this.char()) {
2883
+ case 39: {
2884
+ this.bump();
2885
+ let e7 = this.clonePosition();
2886
+ if (!this.bumpUntil(`'`)) return this.error(11, U(e7, this.clonePosition()));
2887
+ this.bump();
2888
+ break;
2889
+ }
2890
+ case 123:
2891
+ e6 += 1, this.bump();
2892
+ break;
2893
+ case 125:
2894
+ if (e6 > 0) --e6;
2895
+ else return { val: this.message.slice(t2.offset, this.offset()), err: null };
2896
+ break;
2897
+ default:
2898
+ this.bump();
2899
+ }
2900
+ return { val: this.message.slice(t2.offset, this.offset()), err: null };
2901
+ }
2902
+ parseNumberSkeletonFromString(e6, t2) {
2903
+ let n2 = [];
2904
+ try {
2905
+ n2 = Fi(e6);
2906
+ } catch {
2907
+ return this.error(7, t2);
2908
+ }
2909
+ return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Gi(n2) : {} }, err: null };
2910
+ }
2911
+ tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
2912
+ let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
2913
+ for (; ; ) {
2914
+ if (s2.length === 0) {
2915
+ let e7 = this.clonePosition();
2916
+ if (t2 !== `select` && this.bumpIf(`=`)) {
2917
+ let t3 = this.tryParseDecimalInteger(16, 19);
2918
+ if (t3.err) return t3;
2919
+ c2 = U(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
2920
+ } else break;
2921
+ }
2922
+ if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
2923
+ s2 === `other` && (i2 = true), this.bumpSpace();
2924
+ let r3 = this.clonePosition();
2925
+ if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, U(this.clonePosition(), this.clonePosition()));
2926
+ let l2 = this.parseMessage(e6 + 1, t2, n2);
2927
+ if (l2.err) return l2;
2928
+ let u2 = this.tryParseArgumentClose(r3);
2929
+ if (u2.err) return u2;
2930
+ a2.push([s2, { value: l2.val, location: U(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
2931
+ }
2932
+ return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, U(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, U(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
2933
+ }
2934
+ tryParseDecimalInteger(e6, t2) {
2935
+ let n2 = 1, r2 = this.clonePosition();
2936
+ this.bumpIf(`+`) || this.bumpIf(`-`) && (n2 = -1);
2937
+ let i2 = false, a2 = 0;
2938
+ for (; !this.isEOF(); ) {
2939
+ let e7 = this.char();
2940
+ if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
2941
+ else break;
2942
+ }
2943
+ let o2 = U(r2, this.clonePosition());
2944
+ return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
2945
+ }
2946
+ offset() {
2947
+ return this.position.offset;
2948
+ }
2949
+ isEOF() {
2950
+ return this.offset() === this.message.length;
2951
+ }
2952
+ clonePosition() {
2953
+ return { offset: this.position.offset, line: this.position.line, column: this.position.column };
2954
+ }
2955
+ char() {
2956
+ let e6 = this.position.offset;
2957
+ if (e6 >= this.message.length) throw Error(`out of bound`);
2958
+ let t2 = this.message.codePointAt(e6);
2959
+ if (t2 === void 0) throw Error(`Offset ${e6} is at invalid UTF-16 code unit boundary`);
2960
+ return t2;
2961
+ }
2962
+ error(e6, t2) {
2963
+ return { val: null, err: { kind: e6, message: this.message, location: t2 } };
2964
+ }
2965
+ bump() {
2966
+ if (this.isEOF()) return;
2967
+ let e6 = this.char();
2968
+ e6 === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += e6 < 65536 ? 1 : 2);
2969
+ }
2970
+ bumpIf(e6) {
2971
+ if (this.message.startsWith(e6, this.offset())) {
2972
+ for (let t2 = 0; t2 < e6.length; t2++) this.bump();
2973
+ return true;
2974
+ }
2975
+ return false;
2976
+ }
2977
+ bumpUntil(e6) {
2978
+ let t2 = this.offset(), n2 = this.message.indexOf(e6, t2);
2979
+ return n2 >= 0 ? (this.bumpTo(n2), true) : (this.bumpTo(this.message.length), false);
2980
+ }
2981
+ bumpTo(e6) {
2982
+ if (this.offset() > e6) throw Error(`targetOffset ${e6} must be greater than or equal to the current offset ${this.offset()}`);
2983
+ for (e6 = Math.min(e6, this.message.length); ; ) {
2984
+ let t2 = this.offset();
2985
+ if (t2 === e6) break;
2986
+ if (t2 > e6) throw Error(`targetOffset ${e6} is at invalid UTF-16 code unit boundary`);
2987
+ if (this.bump(), this.isEOF()) break;
2988
+ }
2989
+ }
2990
+ bumpSpace() {
2991
+ for (; !this.isEOF() && Sa(this.char()); ) this.bump();
2992
+ }
2993
+ peek() {
2994
+ if (this.isEOF()) return null;
2995
+ let e6 = this.char(), t2 = this.offset();
2996
+ return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
2997
+ }
2998
+ };
2999
+ function ya(e6) {
3000
+ return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
3001
+ }
3002
+ function ba(e6) {
3003
+ return ya(e6) || e6 === 47;
3004
+ }
3005
+ function xa(e6) {
3006
+ return e6 === 45 || e6 === 46 || e6 >= 48 && e6 <= 57 || e6 === 95 || e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90 || e6 == 183 || e6 >= 192 && e6 <= 214 || e6 >= 216 && e6 <= 246 || e6 >= 248 && e6 <= 893 || e6 >= 895 && e6 <= 8191 || e6 >= 8204 && e6 <= 8205 || e6 >= 8255 && e6 <= 8256 || e6 >= 8304 && e6 <= 8591 || e6 >= 11264 && e6 <= 12271 || e6 >= 12289 && e6 <= 55295 || e6 >= 63744 && e6 <= 64975 || e6 >= 65008 && e6 <= 65533 || e6 >= 65536 && e6 <= 983039;
3007
+ }
3008
+ function Sa(e6) {
3009
+ return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
3010
+ }
3011
+ function Ca(e6) {
3012
+ e6.forEach((e7) => {
3013
+ if (delete e7.location, Qi(e7) || $i(e7)) for (let t2 in e7.options) delete e7.options[t2].location, Ca(e7.options[t2].value);
3014
+ else Yi(e7) && na(e7.style) || (Xi(e7) || Zi(e7)) && ra(e7.style) ? delete e7.style.location : ta(e7) && Ca(e7.children);
3015
+ });
3016
+ }
3017
+ function wa(e6, t2 = {}) {
3018
+ t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
3019
+ let n2 = new va(e6, t2).parse();
3020
+ if (n2.err) {
3021
+ let e7 = SyntaxError(Ki[n2.err.kind]);
3022
+ throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
3023
+ }
3024
+ return t2?.captureLocation || Ca(n2.val), n2.val;
3025
+ }
3026
+ var Ta = class extends Error {
3027
+ constructor(e6, t2, n2) {
3028
+ super(e6), this.code = t2, this.originalMessage = n2;
3029
+ }
3030
+ toString() {
3031
+ return `[formatjs Error: ${this.code}] ${this.message}`;
3032
+ }
3033
+ };
3034
+ var Ea = class extends Ta {
3035
+ constructor(e6, t2, n2, r2) {
3036
+ super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
3037
+ }
3038
+ };
3039
+ var Da = class extends Ta {
3040
+ constructor(e6, t2, n2) {
3041
+ super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
3042
+ }
3043
+ };
3044
+ var Oa = class extends Ta {
3045
+ constructor(e6, t2) {
3046
+ super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
3047
+ }
3048
+ };
3049
+ function ka(e6) {
3050
+ return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
3051
+ let n2 = e7[e7.length - 1];
3052
+ return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
3053
+ }, []);
3054
+ }
3055
+ function Aa(e6) {
3056
+ return typeof e6 == `function`;
3057
+ }
3058
+ function ja(e6, t2, n2, r2, i2, a2, o2) {
3059
+ if (e6.length === 1 && qi(e6[0])) return [{ type: 0, value: e6[0].value }];
3060
+ let s2 = [];
3061
+ for (let c2 of e6) {
3062
+ if (qi(c2)) {
3063
+ s2.push({ type: 0, value: c2.value });
3064
+ continue;
3065
+ }
3066
+ if (ea(c2)) {
3067
+ typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
3068
+ continue;
3069
+ }
3070
+ let { value: e7 } = c2;
3071
+ if (!(i2 && e7 in i2)) throw new Oa(e7, o2);
3072
+ let l2 = i2[e7];
3073
+ if (Ji(c2)) (!l2 || typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint`) && (l2 = typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint` ? String(l2) : ``), s2.push({ type: typeof l2 == `string` ? 0 : 1, value: l2 });
3074
+ else if (Xi(c2)) {
3075
+ let e8 = typeof c2.style == `string` ? r2.date[c2.style] : ra(c2.style) ? c2.style.parsedOptions : void 0;
3076
+ s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3077
+ } else if (Zi(c2)) {
3078
+ let e8 = typeof c2.style == `string` ? r2.time[c2.style] : ra(c2.style) ? c2.style.parsedOptions : r2.time.medium;
3079
+ s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3080
+ } else if (Yi(c2)) {
3081
+ let e8 = typeof c2.style == `string` ? r2.number[c2.style] : na(c2.style) ? c2.style.parsedOptions : void 0;
3082
+ if (e8 && e8.scale) {
3083
+ let t3 = e8.scale || 1;
3084
+ if (typeof l2 == `bigint`) {
3085
+ if (!Number.isInteger(t3)) throw TypeError(`Cannot apply fractional scale ${t3} to bigint value. Scale must be an integer when formatting bigint.`);
3086
+ l2 *= BigInt(t3);
3087
+ } else l2 *= t3;
3088
+ }
3089
+ s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
3090
+ } else {
3091
+ if (ta(c2)) {
3092
+ let { children: e8, value: l3 } = c2, u2 = i2[l3];
3093
+ if (!Aa(u2)) throw new Da(l3, `function`, o2);
3094
+ let d2 = u2(ja(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
3095
+ Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
3096
+ }
3097
+ if (Qi(c2)) {
3098
+ let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
3099
+ if (!a3) throw new Ea(c2.value, l2, Object.keys(c2.options), o2);
3100
+ s2.push(...ja(a3.value, t2, n2, r2, i2));
3101
+ } else if ($i(c2)) {
3102
+ let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
3103
+ if (!a3) {
3104
+ if (!Intl.PluralRules) throw new Ta(`Intl.PluralRules is not available in this environment.
3105
+ Try polyfilling it using "@formatjs/intl-pluralrules"
3106
+ `, `MISSING_INTL_API`, o2);
3107
+ let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
3108
+ a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
3109
+ }
3110
+ if (!a3) throw new Ea(c2.value, l2, Object.keys(c2.options), o2);
3111
+ let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
3112
+ s2.push(...ja(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
3113
+ }
3114
+ }
3115
+ }
3116
+ return ka(s2);
3117
+ }
3118
+ function Ma(e6, t2) {
3119
+ return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
3120
+ }
3121
+ function Na(e6, t2) {
3122
+ return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Ma(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
3123
+ }
3124
+ function Pa(e6) {
3125
+ return { create() {
3126
+ return { get(t2) {
3127
+ return e6[t2];
3128
+ }, set(t2, n2) {
3129
+ e6[t2] = n2;
3130
+ } };
3131
+ } };
3132
+ }
3133
+ function Fa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
3134
+ return { getNumberFormat: bi((...e7) => new Intl.NumberFormat(...e7), { cache: Pa(e6.number), strategy: ji.variadic }), getDateTimeFormat: bi((...e7) => new Intl.DateTimeFormat(...e7), { cache: Pa(e6.dateTime), strategy: ji.variadic }), getPluralRules: bi((...e7) => new Intl.PluralRules(...e7), { cache: Pa(e6.pluralRules), strategy: ji.variadic }) };
3135
+ }
3136
+ var Ia = class e5 {
3137
+ constructor(t2, n2 = e5.defaultLocale, r2, i2) {
3138
+ if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
3139
+ let t3 = this.formatToParts(e6);
3140
+ if (t3.length === 1) return t3[0].value;
3141
+ let n3 = t3.reduce((e7, t4) => (!e7.length || t4.type !== 0 || typeof e7[e7.length - 1] != `string` ? e7.push(t4.value) : e7[e7.length - 1] += t4.value, e7), []);
3142
+ return n3.length <= 1 ? n3[0] || `` : n3;
3143
+ }, this.formatToParts = (e6) => ja(this.ast, this.locales, this.formatters, this.formats, e6, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n2, this.resolvedLocale = e5.resolveLocale(n2), typeof t2 == `string`) {
3144
+ if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3145
+ let { ...n3 } = i2 || {};
3146
+ this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
3147
+ } else this.ast = t2;
3148
+ if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
3149
+ this.formats = Na(e5.formats, r2), this.formatters = i2 && i2.formatters || Fa(this.formatterCache);
3150
+ }
3151
+ static {
3152
+ this.memoizedDefaultLocale = null;
3153
+ }
3154
+ static get defaultLocale() {
3155
+ return e5.memoizedDefaultLocale ||= new Intl.NumberFormat().resolvedOptions().locale, e5.memoizedDefaultLocale;
3156
+ }
3157
+ static {
3158
+ this.resolveLocale = (e6) => {
3159
+ if (Intl.Locale === void 0) return;
3160
+ let t2 = Intl.NumberFormat.supportedLocalesOf(e6);
3161
+ return t2.length > 0 ? new Intl.Locale(t2[0]) : new Intl.Locale(typeof e6 == `string` ? e6 : e6[0]);
3162
+ };
3163
+ }
3164
+ static {
3165
+ this.__parse = wa;
3166
+ }
3167
+ static {
3168
+ this.formats = { number: { integer: { maximumFractionDigits: 0 }, currency: { style: `currency` }, percent: { style: `percent` } }, date: { short: { month: `numeric`, day: `numeric`, year: `2-digit` }, medium: { month: `short`, day: `numeric`, year: `numeric` }, long: { month: `long`, day: `numeric`, year: `numeric` }, full: { weekday: `long`, month: `long`, day: `numeric`, year: `numeric` } }, time: { short: { hour: `numeric`, minute: `numeric` }, medium: { hour: `numeric`, minute: `numeric`, second: `numeric` }, long: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` }, full: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` } } };
3169
+ }
3170
+ };
3171
+ function La(e6, t2) {
3172
+ return Ha(e6) || Va(e6, t2) || za(e6, t2) || Ra();
3173
+ }
3174
+ function Ra() {
3175
+ throw TypeError(`Invalid attempt to destructure non-iterable instance.
3176
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3177
+ }
3178
+ function za(e6, t2) {
3179
+ if (e6) {
3180
+ if (typeof e6 == `string`) return Ba(e6, t2);
3181
+ var n2 = {}.toString.call(e6).slice(8, -1);
3182
+ return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? Ba(e6, t2) : void 0;
3183
+ }
3184
+ }
3185
+ function Ba(e6, t2) {
3186
+ (t2 == null || t2 > e6.length) && (t2 = e6.length);
3187
+ for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
3188
+ return r2;
3189
+ }
3190
+ function Va(e6, t2) {
3191
+ var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
3192
+ if (n2 != null) {
3193
+ var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
3194
+ try {
3195
+ if (a2 = (n2 = n2.call(e6)).next, t2 === 0) {
3196
+ if (Object(n2) !== n2) return;
3197
+ c2 = false;
3198
+ } else for (; !(c2 = (r2 = a2.call(n2)).done) && (s2.push(r2.value), s2.length !== t2); c2 = true) ;
3199
+ } catch (e7) {
3200
+ l2 = true, i2 = e7;
3201
+ } finally {
3202
+ try {
3203
+ if (!c2 && n2.return != null && (o2 = n2.return(), Object(o2) !== o2)) return;
3204
+ } finally {
3205
+ if (l2) throw i2;
3206
+ }
3207
+ }
3208
+ return s2;
3209
+ }
3210
+ }
3211
+ function Ha(e6) {
3212
+ if (Array.isArray(e6)) return e6;
3213
+ }
3214
+ function W(e6) {
3215
+ "@babel/helpers - typeof";
3216
+ return W = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
3217
+ return typeof e7;
3218
+ } : function(e7) {
3219
+ return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
3220
+ }, W(e6);
3221
+ }
3222
+ function Ua(e6, t2) {
3223
+ var n2 = Object.keys(e6);
3224
+ if (Object.getOwnPropertySymbols) {
3225
+ var r2 = Object.getOwnPropertySymbols(e6);
3226
+ t2 && (r2 = r2.filter(function(t3) {
3227
+ return Object.getOwnPropertyDescriptor(e6, t3).enumerable;
3228
+ })), n2.push.apply(n2, r2);
3229
+ }
3230
+ return n2;
3231
+ }
3232
+ function Wa(e6) {
3233
+ for (var t2 = 1; t2 < arguments.length; t2++) {
3234
+ var n2 = arguments[t2] == null ? {} : arguments[t2];
3235
+ t2 % 2 ? Ua(Object(n2), true).forEach(function(t3) {
3236
+ Ga(e6, t3, n2[t3]);
3237
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : Ua(Object(n2)).forEach(function(t3) {
3238
+ Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
3239
+ });
3240
+ }
3241
+ return e6;
3242
+ }
3243
+ function Ga(e6, t2, n2) {
3244
+ return (t2 = Ya(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
3245
+ }
3246
+ function Ka(e6, t2) {
3247
+ if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
3248
+ }
3249
+ function qa(e6, t2) {
3250
+ for (var n2 = 0; n2 < t2.length; n2++) {
3251
+ var r2 = t2[n2];
3252
+ r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, Ya(r2.key), r2);
3253
+ }
3254
+ }
3255
+ function Ja(e6, t2, n2) {
3256
+ return t2 && qa(e6.prototype, t2), n2 && qa(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
3257
+ }
3258
+ function Ya(e6) {
3259
+ var t2 = Xa(e6, `string`);
3260
+ return W(t2) == `symbol` ? t2 : t2 + ``;
3261
+ }
3262
+ function Xa(e6, t2) {
3263
+ if (W(e6) != `object` || !e6) return e6;
3264
+ var n2 = e6[Symbol.toPrimitive];
3265
+ if (n2 !== void 0) {
3266
+ var r2 = n2.call(e6, t2 || `default`);
3267
+ if (W(r2) != `object`) return r2;
3268
+ throw TypeError(`@@toPrimitive must return a primitive value.`);
3269
+ }
3270
+ return (t2 === `string` ? String : Number)(e6);
3271
+ }
3272
+ function Za() {
3273
+ return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
3274
+ return n2;
3275
+ }, parseLngForICU: function(e6) {
3276
+ return e6;
3277
+ }, escapeVariables: false };
3278
+ }
3279
+ var Qa = function() {
3280
+ function e6(t2) {
3281
+ Ka(this, e6), this.type = `i18nFormat`, this.mem = {}, this.init(null, t2);
3282
+ }
3283
+ return Ja(e6, [{ key: `init`, value: function(e7, t2) {
3284
+ var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
3285
+ if (this.options = yi(r2, t2, this.options || {}, Za()), this.formats = this.options.formats, e7) {
3286
+ var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
3287
+ e7.IntlMessageFormat = Ia, e7.ICU = this, s2 && (a2 && e7.on(a2, function() {
3288
+ return n2.clearCache();
3289
+ }), o2 && e7.store.on(o2, function() {
3290
+ return n2.clearCache();
3291
+ }));
3292
+ }
3293
+ } }, { key: `addUserDefinedFormats`, value: function(e7) {
3294
+ this.formats = this.formats ? Wa(Wa({}, this.formats), e7) : e7;
3295
+ } }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
3296
+ var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && `${n2}.${r2}.${i2.replace(/\./g, `###`)}`, c2;
3297
+ this.options.memoize && (c2 = hi(this.mem, s2));
3298
+ try {
3299
+ return c2 || (c2 = new Ia(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && mi(this.mem, s2, c2)), c2.format(this.escapeVariableValues(t2));
3300
+ } catch (n3) {
3301
+ return this.options.parseErrorHandler(n3, i2, e7, t2);
3302
+ }
3303
+ } }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
3304
+ return e7;
3305
+ } }, { key: `clearCache`, value: function() {
3306
+ this.mem = {};
3307
+ } }, { key: `escapeVariableValues`, value: function(e7) {
3308
+ if (!this.options.escapeVariables || !e7 || W(e7) !== `object`) return e7;
3309
+ for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
3310
+ var i2 = La(r2[n2], 2), a2 = i2[0], o2 = i2[1];
3311
+ t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`) : o2;
3312
+ }
3313
+ return t2;
3314
+ } }]), e6;
3315
+ }();
3316
+ Qa.type = `i18nFormat`;
3317
+ function $a({ icuOptions: e6 = {}, ...t2 }) {
3318
+ let { parseErrorHandler: n2 = void 0 } = t2;
3319
+ return di(t2, { icu: new Qa({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
3320
+ }
3321
+ var eo = (e6, t2, n2, r2) => {
3322
+ let i2 = [n2, { code: t2, ...r2 || {} }];
3323
+ if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
3324
+ G(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
3325
+ };
3326
+ var to = {};
3327
+ var no = (e6, t2, n2, r2) => {
3328
+ G(n2) && to[n2] || (G(n2) && (to[n2] = /* @__PURE__ */ new Date()), eo(e6, t2, n2, r2));
3329
+ };
3330
+ var ro = (e6, t2) => () => {
3331
+ if (e6.isInitialized) t2();
3332
+ else {
3333
+ let n2 = () => {
3334
+ setTimeout(() => {
3335
+ e6.off(`initialized`, n2);
3336
+ }, 0), t2();
3337
+ };
3338
+ e6.on(`initialized`, n2);
3339
+ }
3340
+ };
3341
+ var io = (e6, t2, n2) => {
3342
+ e6.loadNamespaces(t2, ro(e6, n2));
3343
+ };
3344
+ var ao = (e6, t2, n2, r2) => {
3345
+ if (G(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return io(e6, n2, r2);
3346
+ n2.forEach((t3) => {
3347
+ e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
3348
+ }), e6.loadLanguages(t2, ro(e6, r2));
3349
+ };
3350
+ var oo = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (no(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
3351
+ if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
3352
+ } });
3353
+ var G = (e6) => typeof e6 == `string`;
3354
+ var so = (e6) => typeof e6 == `object` && !!e6;
3355
+ var co = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
3356
+ var lo = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
3357
+ var uo = (e6) => lo[e6];
3358
+ var fo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(co, uo) };
3359
+ var po = () => fo;
3360
+ var mo;
3361
+ var ho = () => mo;
3362
+ var go = (0, import_react.createContext)();
3363
+ var _o = class {
3364
+ constructor() {
3365
+ this.usedNamespaces = {};
3366
+ }
3367
+ addUsedNamespaces(e6) {
3368
+ e6.forEach((e7) => {
3369
+ this.usedNamespaces[e7] || (this.usedNamespaces[e7] = true);
3370
+ });
3371
+ }
3372
+ getUsedNamespaces() {
3373
+ return Object.keys(this.usedNamespaces);
3374
+ }
3375
+ };
3376
+ var vo = (e6, t2) => {
3377
+ let n2 = (0, import_react.useRef)();
3378
+ return (0, import_react.useEffect)(() => {
3379
+ n2.current = t2 ? n2.current : e6;
3380
+ }, [e6, t2]), n2.current;
3381
+ };
3382
+ var yo = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
3383
+ var bo = (e6, t2, n2, r2) => (0, import_react.useCallback)(yo(e6, t2, n2, r2), [e6, t2, n2, r2]);
3384
+ var xo = (e6, t2 = {}) => {
3385
+ let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(go) || {}, a2 = n2 || r2 || ho();
3386
+ if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new _o()), !a2) {
3387
+ no(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
3388
+ let e7 = (e8, t4) => G(t4) ? t4 : so(t4) && G(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
3389
+ return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
3390
+ }
3391
+ a2.options.react?.wait && no(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
3392
+ let c2 = { ...po(), ...a2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = c2, p2 = e6 || i2 || a2.options?.defaultNS;
3393
+ p2 = G(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
3394
+ let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => oo(e7, a2, c2)), h2 = bo(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => yo(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = (0, import_react.useState)(g2), b2 = p2.join();
3395
+ t2.lng && (b2 = `${t2.lng}${b2}`);
3396
+ let x2 = vo(b2), S2 = (0, import_react.useRef)(true);
3397
+ (0, import_react.useEffect)(() => {
3398
+ let { bindI18n: e7, bindI18nStore: n3 } = c2;
3399
+ S2.current = true, !m2 && !d2 && (t2.lng ? ao(a2, t2.lng, p2, () => {
3400
+ S2.current && y2(_2);
3401
+ }) : io(a2, p2, () => {
3402
+ S2.current && y2(_2);
3403
+ })), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
3404
+ let r3 = () => {
3405
+ S2.current && y2(_2);
3406
+ };
3407
+ return e7 && a2?.on(e7, r3), n3 && a2?.store.on(n3, r3), () => {
3408
+ S2.current = false, a2 && e7 && e7?.split(` `).forEach((e8) => a2.off(e8, r3)), n3 && a2 && n3.split(` `).forEach((e8) => a2.store.off(e8, r3));
3409
+ };
3410
+ }, [a2, b2]), (0, import_react.useEffect)(() => {
3411
+ S2.current && m2 && y2(g2);
3412
+ }, [a2, f2, m2]);
3413
+ let C2 = [v2, a2, m2];
3414
+ if (C2.t = v2, C2.i18n = a2, C2.ready = m2, m2 || !m2 && !d2) return C2;
3415
+ throw new Promise((e7) => {
3416
+ t2.lng ? ao(a2, t2.lng, p2, () => e7()) : io(a2, p2, () => e7());
3417
+ });
3418
+ };
3419
+ function So({ i18n: e6, defaultNS: t2, children: n2 }) {
3420
+ let i2 = (0, import_react.useMemo)(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
3421
+ return (0, import_react.createElement)(go.Provider, { value: i2 }, n2);
3422
+ }
3423
+ var Co = `wix-warmup-data`;
3424
+ var wo = null;
3425
+ function To(e6) {
3426
+ if (typeof document < `u`) try {
3427
+ let t2 = document.getElementById(Co)?.textContent;
3428
+ return t2 ? (wo?.text !== t2 && (wo = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), wo.data[e6] ?? void 0) : void 0;
3429
+ } catch {
3430
+ return;
3431
+ }
3432
+ }
3433
+ var Eo = 5e3;
3434
+ var Do = 100;
3435
+ var Oo = {};
3436
+ var ko = /* @__PURE__ */ new WeakMap();
3437
+ var Ao = (e6) => {
3438
+ let t2 = e6.scope ?? Oo, n2 = ko.get(t2);
3439
+ return n2 || (n2 = /* @__PURE__ */ new Map(), ko.set(t2, n2)), n2;
3440
+ };
3441
+ function jo({ key: e6, warmupData: t2, fetchData: n2 }) {
3442
+ if (e6 === null) return n2();
3443
+ if (t2.isServer) return n2().then((n3) => (t2.set(e6, n3), n3));
3444
+ let r2 = Ao(t2), i2 = Date.now();
3445
+ for (let [e7, t3] of r2) t3.expiresAt <= i2 && r2.delete(e7);
3446
+ let a2 = r2.get(e6);
3447
+ if (a2) return a2.promise;
3448
+ let o2 = To(e6);
3449
+ if (o2 !== void 0) {
3450
+ let t3 = Rn(o2);
3451
+ return r2.set(e6, { promise: t3, expiresAt: i2 + Eo }), t3;
3452
+ }
3453
+ let s2 = (async () => await t2.get(e6) ?? n2())();
3454
+ r2.size >= Do && r2.delete(r2.keys().next().value);
3455
+ let c2 = { promise: s2, expiresAt: 1 / 0 };
3456
+ return r2.set(e6, c2), s2.then(() => {
3457
+ c2.expiresAt = Date.now() + Eo;
3458
+ }, () => {
3459
+ r2.get(e6) === c2 && r2.delete(e6);
3460
+ }), s2;
3461
+ }
3462
+ var Mo = `blog-builder:i18n`;
3463
+ var No = `translation`;
3464
+ var Po = () => To(Mo);
3465
+ var Fo = /* @__PURE__ */ new Map();
3466
+ function Io(e6, t2) {
3467
+ let n2 = Fo.get(e6);
3468
+ if (n2) return n2;
3469
+ let r2 = Po(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = $a({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
3470
+ return Fo.set(e6, a2), a2;
3471
+ }
3472
+ function Lo(e6) {
3473
+ let t2 = () => e6.loadNamespaces(No).then(() => void 0, () => void 0);
3474
+ return e6.isInitialized ? t2() : new Promise((n2) => {
3475
+ e6.on(`initialized`, () => void t2().then(n2));
3476
+ });
3477
+ }
3478
+ function Ro(e6, t2) {
3479
+ return e6.getResourceBundle(t2, `translation`) ?? e6.getResourceBundle(`en`, `translation`);
3480
+ }
3481
+ var zo = (e6, t2, n2) => {
3482
+ let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
3483
+ return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
3484
+ (typeof queueMicrotask == `function` ? queueMicrotask : setTimeout)(r3.bind(null, Error(`Unknown variable dynamic import: ` + t2 + (t2.split(`/`).length === n2 ? `` : `. Note that variables only represent file names one level deep.`))));
3485
+ });
3486
+ };
3487
+ var Bo = (e6) => e6.split(`-`)[0] ?? e6;
3488
+ br({ isDev: false, loadMessages: (e6) => zo(Object.assign({ "../assets/locale/messages_en.dev.json": () => gn(() => Promise.resolve().then(() => Go), void 0, import_meta.url), "../assets/locale/messages_en.json": () => gn(() => Promise.resolve().then(() => qo), void 0, import_meta.url) }), `../assets/locale/messages_${Bo(e6)}.json`, 4), loadDevMessages: (e6) => zo(Object.assign({ "../assets/locale/messages_en.dev.json": () => gn(() => Promise.resolve().then(() => Go), void 0, import_meta.url) }), `../assets/locale/messages_${Bo(e6)}.dev.json`, 4) });
3489
+ var Vo = /* @__PURE__ */ new WeakMap();
3490
+ function Ho(e6) {
3491
+ let t2 = Vo.get(e6);
3492
+ return t2 || (t2 = Lo(e6).finally(() => Vo.delete(e6)), Vo.set(e6, t2)), t2;
3493
+ }
3494
+ function Uo({ i18n: e6, locale: t2 }) {
3495
+ let n2 = Gn(), r2 = _r();
3496
+ if (!n2) return null;
3497
+ if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Ho(e6);
3498
+ let i2 = Ro(e6, t2);
3499
+ return i2 && r2.set(Mo, { locale: t2, messages: i2 }), null;
3500
+ }
3501
+ function Wo(e6) {
3502
+ let t2 = mr(), n2 = Po()?.locale ?? t2 ?? `en`;
3503
+ return { i18n: Io(n2, e6), locale: n2 };
3504
+ }
3505
+ var Go = g({ default: () => Ko });
3506
+ var Ko = { "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "post-list.empty-state.title": `No posts yet`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "related-posts.empty-state.title": `No related posts yet`, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "post-actions.like": `Like post`, "post-actions.unlike": `Unlike post`, "post-actions.share": `Share post`, "post-actions.share-dialog": `Share post`, "post-actions.link-copied": `Link copied`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.link-label": `Post link`, "post-actions.copy-link": `Copy link`, "post-actions.close": `Close`, "post-counters.loading-likes": `Loading likes`, "cover-media.play": `Play video`, "cover-media.placeholder-alt": `Post cover image`, "post-comments.loading": `Loading comments\u2026`, "post-comments.no-post": `No post resolved for this URL yet.`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, "canvas.post-title": `Post Title`, "canvas.author-name": `Author Name`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "canvas.category": `Category`, "canvas.category-numbered": `Category {number}`, "canvas.tag-numbered": `Tag {number}`, "canvas.author-photo-alt": `Author photo`, "category-header.all-posts": `All Posts` };
3507
+ var qo = g({ default: () => Yo, title: () => Jo });
3508
+ var Jo = `My App`;
3509
+ var Yo = { "canvas.category": `Category`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "canvas.tag-numbered": `Tag {number}`, "cover-media.play": `Play video`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-counters.loading-likes": `Loading likes`, "post-comments.loading": `Loading comments\u2026`, "post-actions.like": `Like post`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "related-posts.empty-state.title": `No related posts yet`, "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post-actions.link-copied": `Link copied`, "category-header.all-posts": `All Posts`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.copy-link": `Copy link`, "cover-media.placeholder-alt": `Post cover image`, "post-actions.link-label": `Post link`, "post-list.empty-state.title": `No posts yet`, "post-actions.share-dialog": `Share post`, "canvas.post-title": `Post Title`, "post-actions.unlike": `Unlike post`, "post-comments.no-post": `No post resolved for this URL yet.`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "canvas.category-numbered": `Category {number}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post-actions.share": `Share post`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post-actions.close": `Close`, "canvas.category-description": `Add a short description of this category so readers know what they will find here. It shows under the category title, above the posts.`, "canvas.author-photo-alt": `Author photo`, "canvas.author-name": `Author Name`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, title: Jo, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.` };
3510
+ var Xo = Object.assign({ "../assets/locale/messages_en.dev.json": Go, "../assets/locale/messages_en.json": qo });
3511
+ var Zo = (e6, t2) => {
3512
+ let n2 = Xo[`../assets/locale/messages_${Bo(e6)}${t2}.json`];
3513
+ return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
3514
+ };
3515
+ var Qo = br({ isDev: false, loadMessages: (e6) => Zo(e6, ``), loadDevMessages: (e6) => Zo(e6, `.dev`) });
3516
+ var $o = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
3517
+ var K = { timeToRead: `post.time-to-read`, viewCount: `post.view-count`, commentCount: `post.comment-count`, likeCount: `post.like-count`, noPostsTitle: `post-list.empty-state.title`, noPostsDescription: `post-list.empty-state.description`, noRelatedPostsTitle: `related-posts.empty-state.title`, noRelatedPostsDescription: `related-posts.empty-state.description`, canvasPostTitle: `canvas.post-title`, canvasAuthorName: `canvas.author-name`, canvasExcerpt: `canvas.excerpt`, canvasContent: `canvas.content`, canvasCategory: `canvas.category`, canvasCategoryNumbered: `canvas.category-numbered`, canvasTagNumbered: `canvas.tag-numbered`, canvasCoverAlt: `cover-media.placeholder-alt`, canvasAuthorPhotoAlt: `canvas.author-photo-alt` };
3518
+ var es = (e6, t2) => {
3519
+ let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: $o(r2, `full`, t2) });
3520
+ return { timeToRead: (t3) => e6(K.timeToRead, { count: t3 }), viewCount: n2(K.viewCount), commentCount: n2(K.commentCount), likeCount: n2(K.likeCount), noPostsEmptyState: () => ({ title: e6(K.noPostsTitle), description: e6(K.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(K.noRelatedPostsTitle), description: e6(K.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(K.canvasPostTitle), authorName: () => e6(K.canvasAuthorName), excerpt: () => e6(K.canvasExcerpt), content: () => e6(K.canvasContent), category: () => e6(K.canvasCategory), categoryNumbered: (t3) => e6(K.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(K.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(K.canvasCoverAlt), authorPhotoAlt: () => e6(K.canvasAuthorPhotoAlt) } };
3521
+ };
3522
+ function ts(e6) {
3523
+ return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
3524
+ }
3525
+ function ns(e6) {
3526
+ return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
3527
+ }
3528
+ function rs(e6) {
3529
+ return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
3530
+ }
3531
+ function q(e6, t2) {
3532
+ return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...ts(e6) ? e6.$and : [e6], ...ts(t2) ? t2.$and : [t2]] };
3533
+ }
3534
+ function is(e6, t2) {
3535
+ return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...ns(e6) ? e6.$or : [e6], ...ns(t2) ? t2.$or : [t2]] };
3536
+ }
3537
+ function as(e6) {
3538
+ if (e6 !== void 0 && Object.keys(e6).length !== 0) return rs(e6) ? e6.$not : { $not: e6 };
3539
+ }
3540
+ var os = class {
3541
+ _items;
3542
+ _fetchNextPage;
3543
+ _fetchPrevPage;
3544
+ _originQuery;
3545
+ _limit;
3546
+ constructor({ items: e6, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
3547
+ this._items = e6, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
3548
+ }
3549
+ get items() {
3550
+ return this._items;
3551
+ }
3552
+ get length() {
3553
+ return this._items.length;
3554
+ }
3555
+ get pageSize() {
3556
+ return this._limit;
3557
+ }
3558
+ get query() {
3559
+ return this._originQuery;
3560
+ }
3561
+ async next() {
3562
+ if (!this.hasNext()) throw Error(`No next page to fetch`);
3563
+ return await this._fetchNextPage();
3564
+ }
3565
+ async prev() {
3566
+ if (!this.hasPrev()) throw Error(`No previous page to fetch`);
3567
+ return await this._fetchPrevPage();
3568
+ }
3569
+ };
3570
+ var ss = class extends os {
3571
+ _nextCursor;
3572
+ _prevCursor;
3573
+ cursors;
3574
+ constructor({ items: e6, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
3575
+ super({ items: e6, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
3576
+ }
3577
+ hasNext() {
3578
+ return !!this._nextCursor;
3579
+ }
3580
+ hasPrev() {
3581
+ return !!this._prevCursor;
3582
+ }
3583
+ };
3584
+ var cs = class extends os {
3585
+ _totalCount;
3586
+ _offset;
3587
+ _tooManyToCount;
3588
+ constructor({ items: e6, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
3589
+ super({ items: e6, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
3590
+ }
3591
+ get currentPage() {
3592
+ return this._limit === 0 ? void 0 : Math.floor(this._offset / this._limit);
3593
+ }
3594
+ get totalPages() {
3595
+ return this._tooManyToCount || this._limit === 0 ? void 0 : Math.ceil(this._totalCount / this._limit);
3596
+ }
3597
+ get totalCount() {
3598
+ return this._tooManyToCount ? void 0 : this._totalCount;
3599
+ }
3600
+ hasNext() {
3601
+ return this._limit !== 0 && this.currentPage !== void 0 && this.totalPages !== void 0 && this.currentPage < this.totalPages - 1;
3602
+ }
3603
+ hasPrev() {
3604
+ return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
3605
+ }
3606
+ };
3607
+ function ls(e6) {
3608
+ let t2 = (n2) => ({ query: n2, async find() {
3609
+ try {
3610
+ let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Xe]: a2, [Ze]: o2 } = e6.responseTransformer(i2);
3611
+ if (e6.pagingMethod === `OFFSET`) {
3612
+ let e7 = n2;
3613
+ return new cs({ items: a2 ?? [], fetchNextPage: () => t2({ ...e7, paging: { offset: e7.paging.offset + e7.paging.limit, limit: e7.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e7.paging.offset - e7.paging.limit, 0), limit: e7.paging.limit } }).find(), offset: e7.paging.offset, limit: e7.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
3614
+ }
3615
+ let s2 = n2.cursorPaging;
3616
+ return new ss({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
3617
+ } catch (t3) {
3618
+ throw e6.errorTransformer(t3);
3619
+ }
3620
+ }, skipTo(e7) {
3621
+ return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
3622
+ }, eq(r2, i2) {
3623
+ let a2 = i2 === void 0 ? null : i2, o2 = { [J(e6.transformationPaths, r2)]: a2 };
3624
+ return t2({ ...n2, filter: q(n2.filter, o2) });
3625
+ }, ne(r2, i2) {
3626
+ let a2 = i2 === void 0 ? null : i2, o2 = { [J(e6.transformationPaths, r2)]: { $ne: a2 } };
3627
+ return t2({ ...n2, filter: q(n2.filter, o2) });
3628
+ }, ge(r2, i2) {
3629
+ let a2 = { [J(e6.transformationPaths, r2)]: { $gte: i2 } };
3630
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3631
+ }, gt(r2, i2) {
3632
+ let a2 = { [J(e6.transformationPaths, r2)]: { $gt: i2 } };
3633
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3634
+ }, le(r2, i2) {
3635
+ let a2 = { [J(e6.transformationPaths, r2)]: { $lte: i2 } };
3636
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3637
+ }, lt(r2, i2) {
3638
+ let a2 = { [J(e6.transformationPaths, r2)]: { $lt: i2 } };
3639
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3640
+ }, isNotEmpty(e7) {
3641
+ return this.ne(e7, null);
3642
+ }, isEmpty(e7) {
3643
+ return this.eq(e7, null);
3644
+ }, startsWith(r2, i2) {
3645
+ let a2 = { [J(e6.transformationPaths, r2)]: { $startsWith: i2 } };
3646
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3647
+ }, endsWith(r2, i2) {
3648
+ let a2 = { [J(e6.transformationPaths, r2)]: { $endsWith: i2 } };
3649
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3650
+ }, contains(r2, i2) {
3651
+ let a2 = { [J(e6.transformationPaths, r2)]: { $contains: i2 } };
3652
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3653
+ }, hasSome(r2, ...i2) {
3654
+ let a2 = { [J(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
3655
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3656
+ }, hasAll(r2, ...i2) {
3657
+ let a2 = { [J(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
3658
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3659
+ }, between(e7, t3, n3) {
3660
+ return this.ge(e7, t3).lt(e7, n3);
3661
+ }, in(r2, i2) {
3662
+ let a2 = { [J(e6.transformationPaths, r2)]: { $in: i2 } };
3663
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3664
+ }, exists(r2, i2 = true) {
3665
+ let a2 = { [J(e6.transformationPaths, r2)]: { $exists: i2 } };
3666
+ return t2({ ...n2, filter: q(n2.filter, a2) });
3667
+ }, or(e7) {
3668
+ return t2({ ...n2, filter: is(n2.filter, e7.query.filter) });
3669
+ }, and(e7) {
3670
+ return t2({ ...n2, filter: q(n2.filter, e7.query.filter) });
3671
+ }, not(e7) {
3672
+ return t2({ ...n2, filter: as(e7.query.filter) });
3673
+ }, ascending(...r2) {
3674
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: J(e6.transformationPaths, t3), order: `ASC` }))] });
3675
+ }, descending(...r2) {
3676
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: J(e6.transformationPaths, t3), order: `DESC` }))] });
3677
+ }, skip(e7) {
3678
+ return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
3679
+ }, limit(r2) {
3680
+ if (e6.pagingMethod === `CURSOR`) {
3681
+ let e7 = n2;
3682
+ return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e7.cursorPaging ? e7.cursorPaging.cursor : void 0 } });
3683
+ }
3684
+ let i2 = n2;
3685
+ return t2({ ...n2, paging: { limit: r2, offset: `offset` in i2.paging ? i2.paging.offset : 0 } });
3686
+ } });
3687
+ return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
3688
+ }
3689
+ function J(e6, t2) {
3690
+ let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
3691
+ return n2 ? t2.replace(n2, e6[n2]) : $e(t2, { ...e6, ...Qe });
3692
+ }
3693
+ var us = `filter`;
3694
+ var ds = `sort`;
3695
+ var fs = `cursorPaging`;
3696
+ var ps = `paging`;
3697
+ var ms = [us, ds, fs];
3698
+ var hs = [us, ds, ps];
3699
+ function gs(e6, t2) {
3700
+ return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
3701
+ }
3702
+ function _s(e6) {
3703
+ return gs(e6, ms);
3704
+ }
3705
+ function vs(e6) {
3706
+ return gs(e6, hs);
3707
+ }
3708
+ function ys(e6) {
3709
+ let { hasOptionsParameter: t2 } = e6;
3710
+ return function(...n2) {
3711
+ return t2 ? xs(n2, e6) : bs(n2, e6);
3712
+ };
3713
+ }
3714
+ function bs(e6, t2) {
3715
+ return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
3716
+ }
3717
+ function xs(e6, t2) {
3718
+ switch (e6.length) {
3719
+ case 0:
3720
+ return t2.builderQueryFunction();
3721
+ case 1:
3722
+ return _s(e6[0]) || vs(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
3723
+ default:
3724
+ return t2.typedQueryFunction(e6[0], e6[1]);
3725
+ }
3726
+ }
3727
+ function Y(e6) {
3728
+ if (!e6) return;
3729
+ let t2 = ``;
3730
+ return (e6.filename || e6.altText) && (t2 = `/${encodeURIComponent(e6.filename || e6.altText)}`), e6.id ? `wix:image://v1/${e6.id}${t2}#originWidth=${e6.width}&originHeight=${e6.height}` : e6.url;
3731
+ }
3732
+ function X(e6) {
3733
+ if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
3734
+ }
3735
+ var Ss = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
3736
+ var Cs = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
3737
+ function ws(e6) {
3738
+ return It(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/category`, destPath: `/v3/bulk/category` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/categories`, destPath: `/v3/bulk/categories` }], "*.pub.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], _: [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www.wixapis.com": [{ srcPath: `/blog/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/v3/categories`, destPath: `/v3/categories` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "api._api_base_domain_": [{ srcPath: `/category-service-api-proxy`, destPath: `` }] } }));
3739
+ }
3740
+ var Ts = `@wix/auto_sdk_blog_categories`;
3741
+ function Es(e6) {
3742
+ function t2({ host: t3 }) {
3743
+ return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Ts, migrationOptions: { optInTransformResponse: true }, url: ws({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: Ft(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ss }, { transformFn: N, paths: Cs }]) };
3744
+ }
3745
+ return t2;
3746
+ }
3747
+ var Ds = [{ path: `categories.url` }, { path: `categories.translations.url` }];
3748
+ var Os = [{ path: `categories.coverImage` }];
3749
+ async function ks(e6) {
3750
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Es(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
3751
+ n2?.onSiteCall?.();
3752
+ try {
3753
+ let e7 = await t2.request(r2);
3754
+ return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Ds }, { transformFn: Y, paths: Os }]));
3755
+ } catch (e7) {
3756
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
3757
+ throw n2?.onError?.(e7), t3;
3758
+ }
3759
+ }
3760
+ function As(e6) {
3761
+ return (t2) => ks(t2, { httpClient: e6 });
3762
+ }
3763
+ var js = M(As);
3764
+ function Ms(e6) {
3765
+ if (!e6) return;
3766
+ let t2 = ``;
3767
+ e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
3768
+ let n2 = ``;
3769
+ if (e6.posters?.length) {
3770
+ let [t3, r2] = e6.posters, i2 = r2 || t3, a2 = i2.id || ``;
3771
+ if (!a2 && i2.url) {
3772
+ let e7 = i2.url.lastIndexOf(`/`);
3773
+ e7 !== -1 && (a2 = i2.url.substring(e7 + 1));
3774
+ }
3775
+ a2 && (n2 = `#posterUri=${a2}&posterWidth=${i2.width}&posterHeight=${i2.height}`);
3776
+ }
3777
+ return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
3778
+ }
3779
+ var Ns = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { path: `post.heroImage.urlExpirationDate` }, { path: `post.richContent.metadata.createdTimestamp` }, { path: `post.richContent.metadata.updatedTimestamp` }, { path: `post.moderationDetails.submittedDate` }, { path: `post.moderationDetails.moderationDate` }, { path: `post.media.wixMedia.image.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.posters.urlExpirationDate` }];
3780
+ var Ps = [{ path: `post.richContentCompressed` }];
3781
+ var Fs = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
3782
+ var Is = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
3783
+ var Ls = [{ path: `posts.richContentCompressed` }];
3784
+ var Rs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
3785
+ var zs = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
3786
+ function Bs(e6) {
3787
+ return It(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
3788
+ }
3789
+ var Vs = `@wix/auto_sdk_blog_posts`;
3790
+ function Hs(e6) {
3791
+ function t2({ host: t3 }) {
3792
+ return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName: Vs, migrationOptions: { optInTransformResponse: true }, url: Bs({ protoPath: `/v3/posts/slugs/{slug}`, data: e6, host: t3 }), params: Ft(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ns }, { transformFn: un, paths: Ps }, { transformFn: N, paths: Fs }]) };
3793
+ }
3794
+ return t2;
3795
+ }
3796
+ function Us(e6) {
3797
+ function t2({ host: t3 }) {
3798
+ return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: Vs, migrationOptions: { optInTransformResponse: true }, url: Bs({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: Ft(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Is }, { transformFn: un, paths: Ls }, { transformFn: N, paths: Rs }]) };
3799
+ }
3800
+ return t2;
3801
+ }
3802
+ function Ws(e6) {
3803
+ function t2({ host: t3 }) {
3804
+ let n2 = A(e6, [{ transformFn: ln, paths: zs }]);
3805
+ return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Vs, migrationOptions: { optInTransformResponse: true }, url: Bs({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Is }, { transformFn: un, paths: Ls }, { transformFn: N, paths: Rs }]) };
3806
+ }
3807
+ return t2;
3808
+ }
3809
+ var Gs = [{ path: `post.url` }, { path: `post.translations.url` }];
3810
+ var Ks = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
3811
+ var qs = [{ path: `post.media.wixMedia.videoV2` }];
3812
+ var Js = [{ path: `posts.url` }, { path: `posts.translations.url` }];
3813
+ var Ys = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
3814
+ var Xs = [{ path: `posts.media.wixMedia.videoV2` }];
3815
+ var Z = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.COUNTERS = `COUNTERS`, e6.URL = `URL`, e6.CONTENT_TEXT = `CONTENT_TEXT`, e6.METRICS = `METRICS`, e6.SEO = `SEO`, e6.CONTENT = `CONTENT`, e6.INTERNAL_ID = `INTERNAL_ID`, e6.CONTACT_ID = `CONTACT_ID`, e6.RICH_CONTENT = `RICH_CONTENT`, e6.RICH_CONTENT_STRING = `RICH_CONTENT_STRING`, e6.RICH_CONTENT_COMPRESSED = `RICH_CONTENT_COMPRESSED`, e6.TRANSLATIONS = `TRANSLATIONS`, e6.REFERENCE_ID = `REFERENCE_ID`, e6.EXCLUDE_PAID_CONTENT = `EXCLUDE_PAID_CONTENT`, e6.SEO_DATA = `SEO_DATA`, e6.OWNER = `OWNER`, e6.HAS_UNPUBLISHED_CHANGES = `HAS_UNPUBLISHED_CHANGES`, e6.HEADING = `HEADING`, e6.IMAGE = `IMAGE`, e6))(Z || {});
3816
+ async function Zs(e6, t2) {
3817
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Hs(D({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }, []));
3818
+ r2?.onSiteCall?.();
3819
+ try {
3820
+ let e7 = await n2.request(i2);
3821
+ return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Gs }, { transformFn: Y, paths: Ks }, { transformFn: Ms, paths: qs }]), [`post.richContent`, `post.rich_content`]);
3822
+ } catch (e7) {
3823
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
3824
+ throw r2?.onError?.(e7), t3;
3825
+ }
3826
+ }
3827
+ async function Qs(e6) {
3828
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Us(D({ featured: e6?.featured, hashtags: e6?.hashtags, categoryIds: e6?.categoryIds, tagIds: e6?.tagIds, sort: e6?.sort, paging: e6?.paging, language: e6?.language, memberId: e6?.memberId, fieldsets: e6?.fieldsets }, []));
3829
+ n2?.onSiteCall?.();
3830
+ try {
3831
+ let e7 = await t2.request(r2);
3832
+ return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Js }, { transformFn: Y, paths: Ys }, { transformFn: Ms, paths: Xs }]), [`posts.richContent`, `posts.rich_content`]);
3833
+ } catch (e7) {
3834
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { featured: `$[0].featured`, hashtags: `$[0].hashtags`, categoryIds: `$[0].categoryIds`, tagIds: `$[0].tagIds`, sort: `$[0].sort`, paging: `$[0].paging`, language: `$[0].language`, memberId: `$[0].memberId`, fieldsets: `$[0].fieldsets` }, singleArgumentUnchanged: false }, [`options`]);
3835
+ throw n2?.onError?.(e7), t3;
3836
+ }
3837
+ }
3838
+ function $s(e6) {
3839
+ let { httpClient: t2, sideEffects: n2 } = arguments[1];
3840
+ return ls({ func: async (r2) => {
3841
+ let i2 = Ws({ ...r2, ...e6 ?? {} });
3842
+ n2?.onSiteCall?.();
3843
+ try {
3844
+ let e7 = await t2.request(i2);
3845
+ return n2?.onSuccess?.(e7), e7;
3846
+ } catch (e7) {
3847
+ throw n2?.onError?.(e7), e7;
3848
+ }
3849
+ }, requestTransformer: (t3) => {
3850
+ let n3 = [t3, e6];
3851
+ return D({ ...n3?.[1], query: n3?.[0] }, []);
3852
+ }, responseTransformer: ({ data: e7 }) => {
3853
+ let t3 = O(A(e7, [{ transformFn: X, paths: Js }, { transformFn: Y, paths: Ys }, { transformFn: Ms, paths: Xs }]), [`posts.richContent`, `posts.rich_content`]);
3854
+ return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
3855
+ }, errorTransformer: (e7) => {
3856
+ throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
3857
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
3858
+ }
3859
+ async function ec(e6, t2) {
3860
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ws(D({ query: e6, ...t2 }, []));
3861
+ r2?.onSiteCall?.();
3862
+ try {
3863
+ let e7 = await n2.request(i2);
3864
+ return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Js }, { transformFn: Y, paths: Ys }, { transformFn: Ms, paths: Xs }]), [`posts.richContent`, `posts.rich_content`]);
3865
+ } catch (e7) {
3866
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
3867
+ throw r2?.onError?.(e7), t3;
3868
+ }
3869
+ }
3870
+ function tc(e6) {
3871
+ return (t2, n2) => Zs(t2, n2, { httpClient: e6 });
3872
+ }
3873
+ function nc(e6) {
3874
+ return (t2) => Qs(t2, { httpClient: e6 });
3875
+ }
3876
+ function rc(e6) {
3877
+ return (t2) => $s(t2, { httpClient: e6 });
3878
+ }
3879
+ function ic(e6) {
3880
+ return (t2, n2) => ec(t2, n2, { httpClient: e6 });
3881
+ }
3882
+ function ac(e6) {
3883
+ let t2 = ys({ builderQueryFunction: (t3) => rc(e6)(t3), typedQueryFunction: (t3, n3) => ic(e6)(t3, n3), hasOptionsParameter: true });
3884
+ function n2(e7, n3) {
3885
+ return t2(...arguments);
3886
+ }
3887
+ return n2;
3888
+ }
3889
+ var oc = M(tc);
3890
+ var sc = M(nc);
3891
+ var cc = M(ac);
3892
+ var lc = [{ path: `members.createdDate` }, { path: `members.updatedDate` }, { path: `members.lastLoginDate` }];
3893
+ var uc = [{ path: `query.sorting.origin.latitude` }, { path: `query.sorting.origin.longitude` }];
3894
+ function dc(e6) {
3895
+ return It(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
3896
+ }
3897
+ var fc = `@wix/auto_sdk_members_members`;
3898
+ function pc(e6) {
3899
+ function t2({ host: t3 }) {
3900
+ let n2 = A(e6, [{ transformFn: ln, paths: uc }]);
3901
+ return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: fc, migrationOptions: { optInTransformResponse: true }, url: dc({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: lc }]) };
3902
+ }
3903
+ return t2;
3904
+ }
3905
+ function mc(e6) {
3906
+ let { httpClient: t2, sideEffects: n2 } = arguments[1];
3907
+ return ls({ func: async (r2) => {
3908
+ let i2 = pc({ ...r2, ...e6 ?? {} });
3909
+ n2?.onSiteCall?.();
3910
+ try {
3911
+ let e7 = await t2.request(i2);
3912
+ return n2?.onSuccess?.(e7), e7;
3913
+ } catch (e7) {
3914
+ throw n2?.onError?.(e7), e7;
3915
+ }
3916
+ }, requestTransformer: (t3) => {
3917
+ let n3 = [t3, e6];
3918
+ return D({ ...n3?.[1], query: n3?.[0] });
3919
+ }, responseTransformer: ({ data: e7 }) => {
3920
+ let t3 = O(A(e7, []));
3921
+ return { items: t3?.members, pagingMetadata: t3?.metadata };
3922
+ }, errorTransformer: (e7) => {
3923
+ throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
3924
+ }, pagingMethod: `OFFSET`, transformationPaths: {} });
3925
+ }
3926
+ async function hc(e6, t2) {
3927
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = pc(D({ query: e6, ...t2 }));
3928
+ r2?.onSiteCall?.();
3929
+ try {
3930
+ let e7 = await n2.request(i2);
3931
+ return r2?.onSuccess?.(e7), O(e7.data);
3932
+ } catch (e7) {
3933
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
3934
+ throw r2?.onError?.(e7), t3;
3935
+ }
3936
+ }
3937
+ function gc(e6) {
3938
+ return (t2) => mc(t2, { httpClient: e6 });
3939
+ }
3940
+ function _c(e6) {
3941
+ return (t2, n2) => hc(t2, n2, { httpClient: e6 });
3942
+ }
3943
+ function vc(e6) {
3944
+ let t2 = ys({ builderQueryFunction: (t3) => gc(e6)(t3), typedQueryFunction: (t3, n3) => _c(e6)(t3, n3), hasOptionsParameter: true });
3945
+ function n2(e7, n3) {
3946
+ return t2(...arguments);
3947
+ }
3948
+ return n2;
3949
+ }
3950
+ var yc = M(vc);
3951
+ var bc = async (e6) => {
3952
+ let t2 = [...new Set(e6.filter((e7) => !!e7))];
3953
+ if (t2.length === 0) return {};
3954
+ try {
3955
+ let { items: e7 } = await yc({ fieldsets: [`PUBLIC`] }).in(`_id`, t2).limit(t2.length).find();
3956
+ return Object.fromEntries(e7.flatMap((e8) => {
3957
+ let { _id: t3 } = e8;
3958
+ return t3 ? [[t3, e8]] : [];
3959
+ }));
3960
+ } catch {
3961
+ return {};
3962
+ }
3963
+ };
3964
+ var xc = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
3965
+ var Sc = [{ path: `posts.richContentCompressed` }];
3966
+ var Cc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
3967
+ var wc = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
3968
+ function Tc(e6) {
3969
+ return It(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
3970
+ }
3971
+ var Ec = `@wix/auto_sdk_blog_posts`;
3972
+ function Dc(e6) {
3973
+ function t2({ host: t3 }) {
3974
+ let n2 = A(e6, [{ transformFn: ln, paths: wc }]);
3975
+ return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Ec, migrationOptions: { optInTransformResponse: true }, url: Tc({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: xc }, { transformFn: un, paths: Sc }, { transformFn: N, paths: Cc }]) };
3976
+ }
3977
+ return t2;
3978
+ }
3979
+ function Oc() {
3980
+ let e6 = Dc({});
3981
+ return { getUrl: (t2) => {
3982
+ let { url: n2 } = e6(t2);
3983
+ return n2;
3984
+ }, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
3985
+ }
3986
+ var kc = Oc();
3987
+ var Ac = (e6) => (t2) => ({ method: `POST`, url: kc.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
3988
+ var jc = M((e6) => async (t2) => {
3989
+ let { data: n2 } = await e6.request(Ac(t2)), r2 = {};
3990
+ for (let e7 of n2.posts ?? []) {
3991
+ let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
3992
+ if (!t3 || !n3?.length) continue;
3993
+ let i2 = n3.filter((e8) => e8.url && e8.format === `mp4`).map(({ url: e8, width: t4, height: n4 }) => ({ url: e8, width: t4, height: n4 }));
3994
+ i2.length > 0 && (r2[t3] = i2);
3995
+ }
3996
+ return r2;
3997
+ });
3998
+ var Mc = async (e6) => {
3999
+ if (e6.length === 0) return {};
4000
+ try {
4001
+ return await jc(e6);
4002
+ } catch {
4003
+ return {};
4004
+ }
4005
+ };
4006
+ var Nc = class extends Error {
4007
+ constructor(e6, t2) {
4008
+ super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
4009
+ }
4010
+ };
4011
+ var Pc = (e6, t2, n2) => {
4012
+ let r2, i2 = new Promise((e7, i3) => {
4013
+ r2 = setTimeout(() => i3(new Nc(n2, t2)), t2);
4014
+ });
4015
+ return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
4016
+ };
4017
+ Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT, Z.RICH_CONTENT, Z.URL;
4018
+ var Fc = [Z.URL, Z.METRICS];
4019
+ var Ic = (e6) => {
4020
+ let { status: t2, details: n2 } = e6 ?? {};
4021
+ return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
4022
+ };
4023
+ var Lc = (e6, t2) => {
4024
+ if (t2 && !Ic(e6)) throw e6;
4025
+ };
4026
+ var Rc = (e6) => bc(e6.map(({ memberId: e7 }) => e7));
4027
+ var zc = (e6) => Mc(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
4028
+ var Bc = async (e6, t2, n2 = false, r2) => {
4029
+ try {
4030
+ let { post: n3 } = await oc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
4031
+ if (n3) return n3;
4032
+ } catch (e7) {
4033
+ Lc(e7, n2);
4034
+ }
4035
+ try {
4036
+ let { items: n3 } = await cc(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
4037
+ return n3[0];
4038
+ } catch (e7) {
4039
+ Lc(e7, n2);
4040
+ return;
4041
+ }
4042
+ };
4043
+ var Vc = async (e6, t2 = false, n2) => {
4044
+ try {
4045
+ let t3 = async (t4) => {
4046
+ let { posts: r2 } = await sc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
4047
+ return r2?.[0];
4048
+ };
4049
+ return await t3(true) ?? (n2 ? await t3(false) : void 0);
4050
+ } catch (e7) {
4051
+ Lc(e7, t2);
4052
+ return;
4053
+ }
4054
+ };
4055
+ var Hc = 100;
4056
+ var Uc = async () => {
4057
+ try {
4058
+ let { categories: e6 } = await js({ paging: { limit: Hc } });
4059
+ return e6 ?? [];
4060
+ } catch {
4061
+ return [];
4062
+ }
4063
+ };
4064
+ var Wc = (e6, t2) => {
4065
+ let { categoryIds: n2 } = e6 ?? {};
4066
+ if (!n2?.length) return [];
4067
+ let r2 = new Map(t2.map((e7) => [e7._id, e7]));
4068
+ return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
4069
+ };
4070
+ var Gc = (e6, t2) => {
4071
+ let n2 = {};
4072
+ for (let r2 of e6) for (let { _id: e7, label: i2 } of Wc(r2, t2)) e7 && (n2[e7] = i2 ?? ``);
4073
+ return n2;
4074
+ };
4075
+ var Kc = async (e6, t2) => {
4076
+ let n2 = e6 ? await Bc(e6, void 0, false, t2) : void 0, { _id: r2, categoryIds: i2, relatedPostIds: a2 } = n2 ?? await Vc(void 0, false, t2) ?? {};
4077
+ return { currentPostId: r2 ?? void 0, categoryIds: i2, relatedPostIds: n2 ? a2 : void 0 };
4078
+ };
4079
+ var qc = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
4080
+ let { items: r2 } = await cc({ fieldsets: Fc }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
4081
+ let { _id: t3 } = e7;
4082
+ return [t3, e7];
4083
+ }));
4084
+ return e6.filter((e7) => e7 !== t2).map((e7) => i2.get(e7)).filter((e7) => e7 !== void 0).slice(0, n2);
4085
+ };
4086
+ var Jc = async ({ currentPostId: e6, categoryIds: t2, language: n2, limit: r2 }) => {
4087
+ let i2 = cc({ fieldsets: Fc }).ne(`_id`, e6).descending(`firstPublishedDate`).limit(r2);
4088
+ t2?.length && (i2 = i2.hasSome(`categoryIds`, t2)), n2 && (i2 = i2.eq(`language`, n2));
4089
+ let { items: a2 } = await i2.find();
4090
+ return a2;
4091
+ };
4092
+ var Yc = async ({ slug: e6, language: t2, limit: n2 = 3, propagateErrors: r2 = false, source: i2, sourcePromise: a2 }) => {
4093
+ let o2 = Uc();
4094
+ try {
4095
+ let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await Kc(e6, t2));
4096
+ if (!r3) return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
4097
+ let l2 = c2?.length ? await qc({ ids: c2, currentPostId: r3, limit: n2 }) : [], u2 = l2.length > 0 ? l2 : await Jc({ currentPostId: r3, categoryIds: s2, language: t2, limit: n2 }), [d2, f2, p2] = await Promise.all([Rc(u2), o2, zc(u2)]);
4098
+ return { posts: u2, authorsByMemberId: d2, categoryLabelsById: Gc(u2, f2), videoSourcesByPostId: p2 };
4099
+ } catch (e7) {
4100
+ if (r2) throw e7;
4101
+ return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
4102
+ }
4103
+ };
4104
+ var Xc = (0, import_react.createContext)({ isEditor: false, isPreview: false });
4105
+ var Zc = () => (0, import_react.useContext)(Xc);
4106
+ var Qc = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
4107
+ var $c = () => {
4108
+ try {
4109
+ let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(Wn);
4110
+ return e6 || t2;
4111
+ } catch {
4112
+ return false;
4113
+ }
4114
+ };
4115
+ var el = () => {
4116
+ let e6 = $c();
4117
+ return Qc(Zc()) && !e6;
4118
+ };
4119
+ var tl = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
4120
+ var nl = (e6) => {
4121
+ try {
4122
+ return e6.getMonitoringClient?.() ?? null;
4123
+ } catch {
4124
+ return null;
4125
+ }
4126
+ };
4127
+ var rl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
4128
+ function il(e6, t2, { feature: n2, action: r2, level: i2 = `error`, contexts: a2 }) {
4129
+ let o2 = rl(e6, `captureException`);
4130
+ if (!o2) return;
4131
+ let s2 = t2 instanceof Error ? t2 : Error(String(t2));
4132
+ o2.captureException(s2, { level: i2, tags: { feature: n2, action: r2 }, ...a2 ? { contexts: a2 } : {} });
4133
+ }
4134
+ function al(e6, t2, { feature: n2, tags: r2 }, i2) {
4135
+ let a2 = rl(e6, `startSpanManual`);
4136
+ if (!a2) return i2;
4137
+ let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
4138
+ return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
4139
+ }
4140
+ var ol = class extends import_react.Component {
4141
+ state = { error: void 0 };
4142
+ static getDerivedStateFromError(e6) {
4143
+ return { error: e6 ?? Error(`Unknown render error`) };
4144
+ }
4145
+ componentDidCatch(e6, t2) {
4146
+ il(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
4147
+ }
4148
+ render() {
4149
+ if (this.state.error === void 0) return this.props.children;
4150
+ if (this.props.rethrow) throw this.state.error;
4151
+ return this.props.fallback;
4152
+ }
4153
+ };
4154
+ var sl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
4155
+ var cl = (0, import_react.createContext)(void 0);
4156
+ function ll() {
4157
+ return (0, import_react.useContext)(cl);
4158
+ }
4159
+ var ul = (0, import_react.createContext)(void 0);
4160
+ function dl() {
4161
+ return (0, import_react.useContext)(ul);
4162
+ }
4163
+ var fl = 6e4;
4164
+ var pl = fl * 60;
4165
+ var ml = pl * 24;
4166
+ var hl = ml * 7;
4167
+ var gl = (e6) => e6 < fl ? [`second`, e6 / 1e3] : e6 < pl ? [`minute`, e6 / fl] : e6 < ml ? [`hour`, e6 / pl] : [`day`, e6 / ml];
4168
+ var _l = (e6, t2, n2 = Date.now()) => {
4169
+ let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
4170
+ if (i2 >= 0 && i2 < hl) {
4171
+ let [e7, n3] = gl(i2);
4172
+ return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
4173
+ }
4174
+ let a2 = r2.getFullYear() === new Date(n2).getFullYear();
4175
+ return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
4176
+ };
4177
+ var vl = `https://static.wixstatic.com/media/`;
4178
+ var yl = 100;
4179
+ var bl = (e6, t2 = ``) => {
4180
+ let n2 = e6?.profile?.photo;
4181
+ if (!n2?.url) return;
4182
+ let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(vl) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
4183
+ return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || yl, height: n2.height || yl, alt: r2 ?? t2 };
4184
+ };
4185
+ var xl = `https://static.wixstatic.com/media/`;
4186
+ var Sl = `wix:image://`;
4187
+ var Cl = 1200;
4188
+ var wl = 800;
4189
+ var Tl = (e6) => {
4190
+ if (!e6) return;
4191
+ let t2 = Number.parseInt(e6, 10);
4192
+ return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
4193
+ };
4194
+ var El = (e6) => {
4195
+ if (!e6.startsWith(Sl)) {
4196
+ let t3 = e6.split(/[?#]/)[0];
4197
+ return t3 ? { uri: t3 } : void 0;
4198
+ }
4199
+ let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
4200
+ if (!r2) return;
4201
+ let a2 = new URLSearchParams(n2 ?? ``);
4202
+ return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Tl(a2.get(`originWidth`)), height: Tl(a2.get(`originHeight`)) };
4203
+ };
4204
+ var Dl = (e6, t2) => {
4205
+ if (!e6) return;
4206
+ let n2 = El(e6);
4207
+ if (!n2) return;
4208
+ let r2 = n2.name ?? n2.uri;
4209
+ return { uri: n2.uri, url: `${xl}${n2.uri}`, name: r2, width: n2.width ?? Cl, height: n2.height ?? wl, alt: t2 ?? r2 };
4210
+ };
4211
+ var Ol = (e6) => {
4212
+ let t2 = e6?.media?.wixMedia?.image;
4213
+ if (!t2) return;
4214
+ let n2 = El(t2);
4215
+ if (!n2) return;
4216
+ let r2 = n2.name ?? n2.uri;
4217
+ return { uri: n2.uri, url: `${xl}${n2.uri}`, name: r2, width: n2.width ?? Cl, height: n2.height ?? wl, alt: e6?.media?.altText ?? e6?.title ?? r2 };
4218
+ };
4219
+ var kl = `https://static.wixstatic.com/media/`;
4220
+ var Al = `wix:video://`;
4221
+ var jl = (e6) => {
4222
+ if (!e6) return;
4223
+ let t2 = Number.parseInt(e6, 10);
4224
+ return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
4225
+ };
4226
+ var Ml = (e6) => {
4227
+ if (!e6.startsWith(Al)) return;
4228
+ let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
4229
+ if (!r2) return;
4230
+ let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
4231
+ return { id: decodeURIComponent(r2), posterUrl: a2 ? `${kl}${a2}` : void 0, posterWidth: jl(i2.get(`posterWidth`)), posterHeight: jl(i2.get(`posterHeight`)) };
4232
+ };
4233
+ var Nl = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
4234
+ var Pl = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
4235
+ var Fl = (e6, t2) => {
4236
+ for (let n2 of e6) {
4237
+ let e7 = n2.exec(t2);
4238
+ if (e7) return e7[1];
4239
+ }
4240
+ };
4241
+ var Il = (e6) => {
4242
+ let t2 = Fl(Nl, e6);
4243
+ if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
4244
+ let n2 = Fl(Pl, e6);
4245
+ return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
4246
+ };
4247
+ var Ll = (e6, t2 = []) => {
4248
+ let n2 = e6?.media;
4249
+ if (!n2 || n2.displayed === false) return;
4250
+ let r2 = Ol(e6);
4251
+ if (r2) return { kind: `image`, image: r2 };
4252
+ let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Ml(n2.wixMedia.videoV2) : void 0;
4253
+ if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
4254
+ let o2 = n2.embedMedia?.video?.url;
4255
+ if (o2) {
4256
+ let { thumbnail: e7 } = n2.embedMedia ?? {};
4257
+ return { kind: `embed`, videoUrl: o2, ...Il(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
4258
+ }
4259
+ };
4260
+ var Rl = (e6) => {
4261
+ let t2 = Ol(e6), n2 = e6?.media?.wixMedia?.videoV2;
4262
+ if (t2 || !n2) return t2;
4263
+ let r2 = Ml(n2), i2 = Dl(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
4264
+ return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
4265
+ };
4266
+ var zl = `2026-05-12T12:00:00.000Z`;
4267
+ var Bl = (e6) => ({ href: e6 ?? `#`, target: `_self` });
4268
+ var Vl = (e6) => `https://static.wixstatic.com/media/${e6}/v1/fit/w_1200,h_1200,al_c,q_85/cover.jpg`;
4269
+ var Hl = (e6) => {
4270
+ if (!e6) return;
4271
+ let t2 = e6 instanceof Date ? e6 : new Date(e6);
4272
+ return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
4273
+ };
4274
+ var Ul = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
4275
+ var Wl = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
4276
+ var Q = (e6) => ({ text: e6, html: `<p>${Wl(e6)}</p>`, linkList: [] });
4277
+ var $ = { minutesToRead: 5, views: 120, comments: 4 };
4278
+ var Gl = (e6) => {
4279
+ let { metrics: t2 } = e6;
4280
+ return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
4281
+ };
4282
+ var Kl = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
4283
+ var ql = (e6, t2, n2, r2) => {
4284
+ let i2 = e6.categoryIds?.map((e7) => t2[e7]).find(Boolean);
4285
+ return Q(i2 ?? (n2 ? r2.canvas.category() : ``));
4286
+ };
4287
+ var Jl = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
4288
+ let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = Gl(e6);
4289
+ return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Rl(e6), itemCoverMedia: Ll(e6, s2[l2 ?? ``] ?? []), itemLink: ar(e6, r2), itemPublishedDate: Q(_l(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Hl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Ul(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: bl(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: Kl(f2.views, $.views, o2, t2.viewCount), commentCount: Kl(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: ql(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
4290
+ };
4291
+ var Yl = 3;
4292
+ var Xl = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
4293
+ var Zl = (e6, t2) => {
4294
+ let { uri: n2, width: r2, height: i2 } = Xl[e6 % Xl.length];
4295
+ return { uri: n2, url: Vl(n2), name: n2, width: r2, height: i2, alt: t2 };
4296
+ };
4297
+ var Ql = (e6, t2) => {
4298
+ let { uri: n2 } = Xl[(e6 + 1) % Xl.length];
4299
+ return { uri: n2, url: Vl(n2), name: n2, width: 100, height: 100, alt: t2 };
4300
+ };
4301
+ var $l = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: Yl }, (i2, a2) => {
4302
+ let o2 = e6.canvas.postTitle(), s2 = Zl(a2, e6.canvas.coverAlt());
4303
+ return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Bl(n2), itemPublishedDate: Q(_l(new Date(r2), t2, r2)), publishedDateValue: zl, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: Ql(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
4304
+ });
4305
+ var eu = (0, import_react.createContext)(void 0);
4306
+ function tu() {
4307
+ let e6 = (0, import_react.useContext)(eu);
4308
+ if (!e6) throw Error(`useRelatedPostsContext must be used within a RelatedPostsProvider`);
4309
+ return e6;
4310
+ }
4311
+ var nu = 3;
4312
+ var ru = (e6) => typeof e6 == `number` && Number.isFinite(e6) && e6 >= 1 ? Math.min(Math.floor(e6), 12) : nu;
4313
+ var iu = 2e3;
4314
+ var au = /* @__PURE__ */ new WeakMap();
4315
+ var ou = (e6, t2, n2) => {
4316
+ if (!e6) return n2();
4317
+ let r2 = au.get(e6);
4318
+ r2 || (r2 = /* @__PURE__ */ new Map(), au.set(e6, r2));
4319
+ let i2 = r2.get(t2);
4320
+ if (i2) return i2;
4321
+ let a2 = n2();
4322
+ return r2.set(t2, a2), a2;
4323
+ };
4324
+ var su = { relatedPosts: [], emptyState: null, isLoadingRelatedPosts: true, hasError: false };
4325
+ var cu = { ...su, isLoadingRelatedPosts: false, hasError: true };
4326
+ var lu = (e6) => ({ strip: e6, hasError: false });
4327
+ var uu = () => ({ strip: { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {}, fetchedAt: Date.now() }, hasError: true });
4328
+ var du = (e6) => {
4329
+ throw e6;
4330
+ };
4331
+ var fu = ({ children: e6, stripLoadPromise: t2, slug: n2, language: r2 }) => {
4332
+ let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2 }, hasError: u2 } = zn(t2), d2 = Un(l2), f2 = el(), m2 = or(n2), { t: h2 } = xo(), g2 = hr(), _2 = (0, import_react.useMemo)(() => es(h2, g2), [h2, g2]), v2 = (0, import_react.useMemo)(() => {
4333
+ let e7 = i2.map((e8) => Jl(e8, _2, g2, m2, a2, o2, f2, s2, d2));
4334
+ return { relatedPosts: e7.length === 0 && f2 ? $l(_2, g2, m2, d2) : e7, emptyState: e7.length === 0 && !u2 ? _2.noRelatedPostsEmptyState() : null, isLoadingRelatedPosts: false, hasError: u2 };
4335
+ }, [i2, a2, o2, s2, _2, g2, r2, m2, f2, d2, u2]);
4336
+ return dr(lr.relatedPostsProvider, u2 ? `error` : i2.length > 0 ? `data` : `empty`), (0, import_jsx_runtime.jsx)(eu.Provider, { value: v2, children: e6 });
4337
+ };
4338
+ function pu({ children: e6, postsCount: n2 }) {
4339
+ let r2 = cr(), i2 = mr(), a2 = Gn(), o2 = ru(n2), s2 = ll(), l2 = dl(), u2 = _r(), d2 = (0, import_react.useMemo)(() => nl(Ln), []), { i18n: f2, locale: h2 } = Wo(Qo), g2 = qn(() => {
4340
+ let e7 = `blog-builder:related:${JSON.stringify({ slug: r2 ?? ``, language: i2 ?? ``, limit: o2, ...l2 && { postId: l2 } })}`;
4341
+ return { slug: r2, language: i2, stripLoadPromise: Vn(ou(s2, e7, () => jo({ key: e7, warmupData: u2, fetchData: () => {
4342
+ let e8 = Yc({ slug: r2, language: i2, limit: o2, propagateErrors: true, sourcePromise: s2 });
4343
+ return sl(al(d2, `related-posts-read`, { feature: tl.relatedPosts, tags: { limit: o2 } }, a2 ? Pc(e8, iu, `related-posts`) : e8));
4344
+ } })), lu, a2 ? du : uu) };
4345
+ }, [r2, i2, a2, s2, u2, o2, d2, l2]);
4346
+ return (0, import_jsx_runtime.jsx)(So, { i18n: f2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(eu.Provider, { value: su, children: e6 }), children: [(0, import_jsx_runtime.jsx)(Uo, { i18n: f2, locale: h2 }), (0, import_jsx_runtime.jsx)(ol, { fallback: (0, import_jsx_runtime.jsx)(eu.Provider, { value: cu, children: e6 }), feature: tl.relatedPosts, monitoringClient: d2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(fu, { stripLoadPromise: g2.stripLoadPromise, slug: g2.slug, language: g2.language, children: e6 }, `${g2.language ?? ``}|${g2.slug ?? ``}`) })] }) });
4347
+ }
4348
+ var mu = An(`7d10ae29-fb0a-4361-8bc0-c3b8a3b96e34`);
4349
+ // Annotate the CommonJS export names for ESM import in node:
4350
+ 0 && (module.exports = {
4351
+ RelatedPostsProvider,
4352
+ injectAccessTokenGetter,
4353
+ useRelatedPostsContext
4354
+ });
4355
+ //# sourceMappingURL=context-related-posts-context-provider.js.map