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