@shoppexio/storefront 1.0.72 → 1.0.73
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.
- package/CHANGELOG.md +8 -0
- package/README.md +11 -0
- package/dist/{chunk-UHEFHGZ3.js → chunk-ZVOFFURI.js} +81 -81
- package/dist/chunk-ZVOFFURI.js.map +1 -0
- package/dist/customer.cjs +80 -80
- package/dist/customer.cjs.map +1 -1
- package/dist/customer.js +1 -1
- package/dist/index.cjs +416 -221
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +336 -142
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-UHEFHGZ3.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -23,6 +23,7 @@ __export(src_exports, {
|
|
|
23
23
|
ApiError: () => ApiError,
|
|
24
24
|
CATALOG_UNIT_PRICE_DECIMAL_PLACES: () => CATALOG_UNIT_PRICE_DECIMAL_PLACES,
|
|
25
25
|
CATALOG_UNIT_PRICE_FORMAT_OPTIONS: () => CATALOG_UNIT_PRICE_FORMAT_OPTIONS,
|
|
26
|
+
CURRENCY_UNAVAILABLE_ERROR_CODE: () => CURRENCY_UNAVAILABLE_ERROR_CODE,
|
|
26
27
|
CartError: () => CartError,
|
|
27
28
|
CheckoutCreateError: () => CheckoutCreateError,
|
|
28
29
|
NetworkError: () => NetworkError,
|
|
@@ -118,93 +119,8 @@ __export(src_exports, {
|
|
|
118
119
|
});
|
|
119
120
|
module.exports = __toCommonJS(src_exports);
|
|
120
121
|
|
|
121
|
-
// ../sdk/src/core/cache.ts
|
|
122
|
-
var cache = /* @__PURE__ */ new Map();
|
|
123
|
-
var pending = /* @__PURE__ */ new Map();
|
|
124
|
-
var stats = {
|
|
125
|
-
hits: 0,
|
|
126
|
-
misses: 0
|
|
127
|
-
};
|
|
128
|
-
function isExpired(entry) {
|
|
129
|
-
return Date.now() > entry.expiresAt;
|
|
130
|
-
}
|
|
131
|
-
function getCacheStats() {
|
|
132
|
-
return {
|
|
133
|
-
hits: stats.hits,
|
|
134
|
-
misses: stats.misses,
|
|
135
|
-
pendingRequests: pending.size,
|
|
136
|
-
entries: cache.size
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
function clearCache() {
|
|
140
|
-
cache.clear();
|
|
141
|
-
pending.clear();
|
|
142
|
-
}
|
|
143
|
-
function invalidateCache(prefixOrKey) {
|
|
144
|
-
for (const key of cache.keys()) {
|
|
145
|
-
if (key === prefixOrKey || key.startsWith(prefixOrKey)) {
|
|
146
|
-
cache.delete(key);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
function setCacheEntry(key, data, ttl) {
|
|
151
|
-
const now = Date.now();
|
|
152
|
-
cache.set(key, {
|
|
153
|
-
data,
|
|
154
|
-
ttl,
|
|
155
|
-
updatedAt: now,
|
|
156
|
-
expiresAt: now + ttl
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function getCacheEntry(key) {
|
|
160
|
-
const entry = cache.get(key);
|
|
161
|
-
if (!entry) return null;
|
|
162
|
-
return entry;
|
|
163
|
-
}
|
|
164
|
-
async function getOrFetch(key, fetcher, options, shouldCache = () => true) {
|
|
165
|
-
const entry = getCacheEntry(key);
|
|
166
|
-
if (entry && !isExpired(entry)) {
|
|
167
|
-
stats.hits += 1;
|
|
168
|
-
return entry.data;
|
|
169
|
-
}
|
|
170
|
-
if (entry && options.staleWhileRevalidate) {
|
|
171
|
-
stats.hits += 1;
|
|
172
|
-
if (!pending.has(key)) {
|
|
173
|
-
const refreshPromise = (async () => {
|
|
174
|
-
try {
|
|
175
|
-
const data = await fetcher();
|
|
176
|
-
if (shouldCache(data)) {
|
|
177
|
-
setCacheEntry(key, data, options.ttl);
|
|
178
|
-
}
|
|
179
|
-
return data;
|
|
180
|
-
} finally {
|
|
181
|
-
pending.delete(key);
|
|
182
|
-
}
|
|
183
|
-
})();
|
|
184
|
-
pending.set(key, refreshPromise);
|
|
185
|
-
}
|
|
186
|
-
return entry.data;
|
|
187
|
-
}
|
|
188
|
-
if (pending.has(key)) {
|
|
189
|
-
return pending.get(key);
|
|
190
|
-
}
|
|
191
|
-
stats.misses += 1;
|
|
192
|
-
const promise2 = (async () => {
|
|
193
|
-
try {
|
|
194
|
-
const data = await fetcher();
|
|
195
|
-
if (shouldCache(data)) {
|
|
196
|
-
setCacheEntry(key, data, options.ttl);
|
|
197
|
-
}
|
|
198
|
-
return data;
|
|
199
|
-
} finally {
|
|
200
|
-
pending.delete(key);
|
|
201
|
-
}
|
|
202
|
-
})();
|
|
203
|
-
pending.set(key, promise2);
|
|
204
|
-
return promise2;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
122
|
// ../sdk/src/core/errors.ts
|
|
123
|
+
var CURRENCY_UNAVAILABLE_ERROR_CODE = "errors.storefront.currency_unavailable";
|
|
208
124
|
var ShoppexError = class _ShoppexError extends Error {
|
|
209
125
|
constructor(message, code, statusCode) {
|
|
210
126
|
super(message);
|
|
@@ -255,7 +171,7 @@ var CartError = class _CartError extends ShoppexError {
|
|
|
255
171
|
}
|
|
256
172
|
};
|
|
257
173
|
|
|
258
|
-
//
|
|
174
|
+
// ../../node_modules/.bun/openapi-fetch@0.17.0/node_modules/openapi-fetch/dist/index.mjs
|
|
259
175
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
260
176
|
var supportsRequestInitExt = () => {
|
|
261
177
|
return typeof process === "object" && Number.parseInt(process?.versions?.node?.substring(0, 2)) >= 18 && process.versions.undici;
|
|
@@ -748,7 +664,7 @@ function getNavigationMenuTitles(slot) {
|
|
|
748
664
|
}
|
|
749
665
|
var NAVIGATION_MENU_SLOTS = Object.keys(NAVIGATION_MENU_SLOT_CONFIG);
|
|
750
666
|
|
|
751
|
-
//
|
|
667
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
752
668
|
var external_exports = {};
|
|
753
669
|
__export(external_exports, {
|
|
754
670
|
$brand: () => $brand,
|
|
@@ -991,7 +907,7 @@ __export(external_exports, {
|
|
|
991
907
|
xor: () => xor
|
|
992
908
|
});
|
|
993
909
|
|
|
994
|
-
//
|
|
910
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/index.js
|
|
995
911
|
var core_exports2 = {};
|
|
996
912
|
__export(core_exports2, {
|
|
997
913
|
$ZodAny: () => $ZodAny,
|
|
@@ -1270,7 +1186,7 @@ __export(core_exports2, {
|
|
|
1270
1186
|
version: () => version
|
|
1271
1187
|
});
|
|
1272
1188
|
|
|
1273
|
-
//
|
|
1189
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/core.js
|
|
1274
1190
|
var _a;
|
|
1275
1191
|
var NEVER = /* @__PURE__ */ Object.freeze({
|
|
1276
1192
|
status: "aborted"
|
|
@@ -1347,7 +1263,7 @@ function config(newConfig) {
|
|
|
1347
1263
|
return globalConfig;
|
|
1348
1264
|
}
|
|
1349
1265
|
|
|
1350
|
-
//
|
|
1266
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/util.js
|
|
1351
1267
|
var util_exports = {};
|
|
1352
1268
|
__export(util_exports, {
|
|
1353
1269
|
BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
|
|
@@ -2043,7 +1959,7 @@ var Class = class {
|
|
|
2043
1959
|
}
|
|
2044
1960
|
};
|
|
2045
1961
|
|
|
2046
|
-
//
|
|
1962
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/errors.js
|
|
2047
1963
|
var initializer = (inst, def) => {
|
|
2048
1964
|
inst.name = "$ZodError";
|
|
2049
1965
|
Object.defineProperty(inst, "_zod", {
|
|
@@ -2182,7 +2098,7 @@ function prettifyError(error51) {
|
|
|
2182
2098
|
return lines.join("\n");
|
|
2183
2099
|
}
|
|
2184
2100
|
|
|
2185
|
-
//
|
|
2101
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/parse.js
|
|
2186
2102
|
var _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
2187
2103
|
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
2188
2104
|
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
@@ -2270,7 +2186,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
2270
2186
|
};
|
|
2271
2187
|
var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
2272
2188
|
|
|
2273
|
-
//
|
|
2189
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/regexes.js
|
|
2274
2190
|
var regexes_exports = {};
|
|
2275
2191
|
__export(regexes_exports, {
|
|
2276
2192
|
base64: () => base64,
|
|
@@ -2429,7 +2345,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
|
|
|
2429
2345
|
var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
|
|
2430
2346
|
var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
2431
2347
|
|
|
2432
|
-
//
|
|
2348
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/checks.js
|
|
2433
2349
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2434
2350
|
var _a3;
|
|
2435
2351
|
inst._zod ?? (inst._zod = {});
|
|
@@ -2977,7 +2893,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
|
|
|
2977
2893
|
};
|
|
2978
2894
|
});
|
|
2979
2895
|
|
|
2980
|
-
//
|
|
2896
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/doc.js
|
|
2981
2897
|
var Doc = class {
|
|
2982
2898
|
constructor(args = []) {
|
|
2983
2899
|
this.content = [];
|
|
@@ -3013,14 +2929,14 @@ var Doc = class {
|
|
|
3013
2929
|
}
|
|
3014
2930
|
};
|
|
3015
2931
|
|
|
3016
|
-
//
|
|
2932
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/versions.js
|
|
3017
2933
|
var version = {
|
|
3018
2934
|
major: 4,
|
|
3019
2935
|
minor: 4,
|
|
3020
2936
|
patch: 3
|
|
3021
2937
|
};
|
|
3022
2938
|
|
|
3023
|
-
//
|
|
2939
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/schemas.js
|
|
3024
2940
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3025
2941
|
var _a3;
|
|
3026
2942
|
inst ?? (inst = {});
|
|
@@ -5113,7 +5029,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
5113
5029
|
}
|
|
5114
5030
|
}
|
|
5115
5031
|
|
|
5116
|
-
//
|
|
5032
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/index.js
|
|
5117
5033
|
var locales_exports = {};
|
|
5118
5034
|
__export(locales_exports, {
|
|
5119
5035
|
ar: () => ar_default,
|
|
@@ -5170,7 +5086,7 @@ __export(locales_exports, {
|
|
|
5170
5086
|
zhTW: () => zh_TW_default
|
|
5171
5087
|
});
|
|
5172
5088
|
|
|
5173
|
-
//
|
|
5089
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ar.js
|
|
5174
5090
|
var error = () => {
|
|
5175
5091
|
const Sizable = {
|
|
5176
5092
|
string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
|
|
@@ -5277,7 +5193,7 @@ function ar_default() {
|
|
|
5277
5193
|
};
|
|
5278
5194
|
}
|
|
5279
5195
|
|
|
5280
|
-
//
|
|
5196
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/az.js
|
|
5281
5197
|
var error2 = () => {
|
|
5282
5198
|
const Sizable = {
|
|
5283
5199
|
string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
|
|
@@ -5383,7 +5299,7 @@ function az_default() {
|
|
|
5383
5299
|
};
|
|
5384
5300
|
}
|
|
5385
5301
|
|
|
5386
|
-
//
|
|
5302
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/be.js
|
|
5387
5303
|
function getBelarusianPlural(count, one, few, many) {
|
|
5388
5304
|
const absCount = Math.abs(count);
|
|
5389
5305
|
const lastDigit = absCount % 10;
|
|
@@ -5540,7 +5456,7 @@ function be_default() {
|
|
|
5540
5456
|
};
|
|
5541
5457
|
}
|
|
5542
5458
|
|
|
5543
|
-
//
|
|
5459
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/bg.js
|
|
5544
5460
|
var error4 = () => {
|
|
5545
5461
|
const Sizable = {
|
|
5546
5462
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
|
|
@@ -5661,7 +5577,7 @@ function bg_default() {
|
|
|
5661
5577
|
};
|
|
5662
5578
|
}
|
|
5663
5579
|
|
|
5664
|
-
//
|
|
5580
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ca.js
|
|
5665
5581
|
var error5 = () => {
|
|
5666
5582
|
const Sizable = {
|
|
5667
5583
|
string: { unit: "car\xE0cters", verb: "contenir" },
|
|
@@ -5770,7 +5686,7 @@ function ca_default() {
|
|
|
5770
5686
|
};
|
|
5771
5687
|
}
|
|
5772
5688
|
|
|
5773
|
-
//
|
|
5689
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/cs.js
|
|
5774
5690
|
var error6 = () => {
|
|
5775
5691
|
const Sizable = {
|
|
5776
5692
|
string: { unit: "znak\u016F", verb: "m\xEDt" },
|
|
@@ -5882,7 +5798,7 @@ function cs_default() {
|
|
|
5882
5798
|
};
|
|
5883
5799
|
}
|
|
5884
5800
|
|
|
5885
|
-
//
|
|
5801
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/da.js
|
|
5886
5802
|
var error7 = () => {
|
|
5887
5803
|
const Sizable = {
|
|
5888
5804
|
string: { unit: "tegn", verb: "havde" },
|
|
@@ -5998,7 +5914,7 @@ function da_default() {
|
|
|
5998
5914
|
};
|
|
5999
5915
|
}
|
|
6000
5916
|
|
|
6001
|
-
//
|
|
5917
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/de.js
|
|
6002
5918
|
var error8 = () => {
|
|
6003
5919
|
const Sizable = {
|
|
6004
5920
|
string: { unit: "Zeichen", verb: "zu haben" },
|
|
@@ -6107,7 +6023,7 @@ function de_default() {
|
|
|
6107
6023
|
};
|
|
6108
6024
|
}
|
|
6109
6025
|
|
|
6110
|
-
//
|
|
6026
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/el.js
|
|
6111
6027
|
var error9 = () => {
|
|
6112
6028
|
const Sizable = {
|
|
6113
6029
|
string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
|
|
@@ -6217,7 +6133,7 @@ function el_default() {
|
|
|
6217
6133
|
};
|
|
6218
6134
|
}
|
|
6219
6135
|
|
|
6220
|
-
//
|
|
6136
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/en.js
|
|
6221
6137
|
var error10 = () => {
|
|
6222
6138
|
const Sizable = {
|
|
6223
6139
|
string: { unit: "characters", verb: "to have" },
|
|
@@ -6330,7 +6246,7 @@ function en_default() {
|
|
|
6330
6246
|
};
|
|
6331
6247
|
}
|
|
6332
6248
|
|
|
6333
|
-
//
|
|
6249
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/eo.js
|
|
6334
6250
|
var error11 = () => {
|
|
6335
6251
|
const Sizable = {
|
|
6336
6252
|
string: { unit: "karaktrojn", verb: "havi" },
|
|
@@ -6440,7 +6356,7 @@ function eo_default() {
|
|
|
6440
6356
|
};
|
|
6441
6357
|
}
|
|
6442
6358
|
|
|
6443
|
-
//
|
|
6359
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/es.js
|
|
6444
6360
|
var error12 = () => {
|
|
6445
6361
|
const Sizable = {
|
|
6446
6362
|
string: { unit: "caracteres", verb: "tener" },
|
|
@@ -6573,7 +6489,7 @@ function es_default() {
|
|
|
6573
6489
|
};
|
|
6574
6490
|
}
|
|
6575
6491
|
|
|
6576
|
-
//
|
|
6492
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fa.js
|
|
6577
6493
|
var error13 = () => {
|
|
6578
6494
|
const Sizable = {
|
|
6579
6495
|
string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
|
|
@@ -6688,7 +6604,7 @@ function fa_default() {
|
|
|
6688
6604
|
};
|
|
6689
6605
|
}
|
|
6690
6606
|
|
|
6691
|
-
//
|
|
6607
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fi.js
|
|
6692
6608
|
var error14 = () => {
|
|
6693
6609
|
const Sizable = {
|
|
6694
6610
|
string: { unit: "merkki\xE4", subject: "merkkijonon" },
|
|
@@ -6801,7 +6717,7 @@ function fi_default() {
|
|
|
6801
6717
|
};
|
|
6802
6718
|
}
|
|
6803
6719
|
|
|
6804
|
-
//
|
|
6720
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fr.js
|
|
6805
6721
|
var error15 = () => {
|
|
6806
6722
|
const Sizable = {
|
|
6807
6723
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -6927,7 +6843,7 @@ function fr_default() {
|
|
|
6927
6843
|
};
|
|
6928
6844
|
}
|
|
6929
6845
|
|
|
6930
|
-
//
|
|
6846
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
|
|
6931
6847
|
var error16 = () => {
|
|
6932
6848
|
const Sizable = {
|
|
6933
6849
|
string: { unit: "caract\xE8res", verb: "avoir" },
|
|
@@ -7035,7 +6951,7 @@ function fr_CA_default() {
|
|
|
7035
6951
|
};
|
|
7036
6952
|
}
|
|
7037
6953
|
|
|
7038
|
-
//
|
|
6954
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/he.js
|
|
7039
6955
|
var error17 = () => {
|
|
7040
6956
|
const TypeNames = {
|
|
7041
6957
|
string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
|
|
@@ -7230,7 +7146,7 @@ function he_default() {
|
|
|
7230
7146
|
};
|
|
7231
7147
|
}
|
|
7232
7148
|
|
|
7233
|
-
//
|
|
7149
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hr.js
|
|
7234
7150
|
var error18 = () => {
|
|
7235
7151
|
const Sizable = {
|
|
7236
7152
|
string: { unit: "znakova", verb: "imati" },
|
|
@@ -7353,7 +7269,7 @@ function hr_default() {
|
|
|
7353
7269
|
};
|
|
7354
7270
|
}
|
|
7355
7271
|
|
|
7356
|
-
//
|
|
7272
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hu.js
|
|
7357
7273
|
var error19 = () => {
|
|
7358
7274
|
const Sizable = {
|
|
7359
7275
|
string: { unit: "karakter", verb: "legyen" },
|
|
@@ -7462,7 +7378,7 @@ function hu_default() {
|
|
|
7462
7378
|
};
|
|
7463
7379
|
}
|
|
7464
7380
|
|
|
7465
|
-
//
|
|
7381
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hy.js
|
|
7466
7382
|
function getArmenianPlural(count, one, many) {
|
|
7467
7383
|
return Math.abs(count) === 1 ? one : many;
|
|
7468
7384
|
}
|
|
@@ -7610,7 +7526,7 @@ function hy_default() {
|
|
|
7610
7526
|
};
|
|
7611
7527
|
}
|
|
7612
7528
|
|
|
7613
|
-
//
|
|
7529
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/id.js
|
|
7614
7530
|
var error21 = () => {
|
|
7615
7531
|
const Sizable = {
|
|
7616
7532
|
string: { unit: "karakter", verb: "memiliki" },
|
|
@@ -7717,7 +7633,7 @@ function id_default() {
|
|
|
7717
7633
|
};
|
|
7718
7634
|
}
|
|
7719
7635
|
|
|
7720
|
-
//
|
|
7636
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/is.js
|
|
7721
7637
|
var error22 = () => {
|
|
7722
7638
|
const Sizable = {
|
|
7723
7639
|
string: { unit: "stafi", verb: "a\xF0 hafa" },
|
|
@@ -7827,7 +7743,7 @@ function is_default() {
|
|
|
7827
7743
|
};
|
|
7828
7744
|
}
|
|
7829
7745
|
|
|
7830
|
-
//
|
|
7746
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/it.js
|
|
7831
7747
|
var error23 = () => {
|
|
7832
7748
|
const Sizable = {
|
|
7833
7749
|
string: { unit: "caratteri", verb: "avere" },
|
|
@@ -7936,7 +7852,7 @@ function it_default() {
|
|
|
7936
7852
|
};
|
|
7937
7853
|
}
|
|
7938
7854
|
|
|
7939
|
-
//
|
|
7855
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ja.js
|
|
7940
7856
|
var error24 = () => {
|
|
7941
7857
|
const Sizable = {
|
|
7942
7858
|
string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
|
|
@@ -8044,7 +7960,7 @@ function ja_default() {
|
|
|
8044
7960
|
};
|
|
8045
7961
|
}
|
|
8046
7962
|
|
|
8047
|
-
//
|
|
7963
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ka.js
|
|
8048
7964
|
var error25 = () => {
|
|
8049
7965
|
const Sizable = {
|
|
8050
7966
|
string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
|
|
@@ -8157,7 +8073,7 @@ function ka_default() {
|
|
|
8157
8073
|
};
|
|
8158
8074
|
}
|
|
8159
8075
|
|
|
8160
|
-
//
|
|
8076
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/km.js
|
|
8161
8077
|
var error26 = () => {
|
|
8162
8078
|
const Sizable = {
|
|
8163
8079
|
string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
|
|
@@ -8268,12 +8184,12 @@ function km_default() {
|
|
|
8268
8184
|
};
|
|
8269
8185
|
}
|
|
8270
8186
|
|
|
8271
|
-
//
|
|
8187
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/kh.js
|
|
8272
8188
|
function kh_default() {
|
|
8273
8189
|
return km_default();
|
|
8274
8190
|
}
|
|
8275
8191
|
|
|
8276
|
-
//
|
|
8192
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ko.js
|
|
8277
8193
|
var error27 = () => {
|
|
8278
8194
|
const Sizable = {
|
|
8279
8195
|
string: { unit: "\uBB38\uC790", verb: "to have" },
|
|
@@ -8385,7 +8301,7 @@ function ko_default() {
|
|
|
8385
8301
|
};
|
|
8386
8302
|
}
|
|
8387
8303
|
|
|
8388
|
-
//
|
|
8304
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/lt.js
|
|
8389
8305
|
var capitalizeFirstCharacter = (text) => {
|
|
8390
8306
|
return text.charAt(0).toUpperCase() + text.slice(1);
|
|
8391
8307
|
};
|
|
@@ -8589,7 +8505,7 @@ function lt_default() {
|
|
|
8589
8505
|
};
|
|
8590
8506
|
}
|
|
8591
8507
|
|
|
8592
|
-
//
|
|
8508
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/mk.js
|
|
8593
8509
|
var error29 = () => {
|
|
8594
8510
|
const Sizable = {
|
|
8595
8511
|
string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
|
|
@@ -8699,7 +8615,7 @@ function mk_default() {
|
|
|
8699
8615
|
};
|
|
8700
8616
|
}
|
|
8701
8617
|
|
|
8702
|
-
//
|
|
8618
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ms.js
|
|
8703
8619
|
var error30 = () => {
|
|
8704
8620
|
const Sizable = {
|
|
8705
8621
|
string: { unit: "aksara", verb: "mempunyai" },
|
|
@@ -8807,7 +8723,7 @@ function ms_default() {
|
|
|
8807
8723
|
};
|
|
8808
8724
|
}
|
|
8809
8725
|
|
|
8810
|
-
//
|
|
8726
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/nl.js
|
|
8811
8727
|
var error31 = () => {
|
|
8812
8728
|
const Sizable = {
|
|
8813
8729
|
string: { unit: "tekens", verb: "heeft" },
|
|
@@ -8918,7 +8834,7 @@ function nl_default() {
|
|
|
8918
8834
|
};
|
|
8919
8835
|
}
|
|
8920
8836
|
|
|
8921
|
-
//
|
|
8837
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/no.js
|
|
8922
8838
|
var error32 = () => {
|
|
8923
8839
|
const Sizable = {
|
|
8924
8840
|
string: { unit: "tegn", verb: "\xE5 ha" },
|
|
@@ -9027,7 +8943,7 @@ function no_default() {
|
|
|
9027
8943
|
};
|
|
9028
8944
|
}
|
|
9029
8945
|
|
|
9030
|
-
//
|
|
8946
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ota.js
|
|
9031
8947
|
var error33 = () => {
|
|
9032
8948
|
const Sizable = {
|
|
9033
8949
|
string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
|
|
@@ -9137,7 +9053,7 @@ function ota_default() {
|
|
|
9137
9053
|
};
|
|
9138
9054
|
}
|
|
9139
9055
|
|
|
9140
|
-
//
|
|
9056
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ps.js
|
|
9141
9057
|
var error34 = () => {
|
|
9142
9058
|
const Sizable = {
|
|
9143
9059
|
string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
|
|
@@ -9252,7 +9168,7 @@ function ps_default() {
|
|
|
9252
9168
|
};
|
|
9253
9169
|
}
|
|
9254
9170
|
|
|
9255
|
-
//
|
|
9171
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/pl.js
|
|
9256
9172
|
var error35 = () => {
|
|
9257
9173
|
const Sizable = {
|
|
9258
9174
|
string: { unit: "znak\xF3w", verb: "mie\u0107" },
|
|
@@ -9362,7 +9278,7 @@ function pl_default() {
|
|
|
9362
9278
|
};
|
|
9363
9279
|
}
|
|
9364
9280
|
|
|
9365
|
-
//
|
|
9281
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/pt.js
|
|
9366
9282
|
var error36 = () => {
|
|
9367
9283
|
const Sizable = {
|
|
9368
9284
|
string: { unit: "caracteres", verb: "ter" },
|
|
@@ -9471,7 +9387,7 @@ function pt_default() {
|
|
|
9471
9387
|
};
|
|
9472
9388
|
}
|
|
9473
9389
|
|
|
9474
|
-
//
|
|
9390
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ro.js
|
|
9475
9391
|
var error37 = () => {
|
|
9476
9392
|
const Sizable = {
|
|
9477
9393
|
string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
|
|
@@ -9591,7 +9507,7 @@ function ro_default() {
|
|
|
9591
9507
|
};
|
|
9592
9508
|
}
|
|
9593
9509
|
|
|
9594
|
-
//
|
|
9510
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ru.js
|
|
9595
9511
|
function getRussianPlural(count, one, few, many) {
|
|
9596
9512
|
const absCount = Math.abs(count);
|
|
9597
9513
|
const lastDigit = absCount % 10;
|
|
@@ -9748,7 +9664,7 @@ function ru_default() {
|
|
|
9748
9664
|
};
|
|
9749
9665
|
}
|
|
9750
9666
|
|
|
9751
|
-
//
|
|
9667
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/sl.js
|
|
9752
9668
|
var error39 = () => {
|
|
9753
9669
|
const Sizable = {
|
|
9754
9670
|
string: { unit: "znakov", verb: "imeti" },
|
|
@@ -9858,7 +9774,7 @@ function sl_default() {
|
|
|
9858
9774
|
};
|
|
9859
9775
|
}
|
|
9860
9776
|
|
|
9861
|
-
//
|
|
9777
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/sv.js
|
|
9862
9778
|
var error40 = () => {
|
|
9863
9779
|
const Sizable = {
|
|
9864
9780
|
string: { unit: "tecken", verb: "att ha" },
|
|
@@ -9969,7 +9885,7 @@ function sv_default() {
|
|
|
9969
9885
|
};
|
|
9970
9886
|
}
|
|
9971
9887
|
|
|
9972
|
-
//
|
|
9888
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ta.js
|
|
9973
9889
|
var error41 = () => {
|
|
9974
9890
|
const Sizable = {
|
|
9975
9891
|
string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
|
|
@@ -10080,7 +9996,7 @@ function ta_default() {
|
|
|
10080
9996
|
};
|
|
10081
9997
|
}
|
|
10082
9998
|
|
|
10083
|
-
//
|
|
9999
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/th.js
|
|
10084
10000
|
var error42 = () => {
|
|
10085
10001
|
const Sizable = {
|
|
10086
10002
|
string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
|
|
@@ -10191,7 +10107,7 @@ function th_default() {
|
|
|
10191
10107
|
};
|
|
10192
10108
|
}
|
|
10193
10109
|
|
|
10194
|
-
//
|
|
10110
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/tr.js
|
|
10195
10111
|
var error43 = () => {
|
|
10196
10112
|
const Sizable = {
|
|
10197
10113
|
string: { unit: "karakter", verb: "olmal\u0131" },
|
|
@@ -10297,7 +10213,7 @@ function tr_default() {
|
|
|
10297
10213
|
};
|
|
10298
10214
|
}
|
|
10299
10215
|
|
|
10300
|
-
//
|
|
10216
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/uk.js
|
|
10301
10217
|
var error44 = () => {
|
|
10302
10218
|
const Sizable = {
|
|
10303
10219
|
string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
|
|
@@ -10406,12 +10322,12 @@ function uk_default() {
|
|
|
10406
10322
|
};
|
|
10407
10323
|
}
|
|
10408
10324
|
|
|
10409
|
-
//
|
|
10325
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ua.js
|
|
10410
10326
|
function ua_default() {
|
|
10411
10327
|
return uk_default();
|
|
10412
10328
|
}
|
|
10413
10329
|
|
|
10414
|
-
//
|
|
10330
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ur.js
|
|
10415
10331
|
var error45 = () => {
|
|
10416
10332
|
const Sizable = {
|
|
10417
10333
|
string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
|
|
@@ -10522,7 +10438,7 @@ function ur_default() {
|
|
|
10522
10438
|
};
|
|
10523
10439
|
}
|
|
10524
10440
|
|
|
10525
|
-
//
|
|
10441
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/uz.js
|
|
10526
10442
|
var error46 = () => {
|
|
10527
10443
|
const Sizable = {
|
|
10528
10444
|
string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
|
|
@@ -10633,7 +10549,7 @@ function uz_default() {
|
|
|
10633
10549
|
};
|
|
10634
10550
|
}
|
|
10635
10551
|
|
|
10636
|
-
//
|
|
10552
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/vi.js
|
|
10637
10553
|
var error47 = () => {
|
|
10638
10554
|
const Sizable = {
|
|
10639
10555
|
string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
|
|
@@ -10742,7 +10658,7 @@ function vi_default() {
|
|
|
10742
10658
|
};
|
|
10743
10659
|
}
|
|
10744
10660
|
|
|
10745
|
-
//
|
|
10661
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
|
|
10746
10662
|
var error48 = () => {
|
|
10747
10663
|
const Sizable = {
|
|
10748
10664
|
string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
|
|
@@ -10852,7 +10768,7 @@ function zh_CN_default() {
|
|
|
10852
10768
|
};
|
|
10853
10769
|
}
|
|
10854
10770
|
|
|
10855
|
-
//
|
|
10771
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
|
|
10856
10772
|
var error49 = () => {
|
|
10857
10773
|
const Sizable = {
|
|
10858
10774
|
string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
|
|
@@ -10960,7 +10876,7 @@ function zh_TW_default() {
|
|
|
10960
10876
|
};
|
|
10961
10877
|
}
|
|
10962
10878
|
|
|
10963
|
-
//
|
|
10879
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/yo.js
|
|
10964
10880
|
var error50 = () => {
|
|
10965
10881
|
const Sizable = {
|
|
10966
10882
|
string: { unit: "\xE0mi", verb: "n\xED" },
|
|
@@ -11068,7 +10984,7 @@ function yo_default() {
|
|
|
11068
10984
|
};
|
|
11069
10985
|
}
|
|
11070
10986
|
|
|
11071
|
-
//
|
|
10987
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/registries.js
|
|
11072
10988
|
var _a2;
|
|
11073
10989
|
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
11074
10990
|
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
@@ -11118,7 +11034,7 @@ function registry() {
|
|
|
11118
11034
|
(_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
|
|
11119
11035
|
var globalRegistry = globalThis.__zod_globalRegistry;
|
|
11120
11036
|
|
|
11121
|
-
//
|
|
11037
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/api.js
|
|
11122
11038
|
// @__NO_SIDE_EFFECTS__
|
|
11123
11039
|
function _string(Class2, params) {
|
|
11124
11040
|
return new Class2({
|
|
@@ -12157,7 +12073,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
|
|
|
12157
12073
|
return inst;
|
|
12158
12074
|
}
|
|
12159
12075
|
|
|
12160
|
-
//
|
|
12076
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
|
|
12161
12077
|
function initializeContext(params) {
|
|
12162
12078
|
let target = params?.target ?? "draft-2020-12";
|
|
12163
12079
|
if (target === "draft-4")
|
|
@@ -12516,7 +12432,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
|
|
|
12516
12432
|
return finalize(ctx, schema);
|
|
12517
12433
|
};
|
|
12518
12434
|
|
|
12519
|
-
//
|
|
12435
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
|
|
12520
12436
|
var formatMap = {
|
|
12521
12437
|
guid: "uuid",
|
|
12522
12438
|
url: "uri",
|
|
@@ -13060,7 +12976,7 @@ function toJSONSchema(input, params) {
|
|
|
13060
12976
|
return finalize(ctx, input);
|
|
13061
12977
|
}
|
|
13062
12978
|
|
|
13063
|
-
//
|
|
12979
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
|
|
13064
12980
|
var JSONSchemaGenerator = class {
|
|
13065
12981
|
/** @deprecated Access via ctx instead */
|
|
13066
12982
|
get metadataRegistry() {
|
|
@@ -13135,10 +13051,10 @@ var JSONSchemaGenerator = class {
|
|
|
13135
13051
|
}
|
|
13136
13052
|
};
|
|
13137
13053
|
|
|
13138
|
-
//
|
|
13054
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
|
|
13139
13055
|
var json_schema_exports = {};
|
|
13140
13056
|
|
|
13141
|
-
//
|
|
13057
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
13142
13058
|
var schemas_exports2 = {};
|
|
13143
13059
|
__export(schemas_exports2, {
|
|
13144
13060
|
ZodAny: () => ZodAny,
|
|
@@ -13309,7 +13225,7 @@ __export(schemas_exports2, {
|
|
|
13309
13225
|
xor: () => xor
|
|
13310
13226
|
});
|
|
13311
13227
|
|
|
13312
|
-
//
|
|
13228
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/checks.js
|
|
13313
13229
|
var checks_exports2 = {};
|
|
13314
13230
|
__export(checks_exports2, {
|
|
13315
13231
|
endsWith: () => _endsWith,
|
|
@@ -13343,7 +13259,7 @@ __export(checks_exports2, {
|
|
|
13343
13259
|
uppercase: () => _uppercase
|
|
13344
13260
|
});
|
|
13345
13261
|
|
|
13346
|
-
//
|
|
13262
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/iso.js
|
|
13347
13263
|
var iso_exports = {};
|
|
13348
13264
|
__export(iso_exports, {
|
|
13349
13265
|
ZodISODate: () => ZodISODate,
|
|
@@ -13384,7 +13300,7 @@ function duration2(params) {
|
|
|
13384
13300
|
return _isoDuration(ZodISODuration, params);
|
|
13385
13301
|
}
|
|
13386
13302
|
|
|
13387
|
-
//
|
|
13303
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/errors.js
|
|
13388
13304
|
var initializer2 = (inst, issues) => {
|
|
13389
13305
|
$ZodError.init(inst, issues);
|
|
13390
13306
|
inst.name = "ZodError";
|
|
@@ -13424,7 +13340,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
|
|
|
13424
13340
|
Parent: Error
|
|
13425
13341
|
});
|
|
13426
13342
|
|
|
13427
|
-
//
|
|
13343
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/parse.js
|
|
13428
13344
|
var parse2 = /* @__PURE__ */ _parse(ZodRealError);
|
|
13429
13345
|
var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
13430
13346
|
var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -13438,7 +13354,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
13438
13354
|
var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
13439
13355
|
var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
13440
13356
|
|
|
13441
|
-
//
|
|
13357
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
|
|
13442
13358
|
var _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
13443
13359
|
function _installLazyMethods(inst, group, methods) {
|
|
13444
13360
|
const proto = Object.getPrototypeOf(inst);
|
|
@@ -14728,7 +14644,7 @@ function preprocess(fn, schema) {
|
|
|
14728
14644
|
});
|
|
14729
14645
|
}
|
|
14730
14646
|
|
|
14731
|
-
//
|
|
14647
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/compat.js
|
|
14732
14648
|
var ZodIssueCode = {
|
|
14733
14649
|
invalid_type: "invalid_type",
|
|
14734
14650
|
too_big: "too_big",
|
|
@@ -14754,7 +14670,7 @@ var ZodFirstPartyTypeKind;
|
|
|
14754
14670
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
|
|
14755
14671
|
})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
|
|
14756
14672
|
|
|
14757
|
-
//
|
|
14673
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
|
|
14758
14674
|
var z = {
|
|
14759
14675
|
...schemas_exports2,
|
|
14760
14676
|
...checks_exports2,
|
|
@@ -15234,7 +15150,7 @@ function fromJSONSchema(schema, params) {
|
|
|
15234
15150
|
return convertSchema(normalized, ctx);
|
|
15235
15151
|
}
|
|
15236
15152
|
|
|
15237
|
-
//
|
|
15153
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
|
|
15238
15154
|
var coerce_exports = {};
|
|
15239
15155
|
__export(coerce_exports, {
|
|
15240
15156
|
bigint: () => bigint3,
|
|
@@ -15259,7 +15175,7 @@ function date4(params) {
|
|
|
15259
15175
|
return _coercedDate(ZodDate, params);
|
|
15260
15176
|
}
|
|
15261
15177
|
|
|
15262
|
-
//
|
|
15178
|
+
// ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
|
|
15263
15179
|
config(en_default());
|
|
15264
15180
|
|
|
15265
15181
|
// ../contracts/src/email-marketing.ts
|
|
@@ -15639,7 +15555,7 @@ var PaymentGatewayStateSchema = object({
|
|
|
15639
15555
|
|
|
15640
15556
|
// ../contracts/src/style-center.ts
|
|
15641
15557
|
var CHECKOUT_PLATFORM_BRAND_COLOR = "#7c3aed";
|
|
15642
|
-
var CHECKOUT_PLATFORM_FONT_FAMILY = "
|
|
15558
|
+
var CHECKOUT_PLATFORM_FONT_FAMILY = "Inter";
|
|
15643
15559
|
var checkoutStyleSurfaceValues = ["checkout", "payment_link", "embed"];
|
|
15644
15560
|
var checkoutStyleDensityValues = ["comfortable", "compact"];
|
|
15645
15561
|
var checkoutStyleModeValues = ["light", "dark", "system"];
|
|
@@ -15686,7 +15602,7 @@ var checkoutStyleTokenDefinitions = [
|
|
|
15686
15602
|
// `var(--spx-checkout-border, …)` chains loose. The hosted checkout draws
|
|
15687
15603
|
// almost no hairlines any more — the slots that still do read this, the rest
|
|
15688
15604
|
// resolve their border to `transparent` in the system CSS.
|
|
15689
|
-
{ key: "color.border", cssVar: "--spx-checkout-border", group: "color", type: "color", default: "#
|
|
15605
|
+
{ key: "color.border", cssVar: "--spx-checkout-border", group: "color", type: "color", default: "#3a3a3a" },
|
|
15690
15606
|
{ key: "color.focus", cssVar: "--spx-checkout-focus", group: "color", type: "color", default: CHECKOUT_PLATFORM_BRAND_COLOR, protected: true },
|
|
15691
15607
|
{ key: "color.success", cssVar: "--spx-checkout-success", group: "color", type: "color", default: "#22c55e", protected: true },
|
|
15692
15608
|
{ key: "color.warning", cssVar: "--spx-checkout-warning", group: "color", type: "color", default: "#f59e0b", protected: true },
|
|
@@ -15698,16 +15614,22 @@ var checkoutStyleTokenDefinitions = [
|
|
|
15698
15614
|
// actually loaded.
|
|
15699
15615
|
{ key: "typography.googleFontFamily", cssVar: "--spx-checkout-google-font", group: "typography", type: "font", default: "" },
|
|
15700
15616
|
{ key: "typography.baseSize", cssVar: "--spx-checkout-font-size", group: "typography", type: "number", default: 14, min: 12, max: 18, step: 1, unit: "px" },
|
|
15701
|
-
//
|
|
15702
|
-
//
|
|
15703
|
-
//
|
|
15704
|
-
//
|
|
15705
|
-
|
|
15706
|
-
//
|
|
15707
|
-
//
|
|
15708
|
-
//
|
|
15709
|
-
|
|
15710
|
-
|
|
15617
|
+
// ALL THREE ARE 8, and they have to be — this is one edge, stated in three
|
|
15618
|
+
// places, and the whole reason it is worth a comment is that the three places
|
|
15619
|
+
// are read by three different renderers:
|
|
15620
|
+
// 1. these defaults, materialised into the live checkout root (the `shape`
|
|
15621
|
+
// group is a foundation group, so an untouched shop still gets them);
|
|
15622
|
+
// 2. `--radius-sm` / `--radius-lg` in apps/checkout/app/globals.css, which
|
|
15623
|
+
// every component class paints from, both 0.5rem;
|
|
15624
|
+
// 3. the Stripe Appearance object (`buildStripeAppearanceFromCheckoutStyle`),
|
|
15625
|
+
// which cannot resolve `var()` and is handed these same values as plain
|
|
15626
|
+
// strings for `borderRadius` and the `.Block` / `.AccordionItem` rules.
|
|
15627
|
+
// A disagreement between any two of them is visible as a card inside the
|
|
15628
|
+
// provider iframe rounded differently from the card around it. Pinned by
|
|
15629
|
+
// `__tests__/checkout-radius-chain.test.ts` in apps/checkout.
|
|
15630
|
+
{ key: "shape.buttonRadius", cssVar: "--spx-checkout-button-radius", group: "shape", type: "number", default: 8, min: 0, max: 24, step: 1, unit: "px" },
|
|
15631
|
+
{ key: "shape.inputRadius", cssVar: "--spx-checkout-input-radius", group: "shape", type: "number", default: 8, min: 0, max: 24, step: 1, unit: "px" },
|
|
15632
|
+
{ key: "shape.cardRadius", cssVar: "--spx-checkout-card-radius", group: "shape", type: "number", default: 8, min: 0, max: 28, step: 1, unit: "px" },
|
|
15711
15633
|
{
|
|
15712
15634
|
key: "spacing.density",
|
|
15713
15635
|
cssVar: "--spx-checkout-density",
|
|
@@ -15720,7 +15642,7 @@ var checkoutStyleTokenDefinitions = [
|
|
|
15720
15642
|
{ key: "component.primaryButton.background", cssVar: "--spx-checkout-button-bg", group: "component", type: "color", default: "", protected: true },
|
|
15721
15643
|
{ key: "component.primaryButton.text", cssVar: "--spx-checkout-button-text", group: "component", type: "color", default: "#ffffff", protected: true },
|
|
15722
15644
|
{ key: "component.input.background", cssVar: "--spx-checkout-input-bg", group: "component", type: "color", default: "#292929" },
|
|
15723
|
-
{ key: "component.input.border", cssVar: "--spx-checkout-input-border", group: "component", type: "color", default: "#
|
|
15645
|
+
{ key: "component.input.border", cssVar: "--spx-checkout-input-border", group: "component", type: "color", default: "#3a3a3a" },
|
|
15724
15646
|
{ key: "component.input.focusRing", cssVar: "--spx-checkout-input-focus-ring", group: "component", type: "color", default: "" },
|
|
15725
15647
|
// Default '' is filtered out by the preview-iframe normaliser, so the
|
|
15726
15648
|
// CSS fallback chain on [data-spx-slot="summary.panel"] resolves to
|
|
@@ -15734,9 +15656,28 @@ var checkoutStyleTokenDefinitions = [
|
|
|
15734
15656
|
{ key: "component.paymentMethod.selectedBackground", cssVar: "--spx-checkout-payment-method-selected-bg", group: "component", type: "color", default: "" },
|
|
15735
15657
|
{ key: "component.checkoutHeader.background", cssVar: "--spx-checkout-embed-header-bg", group: "component", type: "color", default: "" },
|
|
15736
15658
|
{ key: "component.checkoutHeader.text", cssVar: "--spx-checkout-embed-header-text", group: "component", type: "color", default: "" },
|
|
15737
|
-
|
|
15738
|
-
|
|
15739
|
-
|
|
15659
|
+
// THE PRODUCT CARD IS GONE FROM THE HOSTED CHECKOUT, and these three tokens
|
|
15660
|
+
// are what is left of it.
|
|
15661
|
+
//
|
|
15662
|
+
// The 2026 rework replaced the boxed summary line item with a FLAT ROW
|
|
15663
|
+
// (`data-spx-slot="product.line"`, apps/checkout/components/checkout/
|
|
15664
|
+
// product-list.tsx). A flat row has no fill of its own, no edge and no cast —
|
|
15665
|
+
// that is the design, not an omission — so there is nothing on the hosted or
|
|
15666
|
+
// payment-link surface for a border or a shadow token to land on. They are
|
|
15667
|
+
// NOT re-pointed at `product.line`: handing a merchant a border control for a
|
|
15668
|
+
// row that must not have a border is a control that can only make the page
|
|
15669
|
+
// worse, and the slot layer would paint it with `!important` where no call
|
|
15670
|
+
// site could undo it.
|
|
15671
|
+
//
|
|
15672
|
+
// `background` is the exception and stays LIVE: the EMBED surface reads
|
|
15673
|
+
// `--spx-checkout-product-card-bg` in `applyCheckoutStyleToEmbedStyles`
|
|
15674
|
+
// (apps/checkout/lib/checkout-style.tsx), where it is the card fill AND the
|
|
15675
|
+
// input to the embed's light/dark inference. It is marked `surface: 'embed'`
|
|
15676
|
+
// so the Style Center offers it where it still does something, and it keeps
|
|
15677
|
+
// being emitted for every stored theme.
|
|
15678
|
+
{ key: "component.productCard.background", cssVar: "--spx-checkout-product-card-bg", group: "component", type: "color", default: "rgba(255,255,255,0.03)", surface: "embed" },
|
|
15679
|
+
{ key: "component.productCard.border", cssVar: "--spx-checkout-product-card-border", group: "component", type: "color", default: "rgba(255,255,255,0.06)", deprecated: true },
|
|
15680
|
+
{ key: "component.productCard.shadow", cssVar: "--spx-checkout-product-card-shadow", group: "component", type: "shadow", default: "none", deprecated: true },
|
|
15740
15681
|
{ key: "component.productImage.background", cssVar: "--spx-checkout-product-image-bg", group: "component", type: "color", default: "rgba(255,255,255,0.06)" },
|
|
15741
15682
|
{ key: "component.productImage.border", cssVar: "--spx-checkout-product-image-border", group: "component", type: "color", default: "rgba(255,255,255,0.04)" },
|
|
15742
15683
|
{ key: "component.productImage.icon", cssVar: "--spx-checkout-product-image-icon", group: "component", type: "color", default: "rgba(250,250,250,0.4)" },
|
|
@@ -15816,28 +15757,91 @@ var checkoutStyleControlTokenDefinitions = [
|
|
|
15816
15757
|
];
|
|
15817
15758
|
var checkoutStyleSlotValues = [
|
|
15818
15759
|
"checkout.shell",
|
|
15760
|
+
"checkout.chrome",
|
|
15819
15761
|
"checkout.panel",
|
|
15820
15762
|
"checkout.header",
|
|
15763
|
+
"checkout.footer",
|
|
15764
|
+
"checkout.trust",
|
|
15765
|
+
"checkout.section.active",
|
|
15766
|
+
"checkout.section.collapsed",
|
|
15767
|
+
"checkout.mobile_pay_bar",
|
|
15768
|
+
// The spacer under the bar, carrying the working column's ground so the last
|
|
15769
|
+
// scroll does not step down onto the shell's.
|
|
15770
|
+
"checkout.mobile_pay_bar_floor",
|
|
15821
15771
|
"brand.logo",
|
|
15772
|
+
"brand.hero",
|
|
15773
|
+
// RETIRED, AND DELIBERATELY STILL HERE (see the note above). No element
|
|
15774
|
+
// carries `product.card` any more (see `component.productCard.*` above), so a
|
|
15775
|
+
// rule aimed at it is inert, which is the harmless half of the trade.
|
|
15822
15776
|
"product.card",
|
|
15777
|
+
// What replaced it: the flat summary row. A merchant can reach it for type
|
|
15778
|
+
// and spacing; it has no card material to override, by design.
|
|
15779
|
+
"product.line",
|
|
15823
15780
|
"product.image",
|
|
15824
15781
|
"product.title",
|
|
15825
15782
|
"product.description",
|
|
15826
15783
|
"product.price",
|
|
15827
15784
|
"product.quantity",
|
|
15785
|
+
"product.quantity_menu",
|
|
15786
|
+
"product.remove",
|
|
15828
15787
|
"product.addon",
|
|
15788
|
+
// The "Included" marker a SELECTED add-on carries in place of its "+$9.00".
|
|
15789
|
+
// Its own slot rather than `product.price`, because it is not a figure: the
|
|
15790
|
+
// amount is already inside the line total above it, and a merchant styling
|
|
15791
|
+
// their price column must not accidentally style a word.
|
|
15792
|
+
"product.addon_included",
|
|
15793
|
+
// The line of glyph-led metadata under the product's title in the embed's
|
|
15794
|
+
// order bar — the description trigger plus whichever of the facts below the
|
|
15795
|
+
// product has. Its own slot so a merchant can retune the whole row's rhythm
|
|
15796
|
+
// (or hide it) without reaching into each fact one at a time.
|
|
15797
|
+
"product.facts",
|
|
15798
|
+
// How many are left. It appears in TWO places and deliberately shares one
|
|
15799
|
+
// slot: on the facts row when the product has no variants, and on each option
|
|
15800
|
+
// tile when it does — because with options there is no single stock figure,
|
|
15801
|
+
// only one per option. A merchant styling scarcity means the same thing in
|
|
15802
|
+
// both, and a shop is unlikely to have configured only the one it can see.
|
|
15803
|
+
"product.stock",
|
|
15804
|
+
"product.delivery",
|
|
15805
|
+
// The billing period a recurring line states — "/month" beside the figure,
|
|
15806
|
+
// or the full phrase on the metadata line when the period is not one-per-unit.
|
|
15807
|
+
"product.recurrence",
|
|
15808
|
+
"product.warranty",
|
|
15829
15809
|
"paymentLink.hero",
|
|
15830
15810
|
"summary.panel",
|
|
15831
15811
|
"summary.line",
|
|
15832
15812
|
"summary.total",
|
|
15813
|
+
// The row that CLOSES the ledger, distinct from `summary.total` (the column's
|
|
15814
|
+
// headline figure) and from `summary.line` (one part of the sum): it is the
|
|
15815
|
+
// sum itself, and it is the only row in the table that draws a rule.
|
|
15816
|
+
"summary.total_line",
|
|
15817
|
+
// What the total does next month, stated directly under it.
|
|
15818
|
+
"summary.recurrence",
|
|
15819
|
+
"summary.total_note",
|
|
15820
|
+
"summary.order_number",
|
|
15821
|
+
"summary.tracking",
|
|
15822
|
+
"summary.tip",
|
|
15823
|
+
"summary.after_payment",
|
|
15824
|
+
// The mobile order summary: a persistent bar that expands into the panel.
|
|
15825
|
+
"summary.mobile_bar",
|
|
15826
|
+
"summary.disclosure",
|
|
15833
15827
|
"form.field",
|
|
15834
15828
|
"form.label",
|
|
15835
15829
|
"form.help",
|
|
15830
|
+
"form.value",
|
|
15831
|
+
"form.error",
|
|
15832
|
+
"form.panel",
|
|
15833
|
+
"form.save",
|
|
15834
|
+
"form.saved",
|
|
15836
15835
|
"coupon.input",
|
|
15836
|
+
"coupon.applied",
|
|
15837
15837
|
"input.base",
|
|
15838
15838
|
"input.error",
|
|
15839
|
+
// The reserved line under an input that holds its message. It is present
|
|
15840
|
+
// whether or not there is something to say, which is the point: no reflow.
|
|
15841
|
+
"input.message_slot",
|
|
15839
15842
|
"button.primary",
|
|
15840
15843
|
"button.secondary",
|
|
15844
|
+
"button.blocked",
|
|
15841
15845
|
"payment.methods",
|
|
15842
15846
|
"payment.method",
|
|
15843
15847
|
"payment.method.icon",
|
|
@@ -15845,13 +15849,35 @@ var checkoutStyleSlotValues = [
|
|
|
15845
15849
|
"payment.method.meta",
|
|
15846
15850
|
"payment.method.fee",
|
|
15847
15851
|
"payment.method.indicator",
|
|
15852
|
+
"payment.method.trailing",
|
|
15853
|
+
"payment.method.change",
|
|
15854
|
+
"payment.selected_method",
|
|
15848
15855
|
"payment.provider_widget",
|
|
15856
|
+
"payment.express_checkout",
|
|
15857
|
+
"payment.paypal_shell",
|
|
15858
|
+
"payment.acknowledgement",
|
|
15859
|
+
"payment.free_completion",
|
|
15860
|
+
"payment.notice",
|
|
15861
|
+
"payment.trial_notice",
|
|
15862
|
+
"payment.blocker_hint",
|
|
15849
15863
|
"payment.loading",
|
|
15850
15864
|
"payment.error",
|
|
15851
15865
|
"payment.warning",
|
|
15852
15866
|
"legal.terms",
|
|
15853
15867
|
"status.success",
|
|
15854
15868
|
"status.processing",
|
|
15869
|
+
"status.details",
|
|
15870
|
+
"status.wait_hint",
|
|
15871
|
+
// The open order kept its gateway: the buyer is told which one, and why the
|
|
15872
|
+
// picker is gone.
|
|
15873
|
+
"status.method_locked",
|
|
15874
|
+
"status.payment_rescue",
|
|
15875
|
+
"status.recovery",
|
|
15876
|
+
"status.delivery_destination",
|
|
15877
|
+
"embed.overlay_root",
|
|
15878
|
+
// The rest of the embed group belongs to the standalone widget bundle, which
|
|
15879
|
+
// no longer carries these names on an element. Kept for the same reason
|
|
15880
|
+
// `product.card` is kept: a stored theme that targets one must still save.
|
|
15855
15881
|
"embed.launcher",
|
|
15856
15882
|
"embed.launcher.icon",
|
|
15857
15883
|
"embed.productCard",
|
|
@@ -15874,6 +15900,18 @@ var checkoutStyleProtectedSlotValues = [
|
|
|
15874
15900
|
"summary.total",
|
|
15875
15901
|
"payment.method.label",
|
|
15876
15902
|
"payment.provider_widget",
|
|
15903
|
+
// The pay control on mobile. It is the only one in the viewport once the
|
|
15904
|
+
// page scrolls, so hiding it hides checkout.
|
|
15905
|
+
"checkout.mobile_pay_bar",
|
|
15906
|
+
// Whole payment routes: express wallets, the PayPal button host, and the
|
|
15907
|
+
// completion control a zero-total order has instead of a gateway.
|
|
15908
|
+
"payment.express_checkout",
|
|
15909
|
+
"payment.paypal_shell",
|
|
15910
|
+
"payment.free_completion",
|
|
15911
|
+
// Disclosures. The acknowledgement is the buyer's consent to an offline
|
|
15912
|
+
// payment; the trial notice is what they will be charged and when.
|
|
15913
|
+
"payment.acknowledgement",
|
|
15914
|
+
"payment.trial_notice",
|
|
15877
15915
|
"payment.loading",
|
|
15878
15916
|
"payment.error",
|
|
15879
15917
|
"payment.warning",
|
|
@@ -16608,6 +16646,7 @@ var embedPaymentSessionWireSchema = external_exports.object({
|
|
|
16608
16646
|
confirmations_needed: external_exports.number().optional()
|
|
16609
16647
|
}).passthrough();
|
|
16610
16648
|
var publicInvoiceWireCustomFieldDefinitionSchema = external_exports.object({
|
|
16649
|
+
collect_after_payment: external_exports.boolean().optional(),
|
|
16611
16650
|
default_value: external_exports.string().optional(),
|
|
16612
16651
|
min_length: external_exports.number().optional(),
|
|
16613
16652
|
name: external_exports.string(),
|
|
@@ -16616,6 +16655,17 @@ var publicInvoiceWireCustomFieldDefinitionSchema = external_exports.object({
|
|
|
16616
16655
|
required: external_exports.boolean(),
|
|
16617
16656
|
type: external_exports.string()
|
|
16618
16657
|
});
|
|
16658
|
+
var pendingPostPaymentCustomFieldsSchema = external_exports.object({
|
|
16659
|
+
version: external_exports.literal(1),
|
|
16660
|
+
line_items: external_exports.array(external_exports.object({
|
|
16661
|
+
line_item_id: external_exports.string().uuid(),
|
|
16662
|
+
product_id: external_exports.string().uuid(),
|
|
16663
|
+
product_title: external_exports.string(),
|
|
16664
|
+
fields: external_exports.array(publicInvoiceWireCustomFieldDefinitionSchema.extend({
|
|
16665
|
+
collect_after_payment: external_exports.literal(true)
|
|
16666
|
+
}))
|
|
16667
|
+
}))
|
|
16668
|
+
});
|
|
16619
16669
|
var publicInvoiceWireProductAddonSchema = external_exports.object({
|
|
16620
16670
|
id: external_exports.string(),
|
|
16621
16671
|
price: external_exports.number(),
|
|
@@ -16652,6 +16702,7 @@ var publicInvoiceWireProductSchema = external_exports.object({
|
|
|
16652
16702
|
currency: external_exports.string(),
|
|
16653
16703
|
custom_fields: unknownRecordSchema.nullable().optional(),
|
|
16654
16704
|
custom_fields_config: external_exports.array(publicInvoiceWireCustomFieldDefinitionSchema).nullable().optional(),
|
|
16705
|
+
post_payment_custom_fields_config: external_exports.array(publicInvoiceWireCustomFieldDefinitionSchema).nullable().optional(),
|
|
16655
16706
|
delivery_instruction: external_exports.unknown().optional(),
|
|
16656
16707
|
delivery_instruction_config: external_exports.unknown().optional(),
|
|
16657
16708
|
delivery_instruction_label: external_exports.unknown().optional(),
|
|
@@ -16960,6 +17011,20 @@ var publicInvoiceWireSchema = external_exports.object({
|
|
|
16960
17011
|
buyer_identity: buyerIdentitySchema.nullable().optional(),
|
|
16961
17012
|
checkout_tipping: checkoutTippingSchema.nullable().optional(),
|
|
16962
17013
|
country_regulations: external_exports.string().nullable().optional(),
|
|
17014
|
+
/**
|
|
17015
|
+
* THAT a coupon is on the order — never WHICH one.
|
|
17016
|
+
*
|
|
17017
|
+
* The redeemed code has no key on this contract, and none is coming back to
|
|
17018
|
+
* it: this is the wire of the anonymous invoice read, whose only credential
|
|
17019
|
+
* is knowledge of the invoice URL. Coupon codes are merchant-authored and
|
|
17020
|
+
* routinely private (campaign, influencer, single-buyer codes), so naming one
|
|
17021
|
+
* to an unproven reader discloses the merchant's code. The producer withholds
|
|
17022
|
+
* it too — `coupon_code`, `coupon_id` and the raw `discount_breakdown` are all
|
|
17023
|
+
* outside `PUBLIC_INVOICE_FIELDS` — so the summary prints "Coupon −$9.80".
|
|
17024
|
+
*
|
|
17025
|
+
* A buyer-bound lane may name the coupon, but only from a source that proves
|
|
17026
|
+
* the reader: this schema is not it.
|
|
17027
|
+
*/
|
|
16963
17028
|
coupon_applied: external_exports.boolean().optional(),
|
|
16964
17029
|
crypto_mode: external_exports.string().nullable().optional(),
|
|
16965
17030
|
crypto_transactions: external_exports.array(cryptoTransactionSchema).optional(),
|
|
@@ -16988,6 +17053,7 @@ var publicInvoiceWireSchema = external_exports.object({
|
|
|
16988
17053
|
paddle_transaction_id: external_exports.unknown().optional(),
|
|
16989
17054
|
payment_link_id: external_exports.string().nullable().optional(),
|
|
16990
17055
|
payment_method_overrides: external_exports.array(paymentMethodOverrideSchema).optional(),
|
|
17056
|
+
pending_custom_fields: pendingPostPaymentCustomFieldsSchema.nullable().optional(),
|
|
16991
17057
|
payment_session_state: invoicePaymentSessionStateSchema.nullable().optional(),
|
|
16992
17058
|
polling: pollingSchema,
|
|
16993
17059
|
pricing_breakdown: pricingBreakdownSchema.nullable().optional(),
|
|
@@ -17091,7 +17157,18 @@ var publicInvoiceWireSchema = external_exports.object({
|
|
|
17091
17157
|
telegram_stars_payment_note: external_exports.string().nullable().optional(),
|
|
17092
17158
|
updated_at: external_exports.string().optional(),
|
|
17093
17159
|
virtual_payments_id: external_exports.string().nullable().optional(),
|
|
17094
|
-
void_details: external_exports.unknown().optional()
|
|
17160
|
+
void_details: external_exports.unknown().optional(),
|
|
17161
|
+
// EU right-of-withdrawal consent (§ 356 Abs. 5 BGB / CRD Art. 16(m)).
|
|
17162
|
+
// `withdrawal_consent_required` is the server's verdict for THIS invoice
|
|
17163
|
+
// (shop opt-in + buyer country + digital deliverables, renewals exempt) and is
|
|
17164
|
+
// REQUIRED on the wire: a missing verdict is a producer bug, not a licence for
|
|
17165
|
+
// the checkout to assume `false` and show a pay button the backend refuses.
|
|
17166
|
+
// The other two are the stored proof — always present, null until the buyer
|
|
17167
|
+
// confirms. The checkout gates on these three and never infers the
|
|
17168
|
+
// requirement itself.
|
|
17169
|
+
withdrawal_consent_at: external_exports.string().nullable(),
|
|
17170
|
+
withdrawal_consent_required: external_exports.boolean(),
|
|
17171
|
+
withdrawal_consent_text_version: external_exports.string().nullable()
|
|
17095
17172
|
}).catchall(external_exports.unknown());
|
|
17096
17173
|
var embedCheckoutProductWireSchema = publicInvoiceWireProductSchema.extend({
|
|
17097
17174
|
available_addons: external_exports.array(publicInvoiceWireAvailableAddonSchema).optional(),
|
|
@@ -17116,6 +17193,15 @@ var embedCheckoutInvoiceWireSchema = publicInvoiceWireSchema.extend({
|
|
|
17116
17193
|
customer_email: external_exports.string().nullable(),
|
|
17117
17194
|
checkout_style: checkoutStyleStateSchema.nullable().optional(),
|
|
17118
17195
|
coupon_id: external_exports.string().nullable().optional(),
|
|
17196
|
+
// Merchant toggle (shop_commerce_settings.coupon_field_always_visible):
|
|
17197
|
+
// render the coupon input expanded instead of behind the "Add coupon code"
|
|
17198
|
+
// trigger. Presentation only — coupon validation is unchanged.
|
|
17199
|
+
//
|
|
17200
|
+
// Required, not optional: the public producer (`InvoiceEnricher`) always
|
|
17201
|
+
// resolves this to a boolean, so an absent field means the producer broke,
|
|
17202
|
+
// not that the merchant left it unset. Failing here beats the checkout
|
|
17203
|
+
// quietly rendering the collapsed default for a shop that turned it on.
|
|
17204
|
+
coupon_field_always_visible: external_exports.boolean(),
|
|
17119
17205
|
discount_breakdown: unknownRecordSchema.nullable().optional(),
|
|
17120
17206
|
affiliate_code: external_exports.string().nullable().optional(),
|
|
17121
17207
|
country: external_exports.string().nullable().optional(),
|
|
@@ -17983,6 +18069,32 @@ function resetTypedClient() {
|
|
|
17983
18069
|
cachedBaseUrl = null;
|
|
17984
18070
|
}
|
|
17985
18071
|
|
|
18072
|
+
// ../sdk/src/utils/requested-currency.ts
|
|
18073
|
+
function normalizeRequestedCurrency(value) {
|
|
18074
|
+
const normalized = value?.trim().toUpperCase();
|
|
18075
|
+
return normalized && /^[A-Z]{3}$/.test(normalized) ? normalized : null;
|
|
18076
|
+
}
|
|
18077
|
+
function getRequestedCurrencyFromLocation() {
|
|
18078
|
+
if (typeof window === "undefined" || !window.location) {
|
|
18079
|
+
return null;
|
|
18080
|
+
}
|
|
18081
|
+
const search = typeof window.location.search === "string" ? window.location.search : "";
|
|
18082
|
+
if (search) {
|
|
18083
|
+
return normalizeRequestedCurrency(new URLSearchParams(search).get("currency"));
|
|
18084
|
+
}
|
|
18085
|
+
const href = typeof window.location.href === "string" ? window.location.href : "";
|
|
18086
|
+
if (!href) {
|
|
18087
|
+
return null;
|
|
18088
|
+
}
|
|
18089
|
+
try {
|
|
18090
|
+
return normalizeRequestedCurrency(
|
|
18091
|
+
new URL(href, "https://storefront.shoppex.local").searchParams.get("currency")
|
|
18092
|
+
);
|
|
18093
|
+
} catch {
|
|
18094
|
+
return null;
|
|
18095
|
+
}
|
|
18096
|
+
}
|
|
18097
|
+
|
|
17986
18098
|
// ../sdk/src/core/config.ts
|
|
17987
18099
|
var DEFAULT_API_BASE_URL = "https://api.shoppex.io";
|
|
17988
18100
|
var currentConfig = null;
|
|
@@ -17991,20 +18103,29 @@ var DEFAULT_CHECKOUT_BASE_URL = "https://checkout.shoppex.io";
|
|
|
17991
18103
|
function initConfig(storeSlug, options) {
|
|
17992
18104
|
const normalizedShopId = options?.shopId?.trim();
|
|
17993
18105
|
cachedShopId = normalizedShopId ? normalizedShopId : null;
|
|
17994
|
-
const previousLocale = currentConfig?.locale;
|
|
17995
18106
|
currentConfig = {
|
|
17996
18107
|
storeSlug,
|
|
17997
18108
|
locale: options?.locale,
|
|
17998
|
-
currency: options?.currency,
|
|
18109
|
+
currency: normalizeInitCurrency(options?.currency),
|
|
17999
18110
|
apiBaseUrl: options?.apiBaseUrl ?? DEFAULT_API_BASE_URL,
|
|
18000
18111
|
checkoutBaseUrl: options?.checkoutBaseUrl ?? DEFAULT_CHECKOUT_BASE_URL
|
|
18001
18112
|
};
|
|
18002
|
-
if (previousLocale !== currentConfig.locale) {
|
|
18003
|
-
clearCache();
|
|
18004
|
-
}
|
|
18005
18113
|
resetTypedClient();
|
|
18006
18114
|
return currentConfig;
|
|
18007
18115
|
}
|
|
18116
|
+
function normalizeInitCurrency(value) {
|
|
18117
|
+
if (value === void 0 || value.trim() === "") {
|
|
18118
|
+
return void 0;
|
|
18119
|
+
}
|
|
18120
|
+
const normalized = normalizeRequestedCurrency(value);
|
|
18121
|
+
if (!normalized) {
|
|
18122
|
+
throw new ValidationError(
|
|
18123
|
+
`Invalid currency "${value}": pass an ISO 4217 code such as "EUR".`,
|
|
18124
|
+
["currency"]
|
|
18125
|
+
);
|
|
18126
|
+
}
|
|
18127
|
+
return normalized;
|
|
18128
|
+
}
|
|
18008
18129
|
function getConfig() {
|
|
18009
18130
|
if (!currentConfig) {
|
|
18010
18131
|
throw new NotInitializedError();
|
|
@@ -18416,6 +18537,92 @@ function resolveStorefrontSocialLinks(store) {
|
|
|
18416
18537
|
};
|
|
18417
18538
|
}
|
|
18418
18539
|
|
|
18540
|
+
// ../sdk/src/core/cache.ts
|
|
18541
|
+
var cache = /* @__PURE__ */ new Map();
|
|
18542
|
+
var pending = /* @__PURE__ */ new Map();
|
|
18543
|
+
var stats = {
|
|
18544
|
+
hits: 0,
|
|
18545
|
+
misses: 0
|
|
18546
|
+
};
|
|
18547
|
+
function isExpired(entry) {
|
|
18548
|
+
return Date.now() > entry.expiresAt;
|
|
18549
|
+
}
|
|
18550
|
+
function getCacheStats() {
|
|
18551
|
+
return {
|
|
18552
|
+
hits: stats.hits,
|
|
18553
|
+
misses: stats.misses,
|
|
18554
|
+
pendingRequests: pending.size,
|
|
18555
|
+
entries: cache.size
|
|
18556
|
+
};
|
|
18557
|
+
}
|
|
18558
|
+
function clearCache() {
|
|
18559
|
+
cache.clear();
|
|
18560
|
+
pending.clear();
|
|
18561
|
+
}
|
|
18562
|
+
function invalidateCache(prefixOrKey) {
|
|
18563
|
+
for (const key of cache.keys()) {
|
|
18564
|
+
if (key === prefixOrKey || key.startsWith(prefixOrKey)) {
|
|
18565
|
+
cache.delete(key);
|
|
18566
|
+
}
|
|
18567
|
+
}
|
|
18568
|
+
}
|
|
18569
|
+
function setCacheEntry(key, data, ttl) {
|
|
18570
|
+
const now = Date.now();
|
|
18571
|
+
cache.set(key, {
|
|
18572
|
+
data,
|
|
18573
|
+
ttl,
|
|
18574
|
+
updatedAt: now,
|
|
18575
|
+
expiresAt: now + ttl
|
|
18576
|
+
});
|
|
18577
|
+
}
|
|
18578
|
+
function getCacheEntry(key) {
|
|
18579
|
+
const entry = cache.get(key);
|
|
18580
|
+
if (!entry) return null;
|
|
18581
|
+
return entry;
|
|
18582
|
+
}
|
|
18583
|
+
async function getOrFetch(key, fetcher, options, shouldCache = () => true) {
|
|
18584
|
+
const entry = getCacheEntry(key);
|
|
18585
|
+
if (entry && !isExpired(entry)) {
|
|
18586
|
+
stats.hits += 1;
|
|
18587
|
+
return entry.data;
|
|
18588
|
+
}
|
|
18589
|
+
if (entry && options.staleWhileRevalidate) {
|
|
18590
|
+
stats.hits += 1;
|
|
18591
|
+
if (!pending.has(key)) {
|
|
18592
|
+
const refreshPromise = (async () => {
|
|
18593
|
+
try {
|
|
18594
|
+
const data = await fetcher();
|
|
18595
|
+
if (shouldCache(data)) {
|
|
18596
|
+
setCacheEntry(key, data, options.ttl);
|
|
18597
|
+
}
|
|
18598
|
+
return data;
|
|
18599
|
+
} finally {
|
|
18600
|
+
pending.delete(key);
|
|
18601
|
+
}
|
|
18602
|
+
})();
|
|
18603
|
+
pending.set(key, refreshPromise);
|
|
18604
|
+
}
|
|
18605
|
+
return entry.data;
|
|
18606
|
+
}
|
|
18607
|
+
if (pending.has(key)) {
|
|
18608
|
+
return pending.get(key);
|
|
18609
|
+
}
|
|
18610
|
+
stats.misses += 1;
|
|
18611
|
+
const promise2 = (async () => {
|
|
18612
|
+
try {
|
|
18613
|
+
const data = await fetcher();
|
|
18614
|
+
if (shouldCache(data)) {
|
|
18615
|
+
setCacheEntry(key, data, options.ttl);
|
|
18616
|
+
}
|
|
18617
|
+
return data;
|
|
18618
|
+
} finally {
|
|
18619
|
+
pending.delete(key);
|
|
18620
|
+
}
|
|
18621
|
+
})();
|
|
18622
|
+
pending.set(key, promise2);
|
|
18623
|
+
return promise2;
|
|
18624
|
+
}
|
|
18625
|
+
|
|
18419
18626
|
// ../sdk/src/core/endpoint.ts
|
|
18420
18627
|
var PARAM_PATTERN = /:([A-Za-z0-9_]+)/g;
|
|
18421
18628
|
function buildEndpoint(template, params) {
|
|
@@ -18549,9 +18756,13 @@ var MAX_RETRIES = 2;
|
|
|
18549
18756
|
async function sleep(ms) {
|
|
18550
18757
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
18551
18758
|
}
|
|
18759
|
+
function appendQueryParam(url2, key, value) {
|
|
18760
|
+
const separator = url2.includes("?") ? "&" : "?";
|
|
18761
|
+
return `${url2}${separator}${encodeURIComponent(key)}=${encodeURIComponent(value)}`;
|
|
18762
|
+
}
|
|
18552
18763
|
async function request(endpoint, options = {}) {
|
|
18553
18764
|
const config2 = options.baseUrl ? null : getConfig();
|
|
18554
|
-
const
|
|
18765
|
+
const audience = config2 ?? (isInitialized() ? getConfig() : null);
|
|
18555
18766
|
const {
|
|
18556
18767
|
method = "GET",
|
|
18557
18768
|
body,
|
|
@@ -18559,18 +18770,21 @@ async function request(endpoint, options = {}) {
|
|
|
18559
18770
|
retries,
|
|
18560
18771
|
baseUrl,
|
|
18561
18772
|
headers: requestHeaders,
|
|
18562
|
-
cache: cache2
|
|
18773
|
+
cache: cache2,
|
|
18774
|
+
buyerCurrency: pricesInBuyerCurrency = false
|
|
18563
18775
|
} = options;
|
|
18564
18776
|
const retryCount = retries ?? (method === "GET" ? MAX_RETRIES : 0);
|
|
18565
18777
|
const apiBaseUrl = baseUrl ?? config2?.apiBaseUrl ?? "";
|
|
18566
|
-
const
|
|
18778
|
+
const buyerCurrency = pricesInBuyerCurrency && audience?.currency ? audience.currency : null;
|
|
18779
|
+
const url2 = buyerCurrency ? appendQueryParam(`${apiBaseUrl}${endpoint}`, "currency", buyerCurrency) : `${apiBaseUrl}${endpoint}`;
|
|
18567
18780
|
const headers = {
|
|
18568
18781
|
"Content-Type": "application/json",
|
|
18569
18782
|
Accept: "application/json",
|
|
18570
18783
|
...requestHeaders
|
|
18571
18784
|
};
|
|
18572
|
-
|
|
18573
|
-
|
|
18785
|
+
const locale = typeof audience?.locale === "string" && audience.locale.trim() ? audience.locale.trim() : null;
|
|
18786
|
+
if (locale) {
|
|
18787
|
+
headers["x-shoppex-locale"] = locale;
|
|
18574
18788
|
}
|
|
18575
18789
|
let lastFailure = null;
|
|
18576
18790
|
const executeRequest = async () => {
|
|
@@ -18653,7 +18867,7 @@ async function request(endpoint, options = {}) {
|
|
|
18653
18867
|
};
|
|
18654
18868
|
};
|
|
18655
18869
|
const result = method === "GET" && cache2 && cache2.ttl > 0 ? await getOrFetch(
|
|
18656
|
-
cache2.key ?? `GET:${url2}`,
|
|
18870
|
+
`${locale ?? ""}|${buyerCurrency ?? ""}|${cache2.key ?? `GET:${url2}`}`,
|
|
18657
18871
|
executeRequest,
|
|
18658
18872
|
{ ttl: cache2.ttl, staleWhileRevalidate: cache2.staleWhileRevalidate },
|
|
18659
18873
|
(value) => value.success
|
|
@@ -18763,6 +18977,7 @@ async function getStore() {
|
|
|
18763
18977
|
storeSlug: config2.storeSlug
|
|
18764
18978
|
}),
|
|
18765
18979
|
{
|
|
18980
|
+
buyerCurrency: true,
|
|
18766
18981
|
cache: {
|
|
18767
18982
|
key: `store:${config2.storeSlug}`,
|
|
18768
18983
|
ttl: STORE_CACHE_TTL,
|
|
@@ -18800,6 +19015,7 @@ async function resolveStoreByDomain(domain2, apiBaseUrl) {
|
|
|
18800
19015
|
}),
|
|
18801
19016
|
{
|
|
18802
19017
|
baseUrl,
|
|
19018
|
+
buyerCurrency: true,
|
|
18803
19019
|
cache: {
|
|
18804
19020
|
key: `store:domain:${cleanDomain}`,
|
|
18805
19021
|
ttl: STORE_CACHE_TTL,
|
|
@@ -18836,6 +19052,7 @@ async function getStorefront(options) {
|
|
|
18836
19052
|
storeSlug: config2.storeSlug
|
|
18837
19053
|
})}${querySuffix}`,
|
|
18838
19054
|
{
|
|
19055
|
+
buyerCurrency: true,
|
|
18839
19056
|
cache: {
|
|
18840
19057
|
key: `storefront:${config2.storeSlug}:${options?.productsLimit ?? "full"}:${options?.productsCursor ?? "start"}`,
|
|
18841
19058
|
ttl: STORE_CACHE_TTL,
|
|
@@ -18933,6 +19150,7 @@ async function getProducts() {
|
|
|
18933
19150
|
storeSlug: config2.storeSlug
|
|
18934
19151
|
}),
|
|
18935
19152
|
{
|
|
19153
|
+
buyerCurrency: true,
|
|
18936
19154
|
cache: {
|
|
18937
19155
|
key: `products:${config2.storeSlug}`,
|
|
18938
19156
|
ttl: PRODUCTS_CACHE_TTL,
|
|
@@ -18976,6 +19194,7 @@ async function getStorefrontProductsPage(options) {
|
|
|
18976
19194
|
storeSlug: config2.storeSlug
|
|
18977
19195
|
})}${querySuffix}`,
|
|
18978
19196
|
{
|
|
19197
|
+
buyerCurrency: true,
|
|
18979
19198
|
cache: {
|
|
18980
19199
|
key: `products:page:${config2.storeSlug}:${options?.limit ?? "default"}:${options?.cursor ?? "start"}:${options?.sort ?? "featured"}:${getStorefrontProductsPageCategoryCacheKey(options?.category)}:${options?.hideOutOfStock === true ? "in-stock" : "all-stock"}`,
|
|
18981
19200
|
ttl: PRODUCTS_CACHE_TTL,
|
|
@@ -19007,6 +19226,7 @@ async function getProduct(idOrSlug) {
|
|
|
19007
19226
|
const response = await get(
|
|
19008
19227
|
`${buildEndpoint("/v1/storefront/products/unique/:idOrSlug", { idOrSlug })}${queryParams}`,
|
|
19009
19228
|
{
|
|
19229
|
+
buyerCurrency: true,
|
|
19010
19230
|
cache: {
|
|
19011
19231
|
key: `product:${idOrSlug}:${shopId ?? "no-shop"}`,
|
|
19012
19232
|
ttl: PRODUCTS_CACHE_TTL,
|
|
@@ -19302,32 +19522,6 @@ function ensureCartLineId(item) {
|
|
|
19302
19522
|
return { ...item, line_id: computeCartLineId(item) };
|
|
19303
19523
|
}
|
|
19304
19524
|
|
|
19305
|
-
// ../sdk/src/utils/requested-currency.ts
|
|
19306
|
-
function normalizeRequestedCurrency(value) {
|
|
19307
|
-
const normalized = value?.trim().toUpperCase();
|
|
19308
|
-
return normalized && /^[A-Z]{3}$/.test(normalized) ? normalized : null;
|
|
19309
|
-
}
|
|
19310
|
-
function getRequestedCurrencyFromLocation() {
|
|
19311
|
-
if (typeof window === "undefined" || !window.location) {
|
|
19312
|
-
return null;
|
|
19313
|
-
}
|
|
19314
|
-
const search = typeof window.location.search === "string" ? window.location.search : "";
|
|
19315
|
-
if (search) {
|
|
19316
|
-
return normalizeRequestedCurrency(new URLSearchParams(search).get("currency"));
|
|
19317
|
-
}
|
|
19318
|
-
const href = typeof window.location.href === "string" ? window.location.href : "";
|
|
19319
|
-
if (!href) {
|
|
19320
|
-
return null;
|
|
19321
|
-
}
|
|
19322
|
-
try {
|
|
19323
|
-
return normalizeRequestedCurrency(
|
|
19324
|
-
new URL(href, "https://storefront.shoppex.local").searchParams.get("currency")
|
|
19325
|
-
);
|
|
19326
|
-
} catch {
|
|
19327
|
-
return null;
|
|
19328
|
-
}
|
|
19329
|
-
}
|
|
19330
|
-
|
|
19331
19525
|
// ../sdk/src/modules/cart.ts
|
|
19332
19526
|
var STORAGE_KEYS = {
|
|
19333
19527
|
cart: "cart",
|
|
@@ -21469,6 +21663,7 @@ if (typeof window !== "undefined") {
|
|
|
21469
21663
|
ApiError,
|
|
21470
21664
|
CATALOG_UNIT_PRICE_DECIMAL_PLACES,
|
|
21471
21665
|
CATALOG_UNIT_PRICE_FORMAT_OPTIONS,
|
|
21666
|
+
CURRENCY_UNAVAILABLE_ERROR_CODE,
|
|
21472
21667
|
CartError,
|
|
21473
21668
|
CheckoutCreateError,
|
|
21474
21669
|
NetworkError,
|