@wix/stores 1.0.959 → 1.0.960

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 (121) hide show
  1. package/_sdk-exports/context-category-by-id-context-provider/runtime.d.ts +4026 -0
  2. package/_sdk-exports/context-category-by-id-context-provider/runtime.js +2 -0
  3. package/_sdk-exports/context-category-by-slug-context-provider/runtime.d.ts +4046 -0
  4. package/_sdk-exports/context-category-by-slug-context-provider/runtime.js +2 -0
  5. package/_sdk-exports/context-category-info-context-provider/runtime.d.ts +3530 -0
  6. package/_sdk-exports/context-category-info-context-provider/runtime.js +2 -0
  7. package/_sdk-exports/context-category-list-context-provider/runtime.d.ts +101 -0
  8. package/_sdk-exports/context-category-list-context-provider/runtime.js +2 -0
  9. package/_sdk-exports/context-product-by-id-context-provider/runtime.d.ts +4221 -0
  10. package/_sdk-exports/context-product-by-id-context-provider/runtime.js +2 -0
  11. package/_sdk-exports/context-product-by-slug-context-provider/runtime.d.ts +4217 -0
  12. package/_sdk-exports/context-product-by-slug-context-provider/runtime.js +2 -0
  13. package/_sdk-exports/context-product-context-provider/runtime.d.ts +4449 -0
  14. package/_sdk-exports/context-product-context-provider/runtime.js +2 -0
  15. package/_sdk-exports/context-product-item-context-provider/runtime.d.ts +4102 -0
  16. package/_sdk-exports/context-product-item-context-provider/runtime.js +2 -0
  17. package/_sdk-exports/context-product-list-context-provider/runtime.d.ts +3969 -0
  18. package/_sdk-exports/context-product-list-context-provider/runtime.js +2 -0
  19. package/_sdk-exports/context-promotion-item-context-provider/runtime.d.ts +85 -0
  20. package/_sdk-exports/context-promotion-item-context-provider/runtime.js +2 -0
  21. package/build/cjs/context-category-by-id-context-provider.d.ts +4026 -0
  22. package/build/cjs/context-category-by-id-context-provider.js +3572 -0
  23. package/build/cjs/context-category-by-id-context-provider.js.map +1 -0
  24. package/build/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
  25. package/build/cjs/context-category-by-slug-context-provider.js +3674 -0
  26. package/build/cjs/context-category-by-slug-context-provider.js.map +1 -0
  27. package/build/cjs/context-category-info-context-provider.d.ts +3530 -0
  28. package/build/cjs/context-category-info-context-provider.js +1201 -0
  29. package/build/cjs/context-category-info-context-provider.js.map +1 -0
  30. package/build/cjs/context-category-list-context-provider.d.ts +101 -0
  31. package/build/cjs/context-category-list-context-provider.js +587 -0
  32. package/build/cjs/context-category-list-context-provider.js.map +1 -0
  33. package/build/cjs/context-product-by-id-context-provider.d.ts +4221 -0
  34. package/build/cjs/context-product-by-id-context-provider.js +3454 -0
  35. package/build/cjs/context-product-by-id-context-provider.js.map +1 -0
  36. package/build/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
  37. package/build/cjs/context-product-by-slug-context-provider.js +3477 -0
  38. package/build/cjs/context-product-by-slug-context-provider.js.map +1 -0
  39. package/build/cjs/context-product-context-provider.d.ts +4449 -0
  40. package/build/cjs/context-product-context-provider.js +587 -0
  41. package/build/cjs/context-product-context-provider.js.map +1 -0
  42. package/build/cjs/context-product-item-context-provider.d.ts +4102 -0
  43. package/build/cjs/context-product-item-context-provider.js +4396 -0
  44. package/build/cjs/context-product-item-context-provider.js.map +1 -0
  45. package/build/cjs/context-product-list-context-provider.d.ts +3970 -0
  46. package/build/cjs/context-product-list-context-provider.js +587 -0
  47. package/build/cjs/context-product-list-context-provider.js.map +1 -0
  48. package/build/cjs/context-promotion-item-context-provider.d.ts +85 -0
  49. package/build/cjs/context-promotion-item-context-provider.js +592 -0
  50. package/build/cjs/context-promotion-item-context-provider.js.map +1 -0
  51. package/build/es/context-category-by-id-context-provider.d.mts +4026 -0
  52. package/build/es/context-category-by-id-context-provider.mjs +3532 -0
  53. package/build/es/context-category-by-id-context-provider.mjs.map +1 -0
  54. package/build/es/context-category-by-slug-context-provider.d.mts +4046 -0
  55. package/build/es/context-category-by-slug-context-provider.mjs +3634 -0
  56. package/build/es/context-category-by-slug-context-provider.mjs.map +1 -0
  57. package/build/es/context-category-info-context-provider.d.mts +3530 -0
  58. package/build/es/context-category-info-context-provider.mjs +1172 -0
  59. package/build/es/context-category-info-context-provider.mjs.map +1 -0
  60. package/build/es/context-category-list-context-provider.d.mts +101 -0
  61. package/build/es/context-category-list-context-provider.mjs +558 -0
  62. package/build/es/context-category-list-context-provider.mjs.map +1 -0
  63. package/build/es/context-product-by-id-context-provider.d.mts +4221 -0
  64. package/build/es/context-product-by-id-context-provider.mjs +3415 -0
  65. package/build/es/context-product-by-id-context-provider.mjs.map +1 -0
  66. package/build/es/context-product-by-slug-context-provider.d.mts +4217 -0
  67. package/build/es/context-product-by-slug-context-provider.mjs +3437 -0
  68. package/build/es/context-product-by-slug-context-provider.mjs.map +1 -0
  69. package/build/es/context-product-context-provider.d.mts +4449 -0
  70. package/build/es/context-product-context-provider.mjs +558 -0
  71. package/build/es/context-product-context-provider.mjs.map +1 -0
  72. package/build/es/context-product-item-context-provider.d.mts +4102 -0
  73. package/build/es/context-product-item-context-provider.mjs +4356 -0
  74. package/build/es/context-product-item-context-provider.mjs.map +1 -0
  75. package/build/es/context-product-list-context-provider.d.mts +3970 -0
  76. package/build/es/context-product-list-context-provider.mjs +558 -0
  77. package/build/es/context-product-list-context-provider.mjs.map +1 -0
  78. package/build/es/context-promotion-item-context-provider.d.mts +85 -0
  79. package/build/es/context-promotion-item-context-provider.mjs +563 -0
  80. package/build/es/context-promotion-item-context-provider.mjs.map +1 -0
  81. package/build/internal/cjs/context-category-by-id-context-provider.d.ts +4026 -0
  82. package/build/internal/cjs/context-category-by-slug-context-provider.d.ts +4046 -0
  83. package/build/internal/cjs/context-category-info-context-provider.d.ts +3530 -0
  84. package/build/internal/cjs/context-category-list-context-provider.d.ts +101 -0
  85. package/build/internal/cjs/context-product-by-id-context-provider.d.ts +4221 -0
  86. package/build/internal/cjs/context-product-by-slug-context-provider.d.ts +4217 -0
  87. package/build/internal/cjs/context-product-context-provider.d.ts +4449 -0
  88. package/build/internal/cjs/context-product-item-context-provider.d.ts +4102 -0
  89. package/build/internal/cjs/context-product-list-context-provider.d.ts +3970 -0
  90. package/build/internal/cjs/context-promotion-item-context-provider.d.ts +85 -0
  91. package/build/internal/es/context-category-by-id-context-provider.d.mts +4026 -0
  92. package/build/internal/es/context-category-by-slug-context-provider.d.mts +4046 -0
  93. package/build/internal/es/context-category-info-context-provider.d.mts +3530 -0
  94. package/build/internal/es/context-category-list-context-provider.d.mts +101 -0
  95. package/build/internal/es/context-product-by-id-context-provider.d.mts +4221 -0
  96. package/build/internal/es/context-product-by-slug-context-provider.d.mts +4217 -0
  97. package/build/internal/es/context-product-context-provider.d.mts +4449 -0
  98. package/build/internal/es/context-product-item-context-provider.d.mts +4102 -0
  99. package/build/internal/es/context-product-list-context-provider.d.mts +3970 -0
  100. package/build/internal/es/context-promotion-item-context-provider.d.mts +85 -0
  101. package/category-by-id-context-provider/package.json +3 -0
  102. package/category-by-slug-context-provider/package.json +3 -0
  103. package/category-info-context-provider/package.json +3 -0
  104. package/category-list-context-provider/package.json +3 -0
  105. package/context/category-by-id-context-provider/package.json +3 -0
  106. package/context/category-by-slug-context-provider/package.json +3 -0
  107. package/context/category-info-context-provider/package.json +3 -0
  108. package/context/category-list-context-provider/package.json +3 -0
  109. package/context/product-by-id-context-provider/package.json +3 -0
  110. package/context/product-by-slug-context-provider/package.json +3 -0
  111. package/context/product-context-provider/package.json +3 -0
  112. package/context/product-item-context-provider/package.json +3 -0
  113. package/context/product-list-context-provider/package.json +3 -0
  114. package/context/promotion-item-context-provider/package.json +3 -0
  115. package/package.json +159 -24
  116. package/product-by-id-context-provider/package.json +3 -0
  117. package/product-by-slug-context-provider/package.json +3 -0
  118. package/product-context-provider/package.json +3 -0
  119. package/product-item-context-provider/package.json +3 -0
  120. package/product-list-context-provider/package.json +3 -0
  121. package/promotion-item-context-provider/package.json +3 -0
