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