@@ -0,0 +1,3415 @@
1
+ // _sdk-exports/context-product-by-id-context-provider/runtime.js
2
+ import { Suspense as e, useCallback as t, useMemo as n, useState as r } from "react";
3
+ import i, { useProductContext as a } from "@wix/stores/product-context-provider";
4
+ import { useGetService as o, useService as s } from "@wix/services-manager-react";
5
+ import { jsx as c } from "react/jsx-runtime";
6
+ var l = Object.create;
7
+ var u = Object.defineProperty;
8
+ var d = Object.getOwnPropertyDescriptor;
9
+ var f = Object.getOwnPropertyNames;
10
+ var p = Object.getPrototypeOf;
11
+ var m = Object.prototype.hasOwnProperty;
12
+ var h = (e2, t2) => () => (t2 || (e2((t2 = { exports: {} }).exports, t2), e2 = null), t2.exports);
13
+ var g = (e2, t2, n2, r2) => {
14
+ if (t2 && typeof t2 == `object` || typeof t2 == `function`) for (var i2 = f(t2), a2 = 0, o2 = i2.length, s2; a2 < o2; a2++) s2 = i2[a2], !m.call(e2, s2) && s2 !== n2 && u(e2, s2, { get: ((e3) => t2[e3]).bind(null, s2), enumerable: !(r2 = d(t2, s2)) || r2.enumerable });
15
+ return e2;
16
+ };
17
+ var _ = (e2, t2, n2) => (n2 = e2 == null ? {} : l(p(e2)), g(t2 || !e2 || !e2.__esModule || !m.call(e2, `default`) ? u(n2, `default`, { value: e2, enumerable: true }) : n2, e2));
18
+ var v = {};
19
+ function y(e2, t2 = false, n2 = (e3) => e3) {
20
+ return () => ({ __type: `event-definition`, type: e2, isDomainEvent: t2, transformations: n2 });
21
+ }
22
+ var b = (e2) => {
23
+ switch (e2) {
24
+ case `get`:
25
+ case `GET`:
26
+ return `GET`;
27
+ case `post`:
28
+ case `POST`:
29
+ return `POST`;
30
+ case `put`:
31
+ case `PUT`:
32
+ return `PUT`;
33
+ case `delete`:
34
+ case `DELETE`:
35
+ return `DELETE`;
36
+ case `patch`:
37
+ case `PATCH`:
38
+ return `PATCH`;
39
+ case `head`:
40
+ case `HEAD`:
41
+ return `HEAD`;
42
+ case `options`:
43
+ case `OPTIONS`:
44
+ return `OPTIONS`;
45
+ default:
46
+ throw Error(`Unknown method: ${e2}`);
47
+ }
48
+ };
49
+ var x = (e2) => (t2) => async (n2) => {
50
+ let r2, i2 = (t3) => {
51
+ if (r2 = e2(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
52
+ let { method: i3, url: a2, params: o2 } = r2;
53
+ return { ...r2, method: b(i3), url: a2, data: r2.data, params: o2 };
54
+ };
55
+ try {
56
+ let e3 = await t2.request(i2);
57
+ if (r2 === void 0) throw Error(`Request options were not created for this request, please reach out to support channels for assistance.`);
58
+ let n3 = Array.isArray(r2.transformResponse) ? r2.transformResponse : [r2.transformResponse], a2 = e3.data;
59
+ return n3.forEach((t3) => {
60
+ t3 && (a2 = t3(e3.data, e3.headers));
61
+ }), a2;
62
+ } catch (e3) {
63
+ throw typeof e3 == `object` && e3 && `response` in e3 && typeof e3.response == `object` && e3.response !== null && `data` in e3.response ? e3.response.data : e3;
64
+ }
65
+ };
66
+ var S = (e2) => e2.__isAmbassador ? true : !!e2().__isAmbassador;
67
+ var C = `__metadata`;
68
+ var w = `edge.wixapis.com`;
69
+ var T = class extends Error {
70
+ message;
71
+ response;
72
+ constructor(e2, t2) {
73
+ super(e2), this.message = e2, this.response = t2;
74
+ }
75
+ async details() {
76
+ let e2 = await this.response.json();
77
+ return E(this.response.status, e2?.message, e2?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e2 });
78
+ }
79
+ };
80
+ var E = (e2, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
81
+ var D = (e2) => e2?.method && [`post`, `put`, `patch`].includes(e2.method.toLocaleLowerCase()) && e2.body ? { "Content-Type": `application/json` } : {};
82
+ var O = (e2) => e2 && typeof e2 == `object` && !Array.isArray(e2);
83
+ var k = (e2) => e2.__type === `host`;
84
+ function ee(e2, t2) {
85
+ return e2.create(t2);
86
+ }
87
+ var te = `x-wix-bi-gateway`;
88
+ function ne(e2, t2, n2) {
89
+ return { [te]: re({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e2.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e2.methodFqn, entity: e2.entityFqdn }) };
90
+ }
91
+ function re(e2) {
92
+ return Object.entries(e2).filter(([e3, t2]) => !!t2).map(([e3, t2]) => `${e3}=${t2}`).join(`,`);
93
+ }
94
+ function ie(e2) {
95
+ let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
96
+ globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
97
+ try {
98
+ return e2();
99
+ } finally {
100
+ globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
101
+ }
102
+ }
103
+ var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
104
+ function oe(e2) {
105
+ return de(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
106
+ }
107
+ var se = /([\p{Ll}\d])(\p{Lu})/gu;
108
+ var ce = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
109
+ var le = `$1\0$2`;
110
+ var ue = /[^\p{L}\d]+/giu;
111
+ function de(e2) {
112
+ let t2 = e2.trim();
113
+ t2 = t2.replace(se, le).replace(ce, le), t2 = t2.replace(ue, `\0`);
114
+ let n2 = 0, r2 = t2.length;
115
+ for (; t2.charAt(n2) === `\0`; ) n2++;
116
+ if (n2 === r2) return [];
117
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
118
+ return t2.slice(n2, r2).split(/\0/g);
119
+ }
120
+ var fe = (e2) => `validationError` in (e2.response?.data?.details ?? {});
121
+ var pe = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
122
+ var me = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
123
+ function he(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
124
+ if (typeof e2 != `object` || !e2) throw e2;
125
+ if (fe(e2)) return ge(e2, t2, n2);
126
+ if (pe(e2)) return ve(e2);
127
+ if (me(e2)) {
128
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: oe(n3), data: {} }, requestId: e2.requestId };
129
+ return _e(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
130
+ }
131
+ return ye(e2);
132
+ }
133
+ var ge = (e2, t2, n2) => {
134
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = be(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
135
+ return _e(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
136
+ };
137
+ var _e = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
138
+ var ve = (e2) => {
139
+ let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? oe(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
140
+ return _e(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
141
+ };
142
+ var ye = (e2) => _e(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: oe(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
143
+ var be = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
144
+ let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
145
+ return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
146
+ let r3 = t2[e3.field];
147
+ if (r3) return { ...e3, field: xe(r3, i2) };
148
+ let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
149
+ if (s2) {
150
+ let t3 = a2[s2];
151
+ if (t3) return { ...e3, field: e3.field.replace(s2, xe(t3, i2)) };
152
+ }
153
+ return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
154
+ });
155
+ };
156
+ var xe = (e2, t2) => {
157
+ let n2 = Se(e2);
158
+ return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
159
+ };
160
+ var Se = (e2) => {
161
+ let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
162
+ return t2 && t2.groups && Number(t2.groups.argIndex);
163
+ };
164
+ function Ce(e2, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
165
+ return ie(() => e2({ request: async (e3) => {
166
+ let i3 = e3({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
167
+ a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
168
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? w : o3}${a3.url}`;
169
+ a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
170
+ try {
171
+ let e4 = ne(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e4 } }, s3 = await n2(u3, o4);
172
+ if (s3.status !== 200) {
173
+ let e5 = null;
174
+ try {
175
+ e5 = await s3.json();
176
+ } catch {
177
+ }
178
+ let t3 = Te(s3.status, e5?.message ?? s3.statusText, e5?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e5 }), n3 = he(t3);
179
+ throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
180
+ }
181
+ let l3 = await s3.json();
182
+ 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 };
183
+ } catch (e4) {
184
+ throw e4.message?.includes(`fetch is not defined`) && console.error(`Node.js v18+ is required`), e4;
185
+ }
186
+ }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
187
+ }
188
+ var we = class extends Error {
189
+ response;
190
+ requestId;
191
+ constructor(e2) {
192
+ super(), this.response = e2.response, this.requestId = e2.requestId;
193
+ }
194
+ };
195
+ var Te = (e2, t2, n2, r2) => new we({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e2, data: r2 } }, ...n2 }, message: t2 }, status: e2 }, requestId: r2?.requestId });
196
+ var Ee = `.`;
197
+ function De(e2, t2, n2) {
198
+ if (e2 == null) throw Error(`Cannot set value on null or undefined`);
199
+ let r2 = Oe(t2), i2 = e2;
200
+ for (let e3 = 0; e3 < r2.length; e3++) {
201
+ let t3 = r2[e3];
202
+ if (e3 === r2.length - 1) {
203
+ i2[t3] = n2;
204
+ break;
205
+ }
206
+ let a2 = r2[e3 + 1];
207
+ (!(t3 in i2) || i2[t3] == null || typeof i2[t3] != `object` || i2[t3] === null) && (i2[t3] = typeof a2 == `number` ? [] : {}), i2 = i2[t3];
208
+ }
209
+ return e2;
210
+ }
211
+ function Oe(e2) {
212
+ return Array.isArray(e2) ? e2 : e2.split(Ee).map((e3) => ke(e3) ? Number(e3) : e3);
213
+ }
214
+ function ke(e2) {
215
+ return /^\d+$/.test(e2);
216
+ }
217
+ function Ae(e2) {
218
+ let t2 = {};
219
+ for (let [n2, r2] of Object.entries(e2)) je(n2) || De(t2, Oe(n2), r2);
220
+ return t2;
221
+ }
222
+ function je(e2) {
223
+ return e2 === `__proto__` || e2 === `constructor` || e2 === `prototype`;
224
+ }
225
+ var Me = class {
226
+ BRACKET_PATTERN = /\[(\d+)\]/g;
227
+ NUMERIC_PATTERN = /^\d+$/;
228
+ ESCAPED_DOT_PATTERN = /\\\./g;
229
+ ESCAPED_LEFT_BRACKET_PATTERN = /\\\[/g;
230
+ ESCAPED_RIGHT_BRACKET_PATTERN = /\\\]/g;
231
+ SPLIT_PATTERN = /\.|\[(\d+)\]/g;
232
+ DOT_BEFORE_BRACKET_PATTERN = /\.\[/g;
233
+ ESCAPED_DOT_PLACEHOLDER = `__DOT__`;
234
+ ESCAPED_RIGHT_BRACKET_PLACEHOLDER = `__RB__`;
235
+ ESCAPED_LEFT_BRACKET_PLACEHOLDER = `__LB__`;
236
+ modifiedFields;
237
+ cleanedModifiedFields;
238
+ constructor(e2) {
239
+ this.modifiedFields = e2;
240
+ }
241
+ replaceEscapedCharacters(e2) {
242
+ return e2.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);
243
+ }
244
+ restoreEscapedCharacters(e2) {
245
+ return e2.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
246
+ }
247
+ unflatten() {
248
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e2, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e2)), t2])), Ae(this.cleanedModifiedFields);
249
+ }
250
+ flatten(e2) {
251
+ let t2 = {};
252
+ for (let n2 of Object.keys(this.cleanedModifiedFields)) {
253
+ let r2 = this.splitPath(n2), i2 = this.navigatePath(e2, r2);
254
+ t2 = { ...t2, ...i2 };
255
+ }
256
+ return Object.fromEntries(Object.entries(t2).map(([e3, t3]) => [this.restoreEscapedCharacters(e3), t3]));
257
+ }
258
+ splitPath(e2) {
259
+ let t2 = [], n2 = 0, r2 = Array.from(e2.matchAll(this.SPLIT_PATTERN));
260
+ for (let i2 of r2) i2.index > n2 && t2.push(e2.substring(n2, i2.index)), i2[1] && t2.push(i2[1]), n2 = i2.index + i2[0].length;
261
+ return n2 < e2.length && t2.push(e2.substring(n2)), t2;
262
+ }
263
+ navigatePath(e2, t2) {
264
+ let n2 = e2, r2 = [], i2 = (e3) => {
265
+ if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
266
+ r2.push(`[${e3}]`), n2 = n2[parseInt(e3, 10)];
267
+ }, a2 = (e3, t3) => {
268
+ let i3 = e3 in ae ? ae[e3] : void 0;
269
+ if (i3 && i3 in t3) {
270
+ r2.push(i3), n2 = t3[i3];
271
+ return;
272
+ }
273
+ let a3 = Ie(e3);
274
+ if (a3 && a3 in t3) {
275
+ r2.push(a3), n2 = t3[a3];
276
+ return;
277
+ }
278
+ throw Error(`Cannot find key '${e3}' or its transformations at path ${this.buildPathString(r2)}`);
279
+ }, o2 = (e3, t3) => {
280
+ r2.push(e3), n2 = t3[e3];
281
+ };
282
+ for (let e3 of t2) {
283
+ if (this.NUMERIC_PATTERN.test(e3)) {
284
+ i2(e3);
285
+ continue;
286
+ }
287
+ if (typeof n2 != `object` || !n2) throw Error(`Cannot access property '${e3}' on ${typeof n2} at path ${this.buildPathString(r2)}`);
288
+ let t3 = n2;
289
+ if (e3 in n2) {
290
+ o2(e3, t3);
291
+ continue;
292
+ }
293
+ a2(e3, t3);
294
+ }
295
+ return { [this.buildPathString(r2)]: n2 };
296
+ }
297
+ buildPathString(e2) {
298
+ return e2.join(`.`).replace(this.DOT_BEFORE_BRACKET_PATTERN, `[`);
299
+ }
300
+ bracketToDotNotation(e2) {
301
+ return e2.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e2[r2 - 1] === `\\` ? t2 : `.` + n2);
302
+ }
303
+ };
304
+ function Ne(e2, t2) {
305
+ let n2 = e2?.modifiedFields;
306
+ if (!n2) return null;
307
+ let r2 = Pe(n2);
308
+ if (!r2) return null;
309
+ let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
310
+ e2 = { ...e2, modifiedFields: i2 };
311
+ let o2 = t2(e2), s2 = o2?.modifiedFields;
312
+ if (!s2) return null;
313
+ let c2 = Fe(s2, a2);
314
+ return c2 === null ? null : (o2.modifiedFields = c2, o2);
315
+ }
316
+ function Pe(e2) {
317
+ if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
318
+ let t2 = new Me(e2);
319
+ return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
320
+ } catch {
321
+ return null;
322
+ }
323
+ return null;
324
+ }
325
+ function Fe(e2, t2) {
326
+ if (typeof e2 == `object` && e2 && !Array.isArray(e2)) try {
327
+ return t2.flatten(e2);
328
+ } catch {
329
+ return null;
330
+ }
331
+ return null;
332
+ }
333
+ function Ie(e2) {
334
+ return e2.replace(/[-_\s]+(.)?/g, (e3, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e3) => e3.toLowerCase());
335
+ }
336
+ function Le() {
337
+ return { emit(e2, ...t2) {
338
+ for (let n2 = 0, r2 = this.events[e2] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
339
+ }, events: {}, on(e2, t2) {
340
+ return (this.events[e2] ||= []).push(t2), () => {
341
+ this.events[e2] = this.events[e2]?.filter((e3) => t2 !== e3);
342
+ };
343
+ } };
344
+ }
345
+ var Re = (e2) => e2.__type === `event-definition`;
346
+ function ze(e2, t2, n2, r2) {
347
+ let i2;
348
+ if (e2.isDomainEvent) {
349
+ let { deletedEvent: e3, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
350
+ i2 = e3 ? e3?.deletedEntity ? { entity: e3?.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 };
351
+ } else i2 = { data: n2, metadata: r2 };
352
+ let a2 = e2.transformations ?? ((e3) => e3), o2 = i2, s2 = i2;
353
+ if (s2.modifiedFields) {
354
+ let e3 = s2.modifiedFields;
355
+ if (typeof e3 == `object` && e3 && !Array.isArray(e3)) {
356
+ o2 = structuredClone(i2);
357
+ let e4 = Ne(s2, a2);
358
+ if (e4) return t2(e4);
359
+ }
360
+ }
361
+ return t2(a2(o2));
362
+ }
363
+ function Be(e2) {
364
+ let t2 = /* @__PURE__ */ new Map(), n2 = Le();
365
+ return { initModule(e3) {
366
+ return (r2) => {
367
+ let i2 = t2.get(e3.type) ?? [];
368
+ i2.push({ eventDefinition: e3, handler: r2 }), t2.set(e3.type, i2), n2.emit(`registered`, e3);
369
+ };
370
+ }, client: { ...n2, getRegisteredEvents: () => t2, async process(e3, n3 = { expectedEvents: [] }) {
371
+ let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e3), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e4) => ({ type: e4 }))];
372
+ if (c2.length > 0 && !c2.some(({ type: e4 }) => e4 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e4) => e4.type).join(`, `)}`);
373
+ let l2 = t2.get(r2) ?? [];
374
+ return await Promise.all(l2.map(({ eventDefinition: e4, handler: t3 }) => ze(e4, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
375
+ }, async processRequest(e3, t3) {
376
+ let n3 = await e3.text();
377
+ return this.process(n3, t3);
378
+ }, async parseJWT(t3) {
379
+ let n3 = e2();
380
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
381
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3);
382
+ if (!i2) throw Error(`JWT is not valid`);
383
+ if (typeof r2.data != `string`) throw Error(`Unexpected type of JWT data: expected string, got ${typeof r2.data}`);
384
+ let a2 = JSON.parse(r2.data), o2 = a2.eventType, s2 = a2.accountInfo, c2 = a2.instanceId, l2 = a2.identity ? JSON.parse(a2.identity) : void 0;
385
+ return { instanceId: c2, eventType: o2, payload: JSON.parse(a2.data), identity: l2, accountInfo: s2 };
386
+ }, async parseRequest(e3) {
387
+ let t3 = await e3.text();
388
+ return this.parseJWT(t3);
389
+ }, async executeHandlers(e3) {
390
+ let n3 = Array.from(t2.keys()).map((e4) => ({ type: e4 }));
391
+ if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e3.eventType)) throw Error(`Unexpected event type: ${e3.eventType}. Expected one of: ${n3.map((e4) => e4.type).join(`, `)}`);
392
+ let r2 = t2.get(e3.eventType) ?? [];
393
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e3.payload, { instanceId: e3.instanceId, identity: e3.identity })));
394
+ }, apps: { AppInstalled: y(`AppInstalled`)(), AppRemoved: y(`AppRemoved`)() } } };
395
+ }
396
+ var Ve = (e2) => e2.__type === `service-plugin-definition`;
397
+ function He(e2) {
398
+ let t2 = /* @__PURE__ */ new Map(), n2 = Le();
399
+ return { initModule(e3) {
400
+ return (r2) => {
401
+ let i2 = t2.get(e3.componentType.toLowerCase()) ?? [];
402
+ i2.push({ servicePluginDefinition: e3, implementation: r2 }), t2.set(e3.componentType.toLowerCase(), i2), n2.emit(`registered`, e3);
403
+ };
404
+ }, client: { ...n2, getRegisteredServicePlugins: () => t2, async parseJWT(t3) {
405
+ let n3 = e2();
406
+ if (!n3.decodeJWT) throw Error(`decodeJWT is not supported by the authentication strategy`);
407
+ let { decoded: r2, valid: i2 } = await n3.decodeJWT(t3, true);
408
+ if (!i2) throw Error(`JWT is not valid`);
409
+ 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`);
410
+ return r2.data;
411
+ }, async process(e3) {
412
+ let t3 = await this.parseJWT(e3.body);
413
+ return this.executeHandler(t3, e3.url);
414
+ }, async parseRequest(e3) {
415
+ let t3 = await e3.text();
416
+ return this.parseJWT(t3);
417
+ }, async processRequest(e3) {
418
+ let t3 = await this.parseRequest(e3);
419
+ return this.processParsedRequest(t3, e3.url);
420
+ }, async processParsedRequest(e3, t3) {
421
+ try {
422
+ let n3 = await this.executeHandler(e3, t3);
423
+ return Response.json(n3);
424
+ } catch (e4) {
425
+ if (e4.errorType === `SPI` && e4.applicationCode && e4.httpCode) return Response.json({ applicationError: { code: e4.applicationCode, data: e4.data } }, { status: e4.httpCode });
426
+ throw e4;
427
+ }
428
+ }, async executeHandler(e3, n3) {
429
+ let r2 = e3.metadata.appExtensionType.toLowerCase(), i2 = t2.get(r2) ?? [];
430
+ if (i2.length === 0) throw Error(`No service plugin implementations found for component type ${r2}`);
431
+ if (i2.length > 1) throw Error(`Multiple service plugin implementations found for component type ${r2}. This is currently not supported`);
432
+ let { implementation: a2, servicePluginDefinition: o2 } = i2[0], s2 = o2.methods.find((e4) => n3.endsWith(e4.primaryHttpMappingPath));
433
+ if (!s2) throw Error(`Unexpect request: request url did not match any method: ` + n3);
434
+ let c2 = a2[s2.name];
435
+ if (!c2) throw Error(`Got request for service plugin method ${s2.name} but no implementation was provided. Available methods: ${Object.keys(a2).join(`, `)}`);
436
+ return s2.transformations.toREST(await c2(s2.transformations.fromREST(e3)));
437
+ } } };
438
+ }
439
+ var A = `X-Wix-Consistent`;
440
+ function Ue(e2) {
441
+ let t2 = e2.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e3) => Promise.resolve({ headers: {} }) }, r2 = e2.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e2.host), o2 = () => e2.fetch ?? fetch, s2 = async (n3, r3) => {
442
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [A]: t2[A] } : {} }, l3 = e2.host?.getErrorHandler?.();
443
+ try {
444
+ if (typeof n3 == `string` || n3 instanceof URL) {
445
+ let e3 = await i3(n3, { ...r3, headers: c3 });
446
+ l3?.handleError(e3, { requestOptions: { url: n3.toString(), method: r3?.method } });
447
+ let a3 = We(e3);
448
+ return a3 && (t2[A] = a3), e3;
449
+ }
450
+ {
451
+ for (let [e4, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e4, t3);
452
+ let e3 = await i3(n3, r3);
453
+ l3?.handleError(e3, { requestOptions: { url: n3.url, method: r3?.method } });
454
+ let a3 = We(e3);
455
+ return a3 && (t2[A] = a3), e3;
456
+ }
457
+ } catch (e3) {
458
+ throw l3?.handleError(e3, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e3;
459
+ }
460
+ }, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
461
+ let i3 = o2(), s3 = await a2(), c3 = D(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e2.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [A]: t2[A] } : {} } }), u3 = We(l3);
462
+ return u3 && (t2[A] = u3), l3;
463
+ }, p2 = (t3, n3) => {
464
+ if (Re(t3)) return d2(t3);
465
+ if (Ve(t3)) return l2(t3);
466
+ if (k(t3) && e2.host) return ee(t3, e2.host);
467
+ if (typeof t3 == `function`) {
468
+ if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
469
+ let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e2.useCDN === void 0 ? i2().shouldUseCDN : e2.useCDN;
470
+ return Ce(ie(() => S(t3)) ? x(t3) : t3, n3 ?? {}, f2, e2.host?.getErrorHandler?.(), (e3, t4) => {
471
+ let n4 = new URL(e3, `https://${r3}`);
472
+ return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
473
+ }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e2.host?.name, o3, e2.validateRequestSchema);
474
+ }
475
+ return O(t3) ? Object.fromEntries(Object.entries(t3).map(([e3, n4]) => [e3, p2(n4, t3[C])])) : t3;
476
+ }, m2 = (e3) => {
477
+ for (let n3 in e3) t2[n3] = e3[n3];
478
+ };
479
+ return { ...e2.modules ? p2(e2.modules) : {}, get auth() {
480
+ let t3 = i2();
481
+ return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e2.host), t3;
482
+ }, setHeaders: m2, use: p2, enableContext(e3, t3 = { elevated: false }) {
483
+ e3 === `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 ? v.elevatedClient = this : v.client = this;
484
+ }, fetch: (t3, n3) => {
485
+ let r3 = e2.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
486
+ return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
487
+ }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
488
+ let i3 = e2?.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 }) });
489
+ if (a3.status !== 200) throw new T(`GraphQL request failed with status ${a3.status}`, a3);
490
+ let { data: o3, errors: s3 } = await a3.json();
491
+ return { data: o3 ?? {}, errors: s3 };
492
+ }, webhooks: u2, servicePlugins: c2 };
493
+ }
494
+ function We(e2) {
495
+ return e2.headers?.get(`X-Wix-Consistent`) ?? e2.headers?.get(`x-wix-consistent`);
496
+ }
497
+ var Ge = `wix:`;
498
+ var Ke = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
499
+ var qe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
500
+ var Je = `items`;
501
+ var Ye = `pagingMetadata`;
502
+ var Xe = Ke;
503
+ function Ze(e2, t2) {
504
+ return e2?.split(`.`).map((e3) => t2?.[e3] ?? e3).join(`.`);
505
+ }
506
+ function Qe(e2, { transformSystemFields: t2 = true } = {}) {
507
+ return t2 ? Ze(e2, Xe) : e2;
508
+ }
509
+ var $e = `sort.fieldName`;
510
+ function et(e2, t2, n2) {
511
+ return (e2 === $e || e2.endsWith(`.${$e}`)) && typeof t2 == `string` ? Ze(t2, n2) : t2;
512
+ }
513
+ function tt(e2, t2, n2) {
514
+ let r2 = (e3) => n2.includes(e3), i2 = (e3, n3) => {
515
+ if (Array.isArray(e3)) e3.forEach((e4) => {
516
+ i2(e4, n3);
517
+ });
518
+ else if (typeof e3 == `object` && e3) {
519
+ let a2 = e3;
520
+ Object.keys(a2).forEach((e4) => {
521
+ let o2 = n3 === `` ? e4 : `${n3}.${e4}`;
522
+ if (r2(o2)) return;
523
+ let s2 = nt(e4, t2);
524
+ s2 !== e4 && !(s2 in a2) && (a2[s2] = a2[e4], delete a2[e4]), a2[s2] = et(o2, a2[s2], t2), i2(a2[s2], o2);
525
+ });
526
+ }
527
+ };
528
+ return i2(e2, ``), e2;
529
+ }
530
+ function nt(e2, t2) {
531
+ let n2;
532
+ return n2 = e2.includes(`.`) ? e2.split(`.`).map((e3) => t2[e3] ?? e3).join(`.`) : t2[e2] ?? e2, n2;
533
+ }
534
+ function j(e2, t2 = []) {
535
+ return tt(e2, Ke, t2);
536
+ }
537
+ function M(e2, t2 = []) {
538
+ return tt(e2, qe, t2);
539
+ }
540
+ function rt(e2) {
541
+ return e2?.toISOString();
542
+ }
543
+ function N(e2) {
544
+ return e2 ? new Date(e2) : void 0;
545
+ }
546
+ var it = /* @__PURE__ */ new WeakMap();
547
+ function at() {
548
+ return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
549
+ }
550
+ function ot(e2, t2) {
551
+ let n2 = e2.get(t2);
552
+ return n2 || (n2 = at(), e2.set(t2, n2)), n2;
553
+ }
554
+ function st(e2, t2) {
555
+ return t2 === `*` ? (e2.anyField ??= at(), e2.anyField) : t2.endsWith(`{}`) ? (e2.mapFields ??= /* @__PURE__ */ new Map(), ot(e2.mapFields, t2.slice(0, -2))) : (e2.fields ??= /* @__PURE__ */ new Map(), ot(e2.fields, t2));
556
+ }
557
+ function ct(e2) {
558
+ let t2 = at();
559
+ for (let n2 of e2) {
560
+ let e3 = n2.path.split(`.`).reduce(st, t2);
561
+ e3.leaves ??= [], e3.leaves.push(n2);
562
+ }
563
+ return t2;
564
+ }
565
+ function lt(e2) {
566
+ let t2 = it.get(e2);
567
+ return t2 || (t2 = ct(e2), it.set(e2, t2)), t2;
568
+ }
569
+ function ut(e2) {
570
+ return typeof e2 == `object` && !!e2;
571
+ }
572
+ function dt(e2, { isRepeated: t2, isMap: n2 }, r2) {
573
+ return t2 ? Array.isArray(e2) ? e2.map(r2) : e2 : n2 ? ut(e2) ? Object.fromEntries(Object.entries(e2).map(([e3, t3]) => [e3, r2(t3)])) : e2 : r2(e2);
574
+ }
575
+ function ft(e2, t2, n2) {
576
+ ut(e2) && ht(e2, t2, n2);
577
+ }
578
+ function pt(e2, t2, n2) {
579
+ for (let [r2, i2] of t2) {
580
+ if (!(r2 in e2)) continue;
581
+ if (i2.leaves) for (let t4 of i2.leaves) e2[r2] = dt(e2[r2], t4, n2);
582
+ let t3 = e2[r2];
583
+ Array.isArray(t3) ? t3.forEach((e3) => ft(e3, i2, n2)) : ft(t3, i2, n2);
584
+ }
585
+ }
586
+ function mt(e2, t2, n2) {
587
+ for (let [r2, i2] of t2) {
588
+ let t3 = e2[r2];
589
+ ut(t3) && Object.values(t3).forEach((e3) => ft(e3, i2, n2));
590
+ }
591
+ }
592
+ function ht(e2, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
593
+ t2 && pt(e2, t2, i2), n2 && mt(e2, n2, i2), r2 && Object.values(e2).forEach((e3) => ft(e3, r2, i2));
594
+ }
595
+ function P(e2, t2) {
596
+ if (!ut(e2)) return e2;
597
+ for (let { paths: n2, transformFn: r2 } of t2) ht(e2, lt(n2), r2);
598
+ return e2;
599
+ }
600
+ function gt(e2, t2) {
601
+ let { protocol: n2 } = new URL(e2);
602
+ return n2 === `${t2}:` ? `${Ge}${e2}` : e2;
603
+ }
604
+ function _t(e2) {
605
+ return Object.fromEntries(Object.entries(e2).filter(([, e3]) => e3 !== void 0));
606
+ }
607
+ function vt(e2) {
608
+ return Ct(e2).map((e3) => e3.toLocaleUpperCase()).join(`_`);
609
+ }
610
+ var yt = /([\p{Ll}\d])(\p{Lu})/gu;
611
+ var bt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
612
+ var xt = `$1\0$2`;
613
+ var St = /[^\p{L}\d]+/giu;
614
+ function Ct(e2) {
615
+ let t2 = e2.trim();
616
+ t2 = t2.replace(yt, xt).replace(bt, xt), t2 = t2.replace(St, `\0`);
617
+ let n2 = 0, r2 = t2.length;
618
+ for (; t2.charAt(n2) === `\0`; ) n2++;
619
+ if (n2 === r2) return [];
620
+ for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
621
+ return t2.slice(n2, r2).split(/\0/g);
622
+ }
623
+ var wt = (e2) => `validationError` in (e2.response?.data?.details ?? {});
624
+ var Tt = (e2) => `applicationError` in (e2.response?.data?.details ?? {});
625
+ var Et = (e2) => (e2.response?.status ?? -1) >= 400 && (e2.response?.status ?? -1) < 500;
626
+ function F(e2, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
627
+ if (typeof e2 != `object` || !e2) throw e2;
628
+ if (wt(e2)) return Dt(e2, t2, n2);
629
+ if (Tt(e2)) return kt(e2);
630
+ if (Et(e2)) {
631
+ let t3 = e2.response?.status, n3 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: vt(n3), data: {} }, requestId: e2.requestId };
632
+ return Ot(e2, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
633
+ }
634
+ return At(e2);
635
+ }
636
+ var Dt = (e2, t2, n2) => {
637
+ let r2 = e2.response?.data, i2 = e2.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = jt(t2, a2, n2)?.sort((e3, t3) => e3.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e3, description: t3 }) => `"${e3}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
638
+ return Ot(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e2.response?.status, requestId: i2 } });
639
+ };
640
+ var Ot = (e2, { message: t2, extraProperties: n2 }) => Object.assign(e2, { ...n2, message: t2 });
641
+ var kt = (e2) => {
642
+ let t2 = e2.response?.status, n2 = e2.response?.statusText ?? `UNKNOWN`, r2 = e2.response?.data?.message ?? n2, i2 = e2.response?.data?.details?.applicationError?.description ?? n2, a2 = e2.response?.data?.details?.applicationError?.code ?? vt(n2), o2 = e2.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e2.requestId };
643
+ return Ot(e2, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e2.requestId } });
644
+ };
645
+ var At = (e2) => Ot(e2, { message: e2.requestId ? `System error occurred, request-id: ${e2.requestId}` : `System error occurred: ${JSON.stringify(e2)}`, extraProperties: { requestId: e2.requestId, status: e2.response?.status, code: vt(e2.response?.statusText ?? `UNKNOWN`), ...!e2.response && { runtimeError: e2 } } });
646
+ var jt = ({ spreadPathsToArguments: e2, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
647
+ let a2 = { ...e2, ...t2 }, o2 = Object.keys(a2);
648
+ return r2?.filter((e3) => !r2.some((t3) => t3.field.length > e3.field.length && t3.field.startsWith(e3.field) && o2.includes(t3.field))).map((e3) => {
649
+ let r3 = t2[e3.field];
650
+ if (r3) return { ...e3, field: Mt(r3, i2) };
651
+ let s2 = o2?.sort((e4, t3) => t3.length - e4.length)?.find((t3) => e3.field.startsWith(t3));
652
+ if (s2) {
653
+ let t3 = a2[s2];
654
+ if (t3) return { ...e3, field: e3.field.replace(s2, Mt(t3, i2)) };
655
+ }
656
+ return n2 ? { ...e3, field: `${i2[0]}.${e3.field}` } : e3;
657
+ });
658
+ };
659
+ var Mt = (e2, t2) => {
660
+ let n2 = Nt(e2);
661
+ return n2 == null ? e2 : e2.replace(`$[${n2}]`, t2[n2]);
662
+ };
663
+ var Nt = (e2) => {
664
+ let t2 = e2.match(/\$\[(?<argIndex>\d+)\]/);
665
+ return t2 && t2.groups && Number(t2.groups.argIndex);
666
+ };
667
+ function Pt() {
668
+ let e2 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
669
+ if (e2) return { initWixModules(t3, n3) {
670
+ return Ft(() => e2(t3, n3));
671
+ }, fetchWithAuth() {
672
+ throw Error(`fetchWithAuth is not available in this context`);
673
+ }, graphql() {
674
+ throw Error(`graphql is not available in this context`);
675
+ } };
676
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : v.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : v.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : v.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : v.elevatedClient;
677
+ if (t2 || n2) return { initWixModules(e3, r2) {
678
+ if (r2) {
679
+ 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`);
680
+ return Ft(() => n2.use(e3));
681
+ }
682
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
683
+ return Ft(() => t2.use(e3));
684
+ }, fetchWithAuth: (e3, n3) => {
685
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
686
+ return t2.fetchWithAuth(e3, n3);
687
+ }, getAuth() {
688
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
689
+ return t2.auth;
690
+ }, async graphql(e3, n3, r2) {
691
+ if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
692
+ return t2.graphql(e3, n3, r2);
693
+ } };
694
+ }
695
+ function Ft(e2) {
696
+ let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
697
+ globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
698
+ try {
699
+ return e2();
700
+ } finally {
701
+ globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
702
+ }
703
+ }
704
+ function It(e2, t2) {
705
+ return (...n2) => {
706
+ let r2 = Pt();
707
+ return r2 ? r2.initWixModules(e2, t2).apply(void 0, n2) : e2.apply(void 0, n2);
708
+ };
709
+ }
710
+ function Lt(e2) {
711
+ let t2 = (...t3) => {
712
+ let n2 = Pt();
713
+ return n2 ? n2.initWixModules(e2).apply(void 0, t3) : () => ({ slug: e2.type });
714
+ };
715
+ return t2.__type = e2.__type, t2.type = e2.type, t2.isDomainEvent = e2.isDomainEvent, t2.transformations = e2.transformations, t2;
716
+ }
717
+ function I(e2, t2 = false) {
718
+ return It(e2, t2);
719
+ }
720
+ function Rt(e2, t2) {
721
+ let n2 = zt(e2), r2 = Object.entries(n2).some(([e3, t3]) => e3.includes(`.`) || Array.isArray(t3) && t3.some((e4) => typeof e4 == `object`));
722
+ return t2 && r2 ? new URLSearchParams({ ".r": Vt(JSON.stringify(e2)) }) : Object.entries(n2).reduce((e3, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
723
+ r3 == null || Array.isArray(n3) && typeof r3 == `object` || e3.append(t3, r3);
724
+ }), e3), new URLSearchParams());
725
+ }
726
+ function L(e2) {
727
+ let t2 = en(Qt(e2.host), e2.domainToMappings);
728
+ return un(sn(e2.protoPath, e2.data || {}), t2);
729
+ }
730
+ function zt(e2, t2 = ``) {
731
+ let n2 = {};
732
+ return Object.entries(e2).forEach(([e3, r2]) => {
733
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Bt(t2, e3);
734
+ if (i2) {
735
+ let e4 = zt(r2, a2);
736
+ Object.assign(n2, e4);
737
+ } else n2[a2] = r2;
738
+ }), n2;
739
+ }
740
+ function Bt(e2, t2) {
741
+ return `${e2}${e2 ? `.` : ``}${t2}`;
742
+ }
743
+ var Vt = (e2) => {
744
+ let t2 = new TextEncoder().encode(e2);
745
+ return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e2, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
746
+ };
747
+ var Ht = [`wix.com`, `editorx.com`];
748
+ var Ut = `_`;
749
+ var Wt = `*.`;
750
+ var Gt = RegExp(`\\.(${Ht.join(`|`)})$`);
751
+ var Kt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
752
+ var qt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
753
+ var Jt = `dev.wix-code.com`;
754
+ var Yt = /{(.*)}/;
755
+ var Xt = RegExp(`\\.(${Kt.join(`|`)})$`);
756
+ var Zt = RegExp(`.*\\.${Jt}$`);
757
+ function Qt(e2) {
758
+ return $t(e2).replace(Gt, `._base_domain_`).replace(Xt, `._api_base_domain_`).replace(Zt, `*.dev.wix-code.com`);
759
+ }
760
+ function $t(e2) {
761
+ return qt[e2] ?? e2;
762
+ }
763
+ function en(e2, t2) {
764
+ let n2 = t2[e2];
765
+ if (n2) return n2;
766
+ let r2 = tn(e2, t2) ?? nn(e2, t2);
767
+ if (!r2) {
768
+ if (an(e2)) {
769
+ let e3 = t2[on];
770
+ if (e3) return e3;
771
+ }
772
+ let n3 = t2[Ut];
773
+ if (n3) return n3;
774
+ }
775
+ return r2 ?? [];
776
+ }
777
+ function tn(e2, t2) {
778
+ return Object.entries(t2).find(([t3]) => {
779
+ let [, ...n2] = e2.split(`.`);
780
+ return n2.join(`.`) === t3;
781
+ })?.[1];
782
+ }
783
+ function nn(e2, t2) {
784
+ let [n2] = Object.entries(t2).filter(([t3]) => rn(e2, t3)).sort(([e3], [t3]) => t3.length - e3.length);
785
+ if (!n2) return;
786
+ let [, r2] = n2;
787
+ return r2;
788
+ }
789
+ function rn(e2, t2) {
790
+ if (!t2.startsWith(Wt)) return false;
791
+ let n2 = t2.slice(1);
792
+ return e2.length > n2.length && e2.endsWith(n2);
793
+ }
794
+ function an(e2) {
795
+ return !!e2.match(/\._base_domain_$/);
796
+ }
797
+ var on = `www._base_domain_`;
798
+ function sn(e2, t2) {
799
+ return e2.split(`/`).map((e3) => cn(e3, t2)).join(`/`);
800
+ }
801
+ function cn(e2, t2) {
802
+ let n2 = e2.match(Yt) || [], r2 = n2[1];
803
+ return r2 ? ln(t2, r2, e2, e2.replace(n2[0], ``)) : e2;
804
+ }
805
+ function ln(e2, t2, n2, r2) {
806
+ let i2 = e2;
807
+ for (let e3 of t2.split(`.`)) {
808
+ if (!i2) return n2;
809
+ i2 = i2[e3];
810
+ }
811
+ return `${i2}${r2}`;
812
+ }
813
+ function un(e2, t2) {
814
+ let n2 = t2?.find((t3) => e2.startsWith(t3.destPath));
815
+ return n2 ? n2.srcPath + e2.slice(n2.destPath.length) : e2;
816
+ }
817
+ function R(e2) {
818
+ return Lt(e2);
819
+ }
820
+ function dn(e2) {
821
+ return isFinite(e2) ? e2 : e2.toString();
822
+ }
823
+ function z(e2) {
824
+ return e2 === `NaN` ? NaN : e2 === `Infinity` ? 1 / 0 : e2 === `-Infinity` ? -1 / 0 : e2;
825
+ }
826
+ function fn(e2) {
827
+ return e2 && _t({ city: e2.city, hint: e2.hint, subdivision: e2.subdivision, country: e2.country, postalCode: e2.postalCode, formattedAddress: e2.formatted, geocode: e2.location, addressLine: e2.addressLine1, addressLine2: e2.addressLine2, streetAddress: e2.streetAddress && { name: e2.streetAddress.name, number: e2.streetAddress.number, apt: e2.streetAddress.apt, formattedAddressLine: e2.streetAddress.formattedAddressLine } });
828
+ }
829
+ function pn(e2) {
830
+ return e2 && _t({ formatted: e2.formattedAddress, location: e2.geocode, addressLine1: e2.addressLine, addressLine2: e2.addressLine2, streetAddress: e2.streetAddress && { name: e2.streetAddress.name, number: e2.streetAddress.number, apt: e2.streetAddress.apt, formattedAddressLine: e2.streetAddress.formattedAddressLine }, hint: e2.hint, city: e2.city, subdivision: e2.subdivision, country: e2.country, postalCode: e2.postalCode, countryFullname: e2.countryFullname, subdivisionFullname: e2.subdivisionFullname });
831
+ }
832
+ var mn = `x-wix-linguist`;
833
+ var hn = `00000000-0000-0000-0000-000000000000`;
834
+ var gn = `false`;
835
+ var _n = () => {
836
+ let e2 = bn(`language`), t2 = bn(`locale`);
837
+ if (e2) return { [mn]: [e2, t2 || e2, gn, hn].join(`|`) };
838
+ };
839
+ function vn() {
840
+ let e2 = null, t2 = null;
841
+ return { promise: new Promise((n2, r2) => {
842
+ e2 = n2, t2 = r2;
843
+ }), resolve: e2, reject: t2 };
844
+ }
845
+ var yn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
846
+ var bn = (e2) => yn()?.[e2];
847
+ var xn = ({ createHost: e2 }) => ({ __type: `host`, create: (e3) => ({}), host: (t2) => {
848
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e2(t2), o2 = Cn();
849
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: bn(`language`), locale: bn(`locale`), get passThroughHeaders() {
850
+ return _n();
851
+ } } };
852
+ }, auth: (e3) => {
853
+ let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
854
+ !e3 && Sn() && (e3 = t2?.getAccessTokenFunction?.());
855
+ let n2 = false, { resolve: r2, promise: i2 } = vn();
856
+ return { getAuthHeaders: async () => {
857
+ if (!e3 && n2 && (e3 = await i2), !e3) throw Error(`Failed to resolve auth token`);
858
+ return { headers: { Authorization: await e3() } };
859
+ }, getAccessTokenInjector: () => (n2 = true, (e4) => {
860
+ r2(e4);
861
+ }) };
862
+ } });
863
+ function Sn() {
864
+ return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
865
+ }
866
+ function Cn() {
867
+ let e2 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
868
+ if (!e2) return;
869
+ let t2 = new URL(e2);
870
+ return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
871
+ }
872
+ var wn = ({ clientSdk: e2, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
873
+ if (!e2) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
874
+ return e2.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
875
+ }, getAccessToken: () => {
876
+ throw Error(`Not implemented`);
877
+ }, observeState: () => ({ disconnect: () => {
878
+ } }) });
879
+ var Tn = xn({ createHost: function(e2) {
880
+ let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e2?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e2 || {};
881
+ if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
882
+ return { channel: wn({ clientSdk: t2, applicationId: n2 }), close: () => {
883
+ } };
884
+ } });
885
+ var En = (e2, t2) => {
886
+ let n2 = Tn.host({ applicationId: e2, componentId: t2 }), r2 = Tn.auth();
887
+ return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
888
+ };
889
+ var Dn = (e2) => En(`215238eb-22a5-4c36-9e7b-e7c08025e04e`, e2);
890
+ function On(e2) {
891
+ return Object.keys(e2).length === 1 && `$and` in e2 && Array.isArray(e2.$and);
892
+ }
893
+ function kn(e2) {
894
+ return Object.keys(e2).length === 1 && `$or` in e2 && Array.isArray(e2.$or);
895
+ }
896
+ function An(e2) {
897
+ return Object.keys(e2).length === 1 && `$not` in e2 && typeof e2.$not == `object`;
898
+ }
899
+ function B(e2, t2) {
900
+ return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $and: [...On(e2) ? e2.$and : [e2], ...On(t2) ? t2.$and : [t2]] };
901
+ }
902
+ function jn(e2, t2) {
903
+ return e2 === void 0 || Object.keys(e2).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e2 : { $or: [...kn(e2) ? e2.$or : [e2], ...kn(t2) ? t2.$or : [t2]] };
904
+ }
905
+ function Mn(e2) {
906
+ if (e2 !== void 0 && Object.keys(e2).length !== 0) return An(e2) ? e2.$not : { $not: e2 };
907
+ }
908
+ var Nn = class {
909
+ _items;
910
+ _fetchNextPage;
911
+ _fetchPrevPage;
912
+ _originQuery;
913
+ _limit;
914
+ constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }) {
915
+ this._items = e2, this._fetchNextPage = n2, this._fetchPrevPage = r2, this._originQuery = t2, this._limit = i2;
916
+ }
917
+ get items() {
918
+ return this._items;
919
+ }
920
+ get length() {
921
+ return this._items.length;
922
+ }
923
+ get pageSize() {
924
+ return this._limit;
925
+ }
926
+ get query() {
927
+ return this._originQuery;
928
+ }
929
+ async next() {
930
+ if (!this.hasNext()) throw Error(`No next page to fetch`);
931
+ return await this._fetchNextPage();
932
+ }
933
+ async prev() {
934
+ if (!this.hasPrev()) throw Error(`No previous page to fetch`);
935
+ return await this._fetchPrevPage();
936
+ }
937
+ };
938
+ var Pn = class extends Nn {
939
+ _nextCursor;
940
+ _prevCursor;
941
+ cursors;
942
+ constructor({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2, nextCursor: a2, prevCursor: o2 }) {
943
+ super({ items: e2, originQuery: t2, fetchNextPage: n2, fetchPrevPage: r2, limit: i2 }), this._nextCursor = a2, this._prevCursor = o2, this.cursors = { next: a2, prev: o2 };
944
+ }
945
+ hasNext() {
946
+ return !!this._nextCursor;
947
+ }
948
+ hasPrev() {
949
+ return !!this._prevCursor;
950
+ }
951
+ };
952
+ var Fn = class extends Nn {
953
+ _totalCount;
954
+ _offset;
955
+ _tooManyToCount;
956
+ constructor({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, offset: r2, originQuery: i2, limit: a2, totalCount: o2, tooManyToCount: s2 }) {
957
+ super({ items: e2, fetchNextPage: t2, fetchPrevPage: n2, originQuery: i2, limit: a2 }), this._totalCount = o2, this._offset = r2, this._tooManyToCount = s2;
958
+ }
959
+ get currentPage() {
960
+ return this._limit === 0 ? void 0 : Math.floor(this._offset / this._limit);
961
+ }
962
+ get totalPages() {
963
+ return this._tooManyToCount || this._limit === 0 ? void 0 : Math.ceil(this._totalCount / this._limit);
964
+ }
965
+ get totalCount() {
966
+ return this._tooManyToCount ? void 0 : this._totalCount;
967
+ }
968
+ hasNext() {
969
+ return this._limit !== 0 && this.currentPage !== void 0 && this.totalPages !== void 0 && this.currentPage < this.totalPages - 1;
970
+ }
971
+ hasPrev() {
972
+ return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
973
+ }
974
+ };
975
+ function In(e2) {
976
+ let t2 = (n2) => ({ query: n2, async find() {
977
+ try {
978
+ let r2 = e2.requestTransformer(e2.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e2.func(r2), { [Je]: a2, [Ye]: o2 } = e2.responseTransformer(i2);
979
+ if (e2.pagingMethod === `OFFSET`) {
980
+ let e3 = n2;
981
+ return new Fn({ items: a2 ?? [], fetchNextPage: () => t2({ ...e3, paging: { offset: e3.paging.offset + e3.paging.limit, limit: e3.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e3.paging.offset - e3.paging.limit, 0), limit: e3.paging.limit } }).find(), offset: e3.paging.offset, limit: e3.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
982
+ }
983
+ let s2 = n2.cursorPaging;
984
+ return new Pn({ 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 });
985
+ } catch (t3) {
986
+ throw e2.errorTransformer(t3);
987
+ }
988
+ }, skipTo(e3) {
989
+ return t2({ ...n2, cursorPaging: { cursor: e3, limit: n2.cursorPaging.limit } });
990
+ }, eq(r2, i2) {
991
+ let a2 = i2 === void 0 ? null : i2, o2 = { [V(e2.transformationPaths, r2)]: a2 };
992
+ return t2({ ...n2, filter: B(n2.filter, o2) });
993
+ }, ne(r2, i2) {
994
+ let a2 = i2 === void 0 ? null : i2, o2 = { [V(e2.transformationPaths, r2)]: { $ne: a2 } };
995
+ return t2({ ...n2, filter: B(n2.filter, o2) });
996
+ }, ge(r2, i2) {
997
+ let a2 = { [V(e2.transformationPaths, r2)]: { $gte: i2 } };
998
+ return t2({ ...n2, filter: B(n2.filter, a2) });
999
+ }, gt(r2, i2) {
1000
+ let a2 = { [V(e2.transformationPaths, r2)]: { $gt: i2 } };
1001
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1002
+ }, le(r2, i2) {
1003
+ let a2 = { [V(e2.transformationPaths, r2)]: { $lte: i2 } };
1004
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1005
+ }, lt(r2, i2) {
1006
+ let a2 = { [V(e2.transformationPaths, r2)]: { $lt: i2 } };
1007
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1008
+ }, isNotEmpty(e3) {
1009
+ return this.ne(e3, null);
1010
+ }, isEmpty(e3) {
1011
+ return this.eq(e3, null);
1012
+ }, startsWith(r2, i2) {
1013
+ let a2 = { [V(e2.transformationPaths, r2)]: { $startsWith: i2 } };
1014
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1015
+ }, endsWith(r2, i2) {
1016
+ let a2 = { [V(e2.transformationPaths, r2)]: { $endsWith: i2 } };
1017
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1018
+ }, contains(r2, i2) {
1019
+ let a2 = { [V(e2.transformationPaths, r2)]: { $contains: i2 } };
1020
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1021
+ }, hasSome(r2, ...i2) {
1022
+ let a2 = { [V(e2.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1023
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1024
+ }, hasAll(r2, ...i2) {
1025
+ let a2 = { [V(e2.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1026
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1027
+ }, between(e3, t3, n3) {
1028
+ return this.ge(e3, t3).lt(e3, n3);
1029
+ }, in(r2, i2) {
1030
+ let a2 = { [V(e2.transformationPaths, r2)]: { $in: i2 } };
1031
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1032
+ }, exists(r2, i2 = true) {
1033
+ let a2 = { [V(e2.transformationPaths, r2)]: { $exists: i2 } };
1034
+ return t2({ ...n2, filter: B(n2.filter, a2) });
1035
+ }, or(e3) {
1036
+ return t2({ ...n2, filter: jn(n2.filter, e3.query.filter) });
1037
+ }, and(e3) {
1038
+ return t2({ ...n2, filter: B(n2.filter, e3.query.filter) });
1039
+ }, not(e3) {
1040
+ return t2({ ...n2, filter: Mn(e3.query.filter) });
1041
+ }, ascending(...r2) {
1042
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: V(e2.transformationPaths, t3), order: `ASC` }))] });
1043
+ }, descending(...r2) {
1044
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: V(e2.transformationPaths, t3), order: `DESC` }))] });
1045
+ }, skip(e3) {
1046
+ return t2({ ...n2, paging: { offset: e3, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
1047
+ }, limit(r2) {
1048
+ if (e2.pagingMethod === `CURSOR`) {
1049
+ let e3 = n2;
1050
+ return t2({ ...n2, cursorPaging: { limit: r2, cursor: `cursor` in e3.cursorPaging ? e3.cursorPaging.cursor : void 0 } });
1051
+ }
1052
+ let i2 = n2;
1053
+ return t2({ ...n2, paging: { limit: r2, offset: `offset` in i2.paging ? i2.paging.offset : 0 } });
1054
+ } });
1055
+ return t2({ filter: {}, ...e2.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
1056
+ }
1057
+ function V(e2, t2) {
1058
+ let n2 = Object.entries(e2).find(([e3]) => e3 === t2 || t2.startsWith(`${e3}.`))?.[0];
1059
+ return n2 ? t2.replace(n2, e2[n2]) : Ze(t2, { ...e2, ...Xe });
1060
+ }
1061
+ function Ln(e2, t2, n2 = {}) {
1062
+ let r2 = (r3, i3) => Ln(e2, t2, { ...n2, [r3]: i3 }), i2 = () => Object.keys(n2).length === 0 ? {} : { [Qe(e2, t2)]: n2 };
1063
+ return { get filter() {
1064
+ return i2();
1065
+ }, eq: (e3) => r2(`$eq`, e3), ne: (e3) => r2(`$ne`, e3), gt: (e3) => r2(`$gt`, e3), gte: (e3) => r2(`$gte`, e3), lt: (e3) => r2(`$lt`, e3), lte: (e3) => r2(`$lte`, e3), startsWith: (e3) => r2(`$startsWith`, e3), endsWith: (e3) => r2(`$endsWith`, e3), contains: (e3) => r2(`$contains`, e3), in: (e3) => r2(`$in`, e3), nin: (e3) => r2(`$nin`, e3), hasSome: (e3) => r2(`$hasSome`, e3), hasAll: (e3) => r2(`$hasAll`, e3), exists: (e3 = true) => r2(`$exists`, e3), isEmpty: (e3 = true) => r2(`$isEmpty`, e3), isNotEmpty: () => r2(`$ne`, null) };
1066
+ }
1067
+ function Rn(e2) {
1068
+ return Object.assign((t2) => Ln(t2, e2), { and: (...e3) => ({ filter: { $and: e3.map((e4) => e4.filter) } }), or: (...e3) => ({ filter: { $or: e3.map((e4) => e4.filter) } }), not: (e3) => ({ filter: { $not: e3.filter } }) });
1069
+ }
1070
+ function zn(e2) {
1071
+ return (t2) => ({ asc: () => ({ sort: { fieldName: Qe(t2, e2), order: `ASC` } }), desc: () => ({ sort: { fieldName: Qe(t2, e2), order: `DESC` } }) });
1072
+ }
1073
+ function Bn(e2) {
1074
+ return () => {
1075
+ let t2 = {}, n2 = { withFilter(e3) {
1076
+ return t2 = { ...t2, filter: e3.filter }, n2;
1077
+ }, withFields(...r2) {
1078
+ return t2 = { ...t2, fields: r2.map((t3) => Qe(t3, e2)) }, n2;
1079
+ }, withSorting(...e3) {
1080
+ return t2 = { ...t2, sort: e3.map((e4) => e4.sort) }, n2;
1081
+ }, withPaging(e3) {
1082
+ return t2 = { ...t2, paging: e3 }, n2;
1083
+ }, build() {
1084
+ return t2;
1085
+ } };
1086
+ return n2;
1087
+ };
1088
+ }
1089
+ function Vn(e2) {
1090
+ return { QueryBuilder: Bn(e2), Filter: Rn(e2), Sort: zn(e2) };
1091
+ }
1092
+ var Hn = `filter`;
1093
+ var Un = `sort`;
1094
+ var Wn = `cursorPaging`;
1095
+ var Gn = `paging`;
1096
+ var Kn = [Hn, Un, Wn];
1097
+ var qn = [Hn, Un, Gn];
1098
+ function Jn(e2, t2) {
1099
+ return !e2 || typeof e2 != `object` ? false : t2.some((t3) => e2.hasOwnProperty(t3));
1100
+ }
1101
+ function Yn(e2) {
1102
+ return Jn(e2, Kn);
1103
+ }
1104
+ function Xn(e2) {
1105
+ return Jn(e2, qn);
1106
+ }
1107
+ function Zn(e2) {
1108
+ let { hasOptionsParameter: t2 } = e2;
1109
+ return function(...n2) {
1110
+ return t2 ? $n(n2, e2) : Qn(n2, e2);
1111
+ };
1112
+ }
1113
+ function Qn(e2, t2) {
1114
+ return e2.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e2[0]);
1115
+ }
1116
+ function $n(e2, t2) {
1117
+ switch (e2.length) {
1118
+ case 0:
1119
+ return t2.builderQueryFunction();
1120
+ case 1:
1121
+ return Yn(e2[0]) || Xn(e2[0]) ? t2.typedQueryFunction(e2[0]) : t2.builderQueryFunction(e2[0]);
1122
+ default:
1123
+ return t2.typedQueryFunction(e2[0], e2[1]);
1124
+ }
1125
+ }
1126
+ function er(e2) {
1127
+ if (!e2) return;
1128
+ let t2 = gt(e2, `image`), { protocol: n2, hash: r2, pathname: i2 } = new URL(t2), a2 = new URLSearchParams(r2.replace(`#`, ``)), o2 = a2.get(`originHeight`), s2 = a2.get(`originWidth`), [c2, l2] = i2.replace(`image://v1/`, ``).split(`/`), u2 = decodeURIComponent(l2);
1129
+ if (n2 === `wix:`) {
1130
+ let t3 = { id: c2, height: Number(o2), width: Number(s2) };
1131
+ return u2 ? { ...t3, altText: u2, filename: u2, url: e2 } : t3;
1132
+ }
1133
+ return { url: e2 };
1134
+ }
1135
+ function H(e2) {
1136
+ if (!e2) return;
1137
+ let t2 = ``;
1138
+ return (e2.filename || e2.altText) && (t2 = `/${encodeURIComponent(e2.filename || e2.altText)}`), e2.id ? `wix:image://v1/${e2.id}${t2}#originWidth=${e2.width}&originHeight=${e2.height}` : e2.url;
1139
+ }
1140
+ function tr(e2) {
1141
+ if (!e2) return;
1142
+ let t2 = ``;
1143
+ e2?.filename && (t2 = `/${encodeURIComponent(e2.filename)}`);
1144
+ let n2 = ``;
1145
+ if (e2.posters?.length) {
1146
+ let [t3, r2] = e2.posters, i2 = r2 || t3, a2 = i2.id || ``;
1147
+ if (!a2 && i2.url) {
1148
+ let e3 = i2.url.lastIndexOf(`/`);
1149
+ e3 !== -1 && (a2 = i2.url.substring(e3 + 1));
1150
+ }
1151
+ a2 && (n2 = `#posterUri=${a2}&posterWidth=${i2.width}&posterHeight=${i2.height}`);
1152
+ }
1153
+ return e2.id ? `wix:video://v1/${e2.id}${t2}${n2}` : e2.url;
1154
+ }
1155
+ function nr(e2) {
1156
+ let t2 = {}, n2 = { get search() {
1157
+ return t2;
1158
+ }, expression(e3) {
1159
+ return t2 = { ...t2, expression: e3 }, n2;
1160
+ }, mode(e3) {
1161
+ return t2 = { ...t2, mode: e3 }, n2;
1162
+ }, fields(r2) {
1163
+ return t2 = { ...t2, fields: r2.map((t3) => Qe(t3, e2)) }, n2;
1164
+ }, fuzzy(e3 = true) {
1165
+ return t2 = { ...t2, fuzzy: e3 }, n2;
1166
+ } };
1167
+ return n2;
1168
+ }
1169
+ function rr(e2) {
1170
+ return (t2) => {
1171
+ let n2 = nr(e2);
1172
+ return t2 === void 0 ? n2 : n2.expression(t2);
1173
+ };
1174
+ }
1175
+ function ir(e2) {
1176
+ let t2 = { ...e2, type: `VALUE`, value: { ...e2.value } }, n2 = { get aggregation() {
1177
+ return t2;
1178
+ }, sortBy(e3, r2) {
1179
+ return t2 = { ...t2, value: { ...t2.value, sortType: e3, sortDirection: r2 } }, n2;
1180
+ }, limit(e3) {
1181
+ return t2 = { ...t2, value: { ...t2.value, limit: e3 } }, n2;
1182
+ }, excludeMissingValues() {
1183
+ return t2 = { ...t2, value: { ...t2.value, missingValues: `EXCLUDE` } }, n2;
1184
+ }, includeMissingValues() {
1185
+ return t2 = { ...t2, value: { ...t2.value, missingValues: `INCLUDE` } }, n2;
1186
+ }, includeValues(e3) {
1187
+ return t2 = { ...t2, value: { ...t2.value, includeOptions: { addToBucket: e3 } } }, n2;
1188
+ } };
1189
+ return n2;
1190
+ }
1191
+ function ar(e2) {
1192
+ let t2 = { ...e2, type: `RANGE`, range: { buckets: [] } }, n2 = { get aggregation() {
1193
+ return t2;
1194
+ }, withBuckets(...e3) {
1195
+ return t2 = { ...t2, range: { buckets: e3 } }, n2;
1196
+ } };
1197
+ return n2;
1198
+ }
1199
+ function or(e2) {
1200
+ let t2 = { ...e2, type: `DATE_HISTOGRAM`, dateHistogram: {} }, n2 = { get aggregation() {
1201
+ return t2;
1202
+ }, interval(e3) {
1203
+ return t2 = { ...t2, dateHistogram: { interval: e3 } }, n2;
1204
+ } };
1205
+ return n2;
1206
+ }
1207
+ function sr(e2) {
1208
+ let t2 = { ...e2, type: `SCALAR`, scalar: {} }, n2 = { get aggregation() {
1209
+ return t2;
1210
+ }, type(e3) {
1211
+ return t2 = { ...t2, scalar: { type: e3 } }, n2;
1212
+ } };
1213
+ return n2;
1214
+ }
1215
+ function cr(e2) {
1216
+ let t2 = { ...e2, type: `NESTED`, nested: { nestedAggregations: [] } }, n2 = { get aggregation() {
1217
+ return t2;
1218
+ }, addNestedAggregation(e3) {
1219
+ let r2 = e3.aggregation, i2 = [...t2.nested?.nestedAggregations ?? [], r2];
1220
+ return t2 = { ...t2, nested: { nestedAggregations: i2 } }, n2;
1221
+ } };
1222
+ return n2;
1223
+ }
1224
+ function lr(e2, t2) {
1225
+ let n2 = { name: e2 }, r2 = { get aggregation() {
1226
+ return n2;
1227
+ }, ofType(e3) {
1228
+ return n2 = { ...n2, type: e3 }, r2;
1229
+ }, onField(e3) {
1230
+ return n2 = { ...n2, fieldPath: Qe(e3, t2) }, r2;
1231
+ }, asValueAggregation() {
1232
+ return ir(n2);
1233
+ }, asRangeAggregation() {
1234
+ return ar(n2);
1235
+ }, asDateHistogramAggregation() {
1236
+ return or(n2);
1237
+ }, asScalarAggregation() {
1238
+ return sr(n2);
1239
+ }, asNestedAggregation() {
1240
+ return cr(n2);
1241
+ } };
1242
+ return r2;
1243
+ }
1244
+ function ur(e2) {
1245
+ return (t2) => lr(t2, e2);
1246
+ }
1247
+ function dr() {
1248
+ return () => {
1249
+ let e2 = {}, t2 = { withFilter(n2) {
1250
+ return e2 = { ...e2, filter: n2.filter }, t2;
1251
+ }, withSearchClause(n2) {
1252
+ return e2 = { ...e2, search: n2.search }, t2;
1253
+ }, withSorting(...n2) {
1254
+ return e2 = { ...e2, sort: n2.map((e3) => e3.sort) }, t2;
1255
+ }, withAggregation(...n2) {
1256
+ return e2 = { ...e2, aggregations: n2.map((e3) => e3.aggregation) }, t2;
1257
+ }, withPaging(n2) {
1258
+ return e2 = { ...e2, paging: n2 }, t2;
1259
+ }, withTimeZone(n2) {
1260
+ return e2 = { ...e2, timeZone: n2 }, t2;
1261
+ }, build() {
1262
+ return e2;
1263
+ } };
1264
+ return t2;
1265
+ };
1266
+ }
1267
+ function fr(e2) {
1268
+ return { SearchBuilder: dr(), Filter: Rn(e2), Sort: zn(e2), SearchParams: rr(e2), Aggregation: ur(e2) };
1269
+ }
1270
+ function pr(e2) {
1271
+ return L(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/inventory`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/inventory`, destPath: `` }], _: [{ srcPath: `/_api/inventory`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/inventory`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/inventory`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/inventory`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/inventory-items`, destPath: `/v3/inventory-items` }, { srcPath: `/stores/v3/bulk/inventory-items`, destPath: `/v3/bulk/inventory-items` }], "*.dev.wix-code.com": [{ srcPath: `/_api/inventory`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/inventory`, destPath: `` }] } }));
1272
+ }
1273
+ var mr = `@wix/auto_sdk_stores_inventory-items-v-3`;
1274
+ function hr(e2) {
1275
+ function t2({ host: t3 }) {
1276
+ return { entityFqdn: `wix.stores.catalog.v3.inventory_item`, method: `GET`, methodFqn: `com.wix.stores.catalog.inventory.api.v3.InventoryService.QueryInventoryItems`, packageName: mr, migrationOptions: { optInTransformResponse: true }, url: pr({ protoPath: `/v3/inventory-items/query`, data: e2, host: t3 }), params: Rt(e2, true), transformResponse: (e3) => P(e3, [{ transformFn: N, paths: [{ path: `inventoryItems.createdDate` }, { path: `inventoryItems.updatedDate` }] }]), fallback: [{ method: `POST`, url: pr({ protoPath: `/v3/inventory-items/query`, data: e2, host: t3 }), data: e2 }] };
1277
+ }
1278
+ return t2;
1279
+ }
1280
+ var gr = ((e2) => (e2.OUT_OF_STOCK = `OUT_OF_STOCK`, e2.IN_STOCK = `IN_STOCK`, e2.PREORDER = `PREORDER`, e2))(gr || {});
1281
+ function _r() {
1282
+ let { httpClient: e2, sideEffects: t2 } = arguments[0];
1283
+ return In({ func: async (n2) => {
1284
+ let r2 = hr(n2);
1285
+ t2?.onSiteCall?.();
1286
+ try {
1287
+ let n3 = await e2.request(r2);
1288
+ return t2?.onSuccess?.(n3), n3;
1289
+ } catch (e3) {
1290
+ throw t2?.onError?.(e3), e3;
1291
+ }
1292
+ }, requestTransformer: (e3) => {
1293
+ let t3 = [e3, {}];
1294
+ return j({ ...t3?.[1], query: t3?.[0] });
1295
+ }, responseTransformer: ({ data: e3 }) => {
1296
+ let t3 = M(P(e3, []));
1297
+ return { items: t3?.inventoryItems, pagingMetadata: t3?.pagingMetadata };
1298
+ }, errorTransformer: (e3) => {
1299
+ throw F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1300
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1301
+ }
1302
+ async function vr(e2) {
1303
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = hr(j({ query: e2 }));
1304
+ n2?.onSiteCall?.();
1305
+ try {
1306
+ let e3 = await t2.request(r2);
1307
+ return n2?.onSuccess?.(e3), M(e3.data);
1308
+ } catch (e3) {
1309
+ let t3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1310
+ throw n2?.onError?.(e3), t3;
1311
+ }
1312
+ }
1313
+ ({ ...Vn() }, { ...fr() });
1314
+ function yr(e2) {
1315
+ return () => _r({ httpClient: e2 });
1316
+ }
1317
+ function br(e2) {
1318
+ return (t2) => vr(t2, { httpClient: e2 });
1319
+ }
1320
+ var xr = y(`wix.stores.catalog.v3.inventory_item_created`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1321
+ var Sr = y(`wix.stores.catalog.v3.inventory_item_deleted`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1322
+ var Cr = y(`wix.stores.catalog.v3.inventory_item_stock_status_updated`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `metadata.eventTime` }] }])))();
1323
+ var wr = y(`wix.stores.catalog.v3.inventory_item_updated`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }] }])))();
1324
+ var Tr = y(`wix.stores.catalog.v3.inventory_item_updated_with_reason`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `data.currentEntity.createdDate` }, { path: `data.currentEntity.updatedDate` }, { path: `metadata.eventTime` }] }])))();
1325
+ function Er(e2) {
1326
+ let t2 = Zn({ builderQueryFunction: () => yr(e2)(), typedQueryFunction: (t3) => br(e2)(t3), hasOptionsParameter: false });
1327
+ function n2(e3) {
1328
+ return t2(...arguments);
1329
+ }
1330
+ return n2;
1331
+ }
1332
+ var Dr = I(Er);
1333
+ R(xr), R(Sr), R(Cr), R(wr), R(Tr);
1334
+ function Or(e2) {
1335
+ if (!e2) return;
1336
+ let { pathname: t2 } = new URL(e2);
1337
+ return { relativePath: t2, url: e2 };
1338
+ }
1339
+ function U(e2) {
1340
+ if (e2) return e2.url;
1341
+ }
1342
+ function kr(e2) {
1343
+ return L(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/stores-catalog-orchestrator`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/stores`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/products`, destPath: `/v3/products` }, { srcPath: `/stores/v3/bulk/products`, destPath: `/v3/bulk/products` }, { srcPath: `/stores/v3/products-with-inventory`, destPath: `/v3/products-with-inventory` }, { srcPath: `/stores/v3/bulk/products-with-inventory`, destPath: `/v3/bulk/products-with-inventory` }, { srcPath: `/stores/v3/all-products-category`, destPath: `/v3/all-products-category` }], "www._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "editor.wixapps.net": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }], _: [{ srcPath: `/_api/stores-catalog-orchestrator`, destPath: `` }] } }));
1344
+ }
1345
+ var Ar = `@wix/auto_sdk_stores_products-v-3`;
1346
+ function jr(e2) {
1347
+ function t2({ host: t3 }) {
1348
+ return { entityFqdn: `wix.stores.catalog.v3.product`, method: `GET`, methodFqn: `wix.stores.catalog.v3.CatalogApi.GetProduct`, packageName: Ar, migrationOptions: { optInTransformResponse: true }, url: kr({ protoPath: `/v3/products/{productId}`, data: e2, host: t3 }), params: Rt(e2), transformResponse: (e3) => P(e3, [{ transformFn: N, paths: [{ path: `product.createdDate` }, { path: `product.updatedDate` }, { path: `product.description.metadata.createdTimestamp` }, { path: `product.description.metadata.updatedTimestamp` }, { path: `product.media.main.image.urlExpirationDate` }, { path: `product.media.main.video.urlExpirationDate` }, { path: `product.media.main.video.resolutions.urlExpirationDate` }, { path: `product.media.main.video.resolutions.poster.urlExpirationDate` }, { path: `product.media.main.video.posters.urlExpirationDate` }, { path: `product.media.itemsInfo.items.image.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.resolutions.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.resolutions.poster.urlExpirationDate` }, { path: `product.media.itemsInfo.items.video.posters.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.image.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.image.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate` }, { path: `product.options.choicesSettings.choices.displayImage.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.image.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.image.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.resolutions.poster.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video.posters.urlExpirationDate` }, { path: `product.modifiers.choicesSettings.choices.displayImage.urlExpirationDate` }, { path: `product.infoSections.description.metadata.createdTimestamp` }, { path: `product.infoSections.description.metadata.updatedTimestamp` }, { path: `product.variantsInfo.variants.media.image.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.resolutions.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.resolutions.poster.urlExpirationDate` }, { path: `product.variantsInfo.variants.media.video.posters.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.image.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.resolutions.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.resolutions.poster.urlExpirationDate` }, { path: `product.variantSummary.minPriceVariant.media.video.posters.urlExpirationDate` }] }, { transformFn: z, paths: [{ path: `product.physicalProperties.pricePerUnit.quantity` }, { path: `product.physicalProperties.shippingWeightRange.minValue` }, { path: `product.physicalProperties.shippingWeightRange.maxValue` }, { path: `product.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `product.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `product.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `product.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `product.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `product.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `product.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `product.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `product.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `product.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `product.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `product.description.nodes.galleryData.items.image.media.duration` }, { path: `product.description.nodes.galleryData.items.video.media.duration` }, { path: `product.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `product.description.nodes.galleryData.options.item.ratio` }, { path: `product.description.nodes.imageData.image.duration` }, { path: `product.description.nodes.imageData.crop.x` }, { path: `product.description.nodes.imageData.crop.y` }, { path: `product.description.nodes.imageData.crop.width` }, { path: `product.description.nodes.imageData.crop.height` }, { path: `product.description.nodes.mapData.mapSettings.lat` }, { path: `product.description.nodes.mapData.mapSettings.lng` }, { path: `product.description.nodes.pollData.poll.image.duration` }, { path: `product.description.nodes.pollData.poll.options.image.duration` }, { path: `product.description.nodes.pollData.design.poll.background.image.duration` }, { path: `product.description.nodes.appEmbedData.image.duration` }, { path: `product.description.nodes.videoData.video.duration` }, { path: `product.description.nodes.videoData.thumbnail.duration` }, { path: `product.description.nodes.audioData.audio.duration` }, { path: `product.description.nodes.audioData.coverImage.duration` }, { path: `product.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `product.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.layoutData.backdropImage.media.duration` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `product.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.layoutData.background.gradient.centerX` }, { path: `product.description.nodes.layoutData.background.gradient.centerY` }, { path: `product.description.nodes.layoutData.background.gradient.stops.position` }, { path: `product.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `product.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `product.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `product.description.nodes.shapeData.shape.duration` }, { path: `product.description.nodes.cardData.background.gradient.centerX` }, { path: `product.description.nodes.cardData.background.gradient.centerY` }, { path: `product.description.nodes.cardData.background.gradient.stops.position` }, { path: `product.description.nodes.cardData.backgroundImage.media.duration` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `product.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.description.nodes.tocData.fontSize` }, { path: `product.description.nodes.tocData.itemSpacing` }, { path: `product.description.nodes.smartBlockCellData.shape.duration` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `product.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `product.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `product.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `product.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `product.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `product.infoSections.description.nodes.imageData.image.duration` }, { path: `product.infoSections.description.nodes.imageData.crop.x` }, { path: `product.infoSections.description.nodes.imageData.crop.y` }, { path: `product.infoSections.description.nodes.imageData.crop.width` }, { path: `product.infoSections.description.nodes.imageData.crop.height` }, { path: `product.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `product.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `product.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `product.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `product.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `product.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `product.infoSections.description.nodes.videoData.video.duration` }, { path: `product.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `product.infoSections.description.nodes.audioData.audio.duration` }, { path: `product.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `product.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `product.infoSections.description.nodes.shapeData.shape.duration` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `product.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `product.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `product.infoSections.description.nodes.tocData.fontSize` }, { path: `product.infoSections.description.nodes.tocData.itemSpacing` }, { path: `product.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `product.variantsInfo.variants.physicalProperties.weight` }, { path: `product.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `product.minVariantPriceInfo.weight` }] }]) };
1349
+ }
1350
+ return t2;
1351
+ }
1352
+ var Mr = ((e2) => (e2.FREE_TEXT = `FREE_TEXT`, e2.TEXT_CHOICES = `TEXT_CHOICES`, e2.SWATCH_CHOICES = `SWATCH_CHOICES`, e2))(Mr || {});
1353
+ var Nr = ((e2) => (e2.IN_STOCK = `IN_STOCK`, e2.OUT_OF_STOCK = `OUT_OF_STOCK`, e2.PARTIALLY_OUT_OF_STOCK = `PARTIALLY_OUT_OF_STOCK`, e2))(Nr || {});
1354
+ var Pr = ((e2) => (e2.ALL_VARIANTS = `ALL_VARIANTS`, e2.NO_VARIANTS = `NO_VARIANTS`, e2.SOME_VARIANTS = `SOME_VARIANTS`, e2))(Pr || {});
1355
+ var W = ((e2) => (e2.URL = `URL`, e2.CURRENCY = `CURRENCY`, e2.INFO_SECTION = `INFO_SECTION`, e2.MERCHANT_DATA = `MERCHANT_DATA`, e2.PLAIN_DESCRIPTION = `PLAIN_DESCRIPTION`, e2.INFO_SECTION_PLAIN_DESCRIPTION = `INFO_SECTION_PLAIN_DESCRIPTION`, e2.SUBSCRIPTION_PRICES_INFO = `SUBSCRIPTION_PRICES_INFO`, e2.BREADCRUMBS_INFO = `BREADCRUMBS_INFO`, e2.WEIGHT_MEASUREMENT_UNIT_INFO = `WEIGHT_MEASUREMENT_UNIT_INFO`, e2.VARIANT_OPTION_CHOICE_NAMES = `VARIANT_OPTION_CHOICE_NAMES`, e2.MEDIA_ITEMS_INFO = `MEDIA_ITEMS_INFO`, e2.DESCRIPTION = `DESCRIPTION`, e2.DIRECT_CATEGORIES_INFO = `DIRECT_CATEGORIES_INFO`, e2.ALL_CATEGORIES_INFO = `ALL_CATEGORIES_INFO`, e2.INFO_SECTION_DESCRIPTION = `INFO_SECTION_DESCRIPTION`, e2.THUMBNAIL = `THUMBNAIL`, e2.PRODUCT_CHOICES_MEDIA_REFERENCES = `PRODUCT_CHOICES_MEDIA_REFERENCES`, e2.PRODUCT_CHOICES_DISPLAY_IMAGE = `PRODUCT_CHOICES_DISPLAY_IMAGE`, e2.MIN_PRICE_VARIANT = `MIN_PRICE_VARIANT`, e2.DISCOUNT_INFO = `DISCOUNT_INFO`, e2))(W || {});
1356
+ async function Fr(e2, t2) {
1357
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = jr(j({ productId: e2, fields: t2?.fields }, []));
1358
+ r2?.onSiteCall?.();
1359
+ try {
1360
+ let e3 = await n2.request(i2);
1361
+ return r2?.onSuccess?.(e3), M(P(e3.data, [{ transformFn: U, paths: [{ path: `product.url` }] }, { transformFn: H, paths: [{ path: `product.media.main.image` }, { path: `product.media.itemsInfo.items.image` }, { path: `product.options.choicesSettings.choices.image` }, { path: `product.options.choicesSettings.choices.displayImage` }, { path: `product.options.choicesSettings.choices.linkedMedia.image` }, { path: `product.modifiers.choicesSettings.choices.image` }, { path: `product.modifiers.choicesSettings.choices.displayImage` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `product.variantsInfo.variants.media.image` }, { path: `product.variantSummary.minPriceVariant.media.image` }] }, { transformFn: tr, paths: [{ path: `product.media.main.video` }, { path: `product.media.itemsInfo.items.video` }, { path: `product.options.choicesSettings.choices.linkedMedia.video` }, { path: `product.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `product.variantsInfo.variants.media.video` }, { path: `product.variantSummary.minPriceVariant.media.video` }] }]), [`product.description`, `product.infoSections.description`])?.product;
1362
+ } catch (e3) {
1363
+ let t3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { productId: `$[0]`, fields: `$[1].fields` }, singleArgumentUnchanged: false }, [`productId`, `options`]);
1364
+ throw r2?.onError?.(e3), t3;
1365
+ }
1366
+ }
1367
+ ({ ...fr() }, { ...Vn() });
1368
+ function Ir(e2) {
1369
+ return (t2, n2) => Fr(t2, n2, { httpClient: e2 });
1370
+ }
1371
+ var Lr = y(`wix.stores.catalog.v3.product_created`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: U, paths: [{ path: `entity.url` }] }, { transformFn: z, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }] }, { transformFn: H, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }] }, { transformFn: tr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }] }])))();
1372
+ var Rr = y(`wix.stores.catalog.v3.product_deleted`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }] }, { transformFn: U, paths: [{ path: `entity.url` }] }, { transformFn: z, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }] }, { transformFn: H, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }] }, { transformFn: tr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }] }])))();
1373
+ var zr = y(`wix.stores.catalog.v3.product_updated`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `entity.updatedDate` }, { path: `entity.description.metadata.createdTimestamp` }, { path: `entity.description.metadata.updatedTimestamp` }, { path: `entity.infoSections.description.metadata.createdTimestamp` }, { path: `entity.infoSections.description.metadata.updatedTimestamp` }, { path: `metadata.eventTime` }, { path: `modifiedFields.createdDate` }, { path: `modifiedFields.updatedDate` }, { path: `modifiedFields.description.metadata.createdTimestamp` }, { path: `modifiedFields.description.metadata.updatedTimestamp` }, { path: `modifiedFields.infoSections.description.metadata.createdTimestamp` }, { path: `modifiedFields.infoSections.description.metadata.updatedTimestamp` }] }, { transformFn: U, paths: [{ path: `entity.url` }, { path: `modifiedFields.url` }] }, { transformFn: z, paths: [{ path: `entity.physicalProperties.pricePerUnit.quantity` }, { path: `entity.physicalProperties.shippingWeightRange.minValue` }, { path: `entity.physicalProperties.shippingWeightRange.maxValue` }, { path: `entity.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `entity.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `entity.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `entity.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `entity.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.description.nodes.galleryData.options.item.ratio` }, { path: `entity.description.nodes.imageData.image.duration` }, { path: `entity.description.nodes.imageData.crop.x` }, { path: `entity.description.nodes.imageData.crop.y` }, { path: `entity.description.nodes.imageData.crop.width` }, { path: `entity.description.nodes.imageData.crop.height` }, { path: `entity.description.nodes.mapData.mapSettings.lat` }, { path: `entity.description.nodes.mapData.mapSettings.lng` }, { path: `entity.description.nodes.pollData.poll.image.duration` }, { path: `entity.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.description.nodes.appEmbedData.image.duration` }, { path: `entity.description.nodes.videoData.video.duration` }, { path: `entity.description.nodes.videoData.thumbnail.duration` }, { path: `entity.description.nodes.audioData.audio.duration` }, { path: `entity.description.nodes.audioData.coverImage.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.description.nodes.shapeData.shape.duration` }, { path: `entity.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.description.nodes.tocData.fontSize` }, { path: `entity.description.nodes.tocData.itemSpacing` }, { path: `entity.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `entity.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `entity.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `entity.infoSections.description.nodes.imageData.image.duration` }, { path: `entity.infoSections.description.nodes.imageData.crop.x` }, { path: `entity.infoSections.description.nodes.imageData.crop.y` }, { path: `entity.infoSections.description.nodes.imageData.crop.width` }, { path: `entity.infoSections.description.nodes.imageData.crop.height` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `entity.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `entity.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `entity.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `entity.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `entity.infoSections.description.nodes.videoData.video.duration` }, { path: `entity.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `entity.infoSections.description.nodes.audioData.audio.duration` }, { path: `entity.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `entity.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.shapeData.shape.duration` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `entity.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `entity.infoSections.description.nodes.tocData.fontSize` }, { path: `entity.infoSections.description.nodes.tocData.itemSpacing` }, { path: `entity.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `entity.variantsInfo.variants.physicalProperties.weight` }, { path: `entity.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `entity.minVariantPriceInfo.weight` }, { path: `modifiedFields.physicalProperties.pricePerUnit.quantity` }, { path: `modifiedFields.physicalProperties.shippingWeightRange.minValue` }, { path: `modifiedFields.physicalProperties.shippingWeightRange.maxValue` }, { path: `modifiedFields.variantsInfo.variants.physicalProperties.pricePerUnit.settings.quantity` }, { path: `modifiedFields.variantsInfo.variants.revenueDetails.profitMargin` }, { path: `modifiedFields.subscriptionDetails.subscriptions.discount.percentOff` }, { path: `modifiedFields.variantSummary.minPriceVariant.physicalProperties.pricePerUnit.settings.quantity` }, { path: `modifiedFields.variantSummary.minPriceVariant.revenueDetails.profitMargin` }, { path: `modifiedFields.minVariantPriceInfo.pricePerUnitData.settings.quantity` }, { path: `modifiedFields.minVariantPriceInfo.revenueDetails.profitMargin` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `modifiedFields.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `modifiedFields.description.nodes.galleryData.items.image.media.duration` }, { path: `modifiedFields.description.nodes.galleryData.items.video.media.duration` }, { path: `modifiedFields.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `modifiedFields.description.nodes.galleryData.options.item.ratio` }, { path: `modifiedFields.description.nodes.imageData.image.duration` }, { path: `modifiedFields.description.nodes.imageData.crop.x` }, { path: `modifiedFields.description.nodes.imageData.crop.y` }, { path: `modifiedFields.description.nodes.imageData.crop.width` }, { path: `modifiedFields.description.nodes.imageData.crop.height` }, { path: `modifiedFields.description.nodes.mapData.mapSettings.lat` }, { path: `modifiedFields.description.nodes.mapData.mapSettings.lng` }, { path: `modifiedFields.description.nodes.pollData.poll.image.duration` }, { path: `modifiedFields.description.nodes.pollData.poll.options.image.duration` }, { path: `modifiedFields.description.nodes.pollData.design.poll.background.image.duration` }, { path: `modifiedFields.description.nodes.appEmbedData.image.duration` }, { path: `modifiedFields.description.nodes.videoData.video.duration` }, { path: `modifiedFields.description.nodes.videoData.thumbnail.duration` }, { path: `modifiedFields.description.nodes.audioData.audio.duration` }, { path: `modifiedFields.description.nodes.audioData.coverImage.duration` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.media.duration` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `modifiedFields.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `modifiedFields.description.nodes.shapeData.shape.duration` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.centerX` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.centerY` }, { path: `modifiedFields.description.nodes.cardData.background.gradient.stops.position` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.media.duration` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.description.nodes.tocData.fontSize` }, { path: `modifiedFields.description.nodes.tocData.itemSpacing` }, { path: `modifiedFields.description.nodes.smartBlockCellData.shape.duration` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.image.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.video.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.items.video.thumbnail.duration` }, { path: `modifiedFields.infoSections.description.nodes.galleryData.options.item.ratio` }, { path: `modifiedFields.infoSections.description.nodes.imageData.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.x` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.y` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.width` }, { path: `modifiedFields.infoSections.description.nodes.imageData.crop.height` }, { path: `modifiedFields.infoSections.description.nodes.mapData.mapSettings.lat` }, { path: `modifiedFields.infoSections.description.nodes.mapData.mapSettings.lng` }, { path: `modifiedFields.infoSections.description.nodes.pollData.poll.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.pollData.poll.options.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.pollData.design.poll.background.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.appEmbedData.image.duration` }, { path: `modifiedFields.infoSections.description.nodes.videoData.video.duration` }, { path: `modifiedFields.infoSections.description.nodes.videoData.thumbnail.duration` }, { path: `modifiedFields.infoSections.description.nodes.audioData.audio.duration` }, { path: `modifiedFields.infoSections.description.nodes.audioData.coverImage.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.shapeData.shape.duration` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.cardData.background.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.media.duration` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `modifiedFields.infoSections.description.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `modifiedFields.infoSections.description.nodes.tocData.fontSize` }, { path: `modifiedFields.infoSections.description.nodes.tocData.itemSpacing` }, { path: `modifiedFields.infoSections.description.nodes.smartBlockCellData.shape.duration` }, { path: `modifiedFields.variantsInfo.variants.physicalProperties.weight` }, { path: `modifiedFields.variantSummary.minPriceVariant.physicalProperties.weight` }, { path: `modifiedFields.minVariantPriceInfo.weight` }] }, { transformFn: H, paths: [{ path: `entity.media.main.image` }, { path: `entity.media.itemsInfo.items.image` }, { path: `entity.options.choicesSettings.choices.image` }, { path: `entity.options.choicesSettings.choices.displayImage` }, { path: `entity.options.choicesSettings.choices.linkedMedia.image` }, { path: `entity.modifiers.choicesSettings.choices.image` }, { path: `entity.modifiers.choicesSettings.choices.displayImage` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `entity.variantsInfo.variants.media.image` }, { path: `entity.variantSummary.minPriceVariant.media.image` }, { path: `modifiedFields.media.main.image` }, { path: `modifiedFields.media.itemsInfo.items.image` }, { path: `modifiedFields.options.choicesSettings.choices.image` }, { path: `modifiedFields.options.choicesSettings.choices.displayImage` }, { path: `modifiedFields.options.choicesSettings.choices.linkedMedia.image` }, { path: `modifiedFields.modifiers.choicesSettings.choices.image` }, { path: `modifiedFields.modifiers.choicesSettings.choices.displayImage` }, { path: `modifiedFields.modifiers.choicesSettings.choices.linkedMedia.image` }, { path: `modifiedFields.variantsInfo.variants.media.image` }, { path: `modifiedFields.variantSummary.minPriceVariant.media.image` }] }, { transformFn: tr, paths: [{ path: `entity.media.main.video` }, { path: `entity.media.itemsInfo.items.video` }, { path: `entity.options.choicesSettings.choices.linkedMedia.video` }, { path: `entity.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `entity.variantsInfo.variants.media.video` }, { path: `entity.variantSummary.minPriceVariant.media.video` }, { path: `modifiedFields.media.main.video` }, { path: `modifiedFields.media.itemsInfo.items.video` }, { path: `modifiedFields.options.choicesSettings.choices.linkedMedia.video` }, { path: `modifiedFields.modifiers.choicesSettings.choices.linkedMedia.video` }, { path: `modifiedFields.variantsInfo.variants.media.video` }, { path: `modifiedFields.variantSummary.minPriceVariant.media.video` }] }])))();
1374
+ var Br = I(Ir);
1375
+ R(Lr), R(Rr), R(zr);
1376
+ function Vr(e2) {
1377
+ return L(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/product-group`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/product-group`, destPath: `` }], _: [{ srcPath: `/_api/product-group`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/product-group`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/product-groups`, destPath: `/v3/product-groups` }, { srcPath: `/stores/v3/bulk/product-groups`, destPath: `/v3/bulk/product-groups` }], "*.dev.wix-code.com": [{ srcPath: `/_api/product-group`, destPath: `` }] } }));
1378
+ }
1379
+ var Hr = `@wix/auto_sdk_stores_product-groups-v-3`;
1380
+ function Ur(e2) {
1381
+ function t2({ host: t3 }) {
1382
+ return { entityFqdn: `wix.stores.catalog.v3.product_group`, method: `GET`, methodFqn: `wix.stores.catalog.product_group.v3.ProductGroupService.QueryProductGroups`, packageName: Hr, migrationOptions: { optInTransformResponse: true }, url: Vr({ protoPath: `/v3/product-groups/query`, data: e2, host: t3 }), params: Rt(e2, true), transformResponse: (e3) => P(e3, [{ transformFn: N, paths: [{ path: `productGroups.createdDate` }, { path: `productGroups.updatedDate` }, { path: `productGroups.media.image.urlExpirationDate` }] }]), fallback: [{ method: `POST`, url: Vr({ protoPath: `/v3/product-groups/query`, data: e2, host: t3 }), data: e2 }] };
1383
+ }
1384
+ return t2;
1385
+ }
1386
+ var Wr = ((e2) => (e2.GROUPING_CUSTOMIZATION = `GROUPING_CUSTOMIZATION`, e2.THUMBNAIL = `THUMBNAIL`, e2))(Wr || {});
1387
+ function Gr(e2) {
1388
+ let { httpClient: t2, sideEffects: n2 } = arguments[1];
1389
+ return In({ func: async (r2) => {
1390
+ let i2 = Ur({ ...r2, ...e2 ?? {} });
1391
+ n2?.onSiteCall?.();
1392
+ try {
1393
+ let e3 = await t2.request(i2);
1394
+ return n2?.onSuccess?.(e3), e3;
1395
+ } catch (e3) {
1396
+ throw n2?.onError?.(e3), e3;
1397
+ }
1398
+ }, requestTransformer: (t3) => {
1399
+ let n3 = [t3, e2];
1400
+ return j({ ...n3?.[1], query: n3?.[0] });
1401
+ }, responseTransformer: ({ data: e3 }) => {
1402
+ let t3 = M(P(e3, [{ transformFn: H, paths: [{ path: `productGroups.media.image` }] }]));
1403
+ return { items: t3?.productGroups, pagingMetadata: t3?.pagingMetadata };
1404
+ }, errorTransformer: (e3) => {
1405
+ throw F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1406
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1407
+ }
1408
+ async function Kr(e2, t2) {
1409
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ur(j({ query: e2, ...t2 }));
1410
+ r2?.onSiteCall?.();
1411
+ try {
1412
+ let e3 = await n2.request(i2);
1413
+ return r2?.onSuccess?.(e3), M(P(e3.data, [{ transformFn: H, paths: [{ path: `productGroups.media.image` }] }]));
1414
+ } catch (e3) {
1415
+ let t3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
1416
+ throw r2?.onError?.(e3), t3;
1417
+ }
1418
+ }
1419
+ ({ ...Vn() }, { ...fr() });
1420
+ function qr(e2) {
1421
+ return (t2) => Gr(t2, { httpClient: e2 });
1422
+ }
1423
+ function Jr(e2) {
1424
+ return (t2, n2) => Kr(t2, n2, { httpClient: e2 });
1425
+ }
1426
+ function Yr(e2) {
1427
+ let t2 = Zn({ builderQueryFunction: (t3) => qr(e2)(t3), typedQueryFunction: (t3, n3) => Jr(e2)(t3, n3), hasOptionsParameter: true });
1428
+ function n2(e3, n3) {
1429
+ return t2(...arguments);
1430
+ }
1431
+ return n2;
1432
+ }
1433
+ var Xr = I(Yr);
1434
+ function Zr(e2) {
1435
+ return L(Object.assign(e2, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/location`, destPath: `` }], _: [{ srcPath: `/_api/location`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/location`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/stores/v3/locations`, destPath: `/v3/locations` }] } }));
1436
+ }
1437
+ var Qr = `@wix/auto_sdk_stores_stores-locations-v-3`;
1438
+ function $r(e2) {
1439
+ function t2({ host: t3 }) {
1440
+ return { entityFqdn: `wix.stores.catalog.v3.stores_location`, method: `POST`, methodFqn: `wix.stores.catalog.location.v3.StoresLocationService.QueryStoresLocations`, packageName: Qr, migrationOptions: { optInTransformResponse: true }, url: Zr({ protoPath: `/v3/locations/query`, data: e2, host: t3 }), data: e2, transformResponse: (e3) => P(e3, [{ transformFn: N, paths: [{ path: `storesLocations.createdDate` }, { path: `storesLocations.updatedDate` }] }]) };
1441
+ }
1442
+ return t2;
1443
+ }
1444
+ function ei() {
1445
+ let { httpClient: e2, sideEffects: t2 } = arguments[0];
1446
+ return In({ func: async (n2) => {
1447
+ let r2 = $r(n2);
1448
+ t2?.onSiteCall?.();
1449
+ try {
1450
+ let n3 = await e2.request(r2);
1451
+ return t2?.onSuccess?.(n3), n3;
1452
+ } catch (e3) {
1453
+ throw t2?.onError?.(e3), e3;
1454
+ }
1455
+ }, requestTransformer: (e3) => {
1456
+ let t3 = [e3, {}];
1457
+ return j({ ...t3?.[1], query: t3?.[0] });
1458
+ }, responseTransformer: ({ data: e3 }) => {
1459
+ let t3 = M(P(e3, []));
1460
+ return { items: t3?.storesLocations, pagingMetadata: t3?.pagingMetadata };
1461
+ }, errorTransformer: (e3) => {
1462
+ throw F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1463
+ }, pagingMethod: `CURSOR`, transformationPaths: {} });
1464
+ }
1465
+ async function ti(e2) {
1466
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = $r(j({ query: e2 }));
1467
+ n2?.onSiteCall?.();
1468
+ try {
1469
+ let e3 = await t2.request(r2);
1470
+ return n2?.onSuccess?.(e3), M(e3.data);
1471
+ } catch (e3) {
1472
+ let t3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1473
+ throw n2?.onError?.(e3), t3;
1474
+ }
1475
+ }
1476
+ ({ ...Vn() });
1477
+ function ni(e2) {
1478
+ return () => ei({ httpClient: e2 });
1479
+ }
1480
+ function ri(e2) {
1481
+ return (t2) => ti(t2, { httpClient: e2 });
1482
+ }
1483
+ function ii(e2) {
1484
+ let t2 = Zn({ builderQueryFunction: () => ni(e2)(), typedQueryFunction: (t3) => ri(e2)(t3), hasOptionsParameter: false });
1485
+ function n2(e3) {
1486
+ return t2(...arguments);
1487
+ }
1488
+ return n2;
1489
+ }
1490
+ var ai = I(ii);
1491
+ var oi = `https://static.wixstatic.com/media`;
1492
+ var si = `https://video.wixstatic.com/video`;
1493
+ var ci = /image:\/\/v1\/([^/#]+)/;
1494
+ var li = /^(?:wix:)?video:\/\/v1\/([^/#]+)(?:\/[^#]*)?(?:#(.*))?$/;
1495
+ function ui(e2) {
1496
+ let t2 = e2?.match(li);
1497
+ if (!t2) return null;
1498
+ let [, n2, r2] = t2, i2 = new URLSearchParams(r2 ?? ``), a2 = i2.get(`posterUri`);
1499
+ return { id: n2, url: `${si}/${n2}/file`, ...a2 ? { poster: { uri: a2, url: `${oi}/${a2}`, width: Number(i2.get(`posterWidth`)) || 0, height: Number(i2.get(`posterHeight`)) || 0 } } : {} };
1500
+ }
1501
+ function di(e2) {
1502
+ return e2 ? e2.match(ci)?.[1] ?? null : null;
1503
+ }
1504
+ function fi(e2) {
1505
+ if (!e2) return;
1506
+ if (/^https?:\/\//i.test(e2)) return e2;
1507
+ let t2 = di(e2);
1508
+ return t2 ? `${oi}/${t2}` : void 0;
1509
+ }
1510
+ function pi(e2) {
1511
+ if (!e2) return null;
1512
+ let t2 = e2.match(/#originWidth=(\d+)&originHeight=(\d+)/);
1513
+ return t2 ? { width: parseInt(t2[1], 10), height: parseInt(t2[2], 10) } : null;
1514
+ }
1515
+ var mi = `one-time`;
1516
+ function hi(e2) {
1517
+ return e2.map((e3) => ({ id: e3._id, key: e3.key, name: e3.name ?? void 0, optionRenderType: e3.optionRenderType, choices: (e3.choicesSettings?.choices ?? []).map((e4) => {
1518
+ let t2 = di(e4.displayImage) ?? void 0;
1519
+ return { choiceId: e4.choiceId, key: e4.key, name: e4.name ?? void 0, colorCode: e4.colorCode, ...t2 ? { displayImageUri: t2 } : {}, inStock: e4.inStock, visible: e4.visible ?? void 0, mediaIds: gi(e4.media) };
1520
+ }) }));
1521
+ }
1522
+ var gi = (e2) => {
1523
+ let t2 = (e2?.items ?? []).map((e3) => e3.mediaId);
1524
+ return t2.length > 0 ? t2 : void 0;
1525
+ };
1526
+ function _i(e2) {
1527
+ let t2 = e2.map((e3) => {
1528
+ let t3 = e3._id, n2 = e3.modifierRenderType === Mr.FREE_TEXT;
1529
+ return [t3, { id: t3, key: e3.key, name: e3.name ?? void 0, mandatory: e3.mandatory !== false, modifierRenderType: e3.modifierRenderType, freeTextSettings: n2 ? e3.freeTextSettings : void 0, choices: n2 ? void 0 : (e3.choicesSettings?.choices ?? []).map((e4) => {
1530
+ let t4 = di(e4.displayImage) ?? void 0;
1531
+ return { choiceId: e4.choiceId, key: e4.key, name: e4.name ?? void 0, colorCode: e4.colorCode, ...t4 ? { displayImageUri: t4 } : {}, mediaIds: gi(e4.media) };
1532
+ }) }];
1533
+ });
1534
+ return Object.fromEntries(t2);
1535
+ }
1536
+ function vi(e2) {
1537
+ return e2.filter((e3) => e3.visible !== false).map(yi);
1538
+ }
1539
+ var yi = (e2) => {
1540
+ let t2 = Object.fromEntries((e2.choices ?? []).map((e3) => {
1541
+ let t3 = e3.optionChoiceIds;
1542
+ return [t3?.optionId, t3?.choiceId];
1543
+ }));
1544
+ return { id: e2._id, sku: e2.sku ?? void 0, choices: t2, price: xi(e2), subscriptionPrices: Si(e2) };
1545
+ };
1546
+ function bi(e2) {
1547
+ return e2?.description == null ? void 0 : { description: e2.description };
1548
+ }
1549
+ var xi = (e2) => {
1550
+ let t2 = e2.price;
1551
+ return { actualPrice: Bi(t2?.actualPrice), compareAtPrice: G(t2?.compareAtPrice), priceAfterDiscount: G(t2?.priceAfterDiscount), pricePerUnit: bi(e2.physicalProperties?.pricePerUnit) };
1552
+ };
1553
+ var Si = (e2) => (e2.subscriptionPricesInfo?.subscriptionPrices ?? []).map((e3) => ({ subscriptionId: e3.subscriptionId, price: Bi(e3.price) }));
1554
+ var Ci = { nodes: [] };
1555
+ var wi = `@stores/product-groups`;
1556
+ function Ti(e2) {
1557
+ let t2 = hi(e2.options ?? []), n2 = _i(e2.modifiers ?? []), r2 = ki(e2.subscriptionDetails?.subscriptions ?? []), i2 = vi(e2.variantsInfo?.variants ?? []), a2 = { subscriptions: r2, allowOneTimePurchases: e2.subscriptionDetails?.allowOneTimePurchases ?? false }, o2 = e2.additionalRibbons ?? [], s2 = { primary: e2.ribbon?.name ?? void 0, additional: o2.map((e3) => e3.name ?? void 0).filter((e3) => !!e3) }, c2 = e2.description ? Ai(e2.description) : Ci, l2 = e2.discountInfo?.discountRuleNames, u2 = Di(e2);
1558
+ return { id: e2._id, slug: e2.slug ?? void 0, url: e2.url ? { href: e2.url } : void 0, name: e2.name, description: c2, media: zi(e2), mainMedia: Ri(e2.media?.main), ribbons: s2, breadcrumbs: ji(e2), mainCategoryId: e2.mainCategoryId ?? void 0, categories: Mi(e2), infoSections: Ei(e2), currency: e2.currency, options: t2, modifiers: n2, variants: i2, minPriceVariant: Ii(e2), priceRange: Li(e2), subscriptionDetails: a2, inventory: { availabilityStatus: e2.inventory?.availabilityStatus, preorderAvailability: e2.inventory?.preorderAvailability }, discountRuleNames: l2, productGroupId: u2 };
1559
+ }
1560
+ function Ei(e2) {
1561
+ return (e2.infoSections ?? []).map((e3) => ({ _id: e3.uniqueName ?? e3._id, name: e3.title, body: e3.description ? Ai(e3.description) : void 0 }));
1562
+ }
1563
+ function Di(e2) {
1564
+ let t2 = e2.extendedFields?.namespaces?.[wi]?.productGroupId;
1565
+ return typeof t2 == `string` ? t2 : void 0;
1566
+ }
1567
+ function Oi(e2) {
1568
+ return e2 === `WEEK` || e2 === `MONTH` || e2 === `YEAR` ? e2 : void 0;
1569
+ }
1570
+ function ki(e2) {
1571
+ return e2.filter((e3) => e3.visible !== false).map((e3) => ({ id: e3._id, name: e3.title, description: e3.description ?? void 0, frequency: Oi(e3.frequency), interval: e3.interval, billingCycles: e3.billingCycles ?? void 0 }));
1572
+ }
1573
+ function Ai(e2) {
1574
+ return { ...e2, nodes: e2.nodes ?? [] };
1575
+ }
1576
+ function ji(e2) {
1577
+ return (e2.breadcrumbsInfo?.breadcrumbs ?? []).map((e3) => ({ id: e3.categoryId, name: e3.categoryName, slug: e3.categorySlug }));
1578
+ }
1579
+ function Mi(e2) {
1580
+ return (e2.directCategoriesInfo?.categories ?? []).flatMap((e3) => e3._id ? [{ id: e3._id }] : []);
1581
+ }
1582
+ function Ni(e2) {
1583
+ return { ...e2.displayName ? { title: e2.displayName } : {}, ...e2.altText ? { alt: e2.altText } : {} };
1584
+ }
1585
+ function Pi(e2, t2) {
1586
+ let n2 = e2.image ?? e2.url;
1587
+ if (!n2) return;
1588
+ let r2 = pi(e2.image), { title: i2, alt: a2 } = Ni(e2);
1589
+ return { id: di(e2.image) ?? e2._id ?? t2, media: { type: `image`, src: n2, ...r2 ? { width: r2.width, height: r2.height } : {}, ...i2 ? { title: i2 } : {}, ...a2 ? { parameters: { alt: a2 } } : {} } };
1590
+ }
1591
+ function Fi(e2, t2) {
1592
+ let n2 = ui(e2.video), r2 = n2?.url ?? e2.url;
1593
+ if (!r2) return;
1594
+ let i2 = n2?.poster?.url, a2 = n2?.poster?.width, o2 = n2?.poster?.height, { title: s2, alt: c2 } = Ni(e2);
1595
+ return { id: n2?.id ?? e2._id ?? t2, media: { type: `video`, src: r2, ...a2 === void 0 ? {} : { width: a2 }, ...o2 === void 0 ? {} : { height: o2 }, ...s2 ? { title: s2 } : {}, ...c2 || i2 ? { parameters: { ...c2 ? { alt: c2 } : {}, ...i2 ? { thumbnail: i2 } : {} } } : {} } };
1596
+ }
1597
+ function Ii(e2) {
1598
+ let t2 = e2.variantSummary?.minPriceVariant;
1599
+ return t2 ? vi([t2])[0] : void 0;
1600
+ }
1601
+ function Li(e2) {
1602
+ return { minActualPrice: G(e2.actualPriceRange?.minValue), maxActualPrice: G(e2.actualPriceRange?.maxValue), minCompareAtPrice: G(e2.compareAtPriceRange?.minValue), maxCompareAtPrice: G(e2.compareAtPriceRange?.maxValue) };
1603
+ }
1604
+ function Ri(e2) {
1605
+ if (!e2) return;
1606
+ let { title: t2, alt: n2 } = Ni(e2);
1607
+ if (e2.mediaType === `VIDEO`) {
1608
+ let r3 = ui(e2.video)?.poster;
1609
+ return r3 ? { ...r3, name: t2, alt: n2 } : void 0;
1610
+ }
1611
+ let r2 = e2.image ?? e2.url;
1612
+ if (!r2) return;
1613
+ let i2 = pi(e2.image);
1614
+ return { uri: di(e2.image) ?? void 0, url: r2, width: i2?.width, height: i2?.height, name: t2, alt: n2 };
1615
+ }
1616
+ function zi(e2) {
1617
+ return (e2.media?.itemsInfo?.items ?? (e2.media?.main ? [e2.media.main] : [])).flatMap((e3, t2) => {
1618
+ let n2 = e3.mediaType === `VIDEO` ? Fi(e3, String(t2)) : Pi(e3, String(t2));
1619
+ return n2 ? [n2] : [];
1620
+ });
1621
+ }
1622
+ var Bi = (e2) => Number.parseFloat(e2?.amount);
1623
+ var G = (e2) => e2?.amount == null ? void 0 : Bi(e2);
1624
+ var Vi = [W.URL, W.DESCRIPTION, W.PLAIN_DESCRIPTION, W.MEDIA_ITEMS_INFO, W.INFO_SECTION, W.INFO_SECTION_DESCRIPTION, W.CURRENCY, W.DISCOUNT_INFO, W.SUBSCRIPTION_PRICES_INFO, W.BREADCRUMBS_INFO, W.DIRECT_CATEGORIES_INFO, W.PRODUCT_CHOICES_MEDIA_REFERENCES, W.PRODUCT_CHOICES_DISPLAY_IMAGE];
1625
+ async function Hi(e2) {
1626
+ return { product: Ti(await Br(e2, { fields: Vi })) };
1627
+ }
1628
+ function Ui(e2) {
1629
+ if (e2.status === `fulfilled`) return e2.value;
1630
+ throw e2.status === `rejected` ? e2.reason : e2.status === `pending` ? e2 : (e2.status = `pending`, e2.then((t2) => {
1631
+ e2.status = `fulfilled`, e2.value = t2;
1632
+ }, (t2) => {
1633
+ e2.status = `rejected`, e2.reason = t2;
1634
+ }), e2);
1635
+ }
1636
+ function Wi(e2) {
1637
+ return L(Object.assign(e2, { domainToMappings: { "bo._base_domain_": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wixbo.ai": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wix-bo.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], _: [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }], "*.dev.wix-code.com": [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }] } }));
1638
+ }
1639
+ var Gi = `@wix/auto_sdk_ecom_back-in-stock-notifications`;
1640
+ function Ki(e2) {
1641
+ function t2({ host: t3 }) {
1642
+ let n2 = P(e2, [{ transformFn: rt, paths: [{ path: `request.createdDate` }, { path: `itemDetails.image.urlExpirationDate` }] }, { transformFn: dn, paths: [{ path: `itemDetails.image.focalPoint.x` }, { path: `itemDetails.image.focalPoint.y` }] }]);
1643
+ return { entityFqdn: `wix.ecom.v1.back_in_stock_notification_request`, method: `POST`, methodFqn: `com.wixpress.ecom.back.in.stock.BackInStockNotificationRequestService.CreateBackInStockNotificationRequest`, packageName: Gi, migrationOptions: { optInTransformResponse: true }, url: Wi({ protoPath: `/v1/back-in-stock-notification-requests`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => P(e3, [{ transformFn: N, paths: [{ path: `request.createdDate` }] }]) };
1644
+ }
1645
+ return t2;
1646
+ }
1647
+ async function qi(e2, t2) {
1648
+ let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ki(P(j({ request: e2, itemDetails: t2 }), [{ transformFn: er, paths: [{ path: `itemDetails.image` }] }]));
1649
+ r2?.onSiteCall?.();
1650
+ try {
1651
+ let e3 = await n2.request(i2);
1652
+ return r2?.onSuccess?.(e3), M(e3.data)?.request;
1653
+ } catch (e3) {
1654
+ let t3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { request: `$[0]`, itemDetails: `$[1]` }, singleArgumentUnchanged: false }, [`request`, `itemDetails`]);
1655
+ throw r2?.onError?.(e3), t3;
1656
+ }
1657
+ }
1658
+ ({ ...Vn() });
1659
+ function Ji(e2) {
1660
+ return (t2, n2) => qi(t2, n2, { httpClient: e2 });
1661
+ }
1662
+ var Yi = y(`wix.ecom.v1.back_in_stock_notification_request_created`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `metadata.eventTime` }] }])))();
1663
+ var Xi = y(`wix.ecom.v1.back_in_stock_notification_request_deleted`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `undefined.createdDate` }, { path: `metadata.eventTime` }] }])))();
1664
+ var Zi = y(`wix.ecom.v1.back_in_stock_notification_request_updated`, true, (e2) => M(P(e2, [{ transformFn: N, paths: [{ path: `entity.createdDate` }, { path: `metadata.eventTime` }] }])))();
1665
+ var Qi = I(Ji);
1666
+ R(Yi), R(Xi), R(Zi);
1667
+ function $i(e2) {
1668
+ return L(Object.assign(e2, { domainToMappings: { "bo._base_domain_": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wixbo.ai": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "wix-bo.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/back-in-stock-service`, destPath: `` }], _: [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }], "*.dev.wix-code.com": [{ srcPath: `/v1/back-in-stock-notification-requests`, destPath: `/v1/back-in-stock-notification-requests` }] } }));
1669
+ }
1670
+ var ea = `@wix/auto_sdk_ecom_back-in-stock-settings`;
1671
+ function ta(e2) {
1672
+ function t2({ host: t3 }) {
1673
+ return { entityFqdn: `wix.ecom.v1.back_in_stock_settings`, method: `PUT`, methodFqn: `com.wixpress.ecom.back.in.stock.BackInStockSettingsService.GetSettings`, packageName: ea, migrationOptions: { optInTransformResponse: true }, url: $i({ protoPath: `/v1/back-in-stock-notification-requests/settings`, data: e2, host: t3 }), data: e2 };
1674
+ }
1675
+ return t2;
1676
+ }
1677
+ async function na() {
1678
+ let { httpClient: e2, sideEffects: t2 } = arguments[0], n2 = ta(j({}));
1679
+ t2?.onSiteCall?.();
1680
+ try {
1681
+ let r2 = await e2.request(n2);
1682
+ return t2?.onSuccess?.(r2), M(r2.data);
1683
+ } catch (e3) {
1684
+ let n3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: {}, singleArgumentUnchanged: false }, []);
1685
+ throw t2?.onError?.(e3), n3;
1686
+ }
1687
+ }
1688
+ function ra(e2) {
1689
+ return () => na({ httpClient: e2 });
1690
+ }
1691
+ var ia = I(ra);
1692
+ function aa(e2) {
1693
+ return L(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/cart-v2`, destPath: `` }], _: [{ srcPath: `/_api/cart-v2`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "bo._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wixbo.ai": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wix-bo.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/ecom/v2/carts`, destPath: `/v2/carts` }], "editor.wixapps.net": [{ srcPath: `/_api/cart-v2`, destPath: `` }] } }));
1694
+ }
1695
+ var oa = `@wix/auto_sdk_ecom_cart-v-2`;
1696
+ function sa(e2) {
1697
+ function t2({ host: t3 }) {
1698
+ let n2 = P(e2, [{ transformFn: rt, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }, { path: `catalogItems.catalogOverrideFields.image.urlExpirationDate` }, { path: `customItems.attributes.image.urlExpirationDate` }, { path: `customItems.attributes.serviceProperties.scheduledDate` }, { path: `customItems.attributes.serviceProperties.endDate` }, { path: `customItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }] }, { transformFn: dn, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }, { path: `catalogItems.catalogOverrideFields.physicalProperties.weight` }, { path: `customItems.attributes.physicalProperties.weight` }] }]);
1699
+ return { entityFqdn: `wix.ecom.v2.cart`, method: `POST`, methodFqn: `wix.ecom.cart.v2.CartService.CreateCart`, packageName: oa, migrationOptions: { optInTransformResponse: true }, url: aa({ protoPath: `/v2/carts`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => P(e3, [{ transformFn: N, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }] }, { transformFn: z, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }] }]) };
1700
+ }
1701
+ return t2;
1702
+ }
1703
+ var ca = ((e2) => (e2.UNSPECIFIED = `UNSPECIFIED`, e2.WEB = `WEB`, e2.POS = `POS`, e2.EBAY = `EBAY`, e2.AMAZON = `AMAZON`, e2.OTHER_PLATFORM = `OTHER_PLATFORM`, e2.WIX_APP_STORE = `WIX_APP_STORE`, e2.WIX_INVOICES = `WIX_INVOICES`, e2.BACKOFFICE_MERCHANT = `BACKOFFICE_MERCHANT`, e2.WISH = `WISH`, e2.CLASS_PASS = `CLASS_PASS`, e2.GLOBAL_E = `GLOBAL_E`, e2.FACEBOOK = `FACEBOOK`, e2.ETSY = `ETSY`, e2.TIKTOK = `TIKTOK`, e2.FAIRE_COM = `FAIRE_COM`, e2.PAYPAL_AGENTIC_CHECKOUT = `PAYPAL_AGENTIC_CHECKOUT`, e2.STRIPE_AGENTIC_CHECKOUT = `STRIPE_AGENTIC_CHECKOUT`, e2.WIX_INVOICES_PLATFORM = `WIX_INVOICES_PLATFORM`, e2.UCP_AGENTIC_CHECKOUT = `UCP_AGENTIC_CHECKOUT`, e2))(ca || {});
1704
+ async function la(e2) {
1705
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = sa(P(j({ cart: e2?.cart, catalogItems: e2?.catalogItems, customItems: e2?.customItems, coupons: e2?.coupons, deliveryMethod: e2?.deliveryMethod, giftCards: e2?.giftCards }), [{ transformFn: er, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }, { path: `catalogItems.catalogOverrideFields.image` }, { path: `customItems.attributes.image` }] }, { transformFn: Or, paths: [{ path: `cart.lineItems.attributes.url` }, { path: `customItems.attributes.url` }] }, { transformFn: fn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]));
1706
+ n2?.onSiteCall?.();
1707
+ try {
1708
+ let e3 = await t2.request(r2);
1709
+ return n2?.onSuccess?.(e3), M(P(e3.data, [{ transformFn: H, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }] }, { transformFn: U, paths: [{ path: `cart.lineItems.attributes.url` }] }, { transformFn: pn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]))?.cart;
1710
+ } catch (e3) {
1711
+ let t3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { cart: `$[0].cart`, catalogItems: `$[0].catalogItems`, customItems: `$[0].customItems`, coupons: `$[0].coupons`, deliveryMethod: `$[0].deliveryMethod`, giftCards: `$[0].giftCards` }, singleArgumentUnchanged: false }, [`options`]);
1712
+ throw n2?.onError?.(e3), t3;
1713
+ }
1714
+ }
1715
+ function ua(e2) {
1716
+ return (t2) => la(t2, { httpClient: e2 });
1717
+ }
1718
+ var da = I(ua);
1719
+ function fa(e2) {
1720
+ return L(Object.assign(e2, { domainToMappings: { "api._api_base_domain_": [{ srcPath: `/cart-v2`, destPath: `` }], _: [{ srcPath: `/_api/cart-v2`, destPath: `` }], "*.dev.wix-code.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "bo._base_domain_": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wixbo.ai": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "wix-bo.com": [{ srcPath: `/_api/cart-v2`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/ecom/v2/carts`, destPath: `/v2/carts` }], "editor.wixapps.net": [{ srcPath: `/_api/cart-v2`, destPath: `` }] } }));
1721
+ }
1722
+ var pa = `@wix/auto_sdk_ecom_current-cart-v-2`;
1723
+ function ma(e2) {
1724
+ function t2({ host: t3 }) {
1725
+ let n2 = P(e2, [{ transformFn: dn, paths: [{ path: `catalogItems.catalogOverrideFields.physicalProperties.weight` }, { path: `customItems.attributes.physicalProperties.weight` }] }, { transformFn: rt, paths: [{ path: `catalogItems.catalogOverrideFields.image.urlExpirationDate` }, { path: `customItems.attributes.image.urlExpirationDate` }, { path: `customItems.attributes.serviceProperties.scheduledDate` }, { path: `customItems.attributes.serviceProperties.endDate` }, { path: `customItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }] }]);
1726
+ return { entityFqdn: `wix.ecom.v2.cart`, method: `POST`, methodFqn: `wix.ecom.cart.v2.CurrentCartService.AddLineItemsToCurrentCart`, packageName: pa, migrationOptions: { optInTransformResponse: true }, url: fa({ protoPath: `/v2/carts/current/add-line-items`, data: n2, host: t3 }), data: n2, transformResponse: (e3) => P(e3, [{ transformFn: N, paths: [{ path: `cart.createdDate` }, { path: `cart.updatedDate` }, { path: `cart.lineItems.source.catalogOverrideFields.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.image.urlExpirationDate` }, { path: `cart.lineItems.attributes.subscriptionInfo.subscriptionSettings.startDate` }, { path: `cart.lineItems.attributes.serviceProperties.scheduledDate` }, { path: `cart.lineItems.attributes.serviceProperties.endDate` }] }, { transformFn: z, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.physicalProperties.weight` }, { path: `cart.lineItems.attributes.physicalProperties.weight` }, { path: `cart.deliveryInfo.address.geocode.latitude` }, { path: `cart.deliveryInfo.address.geocode.longitude` }, { path: `cart.paymentInfo.billingAddress.geocode.latitude` }, { path: `cart.paymentInfo.billingAddress.geocode.longitude` }, { path: `cart.legacyFields.discounts.merchantDiscount.percentage` }, { path: `cart.tcAppliedDiscounts.merchantDiscount.percentage` }] }]) };
1727
+ }
1728
+ return t2;
1729
+ }
1730
+ async function ha(e2) {
1731
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ma(P(j({ catalogItems: e2?.catalogItems, customItems: e2?.customItems }), [{ transformFn: er, paths: [{ path: `catalogItems.catalogOverrideFields.image` }, { path: `customItems.attributes.image` }] }, { transformFn: Or, paths: [{ path: `customItems.attributes.url` }] }]));
1732
+ n2?.onSiteCall?.();
1733
+ try {
1734
+ let e3 = await t2.request(r2);
1735
+ return n2?.onSuccess?.(e3), M(P(e3.data, [{ transformFn: H, paths: [{ path: `cart.lineItems.source.catalogOverrideFields.image` }, { path: `cart.lineItems.attributes.image` }] }, { transformFn: U, paths: [{ path: `cart.lineItems.attributes.url` }] }, { transformFn: pn, paths: [{ path: `cart.deliveryInfo.address` }, { path: `cart.paymentInfo.billingAddress` }] }]));
1736
+ } catch (e3) {
1737
+ let t3 = F(e3, { spreadPathsToArguments: {}, explicitPathsToArguments: { catalogItems: `$[0].catalogItems`, customItems: `$[0].customItems` }, singleArgumentUnchanged: false }, [`options`]);
1738
+ throw n2?.onError?.(e3), t3;
1739
+ }
1740
+ }
1741
+ function ga(e2) {
1742
+ return (t2) => ha(t2, { httpClient: e2 });
1743
+ }
1744
+ var _a = I(ga);
1745
+ async function va(e2) {
1746
+ await _a({ catalogItems: [e2] });
1747
+ }
1748
+ var ya = { type: `invalid-purchase`, message: `This item can't be purchased.` };
1749
+ function ba(e2) {
1750
+ let t2 = e2;
1751
+ return { type: `cart`, message: t2?.message, details: t2?.details };
1752
+ }
1753
+ function K(e2) {
1754
+ return e2;
1755
+ }
1756
+ var xa = K(`@wix/site-service-public-api-caller`);
1757
+ var Sa = `215238eb-22a5-4c36-9e7b-e7c08025e04e`;
1758
+ var Ca = `1380b703-ce81-ff05-f115-39571d94dfcd`;
1759
+ `${Sa}`, `${Sa}`;
1760
+ var q = function(e2) {
1761
+ return e2.SIDE_CART = `ecom_side_cart`, e2.CART = `shopping_cart`, e2.CHECKOUT = `checkout`, e2.PRODUCT_PAGE = `product-page-builder`, e2.CATEGORY_PAGE = `category-page-builder`, e2;
1762
+ }({});
1763
+ var wa = () => {
1764
+ let e2 = o();
1765
+ return { reloadCart: t(async () => {
1766
+ if (typeof window < `u`) try {
1767
+ await e2(xa).callPublicApi(Ca, `cart.reloadCart`, []);
1768
+ } catch {
1769
+ }
1770
+ }, [e2]) };
1771
+ };
1772
+ var Ta = K(`@wix/viewer-service-router`);
1773
+ var Ea = K(`@wix/site-service-url`);
1774
+ var Da = K(`@wix/site-service-editor-context`);
1775
+ var Oa = K(`@wix/site-service-pages`);
1776
+ var ka = () => {
1777
+ let e2 = s(Ea), n2 = t((t2, n3) => {
1778
+ let r2 = e2.appSectionRelativeUrl(Sa, t2, true);
1779
+ if (r2) return `./${r2.replace(/^\//, ``).replace(/\/$/, ``)}/${encodeURIComponent(n3)}`;
1780
+ }, [e2]);
1781
+ return { getPageRelativeUrl: n2, getPageAbsoluteUrl: t((t2, r2) => {
1782
+ let i2 = n2(t2, r2);
1783
+ if (i2) return new URL(i2, `${e2.siteUrl.replace(/\/$/, ``)}/`).href;
1784
+ }, [n2, e2]) };
1785
+ };
1786
+ var Aa = (e2) => {
1787
+ if (!e2) return ``;
1788
+ let t2 = new URLSearchParams(e2).toString();
1789
+ return t2 ? `?${t2}` : ``;
1790
+ };
1791
+ var ja = (e2, t2, n2) => {
1792
+ let r2 = `./${e2.replace(/^\//, ``)}`;
1793
+ return n2 ? r2 : new URL(r2, `${t2.replace(/\/$/, ``)}/`).href;
1794
+ };
1795
+ var Ma = () => {
1796
+ let e2 = s(Ta), n2 = s(Ea), r2 = s(Da), i2 = s(Oa), { getPageRelativeUrl: a2, getPageAbsoluteUrl: o2 } = ka();
1797
+ return { navigateToPage: t(async (t2, i3) => {
1798
+ try {
1799
+ let a3 = n2.appSectionRelativeUrl(Ca, t2);
1800
+ if (!a3) return false;
1801
+ let o3 = `${a3}${Aa(i3)}`;
1802
+ return await e2.navigateTo({ href: ja(o3, n2.siteUrl, r2.previewMode) }), true;
1803
+ } catch {
1804
+ return false;
1805
+ }
1806
+ }, [e2, n2, r2]), navigateToProductPage: t(async (t2) => {
1807
+ try {
1808
+ let n3 = r2.previewMode ? a2(q.PRODUCT_PAGE, t2) : o2(q.PRODUCT_PAGE, t2);
1809
+ if (!n3) throw Error(`Failed to resolve app section relative URL for the product page`);
1810
+ await e2.navigateTo({ href: n3 });
1811
+ } catch (e3) {
1812
+ console.error(`navigateToProductPage: failed to navigate to product "${t2}"`, e3);
1813
+ }
1814
+ }, [e2, r2, a2, o2]), openLightbox: t(async (t2) => {
1815
+ try {
1816
+ let n3 = Object.entries(i2.pages).find(([, e3]) => e3.popup && e3.appPageId === t2)?.[0];
1817
+ return n3 ? (await e2.navigateTo({ linkPopupId: n3 }), true) : false;
1818
+ } catch {
1819
+ return false;
1820
+ }
1821
+ }, [e2, i2]) };
1822
+ };
1823
+ var J = function(e2) {
1824
+ return e2.IDLE = `idle`, e2.IN_PROGRESS = `in-progress`, e2.SUCCESS = `success`, e2;
1825
+ }({});
1826
+ var Na = function(e2) {
1827
+ return e2.NONE = `none`, e2.NAVIGATE_TO_CART = `navigate-to-cart`, e2.OPEN_SIDE_CART = `open-side-cart`, e2;
1828
+ }({});
1829
+ var Pa = () => {
1830
+ let [e2, n2] = r(J.IDLE), { navigateToPage: i2, openLightbox: a2 } = Ma(), { reloadCart: o2 } = wa(), s2 = t(async (e3) => {
1831
+ switch (e3) {
1832
+ case Na.NAVIGATE_TO_CART:
1833
+ await i2(q.CART);
1834
+ return;
1835
+ case Na.OPEN_SIDE_CART:
1836
+ await a2(q.SIDE_CART);
1837
+ return;
1838
+ case Na.NONE:
1839
+ default:
1840
+ return;
1841
+ }
1842
+ }, [i2, a2]);
1843
+ return { addToCart: t(async (e3, t2) => {
1844
+ n2(J.IN_PROGRESS);
1845
+ try {
1846
+ await va(e3);
1847
+ } catch (e4) {
1848
+ return n2(J.IDLE), { ok: false, error: ba(e4) };
1849
+ }
1850
+ try {
1851
+ await o2(), n2(J.SUCCESS), await s2(t2), setTimeout(() => n2(J.IDLE), 2e3);
1852
+ } catch {
1853
+ n2(J.IDLE);
1854
+ }
1855
+ return { ok: true };
1856
+ }, [o2, s2]), addToCartState: e2, reloadCart: o2 };
1857
+ };
1858
+ async function Fa(e2) {
1859
+ let t2 = await da({ cart: { source: { channelType: ca.WEB } }, catalogItems: [e2] });
1860
+ if (!t2._id) throw Error(`missing checkout id`);
1861
+ return t2._id;
1862
+ }
1863
+ var Ia = function(e2) {
1864
+ return e2.IDLE = `idle`, e2.IN_PROGRESS = `in-progress`, e2;
1865
+ }({});
1866
+ var La = () => {
1867
+ let { navigateToPage: e2 } = Ma(), [n2, i2] = r(Ia.IDLE);
1868
+ return { buyNowState: n2, buyNow: t(async (t2) => {
1869
+ i2(Ia.IN_PROGRESS);
1870
+ try {
1871
+ let n3 = await Fa(t2);
1872
+ return await e2(q.CHECKOUT, { checkoutId: n3 }) ? { ok: true } : { ok: false, error: ba(Error(`Failed to navigate to checkout`)) };
1873
+ } catch (e3) {
1874
+ return { ok: false, error: ba(e3) };
1875
+ } finally {
1876
+ i2(Ia.IDLE);
1877
+ }
1878
+ }, [e2]) };
1879
+ };
1880
+ function Ra(e2) {
1881
+ let { product: t2, selectedVariant: n2, userSelections: r2, isPreOrder: i2 } = e2;
1882
+ return { catalogReference: { appId: Sa, catalogItemId: t2.id, options: za({ product: t2, selectedVariant: n2, userSelections: r2, isPreOrder: i2 }) }, quantity: r2.quantity };
1883
+ }
1884
+ var za = ({ product: e2, selectedVariant: t2, userSelections: n2, isPreOrder: r2 }) => {
1885
+ let i2 = Ba(e2, t2.choices), { choiceBasedModifiers: a2, customTextFields: o2 } = Va(e2, n2.selectedModifiers), s2 = { ...i2, ...a2 }, { selectedSubscriptionPlanId: c2 } = n2, l2 = { variantId: t2.id, options: s2 };
1886
+ return Object.keys(o2).length > 0 && (l2.customTextFields = o2), Ha(c2) && (l2.subscriptionOptionId = c2), r2 && (l2.preOrderRequested = true), l2;
1887
+ };
1888
+ var Ba = (e2, t2) => {
1889
+ let n2 = {};
1890
+ for (let [r2, i2] of Object.entries(t2)) {
1891
+ let t3 = e2.options.find((e3) => e3.id === r2), a2 = t3?.choices.find((e3) => e3.choiceId === i2);
1892
+ t3 && a2 && (n2[t3.key] = a2.key);
1893
+ }
1894
+ return n2;
1895
+ };
1896
+ var Va = (e2, t2) => {
1897
+ let n2 = {}, r2 = {};
1898
+ for (let i2 of Object.values(e2.modifiers)) if (i2.modifierRenderType === Mr.FREE_TEXT) {
1899
+ let e3 = i2.freeTextSettings?.key;
1900
+ e3 && (r2[e3] = t2[i2.id] ?? ``);
1901
+ } else {
1902
+ let e3 = t2[i2.id], r3 = i2.choices?.find((t3) => t3.choiceId === e3);
1903
+ r3 && (n2[i2.key] = r3.key);
1904
+ }
1905
+ return { choiceBasedModifiers: n2, customTextFields: r2 };
1906
+ };
1907
+ var Ha = (e2) => e2 !== void 0 && e2 !== `one-time`;
1908
+ function Ua(e2, r2, i2) {
1909
+ let { selectedVariant: a2, selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2, isSelectionValid: l2, setHasAttemptedSubmit: u2 } = r2, { addToCart: d2, addToCartState: f2 } = Pa(), { buyNow: p2, buyNowState: m2 } = La(), h2 = i2.isPreOrderState || i2.isInStock, g2 = t(async (t2) => !h2 || (u2(true), !l2 || !a2) ? { ok: false, error: ya } : d2(Ra({ product: e2, selectedVariant: a2, userSelections: { selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2 }, isPreOrder: i2.isPreOrderState }), t2 ?? Na.NONE), [h2, i2.isPreOrderState, l2, u2, e2, a2, o2, s2, c2, d2]), _2 = t(async () => !h2 || (u2(true), !l2 || !a2) ? { ok: false, error: ya } : p2(Ra({ product: e2, selectedVariant: a2, userSelections: { selectedModifiers: o2, selectedSubscriptionPlanId: s2, quantity: c2 }, isPreOrder: i2.isPreOrderState })), [h2, i2.isPreOrderState, l2, u2, e2, a2, o2, s2, c2, p2]);
1910
+ return n(() => ({ addToCartState: f2, buyNowState: m2, handleAddToCart: g2, handleBuyNow: _2 }), [f2, m2, g2, _2]);
1911
+ }
1912
+ function Wa(e2) {
1913
+ return Ka(e2) ?? 99999;
1914
+ }
1915
+ function Ga(e2, t2) {
1916
+ return Math.min(e2, Math.max(t2, 1));
1917
+ }
1918
+ function Ka(e2) {
1919
+ if (!e2 || !e2.trackQuantity) return;
1920
+ let { availabilityStatus: t2, inventoryQuantity: n2, preorderInfo: r2 } = e2, i2 = t2 === `PREORDER` ? r2?.quantity : n2;
1921
+ if (i2 != null) return Math.max(0, i2);
1922
+ }
1923
+ function qa(e2) {
1924
+ let { availabilityStatus: t2, preorderAvailability: n2 } = e2 ?? {}, r2 = t2 !== Nr.OUT_OF_STOCK;
1925
+ return { isInStock: r2, isPreOrderState: n2 === Pr.ALL_VARIANTS || n2 === Pr.SOME_VARIANTS && !r2 };
1926
+ }
1927
+ function Ja(e2, t2) {
1928
+ return t2 ? { isInStock: t2.availabilityStatus === gr.IN_STOCK, isPreOrderState: t2.availabilityStatus === gr.PREORDER } : qa(e2.inventory);
1929
+ }
1930
+ function Ya(e2, t2) {
1931
+ return n(() => {
1932
+ let { isInStock: n2, isPreOrderState: r2 } = Ja(e2, t2);
1933
+ return { isInStock: n2, isPreOrderState: r2, preOrderMessage: r2 ? t2?.preorderInfo?.message : void 0, remainingItemCount: Ka(t2) };
1934
+ }, [e2.inventory, t2]);
1935
+ }
1936
+ var Xa = h((e2, t2) => {
1937
+ t2.exports = typeof window == `object` && window && window.Object === Object && window;
1938
+ });
1939
+ var Y = h((e2, t2) => {
1940
+ var n2 = Xa(), r2 = typeof self == `object` && self && self.Object === Object && self;
1941
+ t2.exports = n2 || r2 || Function(`return this`)();
1942
+ });
1943
+ var Za = h((e2, t2) => {
1944
+ t2.exports = Y().Symbol;
1945
+ });
1946
+ var Qa = h((e2, t2) => {
1947
+ var n2 = Za(), r2 = Object.prototype, i2 = r2.hasOwnProperty, a2 = r2.toString, o2 = n2 ? n2.toStringTag : void 0;
1948
+ function s2(e3) {
1949
+ var t3 = i2.call(e3, o2), n3 = e3[o2];
1950
+ try {
1951
+ e3[o2] = void 0;
1952
+ var r3 = true;
1953
+ } catch {
1954
+ }
1955
+ var s3 = a2.call(e3);
1956
+ return r3 && (t3 ? e3[o2] = n3 : delete e3[o2]), s3;
1957
+ }
1958
+ t2.exports = s2;
1959
+ });
1960
+ var $a = h((e2, t2) => {
1961
+ var n2 = Object.prototype.toString;
1962
+ function r2(e3) {
1963
+ return n2.call(e3);
1964
+ }
1965
+ t2.exports = r2;
1966
+ });
1967
+ var eo = h((e2, t2) => {
1968
+ var n2 = Za(), r2 = Qa(), i2 = $a(), a2 = `[object Null]`, o2 = `[object Undefined]`, s2 = n2 ? n2.toStringTag : void 0;
1969
+ function c2(e3) {
1970
+ return e3 == null ? e3 === void 0 ? o2 : a2 : s2 && s2 in Object(e3) ? r2(e3) : i2(e3);
1971
+ }
1972
+ t2.exports = c2;
1973
+ });
1974
+ var to = h((e2, t2) => {
1975
+ function n2(e3) {
1976
+ return typeof e3 == `object` && !!e3;
1977
+ }
1978
+ t2.exports = n2;
1979
+ });
1980
+ var no = h((e2, t2) => {
1981
+ var n2 = eo(), r2 = to(), i2 = `[object Symbol]`;
1982
+ function a2(e3) {
1983
+ return typeof e3 == `symbol` || r2(e3) && n2(e3) == i2;
1984
+ }
1985
+ t2.exports = a2;
1986
+ });
1987
+ var ro = h((e2, t2) => {
1988
+ var n2 = no();
1989
+ function r2(e3, t3, r3) {
1990
+ for (var i2 = -1, a2 = e3.length; ++i2 < a2; ) {
1991
+ var o2 = e3[i2], s2 = t3(o2);
1992
+ if (s2 != null && (c2 === void 0 ? s2 === s2 && !n2(s2) : r3(s2, c2))) var c2 = s2, l2 = o2;
1993
+ }
1994
+ return l2;
1995
+ }
1996
+ t2.exports = r2;
1997
+ });
1998
+ var io = h((e2, t2) => {
1999
+ function n2(e3, t3) {
2000
+ return e3 > t3;
2001
+ }
2002
+ t2.exports = n2;
2003
+ });
2004
+ var ao = h((e2, t2) => {
2005
+ function n2(e3) {
2006
+ return e3;
2007
+ }
2008
+ t2.exports = n2;
2009
+ });
2010
+ var oo = h((e2, t2) => {
2011
+ var n2 = ro(), r2 = io(), i2 = ao();
2012
+ function a2(e3) {
2013
+ return e3 && e3.length ? n2(e3, i2, r2) : void 0;
2014
+ }
2015
+ t2.exports = a2;
2016
+ });
2017
+ var so = h((e2, t2) => {
2018
+ function n2() {
2019
+ this.__data__ = [], this.size = 0;
2020
+ }
2021
+ t2.exports = n2;
2022
+ });
2023
+ var co = h((e2, t2) => {
2024
+ function n2(e3, t3) {
2025
+ return e3 === t3 || e3 !== e3 && t3 !== t3;
2026
+ }
2027
+ t2.exports = n2;
2028
+ });
2029
+ var lo = h((e2, t2) => {
2030
+ var n2 = co();
2031
+ function r2(e3, t3) {
2032
+ for (var r3 = e3.length; r3--; ) if (n2(e3[r3][0], t3)) return r3;
2033
+ return -1;
2034
+ }
2035
+ t2.exports = r2;
2036
+ });
2037
+ var uo = h((e2, t2) => {
2038
+ var n2 = lo(), r2 = Array.prototype.splice;
2039
+ function i2(e3) {
2040
+ var t3 = this.__data__, i3 = n2(t3, e3);
2041
+ return i3 < 0 ? false : (i3 == t3.length - 1 ? t3.pop() : r2.call(t3, i3, 1), --this.size, true);
2042
+ }
2043
+ t2.exports = i2;
2044
+ });
2045
+ var fo = h((e2, t2) => {
2046
+ var n2 = lo();
2047
+ function r2(e3) {
2048
+ var t3 = this.__data__, r3 = n2(t3, e3);
2049
+ return r3 < 0 ? void 0 : t3[r3][1];
2050
+ }
2051
+ t2.exports = r2;
2052
+ });
2053
+ var po = h((e2, t2) => {
2054
+ var n2 = lo();
2055
+ function r2(e3) {
2056
+ return n2(this.__data__, e3) > -1;
2057
+ }
2058
+ t2.exports = r2;
2059
+ });
2060
+ var mo = h((e2, t2) => {
2061
+ var n2 = lo();
2062
+ function r2(e3, t3) {
2063
+ var r3 = this.__data__, i2 = n2(r3, e3);
2064
+ return i2 < 0 ? (++this.size, r3.push([e3, t3])) : r3[i2][1] = t3, this;
2065
+ }
2066
+ t2.exports = r2;
2067
+ });
2068
+ var ho = h((e2, t2) => {
2069
+ var n2 = so(), r2 = uo(), i2 = fo(), a2 = po(), o2 = mo();
2070
+ function s2(e3) {
2071
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2072
+ for (this.clear(); ++t3 < n3; ) {
2073
+ var r3 = e3[t3];
2074
+ this.set(r3[0], r3[1]);
2075
+ }
2076
+ }
2077
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2078
+ });
2079
+ var go = h((e2, t2) => {
2080
+ var n2 = ho();
2081
+ function r2() {
2082
+ this.__data__ = new n2(), this.size = 0;
2083
+ }
2084
+ t2.exports = r2;
2085
+ });
2086
+ var _o = h((e2, t2) => {
2087
+ function n2(e3) {
2088
+ var t3 = this.__data__, n3 = t3.delete(e3);
2089
+ return this.size = t3.size, n3;
2090
+ }
2091
+ t2.exports = n2;
2092
+ });
2093
+ var vo = h((e2, t2) => {
2094
+ function n2(e3) {
2095
+ return this.__data__.get(e3);
2096
+ }
2097
+ t2.exports = n2;
2098
+ });
2099
+ var yo = h((e2, t2) => {
2100
+ function n2(e3) {
2101
+ return this.__data__.has(e3);
2102
+ }
2103
+ t2.exports = n2;
2104
+ });
2105
+ var bo = h((e2, t2) => {
2106
+ function n2(e3) {
2107
+ var t3 = typeof e3;
2108
+ return e3 != null && (t3 == `object` || t3 == `function`);
2109
+ }
2110
+ t2.exports = n2;
2111
+ });
2112
+ var xo = h((e2, t2) => {
2113
+ var n2 = eo(), r2 = bo(), i2 = `[object AsyncFunction]`, a2 = `[object Function]`, o2 = `[object GeneratorFunction]`, s2 = `[object Proxy]`;
2114
+ function c2(e3) {
2115
+ if (!r2(e3)) return false;
2116
+ var t3 = n2(e3);
2117
+ return t3 == a2 || t3 == o2 || t3 == i2 || t3 == s2;
2118
+ }
2119
+ t2.exports = c2;
2120
+ });
2121
+ var So = h((e2, t2) => {
2122
+ t2.exports = Y()[`__core-js_shared__`];
2123
+ });
2124
+ var Co = h((e2, t2) => {
2125
+ var n2 = So(), r2 = function() {
2126
+ var e3 = /[^.]+$/.exec(n2 && n2.keys && n2.keys.IE_PROTO || ``);
2127
+ return e3 ? `Symbol(src)_1.` + e3 : ``;
2128
+ }();
2129
+ function i2(e3) {
2130
+ return !!r2 && r2 in e3;
2131
+ }
2132
+ t2.exports = i2;
2133
+ });
2134
+ var wo = h((e2, t2) => {
2135
+ var n2 = Function.prototype.toString;
2136
+ function r2(e3) {
2137
+ if (e3 != null) {
2138
+ try {
2139
+ return n2.call(e3);
2140
+ } catch {
2141
+ }
2142
+ try {
2143
+ return e3 + ``;
2144
+ } catch {
2145
+ }
2146
+ }
2147
+ return ``;
2148
+ }
2149
+ t2.exports = r2;
2150
+ });
2151
+ var To = h((e2, t2) => {
2152
+ var n2 = xo(), r2 = Co(), i2 = bo(), a2 = wo(), o2 = /[\\^$.*+?()[\]{}|]/g, s2 = /^\[object .+?Constructor\]$/, c2 = Function.prototype, l2 = Object.prototype, u2 = c2.toString, d2 = l2.hasOwnProperty, f2 = RegExp(`^` + u2.call(d2).replace(o2, `\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, `$1.*?`) + `$`);
2153
+ function p2(e3) {
2154
+ return !i2(e3) || r2(e3) ? false : (n2(e3) ? f2 : s2).test(a2(e3));
2155
+ }
2156
+ t2.exports = p2;
2157
+ });
2158
+ var Eo = h((e2, t2) => {
2159
+ function n2(e3, t3) {
2160
+ return e3?.[t3];
2161
+ }
2162
+ t2.exports = n2;
2163
+ });
2164
+ var X = h((e2, t2) => {
2165
+ var n2 = To(), r2 = Eo();
2166
+ function i2(e3, t3) {
2167
+ var i3 = r2(e3, t3);
2168
+ return n2(i3) ? i3 : void 0;
2169
+ }
2170
+ t2.exports = i2;
2171
+ });
2172
+ var Do = h((e2, t2) => {
2173
+ t2.exports = X()(Y(), `Map`);
2174
+ });
2175
+ var Oo = h((e2, t2) => {
2176
+ t2.exports = X()(Object, `create`);
2177
+ });
2178
+ var ko = h((e2, t2) => {
2179
+ var n2 = Oo();
2180
+ function r2() {
2181
+ this.__data__ = n2 ? n2(null) : {}, this.size = 0;
2182
+ }
2183
+ t2.exports = r2;
2184
+ });
2185
+ var Ao = h((e2, t2) => {
2186
+ function n2(e3) {
2187
+ var t3 = this.has(e3) && delete this.__data__[e3];
2188
+ return this.size -= +!!t3, t3;
2189
+ }
2190
+ t2.exports = n2;
2191
+ });
2192
+ var jo = h((e2, t2) => {
2193
+ var n2 = Oo(), r2 = `__lodash_hash_undefined__`, i2 = Object.prototype.hasOwnProperty;
2194
+ function a2(e3) {
2195
+ var t3 = this.__data__;
2196
+ if (n2) {
2197
+ var a3 = t3[e3];
2198
+ return a3 === r2 ? void 0 : a3;
2199
+ }
2200
+ return i2.call(t3, e3) ? t3[e3] : void 0;
2201
+ }
2202
+ t2.exports = a2;
2203
+ });
2204
+ var Mo = h((e2, t2) => {
2205
+ var n2 = Oo(), r2 = Object.prototype.hasOwnProperty;
2206
+ function i2(e3) {
2207
+ var t3 = this.__data__;
2208
+ return n2 ? t3[e3] !== void 0 : r2.call(t3, e3);
2209
+ }
2210
+ t2.exports = i2;
2211
+ });
2212
+ var No = h((e2, t2) => {
2213
+ var n2 = Oo(), r2 = `__lodash_hash_undefined__`;
2214
+ function i2(e3, t3) {
2215
+ var i3 = this.__data__;
2216
+ return this.size += +!this.has(e3), i3[e3] = n2 && t3 === void 0 ? r2 : t3, this;
2217
+ }
2218
+ t2.exports = i2;
2219
+ });
2220
+ var Po = h((e2, t2) => {
2221
+ var n2 = ko(), r2 = Ao(), i2 = jo(), a2 = Mo(), o2 = No();
2222
+ function s2(e3) {
2223
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2224
+ for (this.clear(); ++t3 < n3; ) {
2225
+ var r3 = e3[t3];
2226
+ this.set(r3[0], r3[1]);
2227
+ }
2228
+ }
2229
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2230
+ });
2231
+ var Fo = h((e2, t2) => {
2232
+ var n2 = Po(), r2 = ho(), i2 = Do();
2233
+ function a2() {
2234
+ this.size = 0, this.__data__ = { hash: new n2(), map: new (i2 || r2)(), string: new n2() };
2235
+ }
2236
+ t2.exports = a2;
2237
+ });
2238
+ var Io = h((e2, t2) => {
2239
+ function n2(e3) {
2240
+ var t3 = typeof e3;
2241
+ return t3 == `string` || t3 == `number` || t3 == `symbol` || t3 == `boolean` ? e3 !== `__proto__` : e3 === null;
2242
+ }
2243
+ t2.exports = n2;
2244
+ });
2245
+ var Lo = h((e2, t2) => {
2246
+ var n2 = Io();
2247
+ function r2(e3, t3) {
2248
+ var r3 = e3.__data__;
2249
+ return n2(t3) ? r3[typeof t3 == `string` ? `string` : `hash`] : r3.map;
2250
+ }
2251
+ t2.exports = r2;
2252
+ });
2253
+ var Ro = h((e2, t2) => {
2254
+ var n2 = Lo();
2255
+ function r2(e3) {
2256
+ var t3 = n2(this, e3).delete(e3);
2257
+ return this.size -= +!!t3, t3;
2258
+ }
2259
+ t2.exports = r2;
2260
+ });
2261
+ var zo = h((e2, t2) => {
2262
+ var n2 = Lo();
2263
+ function r2(e3) {
2264
+ return n2(this, e3).get(e3);
2265
+ }
2266
+ t2.exports = r2;
2267
+ });
2268
+ var Bo = h((e2, t2) => {
2269
+ var n2 = Lo();
2270
+ function r2(e3) {
2271
+ return n2(this, e3).has(e3);
2272
+ }
2273
+ t2.exports = r2;
2274
+ });
2275
+ var Vo = h((e2, t2) => {
2276
+ var n2 = Lo();
2277
+ function r2(e3, t3) {
2278
+ var r3 = n2(this, e3), i2 = r3.size;
2279
+ return r3.set(e3, t3), this.size += r3.size == i2 ? 0 : 1, this;
2280
+ }
2281
+ t2.exports = r2;
2282
+ });
2283
+ var Ho = h((e2, t2) => {
2284
+ var n2 = Fo(), r2 = Ro(), i2 = zo(), a2 = Bo(), o2 = Vo();
2285
+ function s2(e3) {
2286
+ var t3 = -1, n3 = e3 == null ? 0 : e3.length;
2287
+ for (this.clear(); ++t3 < n3; ) {
2288
+ var r3 = e3[t3];
2289
+ this.set(r3[0], r3[1]);
2290
+ }
2291
+ }
2292
+ s2.prototype.clear = n2, s2.prototype.delete = r2, s2.prototype.get = i2, s2.prototype.has = a2, s2.prototype.set = o2, t2.exports = s2;
2293
+ });
2294
+ var Uo = h((e2, t2) => {
2295
+ var n2 = ho(), r2 = Do(), i2 = Ho(), a2 = 200;
2296
+ function o2(e3, t3) {
2297
+ var o3 = this.__data__;
2298
+ if (o3 instanceof n2) {
2299
+ var s2 = o3.__data__;
2300
+ if (!r2 || s2.length < a2 - 1) return s2.push([e3, t3]), this.size = ++o3.size, this;
2301
+ o3 = this.__data__ = new i2(s2);
2302
+ }
2303
+ return o3.set(e3, t3), this.size = o3.size, this;
2304
+ }
2305
+ t2.exports = o2;
2306
+ });
2307
+ var Wo = h((e2, t2) => {
2308
+ var n2 = ho(), r2 = go(), i2 = _o(), a2 = vo(), o2 = yo(), s2 = Uo();
2309
+ function c2(e3) {
2310
+ var t3 = this.__data__ = new n2(e3);
2311
+ this.size = t3.size;
2312
+ }
2313
+ c2.prototype.clear = r2, c2.prototype.delete = i2, c2.prototype.get = a2, c2.prototype.has = o2, c2.prototype.set = s2, t2.exports = c2;
2314
+ });
2315
+ var Go = h((e2, t2) => {
2316
+ function n2(e3) {
2317
+ return this.__data__.set(e3, `__lodash_hash_undefined__`), this;
2318
+ }
2319
+ t2.exports = n2;
2320
+ });
2321
+ var Ko = h((e2, t2) => {
2322
+ function n2(e3) {
2323
+ return this.__data__.has(e3);
2324
+ }
2325
+ t2.exports = n2;
2326
+ });
2327
+ var qo = h((e2, t2) => {
2328
+ var n2 = Ho(), r2 = Go(), i2 = Ko();
2329
+ function a2(e3) {
2330
+ var t3 = -1, r3 = e3 == null ? 0 : e3.length;
2331
+ for (this.__data__ = new n2(); ++t3 < r3; ) this.add(e3[t3]);
2332
+ }
2333
+ a2.prototype.add = a2.prototype.push = r2, a2.prototype.has = i2, t2.exports = a2;
2334
+ });
2335
+ var Jo = h((e2, t2) => {
2336
+ function n2(e3, t3) {
2337
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length; ++n3 < r2; ) if (t3(e3[n3], n3, e3)) return true;
2338
+ return false;
2339
+ }
2340
+ t2.exports = n2;
2341
+ });
2342
+ var Yo = h((e2, t2) => {
2343
+ function n2(e3, t3) {
2344
+ return e3.has(t3);
2345
+ }
2346
+ t2.exports = n2;
2347
+ });
2348
+ var Xo = h((e2, t2) => {
2349
+ var n2 = qo(), r2 = Jo(), i2 = Yo(), a2 = 1, o2 = 2;
2350
+ function s2(e3, t3, s3, c2, l2, u2) {
2351
+ var d2 = s3 & a2, f2 = e3.length, p2 = t3.length;
2352
+ if (f2 != p2 && !(d2 && p2 > f2)) return false;
2353
+ var m2 = u2.get(e3), h2 = u2.get(t3);
2354
+ if (m2 && h2) return m2 == t3 && h2 == e3;
2355
+ var g2 = -1, _2 = true, v2 = s3 & o2 ? new n2() : void 0;
2356
+ for (u2.set(e3, t3), u2.set(t3, e3); ++g2 < f2; ) {
2357
+ var y2 = e3[g2], b2 = t3[g2];
2358
+ if (c2) var x2 = d2 ? c2(b2, y2, g2, t3, e3, u2) : c2(y2, b2, g2, e3, t3, u2);
2359
+ if (x2 !== void 0) {
2360
+ if (x2) continue;
2361
+ _2 = false;
2362
+ break;
2363
+ }
2364
+ if (v2) {
2365
+ if (!r2(t3, function(e4, t4) {
2366
+ if (!i2(v2, t4) && (y2 === e4 || l2(y2, e4, s3, c2, u2))) return v2.push(t4);
2367
+ })) {
2368
+ _2 = false;
2369
+ break;
2370
+ }
2371
+ } else if (!(y2 === b2 || l2(y2, b2, s3, c2, u2))) {
2372
+ _2 = false;
2373
+ break;
2374
+ }
2375
+ }
2376
+ return u2.delete(e3), u2.delete(t3), _2;
2377
+ }
2378
+ t2.exports = s2;
2379
+ });
2380
+ var Zo = h((e2, t2) => {
2381
+ t2.exports = Y().Uint8Array;
2382
+ });
2383
+ var Qo = h((e2, t2) => {
2384
+ function n2(e3) {
2385
+ var t3 = -1, n3 = Array(e3.size);
2386
+ return e3.forEach(function(e4, r2) {
2387
+ n3[++t3] = [r2, e4];
2388
+ }), n3;
2389
+ }
2390
+ t2.exports = n2;
2391
+ });
2392
+ var $o = h((e2, t2) => {
2393
+ function n2(e3) {
2394
+ var t3 = -1, n3 = Array(e3.size);
2395
+ return e3.forEach(function(e4) {
2396
+ n3[++t3] = e4;
2397
+ }), n3;
2398
+ }
2399
+ t2.exports = n2;
2400
+ });
2401
+ var es = h((e2, t2) => {
2402
+ var n2 = Za(), r2 = Zo(), i2 = co(), a2 = Xo(), o2 = Qo(), s2 = $o(), c2 = 1, l2 = 2, u2 = `[object Boolean]`, d2 = `[object Date]`, f2 = `[object Error]`, p2 = `[object Map]`, m2 = `[object Number]`, h2 = `[object RegExp]`, g2 = `[object Set]`, _2 = `[object String]`, v2 = `[object Symbol]`, y2 = `[object ArrayBuffer]`, b2 = `[object DataView]`, x2 = n2 ? n2.prototype : void 0, S2 = x2 ? x2.valueOf : void 0;
2403
+ function C2(e3, t3, n3, x3, C3, w2, T2) {
2404
+ switch (n3) {
2405
+ case b2:
2406
+ if (e3.byteLength != t3.byteLength || e3.byteOffset != t3.byteOffset) return false;
2407
+ e3 = e3.buffer, t3 = t3.buffer;
2408
+ case y2:
2409
+ return !(e3.byteLength != t3.byteLength || !w2(new r2(e3), new r2(t3)));
2410
+ case u2:
2411
+ case d2:
2412
+ case m2:
2413
+ return i2(+e3, +t3);
2414
+ case f2:
2415
+ return e3.name == t3.name && e3.message == t3.message;
2416
+ case h2:
2417
+ case _2:
2418
+ return e3 == t3 + ``;
2419
+ case p2:
2420
+ var E2 = o2;
2421
+ case g2:
2422
+ var D2 = x3 & c2;
2423
+ if (E2 ||= s2, e3.size != t3.size && !D2) return false;
2424
+ var O2 = T2.get(e3);
2425
+ if (O2) return O2 == t3;
2426
+ x3 |= l2, T2.set(e3, t3);
2427
+ var k2 = a2(E2(e3), E2(t3), x3, C3, w2, T2);
2428
+ return T2.delete(e3), k2;
2429
+ case v2:
2430
+ if (S2) return S2.call(e3) == S2.call(t3);
2431
+ }
2432
+ return false;
2433
+ }
2434
+ t2.exports = C2;
2435
+ });
2436
+ var ts = h((e2, t2) => {
2437
+ function n2(e3, t3) {
2438
+ for (var n3 = -1, r2 = t3.length, i2 = e3.length; ++n3 < r2; ) e3[i2 + n3] = t3[n3];
2439
+ return e3;
2440
+ }
2441
+ t2.exports = n2;
2442
+ });
2443
+ var Z = h((e2, t2) => {
2444
+ t2.exports = Array.isArray;
2445
+ });
2446
+ var ns = h((e2, t2) => {
2447
+ var n2 = ts(), r2 = Z();
2448
+ function i2(e3, t3, i3) {
2449
+ var a2 = t3(e3);
2450
+ return r2(e3) ? a2 : n2(a2, i3(e3));
2451
+ }
2452
+ t2.exports = i2;
2453
+ });
2454
+ var rs = h((e2, t2) => {
2455
+ function n2(e3, t3) {
2456
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length, i2 = 0, a2 = []; ++n3 < r2; ) {
2457
+ var o2 = e3[n3];
2458
+ t3(o2, n3, e3) && (a2[i2++] = o2);
2459
+ }
2460
+ return a2;
2461
+ }
2462
+ t2.exports = n2;
2463
+ });
2464
+ var is = h((e2, t2) => {
2465
+ function n2() {
2466
+ return [];
2467
+ }
2468
+ t2.exports = n2;
2469
+ });
2470
+ var as = h((e2, t2) => {
2471
+ var n2 = rs(), r2 = is(), i2 = Object.prototype.propertyIsEnumerable, a2 = Object.getOwnPropertySymbols;
2472
+ t2.exports = a2 ? function(e3) {
2473
+ return e3 == null ? [] : (e3 = Object(e3), n2(a2(e3), function(t3) {
2474
+ return i2.call(e3, t3);
2475
+ }));
2476
+ } : r2;
2477
+ });
2478
+ var os = h((e2, t2) => {
2479
+ function n2(e3, t3) {
2480
+ for (var n3 = -1, r2 = Array(e3); ++n3 < e3; ) r2[n3] = t3(n3);
2481
+ return r2;
2482
+ }
2483
+ t2.exports = n2;
2484
+ });
2485
+ var ss = h((e2, t2) => {
2486
+ var n2 = eo(), r2 = to(), i2 = `[object Arguments]`;
2487
+ function a2(e3) {
2488
+ return r2(e3) && n2(e3) == i2;
2489
+ }
2490
+ t2.exports = a2;
2491
+ });
2492
+ var cs = h((e2, t2) => {
2493
+ var n2 = ss(), r2 = to(), i2 = Object.prototype, a2 = i2.hasOwnProperty, o2 = i2.propertyIsEnumerable;
2494
+ t2.exports = n2(/* @__PURE__ */ function() {
2495
+ return arguments;
2496
+ }()) ? n2 : function(e3) {
2497
+ return r2(e3) && a2.call(e3, `callee`) && !o2.call(e3, `callee`);
2498
+ };
2499
+ });
2500
+ var ls = h((e2, t2) => {
2501
+ function n2() {
2502
+ return false;
2503
+ }
2504
+ t2.exports = n2;
2505
+ });
2506
+ var us = h((e2, t2) => {
2507
+ var n2 = Y(), r2 = ls(), i2 = typeof e2 == `object` && e2 && !e2.nodeType && e2, a2 = i2 && typeof t2 == `object` && t2 && !t2.nodeType && t2, o2 = a2 && a2.exports === i2 ? n2.Buffer : void 0;
2508
+ t2.exports = (o2 ? o2.isBuffer : void 0) || r2;
2509
+ });
2510
+ var ds = h((e2, t2) => {
2511
+ var n2 = /^(?:0|[1-9]\d*)$/;
2512
+ function r2(e3, t3) {
2513
+ var r3 = typeof e3;
2514
+ return t3 ??= 9007199254740991, !!t3 && (r3 == `number` || r3 != `symbol` && n2.test(e3)) && e3 > -1 && e3 % 1 == 0 && e3 < t3;
2515
+ }
2516
+ t2.exports = r2;
2517
+ });
2518
+ var fs = h((e2, t2) => {
2519
+ function n2(e3) {
2520
+ return typeof e3 == `number` && e3 > -1 && e3 % 1 == 0 && e3 <= 9007199254740991;
2521
+ }
2522
+ t2.exports = n2;
2523
+ });
2524
+ var ps = h((e2, t2) => {
2525
+ var n2 = eo(), r2 = fs(), i2 = to(), a2 = `[object Arguments]`, o2 = `[object Array]`, s2 = `[object Boolean]`, c2 = `[object Date]`, l2 = `[object Error]`, u2 = `[object Function]`, d2 = `[object Map]`, f2 = `[object Number]`, p2 = `[object Object]`, m2 = `[object RegExp]`, h2 = `[object Set]`, g2 = `[object String]`, _2 = `[object WeakMap]`, v2 = `[object ArrayBuffer]`, y2 = `[object DataView]`, b2 = `[object Float32Array]`, x2 = `[object Float64Array]`, S2 = `[object Int8Array]`, C2 = `[object Int16Array]`, w2 = `[object Int32Array]`, T2 = `[object Uint8Array]`, E2 = `[object Uint8ClampedArray]`, D2 = `[object Uint16Array]`, O2 = `[object Uint32Array]`, k2 = {};
2526
+ k2[b2] = k2[x2] = k2[S2] = k2[C2] = k2[w2] = k2[T2] = k2[E2] = k2[D2] = k2[O2] = true, k2[a2] = k2[o2] = k2[v2] = k2[s2] = k2[y2] = k2[c2] = k2[l2] = k2[u2] = k2[d2] = k2[f2] = k2[p2] = k2[m2] = k2[h2] = k2[g2] = k2[_2] = false;
2527
+ function ee2(e3) {
2528
+ return i2(e3) && r2(e3.length) && !!k2[n2(e3)];
2529
+ }
2530
+ t2.exports = ee2;
2531
+ });
2532
+ var ms = h((e2, t2) => {
2533
+ function n2(e3) {
2534
+ return function(t3) {
2535
+ return e3(t3);
2536
+ };
2537
+ }
2538
+ t2.exports = n2;
2539
+ });
2540
+ var hs = h((e2, t2) => {
2541
+ var n2 = Xa(), r2 = typeof e2 == `object` && e2 && !e2.nodeType && e2, i2 = r2 && typeof t2 == `object` && t2 && !t2.nodeType && t2, a2 = i2 && i2.exports === r2 && n2.process;
2542
+ t2.exports = function() {
2543
+ try {
2544
+ return i2 && i2.require && i2.require(`util`).types || a2 && a2.binding && a2.binding(`util`);
2545
+ } catch {
2546
+ }
2547
+ }();
2548
+ });
2549
+ var gs = h((e2, t2) => {
2550
+ var n2 = ps(), r2 = ms(), i2 = hs(), a2 = i2 && i2.isTypedArray;
2551
+ t2.exports = a2 ? r2(a2) : n2;
2552
+ });
2553
+ var _s = h((e2, t2) => {
2554
+ var n2 = os(), r2 = cs(), i2 = Z(), a2 = us(), o2 = ds(), s2 = gs(), c2 = Object.prototype.hasOwnProperty;
2555
+ function l2(e3, t3) {
2556
+ var l3 = i2(e3), u2 = !l3 && r2(e3), d2 = !l3 && !u2 && a2(e3), f2 = !l3 && !u2 && !d2 && s2(e3), p2 = l3 || u2 || d2 || f2, m2 = p2 ? n2(e3.length, String) : [], h2 = m2.length;
2557
+ for (var g2 in e3) (t3 || c2.call(e3, g2)) && !(p2 && (g2 == `length` || d2 && (g2 == `offset` || g2 == `parent`) || f2 && (g2 == `buffer` || g2 == `byteLength` || g2 == `byteOffset`) || o2(g2, h2))) && m2.push(g2);
2558
+ return m2;
2559
+ }
2560
+ t2.exports = l2;
2561
+ });
2562
+ var vs = h((e2, t2) => {
2563
+ var n2 = Object.prototype;
2564
+ function r2(e3) {
2565
+ var t3 = e3 && e3.constructor;
2566
+ return e3 === (typeof t3 == `function` && t3.prototype || n2);
2567
+ }
2568
+ t2.exports = r2;
2569
+ });
2570
+ var ys = h((e2, t2) => {
2571
+ function n2(e3, t3) {
2572
+ return function(n3) {
2573
+ return e3(t3(n3));
2574
+ };
2575
+ }
2576
+ t2.exports = n2;
2577
+ });
2578
+ var bs = h((e2, t2) => {
2579
+ t2.exports = ys()(Object.keys, Object);
2580
+ });
2581
+ var xs = h((e2, t2) => {
2582
+ var n2 = vs(), r2 = bs(), i2 = Object.prototype.hasOwnProperty;
2583
+ function a2(e3) {
2584
+ if (!n2(e3)) return r2(e3);
2585
+ var t3 = [];
2586
+ for (var a3 in Object(e3)) i2.call(e3, a3) && a3 != `constructor` && t3.push(a3);
2587
+ return t3;
2588
+ }
2589
+ t2.exports = a2;
2590
+ });
2591
+ var Ss = h((e2, t2) => {
2592
+ var n2 = xo(), r2 = fs();
2593
+ function i2(e3) {
2594
+ return e3 != null && r2(e3.length) && !n2(e3);
2595
+ }
2596
+ t2.exports = i2;
2597
+ });
2598
+ var Cs = h((e2, t2) => {
2599
+ var n2 = _s(), r2 = xs(), i2 = Ss();
2600
+ function a2(e3) {
2601
+ return i2(e3) ? n2(e3) : r2(e3);
2602
+ }
2603
+ t2.exports = a2;
2604
+ });
2605
+ var ws = h((e2, t2) => {
2606
+ var n2 = ns(), r2 = as(), i2 = Cs();
2607
+ function a2(e3) {
2608
+ return n2(e3, i2, r2);
2609
+ }
2610
+ t2.exports = a2;
2611
+ });
2612
+ var Ts = h((e2, t2) => {
2613
+ var n2 = ws(), r2 = 1, i2 = Object.prototype.hasOwnProperty;
2614
+ function a2(e3, t3, a3, o2, s2, c2) {
2615
+ var l2 = a3 & r2, u2 = n2(e3), d2 = u2.length;
2616
+ if (d2 != n2(t3).length && !l2) return false;
2617
+ for (var f2 = d2; f2--; ) {
2618
+ var p2 = u2[f2];
2619
+ if (!(l2 ? p2 in t3 : i2.call(t3, p2))) return false;
2620
+ }
2621
+ var m2 = c2.get(e3), h2 = c2.get(t3);
2622
+ if (m2 && h2) return m2 == t3 && h2 == e3;
2623
+ var g2 = true;
2624
+ c2.set(e3, t3), c2.set(t3, e3);
2625
+ for (var _2 = l2; ++f2 < d2; ) {
2626
+ p2 = u2[f2];
2627
+ var v2 = e3[p2], y2 = t3[p2];
2628
+ if (o2) var b2 = l2 ? o2(y2, v2, p2, t3, e3, c2) : o2(v2, y2, p2, e3, t3, c2);
2629
+ if (!(b2 === void 0 ? v2 === y2 || s2(v2, y2, a3, o2, c2) : b2)) {
2630
+ g2 = false;
2631
+ break;
2632
+ }
2633
+ _2 ||= p2 == `constructor`;
2634
+ }
2635
+ if (g2 && !_2) {
2636
+ var x2 = e3.constructor, S2 = t3.constructor;
2637
+ x2 != S2 && `constructor` in e3 && `constructor` in t3 && !(typeof x2 == `function` && x2 instanceof x2 && typeof S2 == `function` && S2 instanceof S2) && (g2 = false);
2638
+ }
2639
+ return c2.delete(e3), c2.delete(t3), g2;
2640
+ }
2641
+ t2.exports = a2;
2642
+ });
2643
+ var Es = h((e2, t2) => {
2644
+ t2.exports = X()(Y(), `DataView`);
2645
+ });
2646
+ var Ds = h((e2, t2) => {
2647
+ t2.exports = X()(Y(), `Promise`);
2648
+ });
2649
+ var Os = h((e2, t2) => {
2650
+ t2.exports = X()(Y(), `Set`);
2651
+ });
2652
+ var ks = h((e2, t2) => {
2653
+ t2.exports = X()(Y(), `WeakMap`);
2654
+ });
2655
+ var As = h((e2, t2) => {
2656
+ var n2 = Es(), r2 = Do(), i2 = Ds(), a2 = Os(), o2 = ks(), s2 = eo(), c2 = wo(), l2 = `[object Map]`, u2 = `[object Object]`, d2 = `[object Promise]`, f2 = `[object Set]`, p2 = `[object WeakMap]`, m2 = `[object DataView]`, h2 = c2(n2), g2 = c2(r2), _2 = c2(i2), v2 = c2(a2), y2 = c2(o2), b2 = s2;
2657
+ (n2 && b2(new n2(new ArrayBuffer(1))) != m2 || r2 && b2(new r2()) != l2 || i2 && b2(i2.resolve()) != d2 || a2 && b2(new a2()) != f2 || o2 && b2(new o2()) != p2) && (b2 = function(e3) {
2658
+ var t3 = s2(e3), n3 = t3 == u2 ? e3.constructor : void 0, r3 = n3 ? c2(n3) : ``;
2659
+ if (r3) switch (r3) {
2660
+ case h2:
2661
+ return m2;
2662
+ case g2:
2663
+ return l2;
2664
+ case _2:
2665
+ return d2;
2666
+ case v2:
2667
+ return f2;
2668
+ case y2:
2669
+ return p2;
2670
+ }
2671
+ return t3;
2672
+ }), t2.exports = b2;
2673
+ });
2674
+ var js = h((e2, t2) => {
2675
+ var n2 = Wo(), r2 = Xo(), i2 = es(), a2 = Ts(), o2 = As(), s2 = Z(), c2 = us(), l2 = gs(), u2 = 1, d2 = `[object Arguments]`, f2 = `[object Array]`, p2 = `[object Object]`, m2 = Object.prototype.hasOwnProperty;
2676
+ function h2(e3, t3, h3, g2, _2, v2) {
2677
+ var y2 = s2(e3), b2 = s2(t3), x2 = y2 ? f2 : o2(e3), S2 = b2 ? f2 : o2(t3);
2678
+ x2 = x2 == d2 ? p2 : x2, S2 = S2 == d2 ? p2 : S2;
2679
+ var C2 = x2 == p2, w2 = S2 == p2, T2 = x2 == S2;
2680
+ if (T2 && c2(e3)) {
2681
+ if (!c2(t3)) return false;
2682
+ y2 = true, C2 = false;
2683
+ }
2684
+ if (T2 && !C2) return v2 ||= new n2(), y2 || l2(e3) ? r2(e3, t3, h3, g2, _2, v2) : i2(e3, t3, x2, h3, g2, _2, v2);
2685
+ if (!(h3 & u2)) {
2686
+ var E2 = C2 && m2.call(e3, `__wrapped__`), D2 = w2 && m2.call(t3, `__wrapped__`);
2687
+ if (E2 || D2) {
2688
+ var O2 = E2 ? e3.value() : e3, k2 = D2 ? t3.value() : t3;
2689
+ return v2 ||= new n2(), _2(O2, k2, h3, g2, v2);
2690
+ }
2691
+ }
2692
+ return T2 ? (v2 ||= new n2(), a2(e3, t3, h3, g2, _2, v2)) : false;
2693
+ }
2694
+ t2.exports = h2;
2695
+ });
2696
+ var Ms = h((e2, t2) => {
2697
+ var n2 = js(), r2 = to();
2698
+ function i2(e3, t3, a2, o2, s2) {
2699
+ return e3 === t3 ? true : e3 == null || t3 == null || !r2(e3) && !r2(t3) ? e3 !== e3 && t3 !== t3 : n2(e3, t3, a2, o2, i2, s2);
2700
+ }
2701
+ t2.exports = i2;
2702
+ });
2703
+ var Ns = h((e2, t2) => {
2704
+ var n2 = Wo(), r2 = Ms(), i2 = 1, a2 = 2;
2705
+ function o2(e3, t3, o3, s2) {
2706
+ var c2 = o3.length, l2 = c2, u2 = !s2;
2707
+ if (e3 == null) return !l2;
2708
+ for (e3 = Object(e3); c2--; ) {
2709
+ var d2 = o3[c2];
2710
+ if (u2 && d2[2] ? d2[1] !== e3[d2[0]] : !(d2[0] in e3)) return false;
2711
+ }
2712
+ for (; ++c2 < l2; ) {
2713
+ d2 = o3[c2];
2714
+ var f2 = d2[0], p2 = e3[f2], m2 = d2[1];
2715
+ if (u2 && d2[2]) {
2716
+ if (p2 === void 0 && !(f2 in e3)) return false;
2717
+ } else {
2718
+ var h2 = new n2();
2719
+ if (s2) var g2 = s2(p2, m2, f2, e3, t3, h2);
2720
+ if (!(g2 === void 0 ? r2(m2, p2, i2 | a2, s2, h2) : g2)) return false;
2721
+ }
2722
+ }
2723
+ return true;
2724
+ }
2725
+ t2.exports = o2;
2726
+ });
2727
+ var Ps = h((e2, t2) => {
2728
+ var n2 = bo();
2729
+ function r2(e3) {
2730
+ return e3 === e3 && !n2(e3);
2731
+ }
2732
+ t2.exports = r2;
2733
+ });
2734
+ var Fs = h((e2, t2) => {
2735
+ var n2 = Ps(), r2 = Cs();
2736
+ function i2(e3) {
2737
+ for (var t3 = r2(e3), i3 = t3.length; i3--; ) {
2738
+ var a2 = t3[i3], o2 = e3[a2];
2739
+ t3[i3] = [a2, o2, n2(o2)];
2740
+ }
2741
+ return t3;
2742
+ }
2743
+ t2.exports = i2;
2744
+ });
2745
+ var Is = h((e2, t2) => {
2746
+ function n2(e3, t3) {
2747
+ return function(n3) {
2748
+ return n3 != null && n3[e3] === t3 && (t3 !== void 0 || e3 in Object(n3));
2749
+ };
2750
+ }
2751
+ t2.exports = n2;
2752
+ });
2753
+ var Ls = h((e2, t2) => {
2754
+ var n2 = Ns(), r2 = Fs(), i2 = Is();
2755
+ function a2(e3) {
2756
+ var t3 = r2(e3);
2757
+ return t3.length == 1 && t3[0][2] ? i2(t3[0][0], t3[0][1]) : function(r3) {
2758
+ return r3 === e3 || n2(r3, e3, t3);
2759
+ };
2760
+ }
2761
+ t2.exports = a2;
2762
+ });
2763
+ var Rs = h((e2, t2) => {
2764
+ var n2 = Z(), r2 = no(), i2 = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, a2 = /^\w*$/;
2765
+ function o2(e3, t3) {
2766
+ if (n2(e3)) return false;
2767
+ var o3 = typeof e3;
2768
+ return o3 == `number` || o3 == `symbol` || o3 == `boolean` || e3 == null || r2(e3) ? true : a2.test(e3) || !i2.test(e3) || t3 != null && e3 in Object(t3);
2769
+ }
2770
+ t2.exports = o2;
2771
+ });
2772
+ var zs = h((e2, t2) => {
2773
+ var n2 = Ho(), r2 = `Expected a function`;
2774
+ function i2(e3, t3) {
2775
+ if (typeof e3 != `function` || t3 != null && typeof t3 != `function`) throw TypeError(r2);
2776
+ var a2 = function() {
2777
+ var n3 = arguments, r3 = t3 ? t3.apply(this, n3) : n3[0], i3 = a2.cache;
2778
+ if (i3.has(r3)) return i3.get(r3);
2779
+ var o2 = e3.apply(this, n3);
2780
+ return a2.cache = i3.set(r3, o2) || i3, o2;
2781
+ };
2782
+ return a2.cache = new (i2.Cache || n2)(), a2;
2783
+ }
2784
+ i2.Cache = n2, t2.exports = i2;
2785
+ });
2786
+ var Bs = h((e2, t2) => {
2787
+ var n2 = zs(), r2 = 500;
2788
+ function i2(e3) {
2789
+ var t3 = n2(e3, function(e4) {
2790
+ return i3.size === r2 && i3.clear(), e4;
2791
+ }), i3 = t3.cache;
2792
+ return t3;
2793
+ }
2794
+ t2.exports = i2;
2795
+ });
2796
+ var Vs = h((e2, t2) => {
2797
+ var n2 = Bs(), r2 = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, i2 = /\\(\\)?/g;
2798
+ t2.exports = n2(function(e3) {
2799
+ var t3 = [];
2800
+ return e3.charCodeAt(0) === 46 && t3.push(``), e3.replace(r2, function(e4, n3, r3, a2) {
2801
+ t3.push(r3 ? a2.replace(i2, `$1`) : n3 || e4);
2802
+ }), t3;
2803
+ });
2804
+ });
2805
+ var Hs = h((e2, t2) => {
2806
+ function n2(e3, t3) {
2807
+ for (var n3 = -1, r2 = e3 == null ? 0 : e3.length, i2 = Array(r2); ++n3 < r2; ) i2[n3] = t3(e3[n3], n3, e3);
2808
+ return i2;
2809
+ }
2810
+ t2.exports = n2;
2811
+ });
2812
+ var Us = h((e2, t2) => {
2813
+ var n2 = Za(), r2 = Hs(), i2 = Z(), a2 = no(), o2 = 1 / 0, s2 = n2 ? n2.prototype : void 0, c2 = s2 ? s2.toString : void 0;
2814
+ function l2(e3) {
2815
+ if (typeof e3 == `string`) return e3;
2816
+ if (i2(e3)) return r2(e3, l2) + ``;
2817
+ if (a2(e3)) return c2 ? c2.call(e3) : ``;
2818
+ var t3 = e3 + ``;
2819
+ return t3 == `0` && 1 / e3 == -o2 ? `-0` : t3;
2820
+ }
2821
+ t2.exports = l2;
2822
+ });
2823
+ var Ws = h((e2, t2) => {
2824
+ var n2 = Us();
2825
+ function r2(e3) {
2826
+ return e3 == null ? `` : n2(e3);
2827
+ }
2828
+ t2.exports = r2;
2829
+ });
2830
+ var Gs = h((e2, t2) => {
2831
+ var n2 = Z(), r2 = Rs(), i2 = Vs(), a2 = Ws();
2832
+ function o2(e3, t3) {
2833
+ return n2(e3) ? e3 : r2(e3, t3) ? [e3] : i2(a2(e3));
2834
+ }
2835
+ t2.exports = o2;
2836
+ });
2837
+ var Ks = h((e2, t2) => {
2838
+ var n2 = no(), r2 = 1 / 0;
2839
+ function i2(e3) {
2840
+ if (typeof e3 == `string` || n2(e3)) return e3;
2841
+ var t3 = e3 + ``;
2842
+ return t3 == `0` && 1 / e3 == -r2 ? `-0` : t3;
2843
+ }
2844
+ t2.exports = i2;
2845
+ });
2846
+ var qs = h((e2, t2) => {
2847
+ var n2 = Gs(), r2 = Ks();
2848
+ function i2(e3, t3) {
2849
+ t3 = n2(t3, e3);
2850
+ for (var i3 = 0, a2 = t3.length; e3 != null && i3 < a2; ) e3 = e3[r2(t3[i3++])];
2851
+ return i3 && i3 == a2 ? e3 : void 0;
2852
+ }
2853
+ t2.exports = i2;
2854
+ });
2855
+ var Js = h((e2, t2) => {
2856
+ var n2 = qs();
2857
+ function r2(e3, t3, r3) {
2858
+ var i2 = e3 == null ? void 0 : n2(e3, t3);
2859
+ return i2 === void 0 ? r3 : i2;
2860
+ }
2861
+ t2.exports = r2;
2862
+ });
2863
+ var Ys = h((e2, t2) => {
2864
+ function n2(e3, t3) {
2865
+ return e3 != null && t3 in Object(e3);
2866
+ }
2867
+ t2.exports = n2;
2868
+ });
2869
+ var Xs = h((e2, t2) => {
2870
+ var n2 = Gs(), r2 = cs(), i2 = Z(), a2 = ds(), o2 = fs(), s2 = Ks();
2871
+ function c2(e3, t3, c3) {
2872
+ t3 = n2(t3, e3);
2873
+ for (var l2 = -1, u2 = t3.length, d2 = false; ++l2 < u2; ) {
2874
+ var f2 = s2(t3[l2]);
2875
+ if (!(d2 = e3 != null && c3(e3, f2))) break;
2876
+ e3 = e3[f2];
2877
+ }
2878
+ return d2 || ++l2 != u2 ? d2 : (u2 = e3 == null ? 0 : e3.length, !!u2 && o2(u2) && a2(f2, u2) && (i2(e3) || r2(e3)));
2879
+ }
2880
+ t2.exports = c2;
2881
+ });
2882
+ var Zs = h((e2, t2) => {
2883
+ var n2 = Ys(), r2 = Xs();
2884
+ function i2(e3, t3) {
2885
+ return e3 != null && r2(e3, t3, n2);
2886
+ }
2887
+ t2.exports = i2;
2888
+ });
2889
+ var Qs = h((e2, t2) => {
2890
+ var n2 = Ms(), r2 = Js(), i2 = Zs(), a2 = Rs(), o2 = Ps(), s2 = Is(), c2 = Ks(), l2 = 1, u2 = 2;
2891
+ function d2(e3, t3) {
2892
+ return a2(e3) && o2(t3) ? s2(c2(e3), t3) : function(a3) {
2893
+ var o3 = r2(a3, e3);
2894
+ return o3 === void 0 && o3 === t3 ? i2(a3, e3) : n2(t3, o3, l2 | u2);
2895
+ };
2896
+ }
2897
+ t2.exports = d2;
2898
+ });
2899
+ var $s = h((e2, t2) => {
2900
+ function n2(e3) {
2901
+ return function(t3) {
2902
+ return t3?.[e3];
2903
+ };
2904
+ }
2905
+ t2.exports = n2;
2906
+ });
2907
+ var ec = h((e2, t2) => {
2908
+ var n2 = qs();
2909
+ function r2(e3) {
2910
+ return function(t3) {
2911
+ return n2(t3, e3);
2912
+ };
2913
+ }
2914
+ t2.exports = r2;
2915
+ });
2916
+ var tc = h((e2, t2) => {
2917
+ var n2 = $s(), r2 = ec(), i2 = Rs(), a2 = Ks();
2918
+ function o2(e3) {
2919
+ return i2(e3) ? n2(a2(e3)) : r2(e3);
2920
+ }
2921
+ t2.exports = o2;
2922
+ });
2923
+ var nc = h((e2, t2) => {
2924
+ var n2 = Ls(), r2 = Qs(), i2 = ao(), a2 = Z(), o2 = tc();
2925
+ function s2(e3) {
2926
+ return typeof e3 == `function` ? e3 : e3 == null ? i2 : typeof e3 == `object` ? a2(e3) ? r2(e3[0], e3[1]) : n2(e3) : o2(e3);
2927
+ }
2928
+ t2.exports = s2;
2929
+ });
2930
+ var rc = h((e2, t2) => {
2931
+ var n2 = ro(), r2 = io(), i2 = nc();
2932
+ function a2(e3, t3) {
2933
+ return e3 && e3.length ? n2(e3, i2(t3, 2), r2) : void 0;
2934
+ }
2935
+ t2.exports = a2;
2936
+ });
2937
+ var ic = h((e2, t2) => {
2938
+ function n2(e3, t3) {
2939
+ return e3 < t3;
2940
+ }
2941
+ t2.exports = n2;
2942
+ });
2943
+ var ac = h((e2, t2) => {
2944
+ var n2 = ro(), r2 = ic(), i2 = ao();
2945
+ function a2(e3) {
2946
+ return e3 && e3.length ? n2(e3, i2, r2) : void 0;
2947
+ }
2948
+ t2.exports = a2;
2949
+ });
2950
+ var oc = h((e2, t2) => {
2951
+ var n2 = ro(), r2 = nc(), i2 = ic();
2952
+ function a2(e3, t3) {
2953
+ return e3 && e3.length ? n2(e3, r2(t3, 2), i2) : void 0;
2954
+ }
2955
+ t2.exports = a2;
2956
+ });
2957
+ var sc = _(oo(), 1);
2958
+ var cc = _(rc(), 1);
2959
+ var lc = _(ac(), 1);
2960
+ var uc = _(oc(), 1);
2961
+ var dc = ({ price: e2 }) => e2.actualPrice;
2962
+ function fc(e2) {
2963
+ return e2.priceAfterDiscount === void 0 ? { currentSellingPrice: e2.actualPrice, priceBeforeDiscount: e2.compareAtPrice, pricePerUnit: e2.pricePerUnit } : { currentSellingPrice: e2.priceAfterDiscount, priceBeforeDiscount: e2.actualPrice, pricePerUnit: e2.pricePerUnit };
2964
+ }
2965
+ function pc(e2, t2) {
2966
+ let n2 = e2.subscriptionPrices.find((e3) => e3.subscriptionId === t2);
2967
+ if (!n2) throw Error(`Missing subscription price for plan ${t2} on variant ${e2.id}`);
2968
+ let r2 = n2.price;
2969
+ return { currentSellingPrice: r2, priceBeforeDiscount: r2 < e2.price.actualPrice ? e2.price.actualPrice : void 0 };
2970
+ }
2971
+ function mc(e2) {
2972
+ let t2 = (0, uc.default)(e2, dc), n2 = (0, cc.default)(e2, dc), r2 = e2.map(({ price: e3 }) => fc(e3)), i2 = fc(t2.price), a2 = fc(n2.price), o2 = r2.flatMap(({ priceBeforeDiscount: e3 }) => e3 === void 0 ? [] : [e3]);
2973
+ return { minCurrentSellingPrice: i2.currentSellingPrice, maxCurrentSellingPrice: a2.currentSellingPrice, minPriceBeforeDiscount: (0, lc.default)(o2), maxPriceBeforeDiscount: (0, sc.default)(o2), minPricePerUnit: i2.pricePerUnit, maxPricePerUnit: a2.pricePerUnit };
2974
+ }
2975
+ function hc(e2, t2) {
2976
+ return e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: pc(t2, e3.id) }));
2977
+ }
2978
+ function gc(e2) {
2979
+ return { productPrice: { currentSellingPrice: void 0 }, subscriptionPlanPrices: e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: { currentSellingPrice: void 0 } })), productPriceRange: { minCurrentSellingPrice: void 0, maxCurrentSellingPrice: void 0 } };
2980
+ }
2981
+ function _c(e2) {
2982
+ if (!e2.minPriceVariant) return gc(e2);
2983
+ let t2 = fc(e2.minPriceVariant.price), n2 = e2.minPriceVariant.price.priceAfterDiscount !== void 0;
2984
+ return { productPrice: t2, subscriptionPlanPrices: e2.subscriptionDetails.subscriptions.map((e3) => ({ subscription: e3, price: {} })), productPriceRange: { minCurrentSellingPrice: t2.currentSellingPrice, maxCurrentSellingPrice: n2 ? void 0 : e2.priceRange.maxActualPrice, minPriceBeforeDiscount: t2.priceBeforeDiscount, maxPriceBeforeDiscount: n2 ? e2.priceRange.maxActualPrice : e2.priceRange.maxCompareAtPrice, minPricePerUnit: t2.pricePerUnit } };
2985
+ }
2986
+ function vc(e2, t2, n2) {
2987
+ if (!n2) return _c(e2);
2988
+ let r2 = (0, uc.default)(e2.variants, dc), i2 = t2 ?? r2;
2989
+ return i2 ? { productPrice: fc(i2.price), subscriptionPlanPrices: hc(e2, i2), productPriceRange: mc(e2.variants) } : gc(e2);
2990
+ }
2991
+ function yc(e2, t2) {
2992
+ let n2 = e2.subscriptionPlanPrices.find(({ subscription: e3 }) => e3.id === t2);
2993
+ return n2 ? { currentSellingPrice: n2.price.currentSellingPrice, priceBeforeDiscount: n2.price.priceBeforeDiscount, pricePerUnit: e2.productPrice.pricePerUnit } : e2.productPrice;
2994
+ }
2995
+ function bc(e2) {
2996
+ return fc(e2.price).currentSellingPrice;
2997
+ }
2998
+ var xc = `BACK_IN_STOCK_NOTIFICATION_REQUEST_ALREADY_EXISTS`;
2999
+ function Sc(e2) {
3000
+ return e2?.details?.applicationError?.code ?? `UNKNOWN`;
3001
+ }
3002
+ function Cc(e2) {
3003
+ return { code: Sc(e2), message: e2?.message };
3004
+ }
3005
+ async function wc(e2) {
3006
+ let { productId: t2, variantId: n2, email: r2, name: i2, price: a2, imageUrl: o2 } = e2;
3007
+ try {
3008
+ return await Qi({ catalogReference: { catalogItemId: t2, appId: Sa, ...n2 ? { options: { variantId: n2 } } : {} }, email: r2 }, { name: i2, price: String(a2), ...o2 ? { image: o2 } : {} }), `created`;
3009
+ } catch (e3) {
3010
+ if (Sc(e3) === xc) return `already-subscribed`;
3011
+ throw Cc(e3);
3012
+ }
3013
+ }
3014
+ var Tc = (e2) => e2.media.type === `image`;
3015
+ function Ec(e2, t2) {
3016
+ let n2 = t2.choices[e2.id];
3017
+ return e2.choices.find((e3) => e3.choiceId === n2);
3018
+ }
3019
+ function Dc(e2, t2) {
3020
+ let n2 = e2.options.map((e3) => Ec(e3, t2)?.mediaIds).filter((e3) => !!(e3 && e3.length > 0));
3021
+ if (n2.length === 0) return;
3022
+ let r2 = n2.reduce((e3, t3) => e3.filter((e4) => t3.includes(e4))), i2 = r2.length > 0 ? r2 : n2.flat(), a2 = /* @__PURE__ */ new Map();
3023
+ for (let t3 of e2.media ?? []) Tc(t3) && a2.set(t3.id, t3);
3024
+ for (let e3 of i2) {
3025
+ let t3 = a2.get(e3)?.media.src;
3026
+ if (t3) return t3;
3027
+ }
3028
+ }
3029
+ function Oc(e2, t2) {
3030
+ let n2 = [t2 ? Dc(e2, t2) : void 0, e2.media?.find(Tc)?.media.src];
3031
+ for (let e3 of n2) {
3032
+ let t3 = fi(e3);
3033
+ if (t3) return t3;
3034
+ }
3035
+ }
3036
+ function kc(e2, r2) {
3037
+ let i2 = t((t2) => r2 ? wc({ productId: e2.id, variantId: r2.id, email: t2, name: e2.name ?? ``, price: bc(r2), imageUrl: Oc(e2, r2) }) : Promise.reject(Error(`Cannot create a back-in-stock notification without a selected variant`)), [e2, r2]);
3038
+ return n(() => ({ handleNotifyMe: i2 }), [i2]);
3039
+ }
3040
+ function Ac(e2, t2) {
3041
+ return n(() => ({ id: e2.id, name: e2.name, description: e2.description, ribbons: e2.ribbons, breadcrumbs: e2.breadcrumbs, mainCategoryId: e2.mainCategoryId, categories: e2.categories, infoSections: e2.infoSections, sku: t2?.sku, discountRules: e2.discountRuleNames?.map((e3) => ({ name: e3 })) }), [e2, t2]);
3042
+ }
3043
+ function jc(e2) {
3044
+ return { type: `image`, src: e2.url, width: e2.width, height: e2.height, ...e2.name === void 0 ? {} : { title: e2.name }, ...e2.alt === void 0 ? {} : { parameters: { alt: e2.alt } } };
3045
+ }
3046
+ var Mc = `11062b_7b9f1e3756b64285ad5cf5e244b4ae77~mv2.png`;
3047
+ var Nc = { uri: Mc, url: `https://static.wixstatic.com/media/${Mc}`, width: 460, height: 460 };
3048
+ var Pc = [jc(Nc)];
3049
+ function Fc(e2, t2, n2) {
3050
+ let r2 = Rc(e2, Ic(e2, t2, n2));
3051
+ return r2.length > 0 ? r2 : e2.media ?? [];
3052
+ }
3053
+ function Ic(e2, t2, n2) {
3054
+ let r2 = e2.options.flatMap((e3) => Lc(e3.choices, t2[e3.id])), i2 = Object.values(e2.modifiers).flatMap((e3) => Lc(e3.choices, n2[e3.id]));
3055
+ return [.../* @__PURE__ */ new Set([...r2, ...i2])];
3056
+ }
3057
+ function Lc(e2, t2) {
3058
+ return e2?.find((e3) => e3.choiceId === t2)?.mediaIds ?? [];
3059
+ }
3060
+ function Rc(e2, t2) {
3061
+ let n2 = new Map((e2.media ?? []).map((e3) => [e3.id, e3]));
3062
+ return t2.flatMap((e3) => {
3063
+ let t3 = n2.get(e3);
3064
+ return t3 ? [t3] : [];
3065
+ });
3066
+ }
3067
+ function zc(e2) {
3068
+ return e2.map((e3) => e3.id).join(`|`);
3069
+ }
3070
+ function Bc(e2) {
3071
+ return e2.length > 0 ? e2.map((e3) => e3.media) : Pc;
3072
+ }
3073
+ function Vc({ product: e2, selectedOptions: i2, selectedModifiers: a2 }) {
3074
+ let o2 = n(() => Bc(e2.media ?? []), [e2.media]), s2 = e2.mainMedia ?? Nc, c2 = n(() => Fc(e2, i2, a2), [e2, i2, a2]), l2 = n(() => Bc(c2), [c2]), u2 = zc(c2), [d2, f2] = r(u2), [p2, m2] = r(0);
3075
+ d2 !== u2 && (f2(u2), m2(0));
3076
+ let h2 = t((e3) => m2(e3), []);
3077
+ return n(() => ({ allMedia: o2, mainMedia: s2, media: l2, selectedMediaIndex: p2, selectMedia: h2 }), [o2, s2, l2, p2, h2]);
3078
+ }
3079
+ function Hc(e2) {
3080
+ return Object.entries(e2).map(([e3, t2]) => ({ optionId: e3, choiceId: t2 }));
3081
+ }
3082
+ function Uc(e2) {
3083
+ return Object.entries(e2).map(([e3, t2]) => ({ modifierId: e3, value: t2 }));
3084
+ }
3085
+ function Wc(e2, t2, r2, i2 = false) {
3086
+ let { selectedVariant: a2 } = t2, o2 = Ac(e2, a2), s2 = Ya(e2, a2), c2 = Vc({ product: e2, selectedOptions: t2.selectedOptions, selectedModifiers: t2.selectedModifiers }), l2 = kc(e2, a2), { getPageAbsoluteUrl: u2 } = ka(), d2 = n(() => {
3087
+ if (!e2.slug) return;
3088
+ let t3 = u2(q.PRODUCT_PAGE, e2.slug);
3089
+ return t3 ? { href: t3 } : void 0;
3090
+ }, [e2.slug, u2]);
3091
+ return n(() => {
3092
+ let { selectedVariant: e3, setHasAttemptedSubmit: n2, isSelectionValid: a3, selectedOptions: u3, selectedModifiers: f2, selectedSubscriptionPlanId: p2, quantity: m2, ...h2 } = t2;
3093
+ return { ...o2, link: d2, ...r2, ...h2, buyerSelections: { options: Hc(u3), modifiers: Uc(f2), subscriptionPlanId: p2, quantity: m2 }, ...s2, ...c2, ...l2, isBackInStockEnabled: i2 };
3094
+ }, [o2, d2, r2, t2, s2, c2, l2, i2]);
3095
+ }
3096
+ var Gc = K(`@wix/viewer-service-environment`);
3097
+ function Kc() {
3098
+ return s(Gc).language;
3099
+ }
3100
+ var qc = (e2) => {
3101
+ let t2 = e2?.maximumFractionDigits ?? 2;
3102
+ return (e3) => e3?.toFixed(t2);
3103
+ };
3104
+ var Jc = (e2, t2, n2) => {
3105
+ let r2 = new Intl.NumberFormat(t2, { style: `currency`, currency: e2, ...n2 });
3106
+ return (e3) => {
3107
+ if (e3 != null) return r2.format(e3);
3108
+ };
3109
+ };
3110
+ function Yc(e2, t2, n2) {
3111
+ return e2 ? Jc(e2, t2, n2) : qc(n2);
3112
+ }
3113
+ function Xc(e2, t2) {
3114
+ let r2 = Kc();
3115
+ return n(() => Yc(e2, r2, t2), [e2, r2, t2]);
3116
+ }
3117
+ function Q(e2, t2) {
3118
+ return e2 === void 0 ? void 0 : { amount: e2, formattedAmount: t2(e2) };
3119
+ }
3120
+ function Zc(e2, t2, n2) {
3121
+ return { id: e2.id, name: e2.name, isOneTimePurchase: false, description: e2.description, currentPrice: Q(t2.currentSellingPrice, n2), originalPrice: Q(t2.priceBeforeDiscount, n2), frequency: e2.frequency, interval: e2.interval, duration: e2.billingCycles };
3122
+ }
3123
+ function Qc(e2) {
3124
+ return e2 === void 0 ? void 0 : { description: e2.description };
3125
+ }
3126
+ function $c(e2, t2) {
3127
+ return { currentSellingPrice: Q(e2.currentSellingPrice, t2), priceBeforeDiscount: Q(e2.priceBeforeDiscount, t2), pricePerUnit: Qc(e2.pricePerUnit) };
3128
+ }
3129
+ function el(e2, t2) {
3130
+ return { minCurrentSellingPrice: Q(e2.minCurrentSellingPrice, t2), maxCurrentSellingPrice: Q(e2.maxCurrentSellingPrice, t2), minPriceBeforeDiscount: Q(e2.minPriceBeforeDiscount, t2), maxPriceBeforeDiscount: Q(e2.maxPriceBeforeDiscount, t2), minPricePerUnit: Qc(e2.minPricePerUnit), maxPricePerUnit: Qc(e2.maxPricePerUnit) };
3131
+ }
3132
+ function tl(e2, t2, n2, r2) {
3133
+ if (e2.length === 0) return [];
3134
+ let i2 = e2.map(({ subscription: e3, price: t3 }) => Zc(e3, t3, r2));
3135
+ return t2 ? [{ id: mi, name: `One-time purchase`, isOneTimePurchase: true, currentPrice: Q(n2.currentSellingPrice, r2) }, ...i2] : i2;
3136
+ }
3137
+ function nl({ product: e2, userInputs: t2, hasLoadedVariants: r2 }) {
3138
+ let { selectedVariant: i2, selectedSubscriptionPlanId: a2 } = t2, o2 = Xc(e2.currency);
3139
+ return n(() => {
3140
+ let t3 = vc(e2, i2, r2), n2 = { ...$c(yc(t3, a2), o2), ...el(t3.productPriceRange, o2) }, s2 = tl(t3.subscriptionPlanPrices, e2.subscriptionDetails.allowOneTimePurchases, t3.productPrice, o2);
3141
+ return { currency: e2.currency, pricing: n2, subscriptionPlans: s2 };
3142
+ }, [e2, i2, a2, r2, o2]);
3143
+ }
3144
+ function rl(e2) {
3145
+ return Object.values(e2).toSorted().join(`_`);
3146
+ }
3147
+ function il(e2) {
3148
+ let t2 = /* @__PURE__ */ new Map();
3149
+ for (let n2 of e2) t2.set(rl(n2.choices), n2);
3150
+ return t2;
3151
+ }
3152
+ function al(e2, t2, n2) {
3153
+ let r2 = Object.keys(n2).length > 0, i2 = {};
3154
+ for (let a2 of e2) {
3155
+ i2[a2.id] = {};
3156
+ for (let e3 of a2.choices) {
3157
+ if (!r2) {
3158
+ i2[a2.id][e3.choiceId] = { isInStock: e3.inStock ?? true, isVisible: e3.visible ?? true };
3159
+ continue;
3160
+ }
3161
+ if (e3.inStock === false && e3.visible === false) {
3162
+ i2[a2.id][e3.choiceId] = { isInStock: false, isVisible: false };
3163
+ continue;
3164
+ }
3165
+ let { isInStock: o2, isVisible: s2 } = ol({ ...n2, [a2.id]: e3.choiceId }, t2);
3166
+ i2[a2.id][e3.choiceId] = { isInStock: o2, isVisible: s2 };
3167
+ }
3168
+ }
3169
+ return i2;
3170
+ }
3171
+ function ol(e2, t2) {
3172
+ let n2 = false, r2 = false;
3173
+ for (let i2 of t2.values()) if (Object.entries(e2).every(([e3, t3]) => i2.choices[e3] === t3) && (r2 = true, (i2.availabilityStatus === gr.IN_STOCK || i2.availabilityStatus === gr.PREORDER) && (n2 = true), n2)) break;
3174
+ return { isInStock: n2, isVisible: r2 };
3175
+ }
3176
+ function sl(e2, t2) {
3177
+ let n2 = /* @__PURE__ */ new Map();
3178
+ for (let e3 of t2) n2.set(e3.variantId, e3);
3179
+ return e2.map((e3) => {
3180
+ let t3 = n2.get(e3.id);
3181
+ return { ...e3, availabilityStatus: t3?.availabilityStatus, preorderInfo: t3?.preorderInfo, inventoryQuantity: t3?.quantity, trackQuantity: t3?.trackQuantity };
3182
+ });
3183
+ }
3184
+ var cl = (e2, t2) => e2.modifierRenderType === Mr.FREE_TEXT ? !!t2 : e2.choices?.some((e3) => e3.choiceId === t2);
3185
+ function ll({ product: e2, selections: t2, selectedVariant: n2 }) {
3186
+ let r2 = { options: ul(e2.options, t2.selectedOptions, n2), modifiers: fl(e2.modifiers, t2.selectedModifiers), quantity: dl(t2.quantity, n2), subscriptionPlanId: pl(e2.subscriptionDetails, t2.selectedSubscriptionPlanId) };
3187
+ return { valid: Object.values(r2.options).length === 0 && Object.values(r2.modifiers).length === 0 && !r2.quantity && !r2.subscriptionPlanId, fields: r2 };
3188
+ }
3189
+ function ul(e2, t2, n2) {
3190
+ if (n2 !== null) return {};
3191
+ let r2 = {};
3192
+ for (let n3 of e2) t2[n3.id] || (r2[n3.id] = `missing`);
3193
+ return r2;
3194
+ }
3195
+ function dl(e2, t2) {
3196
+ if (e2 < 1) return `below-min`;
3197
+ if (e2 > Wa(t2)) return `above-max`;
3198
+ }
3199
+ function fl(e2, t2) {
3200
+ let n2 = Object.values(e2).filter((e3) => e3.mandatory && !cl(e3, t2[e3.id]));
3201
+ return Object.fromEntries(n2.map((e3) => [e3.id, `missing`]));
3202
+ }
3203
+ function pl(e2, t2) {
3204
+ if (e2.subscriptions.length !== 0) return t2 ? t2 === `one-time` ? e2.allowOneTimePurchases ? void 0 : `missing` : ml(e2, t2) ? void 0 : `missing` : `missing`;
3205
+ }
3206
+ function ml(e2, t2) {
3207
+ return e2.subscriptions.some((e3) => e3.id === t2);
3208
+ }
3209
+ var $ = function(e2) {
3210
+ return e2.PRODUCT_OPTION = `PRODUCT_OPTION`, e2.MODIFIER = `MODIFIER`, e2;
3211
+ }({});
3212
+ function hl(e2) {
3213
+ if (e2 === `IN_STOCK` || e2 === `OUT_OF_STOCK` || e2 === `PARTIALLY_OUT_OF_STOCK`) return e2;
3214
+ }
3215
+ function gl(e2) {
3216
+ if (!(!e2 || e2.customizationRenderType !== `TEXT_CHOICES` && e2.customizationRenderType !== `SWATCH_CHOICES`)) {
3217
+ if (e2.customizationType === `PRODUCT_OPTION`) return `PRODUCT_OPTION`;
3218
+ if (e2.customizationType === `MODIFIER`) return `MODIFIER`;
3219
+ }
3220
+ }
3221
+ function _l(e2) {
3222
+ return !e2._id || !e2.key ? null : { choiceId: e2._id, key: e2.key, name: e2.name, colorCode: e2.colorCode };
3223
+ }
3224
+ function vl(e2) {
3225
+ if (e2.status !== `ACTIVE` || !e2.productId || !e2.slug || !e2.choice) return null;
3226
+ let t2 = _l(e2.choice);
3227
+ return t2 ? { productId: e2.productId, choice: t2, slug: e2.slug, inventoryAvailabilityStatus: hl(e2.inventoryAvailabilityStatus) } : null;
3228
+ }
3229
+ function yl(e2) {
3230
+ let t2 = e2.groupingCustomizationId, n2 = gl(e2.groupingCustomization);
3231
+ if (!t2 || !n2) return;
3232
+ let r2 = (e2.members ?? []).map((e3) => vl(e3)).filter((e3) => e3 !== null);
3233
+ if (r2.length !== 0) return { groupingCustomizationId: t2, customizationType: n2, members: r2 };
3234
+ }
3235
+ async function bl(e2) {
3236
+ if (e2) try {
3237
+ let t2 = await Xr({ fields: [Wr.GROUPING_CUSTOMIZATION] }).eq(`_id`, e2).limit(1).find();
3238
+ return t2.items[0] ? yl(t2.items[0]) : void 0;
3239
+ } catch {
3240
+ return;
3241
+ }
3242
+ }
3243
+ function xl(e2, t2) {
3244
+ if (!t2) return;
3245
+ let n2 = t2.members.find((t3) => t3.productId === e2.id);
3246
+ if (!n2) return;
3247
+ let r2 = { groupingCustomizationId: t2.groupingCustomizationId, currentProductChoiceId: n2.choice.choiceId, members: t2.members };
3248
+ if (t2.customizationType === $.PRODUCT_OPTION) return e2.options.find(({ id: e3 }) => e3 === t2.groupingCustomizationId) ? { ...r2, customizationType: $.PRODUCT_OPTION } : void 0;
3249
+ if (e2.modifiers[t2.groupingCustomizationId]) return { ...r2, customizationType: $.MODIFIER };
3250
+ }
3251
+ function Sl(e2, t2) {
3252
+ return e2.members.find((e3) => e3.choice.choiceId === t2);
3253
+ }
3254
+ function Cl(e2, t2, n2) {
3255
+ return !!e2 && t2 === e2.groupingCustomizationId && n2 !== e2.currentProductChoiceId;
3256
+ }
3257
+ function wl(e2, t2) {
3258
+ if (!t2) return;
3259
+ if (t2.customizationType === $.PRODUCT_OPTION) {
3260
+ let n3 = e2.options.find(({ id: e3 }) => e3 === t2.groupingCustomizationId);
3261
+ if (!n3) return;
3262
+ let r3 = Tl(n3, t2);
3263
+ return { options: e2.options.map((e3) => e3.id === n3.id ? r3 : e3) };
3264
+ }
3265
+ let n2 = e2.modifiers[t2.groupingCustomizationId];
3266
+ if (!n2) return;
3267
+ let r2 = El(n2, t2);
3268
+ return { modifiers: { ...e2.modifiers, [t2.groupingCustomizationId]: r2 } };
3269
+ }
3270
+ function Tl(e2, t2) {
3271
+ return { ...e2, isGroupedOption: true, choices: t2.members.map((e3) => ({ ...e3.choice, inStock: e3.inventoryAvailabilityStatus !== `OUT_OF_STOCK` })) };
3272
+ }
3273
+ function El(e2, t2) {
3274
+ return { ...e2, choices: t2.members.map(({ choice: e3 }) => e3) };
3275
+ }
3276
+ function Dl(e2, t2) {
3277
+ if (!t2 || t2.customizationType !== $.PRODUCT_OPTION) return e2;
3278
+ let n2 = Object.fromEntries(t2.members.map((e3) => [e3.choice.choiceId, { isInStock: e3.inventoryAvailabilityStatus !== `OUT_OF_STOCK`, isVisible: true }]));
3279
+ return { ...e2, [t2.groupingCustomizationId]: { ...n2, ...e2[t2.groupingCustomizationId] } };
3280
+ }
3281
+ function Ol(e2, r2) {
3282
+ let { navigateToProductPage: i2 } = Ma(), a2 = n(() => xl(e2, r2), [e2, r2]);
3283
+ return { productGrouping: a2, selectGroupSiblingChoice: t((e3) => {
3284
+ if (!a2) return;
3285
+ let t2 = Sl(a2, e3);
3286
+ t2 && i2(t2.slug);
3287
+ }, [a2, i2]), productCustomizations: n(() => wl(e2, a2), [e2, a2]), addGroupChoicesAvailability: t((e3) => Dl(e3, a2), [a2]), initialSelection: n(() => {
3288
+ if (!a2) return { options: {}, modifiers: {} };
3289
+ let { customizationType: t2, groupingCustomizationId: n2, currentProductChoiceId: r3 } = a2;
3290
+ if (t2 === $.MODIFIER && e2.modifiers[n2].mandatory === false) return { options: {}, modifiers: {} };
3291
+ let i3 = { [n2]: r3 };
3292
+ return t2 === $.PRODUCT_OPTION ? { options: i3, modifiers: {} } : { options: {}, modifiers: i3 };
3293
+ }, [a2, e2.modifiers]) };
3294
+ }
3295
+ function kl(e2, i2, a2) {
3296
+ let o2 = Ol(e2, a2), { productGrouping: s2, selectGroupSiblingChoice: c2, addGroupChoicesAvailability: l2 } = o2, [u2, d2] = r(() => o2.initialSelection.options), [f2, p2] = r(() => o2.initialSelection.modifiers), [m2, h2] = r(void 0), [g2, _2] = r(1), [v2, y2] = r(false), b2 = n(() => il(sl(e2.variants, i2)), [e2.variants, i2]), x2 = n(() => {
3297
+ let t2 = /* @__PURE__ */ new Map();
3298
+ return (n2) => {
3299
+ let r2 = rl(n2), i3 = t2.get(r2);
3300
+ if (i3) return i3;
3301
+ let a3 = l2(al(e2.options, b2, n2));
3302
+ return t2.set(r2, a3), a3;
3303
+ };
3304
+ }, [b2, e2.options, l2]), S2 = n(() => x2(u2), [x2, u2]), C2 = n(() => Object.keys(u2).length === e2.options.length ? b2.get(rl(u2)) ?? null : null, [b2, u2, e2.options.length]), w2 = t((e3, t2) => {
3305
+ if (u2[e3] !== t2) {
3306
+ if (Cl(s2, e3, t2)) {
3307
+ c2(t2);
3308
+ return;
3309
+ }
3310
+ d2((n2) => ({ ...n2, [e3]: t2 })), _2(1);
3311
+ }
3312
+ }, [u2, s2, c2]), T2 = t((e3, t2) => {
3313
+ if (Cl(s2, e3, t2)) {
3314
+ c2(t2);
3315
+ return;
3316
+ }
3317
+ p2((n2) => n2[e3] === t2 ? n2 : { ...n2, [e3]: t2 });
3318
+ }, [s2, c2]), E2 = t((e3) => {
3319
+ p2((t2) => {
3320
+ if (!(e3 in t2)) return t2;
3321
+ let { [e3]: n2, ...r2 } = t2;
3322
+ return r2;
3323
+ });
3324
+ }, []), D2 = t((e3) => {
3325
+ h2(e3);
3326
+ }, []), O2 = n(() => Wa(C2), [C2]), k2 = n(() => Ga(g2, O2), [g2, O2]), ee2 = t((e3) => {
3327
+ _2(e3);
3328
+ }, []), te2 = n(() => ll({ product: e2, selections: { selectedOptions: u2, selectedModifiers: f2, selectedSubscriptionPlanId: m2, quantity: k2 }, selectedVariant: C2 }), [e2, u2, f2, m2, k2, C2]), ne2 = o2.productCustomizations?.options ?? e2.options, re2 = o2.productCustomizations?.modifiers ?? e2.modifiers;
3329
+ return n(() => ({ options: ne2, modifiers: re2, quantity: k2, selectedOptions: u2, selectedModifiers: f2, selectedSubscriptionPlanId: m2, selectedVariant: C2, selectedVariantId: C2?.id ?? null, selectionsAvailability: S2, maxPurchasableQuantity: O2, isSelectionValid: te2.valid, selectionValidationErrors: te2.fields, hasAttemptedSubmit: v2, setHasAttemptedSubmit: y2, selectOption: w2, selectModifier: T2, clearModifierSelection: E2, selectSubscriptionPlan: D2, selectQuantity: ee2 }), [ne2, re2, k2, u2, f2, m2, C2, S2, O2, te2, v2, w2, T2, E2, D2, ee2]);
3330
+ }
3331
+ function Al({ product: e2, productGroup: t2, inventoryItems: r2, isBackInStockEnabled: i2, source: a2 }) {
3332
+ let o2 = kl(e2, r2, t2), s2 = Ua(e2, o2, Ya(e2, o2.selectedVariant)), c2 = Wc(e2, o2, nl({ product: e2, userInputs: o2, hasLoadedVariants: true }), i2);
3333
+ return n(() => ({ ...c2, ...s2, source: a2 }), [c2, s2, a2]);
3334
+ }
3335
+ function jl({ productPromise: e2, source: t2, children: n2 }) {
3336
+ let { product: r2, productGroup: a2, inventoryItems: o2, isBackInStockEnabled: s2 } = Ui(e2), l2 = Al({ product: r2, productGroup: a2, inventoryItems: o2, isBackInStockEnabled: s2, source: t2 });
3337
+ return c(i, { value: l2, children: n2 });
3338
+ }
3339
+ function Ml(t2) {
3340
+ return c(e, { fallback: null, children: c(jl, { ...t2 }) });
3341
+ }
3342
+ Ml.displayName = `StandaloneProductContextProvider`;
3343
+ var Nl = K(`@wix/site-service-warmup-data`);
3344
+ async function Pl(e2, t2, n2) {
3345
+ let r2 = typeof window > `u`;
3346
+ if (!r2 && e2) try {
3347
+ let n3 = await e2.get(t2);
3348
+ if (n3 !== null) return n3;
3349
+ } catch {
3350
+ }
3351
+ let i2 = await n2();
3352
+ if (r2 && e2) try {
3353
+ e2.set(t2, i2);
3354
+ } catch {
3355
+ }
3356
+ return i2;
3357
+ }
3358
+ function Fl(e2, t2) {
3359
+ let n2 = o(), [i2] = r(() => {
3360
+ let r2;
3361
+ try {
3362
+ r2 = n2(Nl);
3363
+ } catch {
3364
+ r2 = null;
3365
+ }
3366
+ return Pl(r2, e2, t2);
3367
+ });
3368
+ return i2;
3369
+ }
3370
+ async function Il() {
3371
+ return (await ai().eq(`defaultLocation`, true).find()).items?.[0]?._id ?? void 0;
3372
+ }
3373
+ async function Ll() {
3374
+ try {
3375
+ return (await ia()).settings?.collectionStates?.some((e2) => e2.appId === `215238eb-22a5-4c36-9e7b-e7c08025e04e` && e2.collectingRequests) ?? false;
3376
+ } catch {
3377
+ return false;
3378
+ }
3379
+ }
3380
+ function Rl(e2) {
3381
+ return e2.map((e3) => ({ variantId: e3.variantId ?? ``, availabilityStatus: e3.availabilityStatus, quantity: e3.quantity ?? void 0, trackQuantity: e3.trackQuantity ?? false, preorderInfo: e3.preorderInfo ? { message: e3.preorderInfo.message ?? void 0, quantity: e3.preorderInfo.quantity ?? void 0 } : void 0 }));
3382
+ }
3383
+ async function zl(e2, t2) {
3384
+ return Rl((await Dr().eq(`productId`, e2).eq(`locationId`, t2).find()).items ?? []);
3385
+ }
3386
+ async function Bl(e2) {
3387
+ let [t2, n2, r2] = await Promise.all([e2(), Il(), Ll()]), { product: i2 } = t2;
3388
+ if (!n2) throw Error(`Location not found`);
3389
+ let [a2, o2] = await Promise.all([zl(i2.id, n2), i2.productGroupId ? bl(i2.productGroupId) : void 0]);
3390
+ return { ...t2, productGroup: o2, inventoryItems: a2, isBackInStockEnabled: r2 };
3391
+ }
3392
+ function Vl(e2, t2) {
3393
+ return Fl(`wixstores-storefront-builder:product-data:${e2}`, () => Bl(t2));
3394
+ }
3395
+ var Hl = function(e2) {
3396
+ return e2.PRODUCT_BY_SLUG = `product-by-slug`, e2.PRODUCT_BY_ID = `product-by-id`, e2.PRODUCT_ITEM = `product-item`, e2;
3397
+ }({});
3398
+ function Ul() {
3399
+ return a();
3400
+ }
3401
+ function Wl({ productId: e2, children: t2 }) {
3402
+ let n2 = Vl(`id:${e2}`, () => Hi(e2));
3403
+ return c(Ml, { productPromise: n2, source: Hl.PRODUCT_BY_ID, children: t2 });
3404
+ }
3405
+ function Gl({ productId: e2, children: t2 }) {
3406
+ return e2 ? c(Wl, { productId: e2, children: t2 }, e2) : null;
3407
+ }
3408
+ var Kl = Dn(`213f32a8-6f88-4024-a54b-f1264433e878`);
3409
+ export {
3410
+ Gl as ProductByIdContextProvider,
3411
+ Gl as default,
3412
+ Kl as injectAccessTokenGetter,
3413
+ Ul as useProductByIdContext
3414
+ };
3415
+ //# sourceMappingURL=context-product-by-id-context-provider.mjs.map