@betterstore/react 0.3.88 → 0.5.3
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/dist/components/cart/useCart.d.ts +1 -0
- package/dist/components/cart/useCart.d.ts.map +1 -0
- package/dist/components/checkout-embed/appearance.d.ts +2 -1
- package/dist/components/checkout-embed/appearance.d.ts.map +1 -0
- package/dist/components/checkout-embed/checkout-form-loading.d.ts +2 -2
- package/dist/components/checkout-embed/checkout-form-loading.d.ts.map +1 -0
- package/dist/components/checkout-embed/checkout-form.d.ts +2 -2
- package/dist/components/checkout-embed/checkout-form.d.ts.map +1 -0
- package/dist/components/checkout-embed/checkout-schema.d.ts +1 -0
- package/dist/components/checkout-embed/checkout-schema.d.ts.map +1 -0
- package/dist/components/checkout-embed/index.d.ts +3 -2
- package/dist/components/checkout-embed/index.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/customer/address-input.d.ts +2 -2
- package/dist/components/checkout-embed/steps/customer/address-input.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/customer/address-utils.d.ts +1 -0
- package/dist/components/checkout-embed/steps/customer/address-utils.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/customer/form.d.ts +2 -2
- package/dist/components/checkout-embed/steps/customer/form.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/payment/form.d.ts +2 -2
- package/dist/components/checkout-embed/steps/payment/form.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/shipping/form.d.ts +2 -2
- package/dist/components/checkout-embed/steps/shipping/form.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/shipping/providers/zasilkovna.d.ts +2 -1
- package/dist/components/checkout-embed/steps/shipping/providers/zasilkovna.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/shipping/shipping-option-wrapper.d.ts +2 -1
- package/dist/components/checkout-embed/steps/shipping/shipping-option-wrapper.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/summary/discount-code.d.ts +2 -2
- package/dist/components/checkout-embed/steps/summary/discount-code.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/summary/index.d.ts +2 -2
- package/dist/components/checkout-embed/steps/summary/index.d.ts.map +1 -0
- package/dist/components/checkout-embed/steps/summary/loading.d.ts +2 -2
- package/dist/components/checkout-embed/steps/summary/loading.d.ts.map +1 -0
- package/dist/components/checkout-embed/useFormStore.d.ts +1 -0
- package/dist/components/checkout-embed/useFormStore.d.ts.map +1 -0
- package/dist/components/compounds/form/country-dropdown.d.ts +1 -0
- package/dist/components/compounds/form/country-dropdown.d.ts.map +1 -0
- package/dist/components/compounds/form/form-messages.d.ts +2 -1
- package/dist/components/compounds/form/form-messages.d.ts.map +1 -0
- package/dist/components/compounds/form/input-group.d.ts +3 -2
- package/dist/components/compounds/form/input-group.d.ts.map +1 -0
- package/dist/components/compounds/form/submit-button.d.ts +3 -3
- package/dist/components/compounds/form/submit-button.d.ts.map +1 -0
- package/dist/components/iframe-wrapper.d.ts +2 -1
- package/dist/components/iframe-wrapper.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/payment-element/appearance.d.ts +1 -0
- package/dist/components/payment-element/appearance.d.ts.map +1 -0
- package/dist/components/payment-element/checkout-form.d.ts +2 -1
- package/dist/components/payment-element/checkout-form.d.ts.map +1 -0
- package/dist/components/payment-element/index.d.ts +2 -1
- package/dist/components/payment-element/index.d.ts.map +1 -0
- package/dist/components/payment-element/useCheckout.d.ts +1 -0
- package/dist/components/payment-element/useCheckout.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +2 -1
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts +2 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +13 -12
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +11 -10
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +18 -17
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/form.d.ts +7 -6
- package/dist/components/ui/form.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +2 -1
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +2 -1
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +7 -6
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/radio-group.d.ts +4 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +11 -10
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +2 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/sonner.d.ts +2 -2
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/dev/dev.d.ts +2 -0
- package/dist/dev/dev.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/index.cjs.js +425 -614
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +425 -614
- package/dist/lib/betterstore.d.ts +9 -0
- package/dist/lib/betterstore.d.ts.map +1 -0
- package/dist/lib/error-message-utils.d.ts +1 -0
- package/dist/lib/error-message-utils.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -0
- package/package.json +33 -35
- package/.prettierignore +0 -3
- package/.prettierrc +0 -8
- package/CHANGELOG.md +0 -908
- package/CONTRIBUTING.md +0 -52
- package/LICENSE +0 -21
- package/README.md +0 -34
- package/components.json +0 -21
- package/postcss.config.cjs +0 -6
- package/rollup.config.mjs +0 -103
- package/tailwind.config.js +0 -12
package/dist/index.cjs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var ReactDOM = require('react-dom');
|
|
5
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var ReactDOM = require('react-dom');
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -2684,7 +2684,7 @@ const cookie = {
|
|
|
2684
2684
|
cookieOptions.expires.setTime(cookieOptions.expires.getTime() + minutes * 60 * 1000);
|
|
2685
2685
|
}
|
|
2686
2686
|
if (domain) cookieOptions.domain = domain;
|
|
2687
|
-
document.cookie = serializeCookie(name,
|
|
2687
|
+
document.cookie = serializeCookie(name, value, cookieOptions);
|
|
2688
2688
|
},
|
|
2689
2689
|
read(name) {
|
|
2690
2690
|
const nameEQ = `${name}=`;
|
|
@@ -2696,8 +2696,8 @@ const cookie = {
|
|
|
2696
2696
|
}
|
|
2697
2697
|
return null;
|
|
2698
2698
|
},
|
|
2699
|
-
remove(name) {
|
|
2700
|
-
this.create(name, '', -1);
|
|
2699
|
+
remove(name, domain) {
|
|
2700
|
+
this.create(name, '', -1, domain);
|
|
2701
2701
|
}
|
|
2702
2702
|
};
|
|
2703
2703
|
var cookie$1 = {
|
|
@@ -2757,6 +2757,46 @@ var querystring = {
|
|
|
2757
2757
|
}
|
|
2758
2758
|
};
|
|
2759
2759
|
|
|
2760
|
+
var hash = {
|
|
2761
|
+
name: 'hash',
|
|
2762
|
+
// Deconstruct the options object and extract the lookupHash property and the lookupFromHashIndex property
|
|
2763
|
+
lookup(_ref) {
|
|
2764
|
+
let {
|
|
2765
|
+
lookupHash,
|
|
2766
|
+
lookupFromHashIndex
|
|
2767
|
+
} = _ref;
|
|
2768
|
+
let found;
|
|
2769
|
+
if (typeof window !== 'undefined') {
|
|
2770
|
+
const {
|
|
2771
|
+
hash
|
|
2772
|
+
} = window.location;
|
|
2773
|
+
if (hash && hash.length > 2) {
|
|
2774
|
+
const query = hash.substring(1);
|
|
2775
|
+
if (lookupHash) {
|
|
2776
|
+
const params = query.split('&');
|
|
2777
|
+
for (let i = 0; i < params.length; i++) {
|
|
2778
|
+
const pos = params[i].indexOf('=');
|
|
2779
|
+
if (pos > 0) {
|
|
2780
|
+
const key = params[i].substring(0, pos);
|
|
2781
|
+
if (key === lookupHash) {
|
|
2782
|
+
found = params[i].substring(pos + 1);
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
if (found) return found;
|
|
2788
|
+
if (!found && lookupFromHashIndex > -1) {
|
|
2789
|
+
const language = hash.match(/\/([a-zA-Z-]*)/g);
|
|
2790
|
+
if (!Array.isArray(language)) return undefined;
|
|
2791
|
+
const index = typeof lookupFromHashIndex === 'number' ? lookupFromHashIndex : 0;
|
|
2792
|
+
return language[index]?.replace('/', '');
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
}
|
|
2796
|
+
return found;
|
|
2797
|
+
}
|
|
2798
|
+
};
|
|
2799
|
+
|
|
2760
2800
|
let hasLocalStorageSupport = null;
|
|
2761
2801
|
const localStorageAvailable = () => {
|
|
2762
2802
|
if (hasLocalStorageSupport !== null) return hasLocalStorageSupport;
|
|
@@ -2965,6 +3005,7 @@ class Browser {
|
|
|
2965
3005
|
this.addDetector(htmlTag);
|
|
2966
3006
|
this.addDetector(path);
|
|
2967
3007
|
this.addDetector(subdomain);
|
|
3008
|
+
this.addDetector(hash);
|
|
2968
3009
|
}
|
|
2969
3010
|
addDetector(detector) {
|
|
2970
3011
|
this.detectors[detector.name] = detector;
|
|
@@ -4385,6 +4426,10 @@ function toFormData$1(obj, formData, options) {
|
|
|
4385
4426
|
return value.toISOString();
|
|
4386
4427
|
}
|
|
4387
4428
|
|
|
4429
|
+
if (utils$1.isBoolean(value)) {
|
|
4430
|
+
return value.toString();
|
|
4431
|
+
}
|
|
4432
|
+
|
|
4388
4433
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
4389
4434
|
throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
|
|
4390
4435
|
}
|
|
@@ -6293,7 +6338,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|
|
6293
6338
|
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
6294
6339
|
});
|
|
6295
6340
|
|
|
6296
|
-
let response = await fetch(request);
|
|
6341
|
+
let response = await fetch(request, fetchOptions);
|
|
6297
6342
|
|
|
6298
6343
|
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
6299
6344
|
|
|
@@ -6499,7 +6544,7 @@ function dispatchRequest(config) {
|
|
|
6499
6544
|
});
|
|
6500
6545
|
}
|
|
6501
6546
|
|
|
6502
|
-
const VERSION$1 = "1.
|
|
6547
|
+
const VERSION$1 = "1.10.0";
|
|
6503
6548
|
|
|
6504
6549
|
const validators$1 = {};
|
|
6505
6550
|
|
|
@@ -7151,30 +7196,11 @@ const {
|
|
|
7151
7196
|
mergeConfig
|
|
7152
7197
|
} = axios;
|
|
7153
7198
|
|
|
7154
|
-
|
|
7155
|
-
return new Promise((resolve, reject) => {
|
|
7156
|
-
var fulfilled = (value) => {
|
|
7157
|
-
try {
|
|
7158
|
-
step(generator.next(value));
|
|
7159
|
-
} catch (e) {
|
|
7160
|
-
reject(e);
|
|
7161
|
-
}
|
|
7162
|
-
};
|
|
7163
|
-
var rejected = (value) => {
|
|
7164
|
-
try {
|
|
7165
|
-
step(generator.throw(value));
|
|
7166
|
-
} catch (e) {
|
|
7167
|
-
reject(e);
|
|
7168
|
-
}
|
|
7169
|
-
};
|
|
7170
|
-
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
7171
|
-
step((generator = generator.apply(__this, __arguments)).next());
|
|
7172
|
-
});
|
|
7173
|
-
};
|
|
7199
|
+
// src/utils/axios.ts
|
|
7174
7200
|
var API_BASE_URL = "https://api.betterstore.io/v1";
|
|
7175
7201
|
var createApiClient = (apiKey, proxy) => {
|
|
7176
7202
|
const client = axios.create({
|
|
7177
|
-
baseURL: proxy
|
|
7203
|
+
baseURL: proxy ?? API_BASE_URL,
|
|
7178
7204
|
headers: {
|
|
7179
7205
|
"Content-Type": "application/json",
|
|
7180
7206
|
Authorization: `Bearer ${apiKey}`,
|
|
@@ -7186,7 +7212,6 @@ var createApiClient = (apiKey, proxy) => {
|
|
|
7186
7212
|
client.interceptors.response.use(
|
|
7187
7213
|
(response) => response.data,
|
|
7188
7214
|
(error) => {
|
|
7189
|
-
var _a, _b;
|
|
7190
7215
|
const apiError = {
|
|
7191
7216
|
isError: true,
|
|
7192
7217
|
status: 500,
|
|
@@ -7194,8 +7219,8 @@ var createApiClient = (apiKey, proxy) => {
|
|
|
7194
7219
|
};
|
|
7195
7220
|
if (error.response) {
|
|
7196
7221
|
apiError.status = error.response.status;
|
|
7197
|
-
apiError.message =
|
|
7198
|
-
apiError.code =
|
|
7222
|
+
apiError.message = error.response.data?.error || "Server error occurred";
|
|
7223
|
+
apiError.code = error.response.data?.code;
|
|
7199
7224
|
apiError.details = error.response.data;
|
|
7200
7225
|
} else if (error.request) {
|
|
7201
7226
|
apiError.status = 503;
|
|
@@ -7220,169 +7245,150 @@ var createApiClient = (apiKey, proxy) => {
|
|
|
7220
7245
|
|
|
7221
7246
|
// src/client/index.ts
|
|
7222
7247
|
var Client = class {
|
|
7248
|
+
proxy;
|
|
7223
7249
|
constructor(proxy) {
|
|
7224
7250
|
this.proxy = proxy;
|
|
7225
7251
|
}
|
|
7226
7252
|
/**
|
|
7227
7253
|
* Retrieve a checkout session by ID
|
|
7228
7254
|
*/
|
|
7229
|
-
retrieveCheckout(clientSecret, checkoutId) {
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
return data;
|
|
7240
|
-
});
|
|
7255
|
+
async retrieveCheckout(clientSecret, checkoutId) {
|
|
7256
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7257
|
+
const data = await apiClient.get(
|
|
7258
|
+
`/checkout/${checkoutId}`
|
|
7259
|
+
);
|
|
7260
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7261
|
+
console.error(`Checkout session with id ${checkoutId} not found`);
|
|
7262
|
+
return null;
|
|
7263
|
+
}
|
|
7264
|
+
return data;
|
|
7241
7265
|
}
|
|
7242
7266
|
/**
|
|
7243
7267
|
* Update a checkout session
|
|
7244
7268
|
*/
|
|
7245
|
-
updateCheckout(clientSecret, checkoutId, params) {
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
return data;
|
|
7257
|
-
});
|
|
7269
|
+
async updateCheckout(clientSecret, checkoutId, params) {
|
|
7270
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7271
|
+
const data = await apiClient.put(
|
|
7272
|
+
`/checkout/${checkoutId}`,
|
|
7273
|
+
params
|
|
7274
|
+
);
|
|
7275
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7276
|
+
console.error(`Checkout session with id ${checkoutId} not found`);
|
|
7277
|
+
return null;
|
|
7278
|
+
}
|
|
7279
|
+
return data;
|
|
7258
7280
|
}
|
|
7259
7281
|
/**
|
|
7260
7282
|
* Apply a discount code to a checkout session
|
|
7261
7283
|
*/
|
|
7262
|
-
applyDiscountCode(clientSecret, checkoutId, discountCode) {
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
return data;
|
|
7273
|
-
});
|
|
7284
|
+
async applyDiscountCode(clientSecret, checkoutId, discountCode) {
|
|
7285
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7286
|
+
const data = await apiClient.post(
|
|
7287
|
+
`/checkout/${checkoutId}/discounts/apply`,
|
|
7288
|
+
{ code: discountCode }
|
|
7289
|
+
);
|
|
7290
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7291
|
+
throw new Error("Failed to apply discount code");
|
|
7292
|
+
}
|
|
7293
|
+
return data;
|
|
7274
7294
|
}
|
|
7275
7295
|
/**
|
|
7276
7296
|
* Remove a discount code from a checkout session
|
|
7277
7297
|
*/
|
|
7278
|
-
removeDiscount(clientSecret, checkoutId, discountId) {
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
return data;
|
|
7288
|
-
});
|
|
7298
|
+
async removeDiscount(clientSecret, checkoutId, discountId) {
|
|
7299
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7300
|
+
const data = await apiClient.delete(
|
|
7301
|
+
`/checkout/${checkoutId}/discounts/${discountId}`
|
|
7302
|
+
);
|
|
7303
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7304
|
+
throw new Error("Failed to remove discount code");
|
|
7305
|
+
}
|
|
7306
|
+
return data;
|
|
7289
7307
|
}
|
|
7290
7308
|
/**
|
|
7291
7309
|
* Revalidate a checkout session
|
|
7292
7310
|
*/
|
|
7293
|
-
revalidateDiscounts(clientSecret, checkoutId) {
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
return data;
|
|
7304
|
-
});
|
|
7311
|
+
async revalidateDiscounts(clientSecret, checkoutId) {
|
|
7312
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7313
|
+
const data = await apiClient.get(
|
|
7314
|
+
`/checkout/${checkoutId}/discounts/revalidate`
|
|
7315
|
+
);
|
|
7316
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7317
|
+
console.error(`Checkout session with id ${checkoutId} not found`);
|
|
7318
|
+
return null;
|
|
7319
|
+
}
|
|
7320
|
+
return data;
|
|
7305
7321
|
}
|
|
7306
7322
|
/**
|
|
7307
7323
|
* Get shipping rates for a checkout session
|
|
7308
7324
|
*/
|
|
7309
|
-
getCheckoutShippingRates(clientSecret, checkoutId) {
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
return data;
|
|
7319
|
-
});
|
|
7325
|
+
async getCheckoutShippingRates(clientSecret, checkoutId) {
|
|
7326
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7327
|
+
const data = await apiClient.get(
|
|
7328
|
+
`/checkout/shipping/${checkoutId}`
|
|
7329
|
+
);
|
|
7330
|
+
if ("isError" in data && data.isError || !data || !Array.isArray(data)) {
|
|
7331
|
+
return [];
|
|
7332
|
+
}
|
|
7333
|
+
return data;
|
|
7320
7334
|
}
|
|
7321
7335
|
/**
|
|
7322
7336
|
* Generate payment secret for a checkout session
|
|
7323
7337
|
*/
|
|
7324
|
-
generateCheckoutPaymentSecret(clientSecret, checkoutId) {
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
};
|
|
7336
|
-
});
|
|
7338
|
+
async generateCheckoutPaymentSecret(clientSecret, checkoutId) {
|
|
7339
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7340
|
+
const data = await apiClient.post(`/checkout/payment/${checkoutId}`);
|
|
7341
|
+
if ("isError" in data && data.isError || !data || !("paymentSecret" in data)) {
|
|
7342
|
+
throw new Error("Failed to generate payment secret");
|
|
7343
|
+
}
|
|
7344
|
+
return {
|
|
7345
|
+
paymentSecret: data.paymentSecret,
|
|
7346
|
+
publicKey: data.publicKey,
|
|
7347
|
+
checkoutSession: data.checkoutSession
|
|
7348
|
+
};
|
|
7337
7349
|
}
|
|
7338
7350
|
/**
|
|
7339
7351
|
* Create a new customer
|
|
7340
7352
|
*/
|
|
7341
|
-
createCustomer(clientSecret, params) {
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
|
|
7350
|
-
|
|
7351
|
-
return data;
|
|
7352
|
-
});
|
|
7353
|
+
async createCustomer(clientSecret, params) {
|
|
7354
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7355
|
+
const data = await apiClient.post(
|
|
7356
|
+
"/customer",
|
|
7357
|
+
params
|
|
7358
|
+
);
|
|
7359
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7360
|
+
throw new Error("Failed to create customer");
|
|
7361
|
+
}
|
|
7362
|
+
return data;
|
|
7353
7363
|
}
|
|
7354
7364
|
/**
|
|
7355
7365
|
* Retrieve a customer by ID or email
|
|
7356
7366
|
*/
|
|
7357
|
-
retrieveCustomer(clientSecret, idOrEmail) {
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
return data;
|
|
7368
|
-
});
|
|
7367
|
+
async retrieveCustomer(clientSecret, idOrEmail) {
|
|
7368
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7369
|
+
const data = await apiClient.get(
|
|
7370
|
+
`/customer/${idOrEmail}`
|
|
7371
|
+
);
|
|
7372
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7373
|
+
console.error(`Customer with id or email ${idOrEmail} not found`);
|
|
7374
|
+
return null;
|
|
7375
|
+
}
|
|
7376
|
+
return data;
|
|
7369
7377
|
}
|
|
7370
7378
|
/**
|
|
7371
7379
|
* Update a customer
|
|
7372
7380
|
*/
|
|
7373
|
-
updateCustomer(clientSecret, customerId, params) {
|
|
7374
|
-
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7381
|
-
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
return data;
|
|
7385
|
-
});
|
|
7381
|
+
async updateCustomer(clientSecret, customerId, params) {
|
|
7382
|
+
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7383
|
+
const data = await apiClient.put(
|
|
7384
|
+
`/customer/${customerId}`,
|
|
7385
|
+
params
|
|
7386
|
+
);
|
|
7387
|
+
if ("isError" in data && data.isError || !data || !("id" in data)) {
|
|
7388
|
+
console.error(`Customer with id ${customerId} not found`);
|
|
7389
|
+
return null;
|
|
7390
|
+
}
|
|
7391
|
+
return data;
|
|
7386
7392
|
}
|
|
7387
7393
|
};
|
|
7388
7394
|
var client_default = Client;
|
|
@@ -7453,12 +7459,12 @@ var currencyLocales = {
|
|
|
7453
7459
|
// Turkish Lira
|
|
7454
7460
|
};
|
|
7455
7461
|
var Helpers = class {
|
|
7462
|
+
proxy;
|
|
7456
7463
|
constructor(proxy) {
|
|
7457
7464
|
this.proxy = proxy;
|
|
7458
7465
|
}
|
|
7459
7466
|
formatCurrency(currency) {
|
|
7460
|
-
|
|
7461
|
-
const locale = (_a = currencyLocales[currency.toUpperCase()]) != null ? _a : void 0;
|
|
7467
|
+
const locale = currencyLocales[currency.toUpperCase()] ?? void 0;
|
|
7462
7468
|
const formattedCurrency = new Intl.NumberFormat(locale, {
|
|
7463
7469
|
style: "currency",
|
|
7464
7470
|
currency,
|
|
@@ -7467,10 +7473,9 @@ var Helpers = class {
|
|
|
7467
7473
|
return formattedCurrency.format(0).replace(/[\d.,\s]/g, "").trim();
|
|
7468
7474
|
}
|
|
7469
7475
|
formatPrice(priceInCents, currency, exchangeRate) {
|
|
7470
|
-
|
|
7471
|
-
const amount = priceInCents / 100 * (exchangeRate != null ? exchangeRate : 1);
|
|
7476
|
+
const amount = priceInCents / 100 * (exchangeRate ?? 1);
|
|
7472
7477
|
const isWhole = amount % 1 === 0;
|
|
7473
|
-
const locale =
|
|
7478
|
+
const locale = currencyLocales[currency.toUpperCase()] ?? void 0;
|
|
7474
7479
|
const formattedPrice = new Intl.NumberFormat(locale, {
|
|
7475
7480
|
style: "currency",
|
|
7476
7481
|
currency,
|
|
@@ -7480,32 +7485,42 @@ var Helpers = class {
|
|
|
7480
7485
|
}).format(amount);
|
|
7481
7486
|
return formattedPrice;
|
|
7482
7487
|
}
|
|
7483
|
-
getExchangeRate(baseCurrency, targetCurrency) {
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7488
|
+
async getExchangeRate(baseCurrency, targetCurrency) {
|
|
7489
|
+
const apiClient = createApiClient("", this.proxy);
|
|
7490
|
+
const { data } = await apiClient.get(`/helpers/rates/${baseCurrency}`);
|
|
7491
|
+
const rate = data.rates[targetCurrency];
|
|
7492
|
+
if (!rate) {
|
|
7493
|
+
throw new Error("Could not get exchange rate for target currency");
|
|
7494
|
+
}
|
|
7495
|
+
return rate;
|
|
7496
|
+
}
|
|
7497
|
+
async getAutocompleteAddressResults(query, locale) {
|
|
7498
|
+
const apiClient = createApiClient("", this.proxy);
|
|
7499
|
+
const { data } = await apiClient.get(
|
|
7500
|
+
`/helpers/autocomplete-address/${query}`,
|
|
7501
|
+
{
|
|
7502
|
+
params: {
|
|
7503
|
+
locale
|
|
7504
|
+
}
|
|
7490
7505
|
}
|
|
7491
|
-
|
|
7492
|
-
|
|
7506
|
+
);
|
|
7507
|
+
return data;
|
|
7493
7508
|
}
|
|
7494
7509
|
};
|
|
7495
7510
|
var helpers_default = Helpers;
|
|
7496
7511
|
function createStoreClient(config) {
|
|
7497
|
-
return new client_default(config
|
|
7512
|
+
return new client_default(config?.proxy);
|
|
7498
7513
|
}
|
|
7499
7514
|
function createStoreHelpers(config) {
|
|
7500
|
-
return new helpers_default(
|
|
7515
|
+
return new helpers_default(config?.proxy);
|
|
7501
7516
|
}
|
|
7502
7517
|
|
|
7503
|
-
var css_248z = "/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: var(--font-sans), Helvetica, Arial, apple-system, sans-serif;\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-lg: 32rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-base: 1rem;\n --text-base--line-height: calc(1.5 / 1);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --tracking-tight: -0.025em;\n --tracking-widest: 0.1em;\n --radius-xs: 0.125rem;\n --animate-spin: spin 1s linear infinite;\n --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans), Helvetica, Arial, apple-system, sans-serif;\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::-moz-placeholder {\n opacity: 1;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::-moz-placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n -webkit-appearance: button;\n -moz-appearance: button;\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .sticky {\n position: sticky;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .-top-2 {\n top: calc(var(--spacing) * -2);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-0\\.5 {\n top: calc(var(--spacing) * 0.5);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .top-4 {\n top: calc(var(--spacing) * 4);\n }\n .top-\\[50\\%\\] {\n top: 50%;\n }\n .-right-2 {\n right: calc(var(--spacing) * -2);\n }\n .right-2 {\n right: calc(var(--spacing) * 2);\n }\n .right-4 {\n right: calc(var(--spacing) * 4);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-2 {\n left: calc(var(--spacing) * 2);\n }\n .left-\\[50\\%\\] {\n left: 50%;\n }\n .z-10 {\n z-index: 10;\n }\n .z-50 {\n z-index: 50;\n }\n .order-3 {\n order: 3;\n }\n .order-4 {\n order: 4;\n }\n .order-5 {\n order: 5;\n }\n .order-6 {\n order: 6;\n }\n .order-7 {\n order: 7;\n }\n .order-first {\n order: -9999;\n }\n .col-span-2 {\n grid-column: span 2 / span 2;\n }\n .-m-0\\.5 {\n margin: calc(var(--spacing) * -0.5);\n }\n .-mx-1 {\n margin-inline: calc(var(--spacing) * -1);\n }\n .mx-auto {\n margin-inline: auto;\n }\n .my-1 {\n margin-block: calc(var(--spacing) * 1);\n }\n .my-2 {\n margin-block: calc(var(--spacing) * 2);\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-8 {\n margin-top: calc(var(--spacing) * 8);\n }\n .-mb-0\\.5 {\n margin-bottom: calc(var(--spacing) * -0.5);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .ml-4 {\n margin-left: calc(var(--spacing) * 4);\n }\n .ml-auto {\n margin-left: auto;\n }\n .line-clamp-1 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .hidden {\n display: none;\n }\n .inline-flex {\n display: inline-flex;\n }\n .aspect-square {\n aspect-ratio: 1 / 1;\n }\n .size-2 {\n width: calc(var(--spacing) * 2);\n height: calc(var(--spacing) * 2);\n }\n .size-3 {\n width: calc(var(--spacing) * 3);\n height: calc(var(--spacing) * 3);\n }\n .size-3\\.5 {\n width: calc(var(--spacing) * 3.5);\n height: calc(var(--spacing) * 3.5);\n }\n .size-4 {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n }\n .size-5 {\n width: calc(var(--spacing) * 5);\n height: calc(var(--spacing) * 5);\n }\n .size-9 {\n width: calc(var(--spacing) * 9);\n height: calc(var(--spacing) * 9);\n }\n .size-16 {\n width: calc(var(--spacing) * 16);\n height: calc(var(--spacing) * 16);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-3\\.5 {\n height: calc(var(--spacing) * 3.5);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-6 {\n height: calc(var(--spacing) * 6);\n }\n .h-8 {\n height: calc(var(--spacing) * 8);\n }\n .h-9 {\n height: calc(var(--spacing) * 9);\n }\n .h-10 {\n height: calc(var(--spacing) * 10);\n }\n .h-12 {\n height: calc(var(--spacing) * 12);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-\\[18px\\] {\n height: 18px;\n }\n .h-\\[20px\\] {\n height: 20px;\n }\n .h-\\[450px\\] {\n height: 450px;\n }\n .h-\\[var\\(--radix-select-trigger-height\\)\\] {\n height: var(--radix-select-trigger-height);\n }\n .h-auto {\n height: auto;\n }\n .h-auto\\! {\n height: auto !important;\n }\n .h-full {\n height: 100%;\n }\n .h-max {\n height: -moz-max-content;\n height: max-content;\n }\n .h-px {\n height: 1px;\n }\n .max-h-\\(--radix-dropdown-menu-content-available-height\\) {\n max-height: var(--radix-dropdown-menu-content-available-height);\n }\n .max-h-96 {\n max-height: calc(var(--spacing) * 96);\n }\n .max-h-\\[200px\\] {\n max-height: 200px;\n }\n .max-h-\\[300px\\] {\n max-height: 300px;\n }\n .min-h-full {\n min-height: 100%;\n }\n .min-h-screen {\n min-height: 100vh;\n }\n .w-0 {\n width: calc(var(--spacing) * 0);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-6 {\n width: calc(var(--spacing) * 6);\n }\n .w-10 {\n width: calc(var(--spacing) * 10);\n }\n .w-12 {\n width: calc(var(--spacing) * 12);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-20 {\n width: calc(var(--spacing) * 20);\n }\n .w-24 {\n width: calc(var(--spacing) * 24);\n }\n .w-28 {\n width: calc(var(--spacing) * 28);\n }\n .w-32 {\n width: calc(var(--spacing) * 32);\n }\n .w-40 {\n width: calc(var(--spacing) * 40);\n }\n .w-72 {\n width: calc(var(--spacing) * 72);\n }\n .w-fit {\n width: -moz-fit-content;\n width: fit-content;\n }\n .w-full {\n width: 100%;\n }\n .max-w-\\[1200px\\] {\n max-width: 1200px;\n }\n .max-w-\\[calc\\(100\\%-2rem\\)\\] {\n max-width: calc(100% - 2rem);\n }\n .min-w-0 {\n min-width: calc(var(--spacing) * 0);\n }\n .min-w-\\[--radix-popper-anchor-width\\] {\n min-width: --radix-popper-anchor-width;\n }\n .min-w-\\[8rem\\] {\n min-width: 8rem;\n }\n .min-w-\\[var\\(--radix-select-trigger-width\\)\\] {\n min-width: var(--radix-select-trigger-width);\n }\n .flex-1 {\n flex: 1;\n }\n .shrink-0 {\n flex-shrink: 0;\n }\n .flex-grow {\n flex-grow: 1;\n }\n .origin-\\(--radix-dropdown-menu-content-transform-origin\\) {\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n }\n .origin-\\(--radix-popover-content-transform-origin\\) {\n transform-origin: var(--radix-popover-content-transform-origin);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-x-\\[-50\\%\\] {\n --tw-translate-x: -50%;\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-\\[-50\\%\\] {\n --tw-translate-y: -50%;\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .rotate-180 {\n rotate: 180deg;\n }\n .transform-none\\! {\n transform: none !important;\n }\n .animate-pulse {\n animation: var(--animate-pulse);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-default {\n cursor: default;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .scroll-my-1 {\n scroll-margin-block: calc(var(--spacing) * 1);\n }\n .scroll-py-1 {\n scroll-padding-block: calc(var(--spacing) * 1);\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-col-reverse {\n flex-direction: column-reverse;\n }\n .items-center {\n align-items: center;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-0\\.5 {\n gap: calc(var(--spacing) * 0.5);\n }\n .gap-1\\.5 {\n gap: calc(var(--spacing) * 1.5);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-5 {\n gap: calc(var(--spacing) * 5);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .gap-\\[10px\\] {\n gap: 10px;\n }\n .space-y-2 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-x-2 {\n :where(& > :not(:last-child)) {\n --tw-space-x-reverse: 0;\n margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));\n margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));\n }\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .overflow-x-hidden {\n overflow-x: hidden;\n }\n .overflow-y-auto {\n overflow-y: auto;\n }\n .rounded-\\[4px\\] {\n border-radius: 4px;\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius);\n }\n .rounded-md {\n border-radius: calc(var(--radius) - 2px);\n }\n .rounded-sm {\n border-radius: calc(var(--radius) - 4px);\n }\n .rounded-xs {\n border-radius: var(--radius-xs);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-0 {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-input {\n border-color: var(--input);\n }\n .border-primary {\n border-color: var(--primary);\n }\n .bg-accent {\n background-color: var(--accent);\n }\n .bg-background {\n background-color: var(--background);\n }\n .bg-black\\/50 {\n background-color: color-mix(in srgb, #000 50%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 50%, transparent);\n }\n }\n .bg-border {\n background-color: var(--border);\n }\n .bg-destructive {\n background-color: var(--destructive);\n }\n .bg-muted {\n background-color: var(--muted);\n }\n .bg-popover {\n background-color: var(--popover);\n }\n .bg-primary {\n background-color: var(--primary);\n }\n .bg-secondary {\n background-color: var(--secondary);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .fill-current {\n fill: currentcolor;\n }\n .fill-primary {\n fill: var(--primary);\n }\n .object-cover {\n -o-object-fit: cover;\n object-fit: cover;\n }\n .p-0 {\n padding: calc(var(--spacing) * 0);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-1\\.5 {\n padding-block: calc(var(--spacing) * 1.5);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .py-4 {\n padding-block: calc(var(--spacing) * 4);\n }\n .py-6 {\n padding-block: calc(var(--spacing) * 6);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pr-2 {\n padding-right: calc(var(--spacing) * 2);\n }\n .pr-8 {\n padding-right: calc(var(--spacing) * 8);\n }\n .pb-1 {\n padding-bottom: calc(var(--spacing) * 1);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-8 {\n padding-left: calc(var(--spacing) * 8);\n }\n .text-center {\n text-align: center;\n }\n .text-right {\n text-align: right;\n }\n .text-base {\n font-size: var(--text-base);\n line-height: var(--tw-leading, var(--text-base--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .leading-none {\n --tw-leading: 1;\n line-height: 1;\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .tracking-tight {\n --tw-tracking: var(--tracking-tight);\n letter-spacing: var(--tracking-tight);\n }\n .tracking-widest {\n --tw-tracking: var(--tracking-widest);\n letter-spacing: var(--tracking-widest);\n }\n .text-ellipsis {\n text-overflow: ellipsis;\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-background {\n color: var(--background);\n }\n .text-current {\n color: currentcolor;\n }\n .text-destructive {\n color: var(--destructive);\n }\n .text-destructive-foreground {\n color: var(--destructive-foreground);\n }\n .text-foreground {\n color: var(--foreground);\n }\n .text-muted-foreground {\n color: var(--muted-foreground);\n }\n .text-popover-foreground {\n color: var(--popover-foreground);\n }\n .text-primary {\n color: var(--primary);\n }\n .text-primary-foreground {\n color: var(--primary-foreground);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-secondary-foreground {\n color: var(--secondary-foreground);\n }\n .text-white {\n color: var(--color-white);\n }\n .line-through {\n text-decoration-line: line-through;\n }\n .underline-offset-4 {\n text-underline-offset: 4px;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .opacity-50 {\n opacity: 50%;\n }\n .opacity-70 {\n opacity: 70%;\n }\n .opacity-100 {\n opacity: 100%;\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-md {\n --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-sm {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-xs {\n --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring-offset-background {\n --tw-ring-offset-color: var(--background);\n }\n .outline-hidden {\n --tw-outline-style: none;\n outline-style: none;\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition-\\[color\\,box-shadow\\] {\n transition-property: color,box-shadow;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-none {\n transition-property: none;\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .outline-none {\n --tw-outline-style: none;\n outline-style: none;\n }\n .select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n .duration-200 {\n animation-duration: 200ms;\n }\n .group-data-\\[disabled\\=true\\]\\:pointer-events-none {\n &:is(:where(.group)[data-disabled=\"true\"] *) {\n pointer-events: none;\n }\n }\n .group-data-\\[disabled\\=true\\]\\:opacity-50 {\n &:is(:where(.group)[data-disabled=\"true\"] *) {\n opacity: 50%;\n }\n }\n .peer-disabled\\:cursor-not-allowed {\n &:is(:where(.peer):disabled ~ *) {\n cursor: not-allowed;\n }\n }\n .peer-disabled\\:opacity-50 {\n &:is(:where(.peer):disabled ~ *) {\n opacity: 50%;\n }\n }\n .selection\\:bg-primary {\n & *::-moz-selection {\n background-color: var(--primary);\n }\n & *::selection {\n background-color: var(--primary);\n }\n &::-moz-selection {\n background-color: var(--primary);\n }\n &::selection {\n background-color: var(--primary);\n }\n }\n .selection\\:text-primary-foreground {\n & *::-moz-selection {\n color: var(--primary-foreground);\n }\n & *::selection {\n color: var(--primary-foreground);\n }\n &::-moz-selection {\n color: var(--primary-foreground);\n }\n &::selection {\n color: var(--primary-foreground);\n }\n }\n .file\\:inline-flex {\n &::file-selector-button {\n display: inline-flex;\n }\n }\n .file\\:h-7 {\n &::file-selector-button {\n height: calc(var(--spacing) * 7);\n }\n }\n .file\\:border-0 {\n &::file-selector-button {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .file\\:bg-transparent {\n &::file-selector-button {\n background-color: transparent;\n }\n }\n .file\\:text-sm {\n &::file-selector-button {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n }\n .file\\:font-medium {\n &::file-selector-button {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n }\n .file\\:text-foreground {\n &::file-selector-button {\n color: var(--foreground);\n }\n }\n .placeholder\\:text-muted-foreground {\n &::-moz-placeholder {\n color: var(--muted-foreground);\n }\n &::placeholder {\n color: var(--muted-foreground);\n }\n }\n .hover\\:bg-accent {\n &:hover {\n @media (hover: hover) {\n background-color: var(--accent);\n }\n }\n }\n .hover\\:bg-destructive\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--destructive) 90%, transparent);\n }\n }\n }\n }\n .hover\\:bg-muted {\n &:hover {\n @media (hover: hover) {\n background-color: var(--muted);\n }\n }\n }\n .hover\\:bg-primary\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--primary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--primary) 90%, transparent);\n }\n }\n }\n }\n .hover\\:bg-secondary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--secondary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--secondary) 80%, transparent);\n }\n }\n }\n }\n .hover\\:text-accent-foreground {\n &:hover {\n @media (hover: hover) {\n color: var(--accent-foreground);\n }\n }\n }\n .hover\\:text-foreground {\n &:hover {\n @media (hover: hover) {\n color: var(--foreground);\n }\n }\n }\n .hover\\:underline {\n &:hover {\n @media (hover: hover) {\n text-decoration-line: underline;\n }\n }\n }\n .hover\\:opacity-100 {\n &:hover {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .focus\\:bg-accent {\n &:focus {\n background-color: var(--accent);\n }\n }\n .focus\\:text-accent-foreground {\n &:focus {\n color: var(--accent-foreground);\n }\n }\n .focus\\:ring-1 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-ring {\n &:focus {\n --tw-ring-color: var(--ring);\n }\n }\n .focus\\:ring-offset-2 {\n &:focus {\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-hidden {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .focus-visible\\:border-ring {\n &:focus-visible {\n border-color: var(--ring);\n }\n }\n .focus-visible\\:ring-\\[3px\\] {\n &:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus-visible\\:ring-destructive\\/20 {\n &:focus-visible {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 20%, transparent);\n }\n }\n }\n .focus-visible\\:ring-ring\\/50 {\n &:focus-visible {\n --tw-ring-color: var(--ring);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--ring) 50%, transparent);\n }\n }\n }\n .disabled\\:pointer-events-none {\n &:disabled {\n pointer-events: none;\n }\n }\n .disabled\\:cursor-not-allowed {\n &:disabled {\n cursor: not-allowed;\n }\n }\n .disabled\\:opacity-50 {\n &:disabled {\n opacity: 50%;\n }\n }\n .has-\\[\\>svg\\]\\:px-2\\.5 {\n &:has(>svg) {\n padding-inline: calc(var(--spacing) * 2.5);\n }\n }\n .has-\\[\\>svg\\]\\:px-3 {\n &:has(>svg) {\n padding-inline: calc(var(--spacing) * 3);\n }\n }\n .has-\\[\\>svg\\]\\:px-4 {\n &:has(>svg) {\n padding-inline: calc(var(--spacing) * 4);\n }\n }\n .aria-invalid\\:border-destructive {\n &[aria-invalid=\"true\"] {\n border-color: var(--destructive);\n }\n }\n .aria-invalid\\:ring-destructive\\/20 {\n &[aria-invalid=\"true\"] {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 20%, transparent);\n }\n }\n }\n .data-\\[disabled\\]\\:pointer-events-none {\n &[data-disabled] {\n pointer-events: none;\n }\n }\n .data-\\[disabled\\]\\:opacity-50 {\n &[data-disabled] {\n opacity: 50%;\n }\n }\n .data-\\[disabled\\=true\\]\\:pointer-events-none {\n &[data-disabled=\"true\"] {\n pointer-events: none;\n }\n }\n .data-\\[disabled\\=true\\]\\:opacity-50 {\n &[data-disabled=\"true\"] {\n opacity: 50%;\n }\n }\n .data-\\[error\\=true\\]\\:text-destructive-foreground {\n &[data-error=\"true\"] {\n color: var(--destructive-foreground);\n }\n }\n .data-\\[inset\\]\\:pl-8 {\n &[data-inset] {\n padding-left: calc(var(--spacing) * 8);\n }\n }\n .data-\\[placeholder\\]\\:text-muted-foreground {\n &[data-placeholder] {\n color: var(--muted-foreground);\n }\n }\n .data-\\[selected\\=true\\]\\:bg-accent {\n &[data-selected=\"true\"] {\n background-color: var(--accent);\n }\n }\n .data-\\[selected\\=true\\]\\:text-accent-foreground {\n &[data-selected=\"true\"] {\n color: var(--accent-foreground);\n }\n }\n .data-\\[side\\=bottom\\]\\:translate-y-1 {\n &[data-side=\"bottom\"] {\n --tw-translate-y: calc(var(--spacing) * 1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=bottom\\]\\:slide-in-from-top-2 {\n &[data-side=\"bottom\"] {\n --tw-enter-translate-y: -0.5rem;\n }\n }\n .data-\\[side\\=left\\]\\:-translate-x-1 {\n &[data-side=\"left\"] {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=left\\]\\:slide-in-from-right-2 {\n &[data-side=\"left\"] {\n --tw-enter-translate-x: 0.5rem;\n }\n }\n .data-\\[side\\=right\\]\\:translate-x-1 {\n &[data-side=\"right\"] {\n --tw-translate-x: calc(var(--spacing) * 1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=right\\]\\:slide-in-from-left-2 {\n &[data-side=\"right\"] {\n --tw-enter-translate-x: -0.5rem;\n }\n }\n .data-\\[side\\=top\\]\\:-translate-y-1 {\n &[data-side=\"top\"] {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=top\\]\\:slide-in-from-bottom-2 {\n &[data-side=\"top\"] {\n --tw-enter-translate-y: 0.5rem;\n }\n }\n .\\*\\*\\:data-\\[slot\\=command-input-wrapper\\]\\:h-12 {\n :is(& *) {\n &[data-slot=\"command-input-wrapper\"] {\n height: calc(var(--spacing) * 12);\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1 {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:flex {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n display: flex;\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:items-center {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n align-items: center;\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:gap-2 {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n gap: calc(var(--spacing) * 2);\n }\n }\n }\n .data-\\[state\\=checked\\]\\:border-primary {\n &[data-state=\"checked\"] {\n border-color: var(--primary);\n }\n }\n .data-\\[state\\=checked\\]\\:bg-primary {\n &[data-state=\"checked\"] {\n background-color: var(--primary);\n }\n }\n .data-\\[state\\=checked\\]\\:text-primary-foreground {\n &[data-state=\"checked\"] {\n color: var(--primary-foreground);\n }\n }\n .data-\\[state\\=closed\\]\\:animate-out {\n &[data-state=\"closed\"] {\n animation-name: exit;\n animation-duration: 150ms;\n --tw-exit-opacity: initial;\n --tw-exit-scale: initial;\n --tw-exit-rotate: initial;\n --tw-exit-translate-x: initial;\n --tw-exit-translate-y: initial;\n }\n }\n .data-\\[state\\=closed\\]\\:fade-out-0 {\n &[data-state=\"closed\"] {\n --tw-exit-opacity: 0;\n }\n }\n .data-\\[state\\=closed\\]\\:zoom-out-95 {\n &[data-state=\"closed\"] {\n --tw-exit-scale: .95;\n }\n }\n .data-\\[state\\=open\\]\\:bg-accent {\n &[data-state=\"open\"] {\n background-color: var(--accent);\n }\n }\n .data-\\[state\\=open\\]\\:text-accent-foreground {\n &[data-state=\"open\"] {\n color: var(--accent-foreground);\n }\n }\n .data-\\[state\\=open\\]\\:text-muted-foreground {\n &[data-state=\"open\"] {\n color: var(--muted-foreground);\n }\n }\n .data-\\[state\\=open\\]\\:animate-in {\n &[data-state=\"open\"] {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n }\n }\n .data-\\[state\\=open\\]\\:fade-in-0 {\n &[data-state=\"open\"] {\n --tw-enter-opacity: 0;\n }\n }\n .data-\\[state\\=open\\]\\:zoom-in-95 {\n &[data-state=\"open\"] {\n --tw-enter-scale: .95;\n }\n }\n .data-\\[variant\\=destructive\\]\\:text-destructive {\n &[data-variant=\"destructive\"] {\n color: var(--destructive);\n }\n }\n .data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10 {\n &[data-variant=\"destructive\"] {\n &:focus {\n background-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--destructive) 10%, transparent);\n }\n }\n }\n }\n .data-\\[variant\\=destructive\\]\\:focus\\:text-destructive {\n &[data-variant=\"destructive\"] {\n &:focus {\n color: var(--destructive);\n }\n }\n }\n .max-md\\:cursor-pointer {\n @media (width < 48rem) {\n cursor: pointer;\n }\n }\n .max-sm\\:hidden {\n @media (width < 40rem) {\n display: none;\n }\n }\n .sm\\:max-h-\\[270px\\] {\n @media (width >= 40rem) {\n max-height: 270px;\n }\n }\n .sm\\:max-w-\\[500px\\] {\n @media (width >= 40rem) {\n max-width: 500px;\n }\n }\n .sm\\:max-w-lg {\n @media (width >= 40rem) {\n max-width: var(--container-lg);\n }\n }\n .sm\\:flex-row {\n @media (width >= 40rem) {\n flex-direction: row;\n }\n }\n .sm\\:justify-end {\n @media (width >= 40rem) {\n justify-content: flex-end;\n }\n }\n .sm\\:text-left {\n @media (width >= 40rem) {\n text-align: left;\n }\n }\n .md\\:order-last {\n @media (width >= 48rem) {\n order: 9999;\n }\n }\n .md\\:order-none {\n @media (width >= 48rem) {\n order: 0;\n }\n }\n .md\\:col-span-2 {\n @media (width >= 48rem) {\n grid-column: span 2 / span 2;\n }\n }\n .md\\:col-span-3 {\n @media (width >= 48rem) {\n grid-column: span 3 / span 3;\n }\n }\n .md\\:col-span-4 {\n @media (width >= 48rem) {\n grid-column: span 4 / span 4;\n }\n }\n .md\\:block {\n @media (width >= 48rem) {\n display: block;\n }\n }\n .md\\:flex {\n @media (width >= 48rem) {\n display: flex;\n }\n }\n .md\\:grid {\n @media (width >= 48rem) {\n display: grid;\n }\n }\n .md\\:hidden {\n @media (width >= 48rem) {\n display: none;\n }\n }\n .md\\:max-w-\\[75\\%\\] {\n @media (width >= 48rem) {\n max-width: 75%;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .md\\:grid-cols-7 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(7, minmax(0, 1fr));\n }\n }\n .md\\:gap-0 {\n @media (width >= 48rem) {\n gap: calc(var(--spacing) * 0);\n }\n }\n .md\\:px-8 {\n @media (width >= 48rem) {\n padding-inline: calc(var(--spacing) * 8);\n }\n }\n .md\\:py-12 {\n @media (width >= 48rem) {\n padding-block: calc(var(--spacing) * 12);\n }\n }\n .md\\:text-sm {\n @media (width >= 48rem) {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n }\n .dark\\:focus-visible\\:ring-destructive\\/40 {\n @media (prefers-color-scheme: dark) {\n &:focus-visible {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);\n }\n }\n }\n }\n .dark\\:aria-invalid\\:ring-destructive\\/40 {\n @media (prefers-color-scheme: dark) {\n &[aria-invalid=\"true\"] {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);\n }\n }\n }\n }\n .dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20 {\n @media (prefers-color-scheme: dark) {\n &[data-variant=\"destructive\"] {\n &:focus {\n background-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--destructive) 20%, transparent);\n }\n }\n }\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 {\n & [cmdk-group-heading] {\n padding-inline: calc(var(--spacing) * 2);\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 {\n & [cmdk-group-heading] {\n padding-block: calc(var(--spacing) * 1.5);\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs {\n & [cmdk-group-heading] {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium {\n & [cmdk-group-heading] {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-muted-foreground {\n & [cmdk-group-heading] {\n color: var(--muted-foreground);\n }\n }\n .\\[\\&_\\[cmdk-group\\]\\]\\:px-2 {\n & [cmdk-group] {\n padding-inline: calc(var(--spacing) * 2);\n }\n }\n .\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 {\n & [cmdk-group]:not([hidden]) ~[cmdk-group] {\n padding-top: calc(var(--spacing) * 0);\n }\n }\n .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 {\n & [cmdk-input-wrapper] svg {\n height: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 {\n & [cmdk-input-wrapper] svg {\n width: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_\\[cmdk-input\\]\\]\\:h-12 {\n & [cmdk-input] {\n height: calc(var(--spacing) * 12);\n }\n }\n .\\[\\&_\\[cmdk-item\\]\\]\\:px-2 {\n & [cmdk-item] {\n padding-inline: calc(var(--spacing) * 2);\n }\n }\n .\\[\\&_\\[cmdk-item\\]\\]\\:py-3 {\n & [cmdk-item] {\n padding-block: calc(var(--spacing) * 3);\n }\n }\n .\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 {\n & [cmdk-item] svg {\n height: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 {\n & [cmdk-item] svg {\n width: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_svg\\]\\:pointer-events-none {\n & svg {\n pointer-events: none;\n }\n }\n .\\[\\&_svg\\]\\:shrink-0 {\n & svg {\n flex-shrink: 0;\n }\n }\n .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 {\n & svg:not([class*='size-']) {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground {\n & svg:not([class*='text-']) {\n color: var(--muted-foreground);\n }\n }\n .\\*\\:\\[span\\]\\:last\\:flex {\n :is(& > *) {\n &:is(span) {\n &:last-child {\n display: flex;\n }\n }\n }\n }\n .\\*\\:\\[span\\]\\:last\\:items-center {\n :is(& > *) {\n &:is(span) {\n &:last-child {\n align-items: center;\n }\n }\n }\n }\n .\\*\\:\\[span\\]\\:last\\:gap-2 {\n :is(& > *) {\n &:is(span) {\n &:last-child {\n gap: calc(var(--spacing) * 2);\n }\n }\n }\n }\n .data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive {\n &[data-variant=\"destructive\"] {\n :is(& > *) {\n &:is(svg) {\n color: var(--destructive) !important;\n }\n }\n }\n }\n .\\[\\&\\>span\\]\\:line-clamp-1 {\n &>span {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n }\n}\n:root {\n --background: oklch(1 0 0);\n --foreground: oklch(0.145 0 0);\n --card: oklch(1 0 0);\n --card-foreground: oklch(0.145 0 0);\n --popover: oklch(1 0 0);\n --popover-foreground: oklch(0.145 0 0);\n --primary: oklch(0.205 0 0);\n --primary-foreground: oklch(0.985 0 0);\n --secondary: oklch(0.97 0 0);\n --secondary-foreground: oklch(0.205 0 0);\n --muted: oklch(0.97 0 0);\n --muted-foreground: oklch(0.556 0 0);\n --accent: oklch(0.97 0 0);\n --accent-foreground: oklch(0.205 0 0);\n --destructive: oklch(0.577 0.245 27.325);\n --destructive-foreground: oklch(0.577 0.245 27.325);\n --border: oklch(0.922 0 0);\n --input: oklch(0.922 0 0);\n --ring: oklch(0.708 0 0);\n --chart-1: oklch(0.646 0.222 41.116);\n --chart-2: oklch(0.6 0.118 184.704);\n --chart-3: oklch(0.398 0.07 227.392);\n --chart-4: oklch(0.828 0.189 84.429);\n --chart-5: oklch(0.769 0.188 70.08);\n --radius: 0.625rem;\n --sidebar: oklch(0.985 0 0);\n --sidebar-foreground: oklch(0.145 0 0);\n --sidebar-primary: oklch(0.205 0 0);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.97 0 0);\n --sidebar-accent-foreground: oklch(0.205 0 0);\n --sidebar-border: oklch(0.922 0 0);\n --sidebar-ring: oklch(0.708 0 0);\n}\n@layer base {\n * {\n border-color: var(--border);\n outline-color: var(--ring);\n @supports (color: color-mix(in lab, red, red)) {\n outline-color: color-mix(in oklab, var(--ring) 50%, transparent);\n }\n }\n .checkout-embed {\n background-color: var(--background);\n font-family: var(--font-sans), Helvetica, Arial, apple-system, sans-serif;\n color: var(--foreground);\n }\n h2 {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n --tw-tracking: var(--tracking-tight);\n letter-spacing: var(--tracking-tight);\n }\n p {\n --tw-tracking: var(--tracking-tight) !important;\n letter-spacing: var(--tracking-tight) !important;\n }\n}\n@layer utilities {\n .scrollbar-hidden {\n scrollbar-width: none;\n }\n .scrollbar-hidden::-webkit-scrollbar {\n display: none;\n }\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-space-x-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-leading {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-tracking {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-space-y-reverse: 0;\n --tw-space-x-reverse: 0;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n";
|
|
7518
|
+
var css_248z = "/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: var(--font-sans), Helvetica, Arial, apple-system, sans-serif;\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-lg: 32rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-base: 1rem;\n --text-base--line-height: calc(1.5 / 1);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --tracking-tight: -0.025em;\n --tracking-widest: 0.1em;\n --radius-xs: 0.125rem;\n --animate-spin: spin 1s linear infinite;\n --animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans), Helvetica, Arial, apple-system, sans-serif;\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::-moz-placeholder {\n opacity: 1;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::-moz-placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n -webkit-appearance: button;\n -moz-appearance: button;\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .sticky {\n position: sticky;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .-top-2 {\n top: calc(var(--spacing) * -2);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-0\\.5 {\n top: calc(var(--spacing) * 0.5);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .top-4 {\n top: calc(var(--spacing) * 4);\n }\n .top-\\[50\\%\\] {\n top: 50%;\n }\n .-right-2 {\n right: calc(var(--spacing) * -2);\n }\n .right-2 {\n right: calc(var(--spacing) * 2);\n }\n .right-4 {\n right: calc(var(--spacing) * 4);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-2 {\n left: calc(var(--spacing) * 2);\n }\n .left-\\[50\\%\\] {\n left: 50%;\n }\n .z-10 {\n z-index: 10;\n }\n .z-50 {\n z-index: 50;\n }\n .order-3 {\n order: 3;\n }\n .order-4 {\n order: 4;\n }\n .order-5 {\n order: 5;\n }\n .order-6 {\n order: 6;\n }\n .order-7 {\n order: 7;\n }\n .order-first {\n order: -9999;\n }\n .col-span-2 {\n grid-column: span 2 / span 2;\n }\n .-m-0\\.5 {\n margin: calc(var(--spacing) * -0.5);\n }\n .-mx-1 {\n margin-inline: calc(var(--spacing) * -1);\n }\n .mx-auto {\n margin-inline: auto;\n }\n .my-1 {\n margin-block: calc(var(--spacing) * 1);\n }\n .my-2 {\n margin-block: calc(var(--spacing) * 2);\n }\n .mt-2 {\n margin-top: calc(var(--spacing) * 2);\n }\n .mt-8 {\n margin-top: calc(var(--spacing) * 8);\n }\n .-mb-0\\.5 {\n margin-bottom: calc(var(--spacing) * -0.5);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .ml-4 {\n margin-left: calc(var(--spacing) * 4);\n }\n .ml-auto {\n margin-left: auto;\n }\n .line-clamp-1 {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .hidden {\n display: none;\n }\n .inline-flex {\n display: inline-flex;\n }\n .aspect-square {\n aspect-ratio: 1 / 1;\n }\n .size-2 {\n width: calc(var(--spacing) * 2);\n height: calc(var(--spacing) * 2);\n }\n .size-3 {\n width: calc(var(--spacing) * 3);\n height: calc(var(--spacing) * 3);\n }\n .size-3\\.5 {\n width: calc(var(--spacing) * 3.5);\n height: calc(var(--spacing) * 3.5);\n }\n .size-4 {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n }\n .size-5 {\n width: calc(var(--spacing) * 5);\n height: calc(var(--spacing) * 5);\n }\n .size-9 {\n width: calc(var(--spacing) * 9);\n height: calc(var(--spacing) * 9);\n }\n .size-16 {\n width: calc(var(--spacing) * 16);\n height: calc(var(--spacing) * 16);\n }\n .h-3 {\n height: calc(var(--spacing) * 3);\n }\n .h-3\\.5 {\n height: calc(var(--spacing) * 3.5);\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-6 {\n height: calc(var(--spacing) * 6);\n }\n .h-8 {\n height: calc(var(--spacing) * 8);\n }\n .h-9 {\n height: calc(var(--spacing) * 9);\n }\n .h-10 {\n height: calc(var(--spacing) * 10);\n }\n .h-12 {\n height: calc(var(--spacing) * 12);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-\\[18px\\] {\n height: 18px;\n }\n .h-\\[20px\\] {\n height: 20px;\n }\n .h-\\[450px\\] {\n height: 450px;\n }\n .h-\\[var\\(--radix-select-trigger-height\\)\\] {\n height: var(--radix-select-trigger-height);\n }\n .h-auto {\n height: auto;\n }\n .h-auto\\! {\n height: auto !important;\n }\n .h-full {\n height: 100%;\n }\n .h-max {\n height: -moz-max-content;\n height: max-content;\n }\n .h-px {\n height: 1px;\n }\n .max-h-\\(--radix-dropdown-menu-content-available-height\\) {\n max-height: var(--radix-dropdown-menu-content-available-height);\n }\n .max-h-96 {\n max-height: calc(var(--spacing) * 96);\n }\n .max-h-\\[200px\\] {\n max-height: 200px;\n }\n .max-h-\\[300px\\] {\n max-height: 300px;\n }\n .min-h-full {\n min-height: 100%;\n }\n .min-h-screen {\n min-height: 100vh;\n }\n .w-0 {\n width: calc(var(--spacing) * 0);\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-6 {\n width: calc(var(--spacing) * 6);\n }\n .w-10 {\n width: calc(var(--spacing) * 10);\n }\n .w-12 {\n width: calc(var(--spacing) * 12);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-20 {\n width: calc(var(--spacing) * 20);\n }\n .w-24 {\n width: calc(var(--spacing) * 24);\n }\n .w-28 {\n width: calc(var(--spacing) * 28);\n }\n .w-32 {\n width: calc(var(--spacing) * 32);\n }\n .w-40 {\n width: calc(var(--spacing) * 40);\n }\n .w-72 {\n width: calc(var(--spacing) * 72);\n }\n .w-fit {\n width: -moz-fit-content;\n width: fit-content;\n }\n .w-full {\n width: 100%;\n }\n .max-w-\\[1200px\\] {\n max-width: 1200px;\n }\n .max-w-\\[calc\\(100\\%-2rem\\)\\] {\n max-width: calc(100% - 2rem);\n }\n .min-w-0 {\n min-width: calc(var(--spacing) * 0);\n }\n .min-w-\\[--radix-popper-anchor-width\\] {\n min-width: --radix-popper-anchor-width;\n }\n .min-w-\\[8rem\\] {\n min-width: 8rem;\n }\n .min-w-\\[var\\(--radix-select-trigger-width\\)\\] {\n min-width: var(--radix-select-trigger-width);\n }\n .flex-1 {\n flex: 1;\n }\n .shrink-0 {\n flex-shrink: 0;\n }\n .flex-grow {\n flex-grow: 1;\n }\n .origin-\\(--radix-dropdown-menu-content-transform-origin\\) {\n transform-origin: var(--radix-dropdown-menu-content-transform-origin);\n }\n .origin-\\(--radix-popover-content-transform-origin\\) {\n transform-origin: var(--radix-popover-content-transform-origin);\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-x-\\[-50\\%\\] {\n --tw-translate-x: -50%;\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-\\[-50\\%\\] {\n --tw-translate-y: -50%;\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .rotate-180 {\n rotate: 180deg;\n }\n .transform-none\\! {\n transform: none !important;\n }\n .animate-pulse {\n animation: var(--animate-pulse);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-default {\n cursor: default;\n }\n .cursor-pointer {\n cursor: pointer;\n }\n .resize {\n resize: both;\n }\n .scroll-my-1 {\n scroll-margin-block: calc(var(--spacing) * 1);\n }\n .scroll-py-1 {\n scroll-padding-block: calc(var(--spacing) * 1);\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-col-reverse {\n flex-direction: column-reverse;\n }\n .items-center {\n align-items: center;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-0\\.5 {\n gap: calc(var(--spacing) * 0.5);\n }\n .gap-1\\.5 {\n gap: calc(var(--spacing) * 1.5);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-3 {\n gap: calc(var(--spacing) * 3);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .gap-5 {\n gap: calc(var(--spacing) * 5);\n }\n .gap-6 {\n gap: calc(var(--spacing) * 6);\n }\n .gap-\\[10px\\] {\n gap: 10px;\n }\n .space-y-2 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-x-2 {\n :where(& > :not(:last-child)) {\n --tw-space-x-reverse: 0;\n margin-inline-start: calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));\n margin-inline-end: calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)));\n }\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .overflow-x-hidden {\n overflow-x: hidden;\n }\n .overflow-y-auto {\n overflow-y: auto;\n }\n .rounded-\\[4px\\] {\n border-radius: 4px;\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius);\n }\n .rounded-md {\n border-radius: calc(var(--radius) - 2px);\n }\n .rounded-sm {\n border-radius: calc(var(--radius) - 4px);\n }\n .rounded-xs {\n border-radius: var(--radius-xs);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-0 {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n .border-b {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 1px;\n }\n .border-input {\n border-color: var(--input);\n }\n .border-primary {\n border-color: var(--primary);\n }\n .bg-accent {\n background-color: var(--accent);\n }\n .bg-background {\n background-color: var(--background);\n }\n .bg-black\\/50 {\n background-color: color-mix(in srgb, #000 50%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 50%, transparent);\n }\n }\n .bg-border {\n background-color: var(--border);\n }\n .bg-destructive {\n background-color: var(--destructive);\n }\n .bg-muted {\n background-color: var(--muted);\n }\n .bg-popover {\n background-color: var(--popover);\n }\n .bg-primary {\n background-color: var(--primary);\n }\n .bg-secondary {\n background-color: var(--secondary);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .fill-current {\n fill: currentcolor;\n }\n .fill-primary {\n fill: var(--primary);\n }\n .object-cover {\n -o-object-fit: cover;\n object-fit: cover;\n }\n .p-0 {\n padding: calc(var(--spacing) * 0);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-2 {\n padding-inline: calc(var(--spacing) * 2);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-1\\.5 {\n padding-block: calc(var(--spacing) * 1.5);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .py-4 {\n padding-block: calc(var(--spacing) * 4);\n }\n .py-6 {\n padding-block: calc(var(--spacing) * 6);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pr-2 {\n padding-right: calc(var(--spacing) * 2);\n }\n .pr-8 {\n padding-right: calc(var(--spacing) * 8);\n }\n .pb-1 {\n padding-bottom: calc(var(--spacing) * 1);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-8 {\n padding-left: calc(var(--spacing) * 8);\n }\n .text-center {\n text-align: center;\n }\n .text-right {\n text-align: right;\n }\n .text-base {\n font-size: var(--text-base);\n line-height: var(--tw-leading, var(--text-base--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .leading-none {\n --tw-leading: 1;\n line-height: 1;\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .tracking-tight {\n --tw-tracking: var(--tracking-tight);\n letter-spacing: var(--tracking-tight);\n }\n .tracking-widest {\n --tw-tracking: var(--tracking-widest);\n letter-spacing: var(--tracking-widest);\n }\n .text-ellipsis {\n text-overflow: ellipsis;\n }\n .whitespace-nowrap {\n white-space: nowrap;\n }\n .text-background {\n color: var(--background);\n }\n .text-current {\n color: currentcolor;\n }\n .text-destructive {\n color: var(--destructive);\n }\n .text-destructive-foreground {\n color: var(--destructive-foreground);\n }\n .text-foreground {\n color: var(--foreground);\n }\n .text-muted-foreground {\n color: var(--muted-foreground);\n }\n .text-popover-foreground {\n color: var(--popover-foreground);\n }\n .text-primary {\n color: var(--primary);\n }\n .text-primary-foreground {\n color: var(--primary-foreground);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-secondary-foreground {\n color: var(--secondary-foreground);\n }\n .text-white {\n color: var(--color-white);\n }\n .line-through {\n text-decoration-line: line-through;\n }\n .underline-offset-4 {\n text-underline-offset: 4px;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .opacity-50 {\n opacity: 50%;\n }\n .opacity-70 {\n opacity: 70%;\n }\n .opacity-100 {\n opacity: 100%;\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-md {\n --tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-sm {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-xs {\n --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.05));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .ring-offset-background {\n --tw-ring-offset-color: var(--background);\n }\n .outline-hidden {\n --tw-outline-style: none;\n outline-style: none;\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n }\n .outline {\n outline-style: var(--tw-outline-style);\n outline-width: 1px;\n }\n .transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-\\[color\\,box-shadow\\] {\n transition-property: color,box-shadow;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-shadow {\n transition-property: box-shadow;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-transform {\n transition-property: transform, translate, scale, rotate;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-none {\n transition-property: none;\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .outline-none {\n --tw-outline-style: none;\n outline-style: none;\n }\n .select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n .duration-200 {\n animation-duration: 200ms;\n }\n .group-data-\\[disabled\\=true\\]\\:pointer-events-none {\n &:is(:where(.group)[data-disabled=\"true\"] *) {\n pointer-events: none;\n }\n }\n .group-data-\\[disabled\\=true\\]\\:opacity-50 {\n &:is(:where(.group)[data-disabled=\"true\"] *) {\n opacity: 50%;\n }\n }\n .peer-disabled\\:cursor-not-allowed {\n &:is(:where(.peer):disabled ~ *) {\n cursor: not-allowed;\n }\n }\n .peer-disabled\\:opacity-50 {\n &:is(:where(.peer):disabled ~ *) {\n opacity: 50%;\n }\n }\n .selection\\:bg-primary {\n & *::-moz-selection {\n background-color: var(--primary);\n }\n & *::selection {\n background-color: var(--primary);\n }\n &::-moz-selection {\n background-color: var(--primary);\n }\n &::selection {\n background-color: var(--primary);\n }\n }\n .selection\\:text-primary-foreground {\n & *::-moz-selection {\n color: var(--primary-foreground);\n }\n & *::selection {\n color: var(--primary-foreground);\n }\n &::-moz-selection {\n color: var(--primary-foreground);\n }\n &::selection {\n color: var(--primary-foreground);\n }\n }\n .file\\:inline-flex {\n &::file-selector-button {\n display: inline-flex;\n }\n }\n .file\\:h-7 {\n &::file-selector-button {\n height: calc(var(--spacing) * 7);\n }\n }\n .file\\:border-0 {\n &::file-selector-button {\n border-style: var(--tw-border-style);\n border-width: 0px;\n }\n }\n .file\\:bg-transparent {\n &::file-selector-button {\n background-color: transparent;\n }\n }\n .file\\:text-sm {\n &::file-selector-button {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n }\n .file\\:font-medium {\n &::file-selector-button {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n }\n .file\\:text-foreground {\n &::file-selector-button {\n color: var(--foreground);\n }\n }\n .placeholder\\:text-muted-foreground {\n &::-moz-placeholder {\n color: var(--muted-foreground);\n }\n &::placeholder {\n color: var(--muted-foreground);\n }\n }\n .hover\\:bg-accent {\n &:hover {\n @media (hover: hover) {\n background-color: var(--accent);\n }\n }\n }\n .hover\\:bg-destructive\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--destructive) 90%, transparent);\n }\n }\n }\n }\n .hover\\:bg-muted {\n &:hover {\n @media (hover: hover) {\n background-color: var(--muted);\n }\n }\n }\n .hover\\:bg-primary\\/90 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--primary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--primary) 90%, transparent);\n }\n }\n }\n }\n .hover\\:bg-secondary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--secondary);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--secondary) 80%, transparent);\n }\n }\n }\n }\n .hover\\:text-accent-foreground {\n &:hover {\n @media (hover: hover) {\n color: var(--accent-foreground);\n }\n }\n }\n .hover\\:text-foreground {\n &:hover {\n @media (hover: hover) {\n color: var(--foreground);\n }\n }\n }\n .hover\\:underline {\n &:hover {\n @media (hover: hover) {\n text-decoration-line: underline;\n }\n }\n }\n .hover\\:opacity-100 {\n &:hover {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .focus\\:bg-accent {\n &:focus {\n background-color: var(--accent);\n }\n }\n .focus\\:text-accent-foreground {\n &:focus {\n color: var(--accent-foreground);\n }\n }\n .focus\\:ring-1 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-ring {\n &:focus {\n --tw-ring-color: var(--ring);\n }\n }\n .focus\\:ring-offset-2 {\n &:focus {\n --tw-ring-offset-width: 2px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-hidden {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .focus-visible\\:border-ring {\n &:focus-visible {\n border-color: var(--ring);\n }\n }\n .focus-visible\\:ring-\\[3px\\] {\n &:focus-visible {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus-visible\\:ring-destructive\\/20 {\n &:focus-visible {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 20%, transparent);\n }\n }\n }\n .focus-visible\\:ring-ring\\/50 {\n &:focus-visible {\n --tw-ring-color: var(--ring);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--ring) 50%, transparent);\n }\n }\n }\n .disabled\\:pointer-events-none {\n &:disabled {\n pointer-events: none;\n }\n }\n .disabled\\:cursor-not-allowed {\n &:disabled {\n cursor: not-allowed;\n }\n }\n .disabled\\:opacity-50 {\n &:disabled {\n opacity: 50%;\n }\n }\n .has-\\[\\>svg\\]\\:px-2\\.5 {\n &:has(>svg) {\n padding-inline: calc(var(--spacing) * 2.5);\n }\n }\n .has-\\[\\>svg\\]\\:px-3 {\n &:has(>svg) {\n padding-inline: calc(var(--spacing) * 3);\n }\n }\n .has-\\[\\>svg\\]\\:px-4 {\n &:has(>svg) {\n padding-inline: calc(var(--spacing) * 4);\n }\n }\n .aria-invalid\\:border-destructive {\n &[aria-invalid=\"true\"] {\n border-color: var(--destructive);\n }\n }\n .aria-invalid\\:ring-destructive\\/20 {\n &[aria-invalid=\"true\"] {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 20%, transparent);\n }\n }\n }\n .data-\\[disabled\\]\\:pointer-events-none {\n &[data-disabled] {\n pointer-events: none;\n }\n }\n .data-\\[disabled\\]\\:opacity-50 {\n &[data-disabled] {\n opacity: 50%;\n }\n }\n .data-\\[disabled\\=true\\]\\:pointer-events-none {\n &[data-disabled=\"true\"] {\n pointer-events: none;\n }\n }\n .data-\\[disabled\\=true\\]\\:opacity-50 {\n &[data-disabled=\"true\"] {\n opacity: 50%;\n }\n }\n .data-\\[error\\=true\\]\\:text-destructive-foreground {\n &[data-error=\"true\"] {\n color: var(--destructive-foreground);\n }\n }\n .data-\\[inset\\]\\:pl-8 {\n &[data-inset] {\n padding-left: calc(var(--spacing) * 8);\n }\n }\n .data-\\[placeholder\\]\\:text-muted-foreground {\n &[data-placeholder] {\n color: var(--muted-foreground);\n }\n }\n .data-\\[selected\\=true\\]\\:bg-accent {\n &[data-selected=\"true\"] {\n background-color: var(--accent);\n }\n }\n .data-\\[selected\\=true\\]\\:text-accent-foreground {\n &[data-selected=\"true\"] {\n color: var(--accent-foreground);\n }\n }\n .data-\\[side\\=bottom\\]\\:translate-y-1 {\n &[data-side=\"bottom\"] {\n --tw-translate-y: calc(var(--spacing) * 1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=bottom\\]\\:slide-in-from-top-2 {\n &[data-side=\"bottom\"] {\n --tw-enter-translate-y: -0.5rem;\n }\n }\n .data-\\[side\\=left\\]\\:-translate-x-1 {\n &[data-side=\"left\"] {\n --tw-translate-x: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=left\\]\\:slide-in-from-right-2 {\n &[data-side=\"left\"] {\n --tw-enter-translate-x: 0.5rem;\n }\n }\n .data-\\[side\\=right\\]\\:translate-x-1 {\n &[data-side=\"right\"] {\n --tw-translate-x: calc(var(--spacing) * 1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=right\\]\\:slide-in-from-left-2 {\n &[data-side=\"right\"] {\n --tw-enter-translate-x: -0.5rem;\n }\n }\n .data-\\[side\\=top\\]\\:-translate-y-1 {\n &[data-side=\"top\"] {\n --tw-translate-y: calc(var(--spacing) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n }\n .data-\\[side\\=top\\]\\:slide-in-from-bottom-2 {\n &[data-side=\"top\"] {\n --tw-enter-translate-y: 0.5rem;\n }\n }\n .\\*\\*\\:data-\\[slot\\=command-input-wrapper\\]\\:h-12 {\n :is(& *) {\n &[data-slot=\"command-input-wrapper\"] {\n height: calc(var(--spacing) * 12);\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:line-clamp-1 {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:flex {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n display: flex;\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:items-center {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n align-items: center;\n }\n }\n }\n .\\*\\:data-\\[slot\\=select-value\\]\\:gap-2 {\n :is(& > *) {\n &[data-slot=\"select-value\"] {\n gap: calc(var(--spacing) * 2);\n }\n }\n }\n .data-\\[state\\=checked\\]\\:border-primary {\n &[data-state=\"checked\"] {\n border-color: var(--primary);\n }\n }\n .data-\\[state\\=checked\\]\\:bg-primary {\n &[data-state=\"checked\"] {\n background-color: var(--primary);\n }\n }\n .data-\\[state\\=checked\\]\\:text-primary-foreground {\n &[data-state=\"checked\"] {\n color: var(--primary-foreground);\n }\n }\n .data-\\[state\\=closed\\]\\:animate-out {\n &[data-state=\"closed\"] {\n animation-name: exit;\n animation-duration: 150ms;\n --tw-exit-opacity: initial;\n --tw-exit-scale: initial;\n --tw-exit-rotate: initial;\n --tw-exit-translate-x: initial;\n --tw-exit-translate-y: initial;\n }\n }\n .data-\\[state\\=closed\\]\\:fade-out-0 {\n &[data-state=\"closed\"] {\n --tw-exit-opacity: 0;\n }\n }\n .data-\\[state\\=closed\\]\\:zoom-out-95 {\n &[data-state=\"closed\"] {\n --tw-exit-scale: .95;\n }\n }\n .data-\\[state\\=open\\]\\:bg-accent {\n &[data-state=\"open\"] {\n background-color: var(--accent);\n }\n }\n .data-\\[state\\=open\\]\\:text-accent-foreground {\n &[data-state=\"open\"] {\n color: var(--accent-foreground);\n }\n }\n .data-\\[state\\=open\\]\\:text-muted-foreground {\n &[data-state=\"open\"] {\n color: var(--muted-foreground);\n }\n }\n .data-\\[state\\=open\\]\\:animate-in {\n &[data-state=\"open\"] {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n }\n }\n .data-\\[state\\=open\\]\\:fade-in-0 {\n &[data-state=\"open\"] {\n --tw-enter-opacity: 0;\n }\n }\n .data-\\[state\\=open\\]\\:zoom-in-95 {\n &[data-state=\"open\"] {\n --tw-enter-scale: .95;\n }\n }\n .data-\\[variant\\=destructive\\]\\:text-destructive {\n &[data-variant=\"destructive\"] {\n color: var(--destructive);\n }\n }\n .data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/10 {\n &[data-variant=\"destructive\"] {\n &:focus {\n background-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--destructive) 10%, transparent);\n }\n }\n }\n }\n .data-\\[variant\\=destructive\\]\\:focus\\:text-destructive {\n &[data-variant=\"destructive\"] {\n &:focus {\n color: var(--destructive);\n }\n }\n }\n .max-md\\:cursor-pointer {\n @media (width < 48rem) {\n cursor: pointer;\n }\n }\n .max-sm\\:hidden {\n @media (width < 40rem) {\n display: none;\n }\n }\n .sm\\:max-h-\\[270px\\] {\n @media (width >= 40rem) {\n max-height: 270px;\n }\n }\n .sm\\:max-w-\\[500px\\] {\n @media (width >= 40rem) {\n max-width: 500px;\n }\n }\n .sm\\:max-w-lg {\n @media (width >= 40rem) {\n max-width: var(--container-lg);\n }\n }\n .sm\\:flex-row {\n @media (width >= 40rem) {\n flex-direction: row;\n }\n }\n .sm\\:justify-end {\n @media (width >= 40rem) {\n justify-content: flex-end;\n }\n }\n .sm\\:text-left {\n @media (width >= 40rem) {\n text-align: left;\n }\n }\n .md\\:order-last {\n @media (width >= 48rem) {\n order: 9999;\n }\n }\n .md\\:order-none {\n @media (width >= 48rem) {\n order: 0;\n }\n }\n .md\\:col-span-2 {\n @media (width >= 48rem) {\n grid-column: span 2 / span 2;\n }\n }\n .md\\:col-span-3 {\n @media (width >= 48rem) {\n grid-column: span 3 / span 3;\n }\n }\n .md\\:col-span-4 {\n @media (width >= 48rem) {\n grid-column: span 4 / span 4;\n }\n }\n .md\\:block {\n @media (width >= 48rem) {\n display: block;\n }\n }\n .md\\:flex {\n @media (width >= 48rem) {\n display: flex;\n }\n }\n .md\\:grid {\n @media (width >= 48rem) {\n display: grid;\n }\n }\n .md\\:hidden {\n @media (width >= 48rem) {\n display: none;\n }\n }\n .md\\:max-w-\\[75\\%\\] {\n @media (width >= 48rem) {\n max-width: 75%;\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .md\\:grid-cols-7 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(7, minmax(0, 1fr));\n }\n }\n .md\\:gap-0 {\n @media (width >= 48rem) {\n gap: calc(var(--spacing) * 0);\n }\n }\n .md\\:px-8 {\n @media (width >= 48rem) {\n padding-inline: calc(var(--spacing) * 8);\n }\n }\n .md\\:py-12 {\n @media (width >= 48rem) {\n padding-block: calc(var(--spacing) * 12);\n }\n }\n .md\\:text-sm {\n @media (width >= 48rem) {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n }\n .dark\\:focus-visible\\:ring-destructive\\/40 {\n @media (prefers-color-scheme: dark) {\n &:focus-visible {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);\n }\n }\n }\n }\n .dark\\:aria-invalid\\:ring-destructive\\/40 {\n @media (prefers-color-scheme: dark) {\n &[aria-invalid=\"true\"] {\n --tw-ring-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n --tw-ring-color: color-mix(in oklab, var(--destructive) 40%, transparent);\n }\n }\n }\n }\n .dark\\:data-\\[variant\\=destructive\\]\\:focus\\:bg-destructive\\/20 {\n @media (prefers-color-scheme: dark) {\n &[data-variant=\"destructive\"] {\n &:focus {\n background-color: var(--destructive);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--destructive) 20%, transparent);\n }\n }\n }\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 {\n & [cmdk-group-heading] {\n padding-inline: calc(var(--spacing) * 2);\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 {\n & [cmdk-group-heading] {\n padding-block: calc(var(--spacing) * 1.5);\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs {\n & [cmdk-group-heading] {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium {\n & [cmdk-group-heading] {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n }\n .\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-muted-foreground {\n & [cmdk-group-heading] {\n color: var(--muted-foreground);\n }\n }\n .\\[\\&_\\[cmdk-group\\]\\]\\:px-2 {\n & [cmdk-group] {\n padding-inline: calc(var(--spacing) * 2);\n }\n }\n .\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 {\n & [cmdk-group]:not([hidden]) ~[cmdk-group] {\n padding-top: calc(var(--spacing) * 0);\n }\n }\n .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 {\n & [cmdk-input-wrapper] svg {\n height: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 {\n & [cmdk-input-wrapper] svg {\n width: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_\\[cmdk-input\\]\\]\\:h-12 {\n & [cmdk-input] {\n height: calc(var(--spacing) * 12);\n }\n }\n .\\[\\&_\\[cmdk-item\\]\\]\\:px-2 {\n & [cmdk-item] {\n padding-inline: calc(var(--spacing) * 2);\n }\n }\n .\\[\\&_\\[cmdk-item\\]\\]\\:py-3 {\n & [cmdk-item] {\n padding-block: calc(var(--spacing) * 3);\n }\n }\n .\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 {\n & [cmdk-item] svg {\n height: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 {\n & [cmdk-item] svg {\n width: calc(var(--spacing) * 5);\n }\n }\n .\\[\\&_svg\\]\\:pointer-events-none {\n & svg {\n pointer-events: none;\n }\n }\n .\\[\\&_svg\\]\\:shrink-0 {\n & svg {\n flex-shrink: 0;\n }\n }\n .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'size-\\'\\]\\)\\]\\:size-4 {\n & svg:not([class*='size-']) {\n width: calc(var(--spacing) * 4);\n height: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&_svg\\:not\\(\\[class\\*\\=\\'text-\\'\\]\\)\\]\\:text-muted-foreground {\n & svg:not([class*='text-']) {\n color: var(--muted-foreground);\n }\n }\n .\\*\\:\\[span\\]\\:last\\:flex {\n :is(& > *) {\n &:is(span) {\n &:last-child {\n display: flex;\n }\n }\n }\n }\n .\\*\\:\\[span\\]\\:last\\:items-center {\n :is(& > *) {\n &:is(span) {\n &:last-child {\n align-items: center;\n }\n }\n }\n }\n .\\*\\:\\[span\\]\\:last\\:gap-2 {\n :is(& > *) {\n &:is(span) {\n &:last-child {\n gap: calc(var(--spacing) * 2);\n }\n }\n }\n }\n .data-\\[variant\\=destructive\\]\\:\\*\\:\\[svg\\]\\:\\!text-destructive {\n &[data-variant=\"destructive\"] {\n :is(& > *) {\n &:is(svg) {\n color: var(--destructive) !important;\n }\n }\n }\n }\n .\\[\\&\\>span\\]\\:line-clamp-1 {\n &>span {\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 1;\n }\n }\n}\n:root {\n --background: oklch(1 0 0);\n --foreground: oklch(0.145 0 0);\n --card: oklch(1 0 0);\n --card-foreground: oklch(0.145 0 0);\n --popover: oklch(1 0 0);\n --popover-foreground: oklch(0.145 0 0);\n --primary: oklch(0.205 0 0);\n --primary-foreground: oklch(0.985 0 0);\n --secondary: oklch(0.97 0 0);\n --secondary-foreground: oklch(0.205 0 0);\n --muted: oklch(0.97 0 0);\n --muted-foreground: oklch(0.556 0 0);\n --accent: oklch(0.97 0 0);\n --accent-foreground: oklch(0.205 0 0);\n --destructive: oklch(0.577 0.245 27.325);\n --destructive-foreground: oklch(0.577 0.245 27.325);\n --border: oklch(0.922 0 0);\n --input: oklch(0.922 0 0);\n --ring: oklch(0.708 0 0);\n --chart-1: oklch(0.646 0.222 41.116);\n --chart-2: oklch(0.6 0.118 184.704);\n --chart-3: oklch(0.398 0.07 227.392);\n --chart-4: oklch(0.828 0.189 84.429);\n --chart-5: oklch(0.769 0.188 70.08);\n --radius: 0.625rem;\n --sidebar: oklch(0.985 0 0);\n --sidebar-foreground: oklch(0.145 0 0);\n --sidebar-primary: oklch(0.205 0 0);\n --sidebar-primary-foreground: oklch(0.985 0 0);\n --sidebar-accent: oklch(0.97 0 0);\n --sidebar-accent-foreground: oklch(0.205 0 0);\n --sidebar-border: oklch(0.922 0 0);\n --sidebar-ring: oklch(0.708 0 0);\n}\n@layer base {\n * {\n border-color: var(--border);\n outline-color: var(--ring);\n @supports (color: color-mix(in lab, red, red)) {\n outline-color: color-mix(in oklab, var(--ring) 50%, transparent);\n }\n }\n .checkout-embed {\n background-color: var(--background);\n font-family: var(--font-sans), Helvetica, Arial, apple-system, sans-serif;\n color: var(--foreground);\n }\n h2 {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n --tw-tracking: var(--tracking-tight);\n letter-spacing: var(--tracking-tight);\n }\n p {\n --tw-tracking: var(--tracking-tight) !important;\n letter-spacing: var(--tracking-tight) !important;\n }\n}\n@layer utilities {\n .scrollbar-hidden {\n scrollbar-width: none;\n }\n .scrollbar-hidden::-webkit-scrollbar {\n display: none;\n }\n}\n@keyframes enter {\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n@keyframes exit {\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-space-x-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-leading {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-tracking {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-outline-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pulse {\n 50% {\n opacity: 0.5;\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-space-y-reverse: 0;\n --tw-space-x-reverse: 0;\n --tw-border-style: solid;\n --tw-leading: initial;\n --tw-font-weight: initial;\n --tw-tracking: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-outline-style: solid;\n --tw-duration: initial;\n }\n }\n}\n";
|
|
7504
7519
|
|
|
7505
7520
|
const IframeWrapper = React.memo(({ children, iframeRef }) => {
|
|
7506
7521
|
const [iframeBody, setIframeBody] = React.useState(null);
|
|
7507
7522
|
const styleRef = React.useRef(null);
|
|
7508
|
-
const resizeObserver = React.useRef();
|
|
7523
|
+
const resizeObserver = React.useRef(null);
|
|
7509
7524
|
const injectStyles = React.useCallback((doc) => {
|
|
7510
7525
|
var _a;
|
|
7511
7526
|
// Clean up previous style
|
|
@@ -7566,9 +7581,7 @@ const IframeWrapper = React.memo(({ children, iframeRef }) => {
|
|
|
7566
7581
|
window.removeEventListener("resize", updateHeight);
|
|
7567
7582
|
};
|
|
7568
7583
|
}, [updateHeight]);
|
|
7569
|
-
return (
|
|
7570
|
-
React.createElement("iframe", { ref: iframeRef, className: "w-full min-h-screen border-0", sandbox: "allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation" }),
|
|
7571
|
-
iframeBody && ReactDOM.createPortal(children, iframeBody)));
|
|
7584
|
+
return (jsxRuntime.jsxs("div", { id: "bs-wrapper", className: "relative mx-auto min-h-screen w-full max-w-[1200px] overflow-y-auto overflow-x-hidden", children: [jsxRuntime.jsx("iframe", { ref: iframeRef, className: "min-h-screen w-full border-0", sandbox: "allow-same-origin allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox allow-top-navigation" }), iframeBody && ReactDOM.createPortal(children, iframeBody)] }));
|
|
7572
7585
|
});
|
|
7573
7586
|
IframeWrapper.displayName = "IframeWrapper";
|
|
7574
7587
|
|
|
@@ -8251,6 +8264,7 @@ const Toast = (props)=>{
|
|
|
8251
8264
|
pointerStartRef.current = null;
|
|
8252
8265
|
},
|
|
8253
8266
|
onPointerDown: (event)=>{
|
|
8267
|
+
if (event.button === 2) return; // Return early on right click
|
|
8254
8268
|
if (disabled || !dismissible) return;
|
|
8255
8269
|
dragStartTime.current = new Date();
|
|
8256
8270
|
setOffsetBeforeRemove(offset.current);
|
|
@@ -8698,7 +8712,7 @@ const Toaster$1 = /*#__PURE__*/ React.forwardRef(function Toaster(props, ref) {
|
|
|
8698
8712
|
const Toaster = (_a) => {
|
|
8699
8713
|
var props = __rest(_a, []);
|
|
8700
8714
|
const { theme = "system" } = z();
|
|
8701
|
-
return (
|
|
8715
|
+
return (jsxRuntime.jsx(Toaster$1, Object.assign({ theme: theme, className: "toaster group", style: {
|
|
8702
8716
|
"--normal-bg": "var(--popover)",
|
|
8703
8717
|
"--normal-text": "var(--popover-foreground)",
|
|
8704
8718
|
"--normal-border": "var(--border)",
|
|
@@ -9171,8 +9185,9 @@ class ZodError extends Error {
|
|
|
9171
9185
|
const formErrors = [];
|
|
9172
9186
|
for (const sub of this.issues) {
|
|
9173
9187
|
if (sub.path.length > 0) {
|
|
9174
|
-
|
|
9175
|
-
fieldErrors[
|
|
9188
|
+
const firstEl = sub.path[0];
|
|
9189
|
+
fieldErrors[firstEl] = fieldErrors[firstEl] || [];
|
|
9190
|
+
fieldErrors[firstEl].push(mapper(sub));
|
|
9176
9191
|
}
|
|
9177
9192
|
else {
|
|
9178
9193
|
formErrors.push(mapper(sub));
|
|
@@ -9256,6 +9271,8 @@ const errorMap = (issue, _ctx) => {
|
|
|
9256
9271
|
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
9257
9272
|
else if (issue.type === "number")
|
|
9258
9273
|
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
9274
|
+
else if (issue.type === "bigint")
|
|
9275
|
+
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
9259
9276
|
else if (issue.type === "date")
|
|
9260
9277
|
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
9261
9278
|
else
|
|
@@ -9853,6 +9870,8 @@ function isValidJWT(jwt, alg) {
|
|
|
9853
9870
|
return false;
|
|
9854
9871
|
try {
|
|
9855
9872
|
const [header] = jwt.split(".");
|
|
9873
|
+
if (!header)
|
|
9874
|
+
return false;
|
|
9856
9875
|
// Convert base64url to base64
|
|
9857
9876
|
const base64 = header
|
|
9858
9877
|
.replace(/-/g, "+")
|
|
@@ -12934,15 +12953,19 @@ function cloneObject(data) {
|
|
|
12934
12953
|
return copy;
|
|
12935
12954
|
}
|
|
12936
12955
|
|
|
12937
|
-
var
|
|
12956
|
+
var isKey = (value) => /^\w*$/.test(value);
|
|
12938
12957
|
|
|
12939
12958
|
var isUndefined = (val) => val === undefined;
|
|
12940
12959
|
|
|
12960
|
+
var compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];
|
|
12961
|
+
|
|
12962
|
+
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
|
|
12963
|
+
|
|
12941
12964
|
var get = (object, path, defaultValue) => {
|
|
12942
12965
|
if (!path || !isObject(object)) {
|
|
12943
12966
|
return defaultValue;
|
|
12944
12967
|
}
|
|
12945
|
-
const result =
|
|
12968
|
+
const result = (isKey(path) ? [path] : stringToPath(path)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], object);
|
|
12946
12969
|
return isUndefined(result) || result === object
|
|
12947
12970
|
? isUndefined(object[path])
|
|
12948
12971
|
? defaultValue
|
|
@@ -12952,10 +12975,6 @@ var get = (object, path, defaultValue) => {
|
|
|
12952
12975
|
|
|
12953
12976
|
var isBoolean = (value) => typeof value === 'boolean';
|
|
12954
12977
|
|
|
12955
|
-
var isKey = (value) => /^\w*$/.test(value);
|
|
12956
|
-
|
|
12957
|
-
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
|
|
12958
|
-
|
|
12959
12978
|
var set = (object, path, value) => {
|
|
12960
12979
|
let index = -1;
|
|
12961
12980
|
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
@@ -13004,6 +13023,7 @@ const INPUT_VALIDATION_RULES = {
|
|
|
13004
13023
|
};
|
|
13005
13024
|
|
|
13006
13025
|
const HookFormContext = React.createContext(null);
|
|
13026
|
+
HookFormContext.displayName = 'HookFormContext';
|
|
13007
13027
|
/**
|
|
13008
13028
|
* This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.
|
|
13009
13029
|
*
|
|
@@ -13433,7 +13453,7 @@ var createSubject = () => {
|
|
|
13433
13453
|
|
|
13434
13454
|
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
|
13435
13455
|
|
|
13436
|
-
function deepEqual$1(object1, object2) {
|
|
13456
|
+
function deepEqual$1(object1, object2, _internal_visited = new WeakSet()) {
|
|
13437
13457
|
if (isPrimitive(object1) || isPrimitive(object2)) {
|
|
13438
13458
|
return object1 === object2;
|
|
13439
13459
|
}
|
|
@@ -13445,6 +13465,11 @@ function deepEqual$1(object1, object2) {
|
|
|
13445
13465
|
if (keys1.length !== keys2.length) {
|
|
13446
13466
|
return false;
|
|
13447
13467
|
}
|
|
13468
|
+
if (_internal_visited.has(object1) || _internal_visited.has(object2)) {
|
|
13469
|
+
return true;
|
|
13470
|
+
}
|
|
13471
|
+
_internal_visited.add(object1);
|
|
13472
|
+
_internal_visited.add(object2);
|
|
13448
13473
|
for (const key of keys1) {
|
|
13449
13474
|
const val1 = object1[key];
|
|
13450
13475
|
if (!keys2.includes(key)) {
|
|
@@ -13455,7 +13480,7 @@ function deepEqual$1(object1, object2) {
|
|
|
13455
13480
|
if ((isDateObject(val1) && isDateObject(val2)) ||
|
|
13456
13481
|
(isObject(val1) && isObject(val2)) ||
|
|
13457
13482
|
(Array.isArray(val1) && Array.isArray(val2))
|
|
13458
|
-
? !deepEqual$1(val1, val2)
|
|
13483
|
+
? !deepEqual$1(val1, val2, _internal_visited)
|
|
13459
13484
|
: val1 !== val2) {
|
|
13460
13485
|
return false;
|
|
13461
13486
|
}
|
|
@@ -14774,14 +14799,14 @@ function createFormControl(props = {}) {
|
|
|
14774
14799
|
if (_options.resolver) {
|
|
14775
14800
|
const { errors, values } = await _runSchema();
|
|
14776
14801
|
_formState.errors = errors;
|
|
14777
|
-
fieldValues = values;
|
|
14802
|
+
fieldValues = cloneObject(values);
|
|
14778
14803
|
}
|
|
14779
14804
|
else {
|
|
14780
14805
|
await executeBuiltInValidation(_fields);
|
|
14781
14806
|
}
|
|
14782
14807
|
if (_names.disabled.size) {
|
|
14783
14808
|
for (const name of _names.disabled) {
|
|
14784
|
-
|
|
14809
|
+
unset(fieldValues, name);
|
|
14785
14810
|
}
|
|
14786
14811
|
}
|
|
14787
14812
|
unset(_formState.errors, 'root');
|
|
@@ -14878,7 +14903,11 @@ function createFormControl(props = {}) {
|
|
|
14878
14903
|
}
|
|
14879
14904
|
}
|
|
14880
14905
|
for (const fieldName of _names.mount) {
|
|
14881
|
-
|
|
14906
|
+
const value = get(values, fieldName, get(_defaultValues, fieldName));
|
|
14907
|
+
if (!isUndefined(value)) {
|
|
14908
|
+
set(values, fieldName, value);
|
|
14909
|
+
setValue(fieldName, get(values, fieldName));
|
|
14910
|
+
}
|
|
14882
14911
|
}
|
|
14883
14912
|
}
|
|
14884
14913
|
_formValues = cloneObject(values);
|
|
@@ -15098,14 +15127,21 @@ function useForm(props = {}) {
|
|
|
15098
15127
|
: props.defaultValues,
|
|
15099
15128
|
});
|
|
15100
15129
|
if (!_formControl.current) {
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
|
|
15104
|
-
|
|
15105
|
-
|
|
15106
|
-
props.defaultValues &&
|
|
15107
|
-
|
|
15108
|
-
|
|
15130
|
+
if (props.formControl) {
|
|
15131
|
+
_formControl.current = {
|
|
15132
|
+
...props.formControl,
|
|
15133
|
+
formState,
|
|
15134
|
+
};
|
|
15135
|
+
if (props.defaultValues && !isFunction$1(props.defaultValues)) {
|
|
15136
|
+
props.formControl.reset(props.defaultValues, props.resetOptions);
|
|
15137
|
+
}
|
|
15138
|
+
}
|
|
15139
|
+
else {
|
|
15140
|
+
const { formControl, ...rest } = createFormControl(props);
|
|
15141
|
+
_formControl.current = {
|
|
15142
|
+
...rest,
|
|
15143
|
+
formState,
|
|
15144
|
+
};
|
|
15109
15145
|
}
|
|
15110
15146
|
}
|
|
15111
15147
|
const control = _formControl.current.control;
|
|
@@ -15651,7 +15687,7 @@ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
|
|
|
15651
15687
|
const fractionRegex = /^\d+\/\d+$/;
|
|
15652
15688
|
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
|
|
15653
15689
|
const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
|
|
15654
|
-
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/;
|
|
15690
|
+
const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
|
|
15655
15691
|
// Shadow always begins with x and y offset separated by underscore optionally prepended by inset
|
|
15656
15692
|
const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
|
|
15657
15693
|
const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
|
|
@@ -18198,7 +18234,7 @@ function cn(...inputs) {
|
|
|
18198
18234
|
|
|
18199
18235
|
function Label(_a) {
|
|
18200
18236
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18201
|
-
return (
|
|
18237
|
+
return (jsxRuntime.jsx(Root$2, Object.assign({ "data-slot": "label", className: cn("flex select-none items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50", className) }, props)));
|
|
18202
18238
|
}
|
|
18203
18239
|
|
|
18204
18240
|
const validErrorMessageKeys = Object.keys(en.Errors);
|
|
@@ -18214,8 +18250,7 @@ const Form = FormProvider;
|
|
|
18214
18250
|
const FormFieldContext = React__namespace.createContext({});
|
|
18215
18251
|
const FormField = (_a) => {
|
|
18216
18252
|
var props = __rest(_a, []);
|
|
18217
|
-
return (
|
|
18218
|
-
React__namespace.createElement(Controller, Object.assign({}, props))));
|
|
18253
|
+
return (jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: jsxRuntime.jsx(Controller, Object.assign({}, props)) }));
|
|
18219
18254
|
};
|
|
18220
18255
|
const useFormField = () => {
|
|
18221
18256
|
const fieldContext = React__namespace.useContext(FormFieldContext);
|
|
@@ -18233,18 +18268,17 @@ const FormItemContext = React__namespace.createContext({});
|
|
|
18233
18268
|
function FormItem(_a) {
|
|
18234
18269
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18235
18270
|
const id = React__namespace.useId();
|
|
18236
|
-
return (
|
|
18237
|
-
React__namespace.createElement("div", Object.assign({ "data-slot": "form-item", className: cn("grid gap-2", className) }, props))));
|
|
18271
|
+
return (jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: jsxRuntime.jsx("div", Object.assign({ "data-slot": "form-item", className: cn("grid gap-2", className) }, props)) }));
|
|
18238
18272
|
}
|
|
18239
18273
|
function FormLabel(_a) {
|
|
18240
18274
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
18241
18275
|
const { error, formItemId } = useFormField();
|
|
18242
|
-
return (
|
|
18276
|
+
return (jsxRuntime.jsx(Label, Object.assign({ "data-slot": "form-label", "data-error": !!error, className: cn("data-[error=true]:text-destructive-foreground", className), htmlFor: formItemId }, props)));
|
|
18243
18277
|
}
|
|
18244
18278
|
function FormControl(_a) {
|
|
18245
18279
|
var props = __rest(_a, []);
|
|
18246
18280
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
18247
|
-
return (
|
|
18281
|
+
return (jsxRuntime.jsx(Slot$2, Object.assign({ "data-slot": "form-control", id: formItemId, "aria-describedby": !error
|
|
18248
18282
|
? `${formDescriptionId}`
|
|
18249
18283
|
: `${formDescriptionId} ${formMessageId}`, "aria-invalid": !!error }, props)));
|
|
18250
18284
|
}
|
|
@@ -18259,22 +18293,18 @@ function FormMessage(_a) {
|
|
|
18259
18293
|
}
|
|
18260
18294
|
const key = validateErrorMessageKey(String(body));
|
|
18261
18295
|
const message = t(`Errors.${key}`);
|
|
18262
|
-
return (
|
|
18296
|
+
return (jsxRuntime.jsx("p", Object.assign({ "data-slot": "form-message", id: formMessageId, className: cn("text-destructive-foreground text-sm", className) }, props, { children: message })));
|
|
18263
18297
|
}
|
|
18264
18298
|
|
|
18265
18299
|
function Input(_a) {
|
|
18266
18300
|
var { className, type } = _a, props = __rest(_a, ["className", "type"]);
|
|
18267
|
-
return (
|
|
18301
|
+
return (jsxRuntime.jsx("input", Object.assign({ type: type, "data-slot": "input", className: cn("border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground shadow-xs flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base outline-none transition-[color,box-shadow] file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className) }, props)));
|
|
18268
18302
|
}
|
|
18269
18303
|
|
|
18270
18304
|
function InputGroup(_a) {
|
|
18271
18305
|
var { name, label, className } = _a, props = __rest(_a, ["name", "label", "className"]);
|
|
18272
18306
|
const { control } = useFormContext();
|
|
18273
|
-
return (
|
|
18274
|
-
React.createElement(FormLabel, null, label),
|
|
18275
|
-
React.createElement(FormControl, null,
|
|
18276
|
-
React.createElement(Input, Object.assign({}, field, props))),
|
|
18277
|
-
React.createElement(FormMessage, null))) }));
|
|
18307
|
+
return (jsxRuntime.jsx(FormField, { control: control, name: name, render: ({ field }) => (jsxRuntime.jsxs(FormItem, { className: className, children: [jsxRuntime.jsx(FormLabel, { children: label }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(Input, Object.assign({}, field, props)) }), jsxRuntime.jsx(FormMessage, {})] })) }));
|
|
18278
18308
|
}
|
|
18279
18309
|
|
|
18280
18310
|
const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
@@ -18344,7 +18374,7 @@ const buttonVariants = cva("inline-flex cursor-pointer items-center justify-cent
|
|
|
18344
18374
|
function Button(_a) {
|
|
18345
18375
|
var { className, variant, size, asChild = false } = _a, props = __rest(_a, ["className", "variant", "size", "asChild"]);
|
|
18346
18376
|
const Comp = asChild ? Slot$2 : "button";
|
|
18347
|
-
return (
|
|
18377
|
+
return (jsxRuntime.jsx(Comp, Object.assign({ "data-slot": "button", className: cn(buttonVariants({ variant, size, className })) }, props)));
|
|
18348
18378
|
}
|
|
18349
18379
|
|
|
18350
18380
|
/**
|
|
@@ -18537,9 +18567,7 @@ const X$2 = createLucideIcon("X", __iconNode);
|
|
|
18537
18567
|
function SubmitButton(_a) {
|
|
18538
18568
|
var { isSubmitting, isValid = true, className, variant, children, size } = _a, props = __rest(_a, ["isSubmitting", "isValid", "className", "variant", "children", "size"]);
|
|
18539
18569
|
const { t } = useTranslation();
|
|
18540
|
-
return (
|
|
18541
|
-
isSubmitting && React.createElement(Loader, { className: "animate-spin" }),
|
|
18542
|
-
isSubmitting ? t("CheckoutEmbed.loading") : children));
|
|
18570
|
+
return (jsxRuntime.jsxs(Button, Object.assign({ type: "submit", size: size, className: className, variant: variant, disabled: isSubmitting || !isValid }, props, { children: [isSubmitting && jsxRuntime.jsx(Loader, { className: "animate-spin" }), isSubmitting ? t("CheckoutEmbed.loading") : children] })));
|
|
18543
18571
|
}
|
|
18544
18572
|
|
|
18545
18573
|
const r=(t,r,o)=>{if(t&&"reportValidity"in t){const s=get(o,r);t.setCustomValidity(s&&s.message||""),t.reportValidity();}},o=(e,t)=>{for(const o in t.fields){const s=t.fields[o];s&&s.ref&&"reportValidity"in s.ref?r(s.ref,o,e):s&&s.refs&&s.refs.forEach(t=>r(t,o,e));}},s$2=(r,s)=>{s.shouldUseNativeValidation&&o(r,s);const n={};for(const o in r){const f=get(s.fields,o),c=Object.assign(r[o]||{},{ref:f&&f.ref});if(i(s.names||Object.keys(r),o)){const r=Object.assign({},get(n,o));set(r,"root",c),set(n,o,r);}else set(n,o,c);}return n},i=(e,t)=>{const r=n$2(t);return e.some(e=>n$2(e).match(`^${r}\\.\\d+`))};function n$2(e){return e.replace(/\]|\[/g,"")}
|
|
@@ -22064,72 +22092,64 @@ var Close = DialogClose;
|
|
|
22064
22092
|
|
|
22065
22093
|
function Dialog(_a) {
|
|
22066
22094
|
var props = __rest(_a, []);
|
|
22067
|
-
return
|
|
22095
|
+
return jsxRuntime.jsx(Root$1, Object.assign({ "data-slot": "dialog" }, props));
|
|
22068
22096
|
}
|
|
22069
22097
|
function DialogTrigger(_a) {
|
|
22070
22098
|
var props = __rest(_a, []);
|
|
22071
|
-
return
|
|
22099
|
+
return jsxRuntime.jsx(Trigger$1, Object.assign({ "data-slot": "dialog-trigger" }, props));
|
|
22072
22100
|
}
|
|
22073
22101
|
function DialogPortal(_a) {
|
|
22074
22102
|
var props = __rest(_a, []);
|
|
22075
|
-
return
|
|
22103
|
+
return jsxRuntime.jsx(Portal$1, Object.assign({ "data-slot": "dialog-portal" }, props));
|
|
22076
22104
|
}
|
|
22077
22105
|
function DialogOverlay(_a) {
|
|
22078
22106
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22079
|
-
return (
|
|
22107
|
+
return (jsxRuntime.jsx(Overlay, Object.assign({ "data-slot": "dialog-overlay", className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", className) }, props)));
|
|
22080
22108
|
}
|
|
22081
22109
|
function DialogContent(_a) {
|
|
22082
22110
|
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
22083
|
-
return (
|
|
22084
|
-
React__namespace.createElement(DialogOverlay, null),
|
|
22085
|
-
React__namespace.createElement(Content$1, Object.assign({ "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className) }, props),
|
|
22086
|
-
children,
|
|
22087
|
-
React__namespace.createElement(Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4" },
|
|
22088
|
-
React__namespace.createElement(X$2, null),
|
|
22089
|
-
React__namespace.createElement("span", { className: "sr-only" }, "Close")))));
|
|
22111
|
+
return (jsxRuntime.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [jsxRuntime.jsx(DialogOverlay, {}), jsxRuntime.jsxs(Content$1, Object.assign({ "data-slot": "dialog-content", className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", className) }, props, { children: [children, jsxRuntime.jsxs(Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground rounded-xs focus:outline-hidden absolute right-4 top-4 opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", children: [jsxRuntime.jsx(X$2, {}), jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })] })] }))] }));
|
|
22090
22112
|
}
|
|
22091
22113
|
function DialogHeader(_a) {
|
|
22092
22114
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22093
|
-
return (
|
|
22115
|
+
return (jsxRuntime.jsx("div", Object.assign({ "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-center sm:text-left", className) }, props)));
|
|
22094
22116
|
}
|
|
22095
22117
|
function DialogFooter(_a) {
|
|
22096
22118
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22097
|
-
return (
|
|
22119
|
+
return (jsxRuntime.jsx("div", Object.assign({ "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className) }, props)));
|
|
22098
22120
|
}
|
|
22099
22121
|
function DialogTitle(_a) {
|
|
22100
22122
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22101
|
-
return (
|
|
22123
|
+
return (jsxRuntime.jsx(Title, Object.assign({ "data-slot": "dialog-title", className: cn("text-lg font-semibold leading-none", className) }, props)));
|
|
22102
22124
|
}
|
|
22103
22125
|
function DialogDescription(_a) {
|
|
22104
22126
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22105
|
-
return (
|
|
22127
|
+
return (jsxRuntime.jsx(Description, Object.assign({ "data-slot": "dialog-description", className: cn("text-muted-foreground text-sm", className) }, props)));
|
|
22106
22128
|
}
|
|
22107
22129
|
|
|
22108
22130
|
function Command(_a) {
|
|
22109
22131
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22110
|
-
return (
|
|
22132
|
+
return (jsxRuntime.jsx(He, Object.assign({ "data-slot": "command", className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className) }, props)));
|
|
22111
22133
|
}
|
|
22112
22134
|
function CommandInput(_a) {
|
|
22113
22135
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22114
|
-
return (
|
|
22115
|
-
React__namespace.createElement(Search, { className: "size-4 shrink-0 opacity-50" }),
|
|
22116
|
-
React__namespace.createElement(He.Input, Object.assign({ "data-slot": "command-input", className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className) }, props))));
|
|
22136
|
+
return (jsxRuntime.jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [jsxRuntime.jsx(Search, { className: "size-4 shrink-0 opacity-50" }), jsxRuntime.jsx(He.Input, Object.assign({ "data-slot": "command-input", className: cn("placeholder:text-muted-foreground outline-hidden flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50", className) }, props))] }));
|
|
22117
22137
|
}
|
|
22118
22138
|
function CommandList(_a) {
|
|
22119
22139
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22120
|
-
return (
|
|
22140
|
+
return (jsxRuntime.jsx(He.List, Object.assign({ "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-y-auto overflow-x-hidden", className) }, props)));
|
|
22121
22141
|
}
|
|
22122
22142
|
function CommandEmpty(_a) {
|
|
22123
22143
|
var props = __rest(_a, []);
|
|
22124
|
-
return (
|
|
22144
|
+
return (jsxRuntime.jsx(He.Empty, Object.assign({ "data-slot": "command-empty", className: "py-6 text-center text-sm" }, props)));
|
|
22125
22145
|
}
|
|
22126
22146
|
function CommandGroup(_a) {
|
|
22127
22147
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22128
|
-
return (
|
|
22148
|
+
return (jsxRuntime.jsx(He.Group, Object.assign({ "data-slot": "command-group", className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className) }, props)));
|
|
22129
22149
|
}
|
|
22130
22150
|
function CommandItem(_a) {
|
|
22131
22151
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22132
|
-
return (
|
|
22152
|
+
return (jsxRuntime.jsx(He.Item, Object.assign({ "data-slot": "command-item", className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground outline-hidden relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className) }, props)));
|
|
22133
22153
|
}
|
|
22134
22154
|
|
|
22135
22155
|
/**
|
|
@@ -22174,8 +22194,9 @@ function getOppositeAxis(axis) {
|
|
|
22174
22194
|
function getAxisLength(axis) {
|
|
22175
22195
|
return axis === 'y' ? 'height' : 'width';
|
|
22176
22196
|
}
|
|
22197
|
+
const yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);
|
|
22177
22198
|
function getSideAxis(placement) {
|
|
22178
|
-
return
|
|
22199
|
+
return yAxisSides.has(getSide(placement)) ? 'y' : 'x';
|
|
22179
22200
|
}
|
|
22180
22201
|
function getAlignmentAxis(placement) {
|
|
22181
22202
|
return getOppositeAxis(getSideAxis(placement));
|
|
@@ -22200,19 +22221,19 @@ function getExpandedPlacements(placement) {
|
|
|
22200
22221
|
function getOppositeAlignmentPlacement(placement) {
|
|
22201
22222
|
return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
|
|
22202
22223
|
}
|
|
22224
|
+
const lrPlacement = ['left', 'right'];
|
|
22225
|
+
const rlPlacement = ['right', 'left'];
|
|
22226
|
+
const tbPlacement = ['top', 'bottom'];
|
|
22227
|
+
const btPlacement = ['bottom', 'top'];
|
|
22203
22228
|
function getSideList(side, isStart, rtl) {
|
|
22204
|
-
const lr = ['left', 'right'];
|
|
22205
|
-
const rl = ['right', 'left'];
|
|
22206
|
-
const tb = ['top', 'bottom'];
|
|
22207
|
-
const bt = ['bottom', 'top'];
|
|
22208
22229
|
switch (side) {
|
|
22209
22230
|
case 'top':
|
|
22210
22231
|
case 'bottom':
|
|
22211
|
-
if (rtl) return isStart ?
|
|
22212
|
-
return isStart ?
|
|
22232
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
22233
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
22213
22234
|
case 'left':
|
|
22214
22235
|
case 'right':
|
|
22215
|
-
return isStart ?
|
|
22236
|
+
return isStart ? tbPlacement : btPlacement;
|
|
22216
22237
|
default:
|
|
22217
22238
|
return [];
|
|
22218
22239
|
}
|
|
@@ -22762,6 +22783,8 @@ const hide$2 = function (options) {
|
|
|
22762
22783
|
};
|
|
22763
22784
|
};
|
|
22764
22785
|
|
|
22786
|
+
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
22787
|
+
|
|
22765
22788
|
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
22766
22789
|
// Derivable.
|
|
22767
22790
|
|
|
@@ -22775,7 +22798,7 @@ async function convertValueToCoords(state, options) {
|
|
|
22775
22798
|
const side = getSide(placement);
|
|
22776
22799
|
const alignment = getAlignment(placement);
|
|
22777
22800
|
const isVertical = getSideAxis(placement) === 'y';
|
|
22778
|
-
const mainAxisMulti =
|
|
22801
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
22779
22802
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
22780
22803
|
const rawValue = evaluate(options, state);
|
|
22781
22804
|
|
|
@@ -22975,7 +22998,7 @@ const limitShift$2 = function (options) {
|
|
|
22975
22998
|
if (checkCrossAxis) {
|
|
22976
22999
|
var _middlewareData$offse, _middlewareData$offse2;
|
|
22977
23000
|
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
22978
|
-
const isOriginSide =
|
|
23001
|
+
const isOriginSide = originSides.has(getSide(placement));
|
|
22979
23002
|
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
22980
23003
|
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
22981
23004
|
if (crossAxisCoord < limitMin) {
|
|
@@ -23120,6 +23143,7 @@ function isShadowRoot(value) {
|
|
|
23120
23143
|
}
|
|
23121
23144
|
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
23122
23145
|
}
|
|
23146
|
+
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
|
|
23123
23147
|
function isOverflowElement(element) {
|
|
23124
23148
|
const {
|
|
23125
23149
|
overflow,
|
|
@@ -23127,27 +23151,32 @@ function isOverflowElement(element) {
|
|
|
23127
23151
|
overflowY,
|
|
23128
23152
|
display
|
|
23129
23153
|
} = getComputedStyle$1(element);
|
|
23130
|
-
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !
|
|
23154
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
|
|
23131
23155
|
}
|
|
23156
|
+
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
|
|
23132
23157
|
function isTableElement(element) {
|
|
23133
|
-
return
|
|
23158
|
+
return tableElements.has(getNodeName(element));
|
|
23134
23159
|
}
|
|
23160
|
+
const topLayerSelectors = [':popover-open', ':modal'];
|
|
23135
23161
|
function isTopLayer(element) {
|
|
23136
|
-
return
|
|
23162
|
+
return topLayerSelectors.some(selector => {
|
|
23137
23163
|
try {
|
|
23138
23164
|
return element.matches(selector);
|
|
23139
|
-
} catch (
|
|
23165
|
+
} catch (_e) {
|
|
23140
23166
|
return false;
|
|
23141
23167
|
}
|
|
23142
23168
|
});
|
|
23143
23169
|
}
|
|
23170
|
+
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
|
|
23171
|
+
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
|
|
23172
|
+
const containValues = ['paint', 'layout', 'strict', 'content'];
|
|
23144
23173
|
function isContainingBlock(elementOrCss) {
|
|
23145
23174
|
const webkit = isWebKit();
|
|
23146
23175
|
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
23147
23176
|
|
|
23148
23177
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
23149
23178
|
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
23150
|
-
return
|
|
23179
|
+
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
|
|
23151
23180
|
}
|
|
23152
23181
|
function getContainingBlock(element) {
|
|
23153
23182
|
let currentNode = getParentNode(element);
|
|
@@ -23165,8 +23194,9 @@ function isWebKit() {
|
|
|
23165
23194
|
if (typeof CSS === 'undefined' || !CSS.supports) return false;
|
|
23166
23195
|
return CSS.supports('-webkit-backdrop-filter', 'none');
|
|
23167
23196
|
}
|
|
23197
|
+
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
|
|
23168
23198
|
function isLastTraversableNode(node) {
|
|
23169
|
-
return
|
|
23199
|
+
return lastTraversableNodeNames.has(getNodeName(node));
|
|
23170
23200
|
}
|
|
23171
23201
|
function getComputedStyle$1(element) {
|
|
23172
23202
|
return getWindow(element).getComputedStyle(element);
|
|
@@ -23471,6 +23501,7 @@ function getViewportRect(element, strategy) {
|
|
|
23471
23501
|
};
|
|
23472
23502
|
}
|
|
23473
23503
|
|
|
23504
|
+
const absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);
|
|
23474
23505
|
// Returns the inner client rect, subtracting scrollbars if present.
|
|
23475
23506
|
function getInnerBoundingClientRect(element, strategy) {
|
|
23476
23507
|
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
@@ -23535,7 +23566,7 @@ function getClippingElementAncestors(element, cache) {
|
|
|
23535
23566
|
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
23536
23567
|
currentContainingBlockComputedStyle = null;
|
|
23537
23568
|
}
|
|
23538
|
-
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle &&
|
|
23569
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
23539
23570
|
if (shouldDropCurrentNode) {
|
|
23540
23571
|
// Drop non-containing blocks.
|
|
23541
23572
|
result = result.filter(ancestor => ancestor !== currentNode);
|
|
@@ -24902,16 +24933,15 @@ var Content2 = PopoverContent$1;
|
|
|
24902
24933
|
|
|
24903
24934
|
function Popover(_a) {
|
|
24904
24935
|
var props = __rest(_a, []);
|
|
24905
|
-
return
|
|
24936
|
+
return jsxRuntime.jsx(Root2, Object.assign({ "data-slot": "popover" }, props));
|
|
24906
24937
|
}
|
|
24907
24938
|
function PopoverTrigger(_a) {
|
|
24908
24939
|
var props = __rest(_a, []);
|
|
24909
|
-
return
|
|
24940
|
+
return jsxRuntime.jsx(Trigger, Object.assign({ "data-slot": "popover-trigger" }, props));
|
|
24910
24941
|
}
|
|
24911
24942
|
function PopoverContent(_a) {
|
|
24912
24943
|
var { className, align = "center", sideOffset = 4 } = _a, props = __rest(_a, ["className", "align", "sideOffset"]);
|
|
24913
|
-
return (
|
|
24914
|
-
React__namespace.createElement(Content2, Object.assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", className) }, props))));
|
|
24944
|
+
return (jsxRuntime.jsx(Portal, { children: jsxRuntime.jsx(Content2, Object.assign({ "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-popover-content-transform-origin) outline-hidden z-50 w-72 rounded-md border p-4 shadow-md", className) }, props)) }));
|
|
24915
24945
|
}
|
|
24916
24946
|
|
|
24917
24947
|
function n(){return (n=Object.assign?Object.assign.bind():function(a){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(a[t]=e[t]);}return a}).apply(this,arguments)}function e(a,n){if(null==a)return {};var e,t,r={},s=Object.keys(a);for(t=0;t<s.length;t++)n.indexOf(e=s[t])>=0||(r[e]=a[e]);return r}var t={ac:true,ad:true,ae:true,af:true,afar:true,ag:true,ai:true,al:true,am:true,ao:true,aq:true,ar:true,as:true,at:true,au:true,"au-aboriginal":true,"au-act":true,"au-nsw":true,"au-nt":true,"au-qld":true,"au-tas":true,"au-vic":true,"au-wa":true,aw:true,ax:true,az:true,ba:true,bb:true,bd:true,be:true,bf:true,bg:true,bh:true,bi:true,bj:true,bl:true,bm:true,bn:true,bo:true,"bq-bo":true,"bq-sa":true,"bq-se":true,bq:true,br:true,bs:true,bt:true,bv:true,bw:true,by:true,bz:true,"ca-bc":true,ca:true,cc:true,cd:true,cf:true,cg:true,"ch-gr":true,ch:true,ci:true,ck:true,cl:true,cm:true,"cn-xj":true,cn:true,co:true,cp:true,cq:true,cr:true,cu:true,cv:true,cw:true,cx:true,cy:true,cz:true,de:true,dg:true,dj:true,dk:true,dm:true,do:true,dz:true,ea:true,earth:true,east_african_federation:true,easter_island:true,"ec-w":true,ec:true,ee:true,eg:true,eh:true,er:true,"es-ar":true,"es-ce":true,"es-cn":true,"es-ct":true,"es-ga":true,"es-ib":true,"es-ml":true,"es-pv":true,"es-variant":true,es:true,"et-or":true,"et-ti":true,et:true,eu:true,european_union:true,ewe:true,fi:true,fj:true,fk:true,fm:true,fo:true,"fr-20r":true,"fr-bre":true,"fr-cp":true,fr:true,fx:true,ga:true,"gb-con":true,"gb-eng":true,"gb-nir":true,"gb-ork":true,"gb-sct":true,"gb-wls":true,gb:true,gd:true,"ge-ab":true,ge:true,gf:true,gg:true,gh:true,gi:true,gl:true,gm:true,gn:true,gp:true,gq:true,gr:true,gs:true,gt:true,gu:true,guarani:true,gw:true,gy:true,hausa:true,hk:true,hm:true,hmong:true,hn:true,hr:true,ht:true,hu:true,ic:true,id:true,"id-jb":true,"id-jt":true,ie:true,il:true,im:true,"in-as":true,"in-gj":true,"in-ka":true,"in-or":true,"in-tn":true,in:true,io:true,iq:true,ir:true,is:true,"it-23":true,"it-82":true,"it-88":true,it:true,je:true,jm:true,jo:true,jp:true,kanuri:true,ke:true,kg:true,kh:true,ki:true,kikuyu:true,km:true,kn:true,kongo:true,kp:true,kr:true,kurdistan:true,kw:true,ky:true,kz:true,la:true,lb:true,lc:true,li:true,lk:true,lr:true,ls:true,lt:true,lu:true,lv:true,ly:true,ma:true,malayali:true,manipur:true,maori:true,mc:true,md:true,me:true,mf:true,mg:true,mh:true,mizoram:true,mk:true,ml:true,mm:true,mn:true,mo:true,mp:true,mq:true,mr:true,ms:true,mt:true,mu:true,mv:true,mw:true,mx:true,my:true,mz:true,na:true,nato:true,nc:true,ne:true,nf:true,ng:true,ni:true,"nl-fr":true,nl:true,no:true,northern_cyprus:true,np:true,nr:true,nu:true,nz:true,occitania:true,olympics:true,om:true,otomi:true,pa:true,pe:true,pf:true,pg:true,ph:true,"pk-jk":true,"pk-sd":true,pk:true,pl:true,pm:true,pn:true,pr:true,ps:true,"pt-20":true,"pt-30":true,pt:true,pw:true,py:true,qa:true,quechua:true,re:true,ro:true,rs:true,ru:true,"ru-ba":true,"ru-ce":true,"ru-cu":true,"ru-da":true,"ru-ko":true,"ru-ta":true,"ru-ud":true,rw:true,sa:true,sami:true,sb:true,sc:true,sd:true,se:true,sg:true,"sh-ac":true,"sh-hl":true,"sh-ta":true,sh:true,si:true,sj:true,sk:true,sl:true,sm:true,sn:true,so:true,somaliland:true,south_ossetia:true,soviet_union:true,sr:true,ss:true,st:true,su:true,sv:true,sx:true,sy:true,sz:true,ta:true,tc:true,td:true,tf:true,tg:true,th:true,tibet:true,tj:true,tk:true,tl:true,tm:true,tn:true,to:true,torres_strait_islands:true,tr:true,transnistria:true,tt:true,tv:true,tw:true,tz:true,ua:true,ug:true,uk:true,um:true,un:true,united_nations:true,"us-hi":true,us:true,uy:true,uz:true,va:true,vc:true,ve:true,vg:true,vi:true,vn:true,vu:true,wf:true,wiphala:true,ws:true,xk:true,xx:true,ye:true,yorubaland:true,yt:true,za:true,zm:true,zw:true},s=["countryCode","cdnUrl"],c=function(a,e,t,r){return void 0===r&&(r=""),n({},t,{title:t.title||a,height:t.height||100,src:""+(e||"https://react-circle-flags.pages.dev/")+r+a+".svg"})},u=function(r){var i=r.countryCode,u=r.cdnUrl,o=e(r,s);return React.createElement("img",n({"data-testid":"circle-country-flag"},c(function(a){return t[a]?a:"xx"}(i).toLowerCase(),u,o)))};
|
|
@@ -33447,30 +33477,12 @@ const CountryDropdownComponent = (_a, ref) => {
|
|
|
33447
33477
|
onChange === null || onChange === void 0 ? void 0 : onChange(country);
|
|
33448
33478
|
setOpen(false);
|
|
33449
33479
|
}, [onChange]);
|
|
33450
|
-
const triggerClasses = cn("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border
|
|
33451
|
-
return (
|
|
33452
|
-
|
|
33453
|
-
|
|
33454
|
-
|
|
33455
|
-
|
|
33456
|
-
slim === false && (React.createElement("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap" }, selectedCountry.name)))) : (React.createElement("span", null, slim === false ? (placeholder || setSelectedCountry.name) : (React.createElement(Globe, { size: 20 })))),
|
|
33457
|
-
React.createElement(ChevronDown, { size: 16 })),
|
|
33458
|
-
React.createElement(PopoverContent, { collisionPadding: 10, side: "bottom", className: "min-w-[--radix-popper-anchor-width] p-0" },
|
|
33459
|
-
React.createElement(Command, { className: "w-full max-h-[200px] sm:max-h-[270px]" },
|
|
33460
|
-
React.createElement(CommandList, null,
|
|
33461
|
-
React.createElement("div", { className: "sticky top-0 z-10 bg-popover" },
|
|
33462
|
-
React.createElement(CommandInput, { placeholder: "Search country..." })),
|
|
33463
|
-
React.createElement(CommandEmpty, null, "No country found."),
|
|
33464
|
-
React.createElement(CommandGroup, null, options
|
|
33465
|
-
.filter((x) => x.name)
|
|
33466
|
-
.map((option, key) => (React.createElement(CommandItem, { className: "flex items-center w-full gap-2", key: key, onSelect: () => handleSelect(option) },
|
|
33467
|
-
React.createElement("div", { className: "flex flex-grow w-0 space-x-2 overflow-hidden" },
|
|
33468
|
-
React.createElement("div", { className: "inline-flex items-center justify-center w-5 h-5 shrink-0 overflow-hidden rounded-full" },
|
|
33469
|
-
React.createElement(u, { countryCode: option.alpha2.toLowerCase(), height: 20 })),
|
|
33470
|
-
React.createElement("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap" }, option.name)),
|
|
33471
|
-
React.createElement(Check, { className: cn("ml-auto h-4 w-4 shrink-0", option.name === (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.name)
|
|
33472
|
-
? "opacity-100"
|
|
33473
|
-
: "opacity-0") }))))))))));
|
|
33480
|
+
const triggerClasses = cn("border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", slim === true && "w-20");
|
|
33481
|
+
return (jsxRuntime.jsxs(Popover, { open: open, onOpenChange: setOpen, children: [jsxRuntime.jsxs(PopoverTrigger, Object.assign({ ref: ref, className: triggerClasses, disabled: disabled }, props, { children: [selectedCountry ? (jsxRuntime.jsxs("div", { className: "flex w-0 flex-grow items-center gap-2 overflow-hidden", children: [jsxRuntime.jsx("div", { className: "inline-flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden rounded-full", children: jsxRuntime.jsx(u, { countryCode: selectedCountry.alpha2.toLowerCase(), height: 20 }) }), slim === false && (jsxRuntime.jsx("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: selectedCountry.name }))] })) : (jsxRuntime.jsx("span", { children: slim === false ? (placeholder || setSelectedCountry.name) : (jsxRuntime.jsx(Globe, { size: 20 })) })), jsxRuntime.jsx(ChevronDown, { size: 16 })] })), jsxRuntime.jsx(PopoverContent, { collisionPadding: 10, side: "bottom", className: "min-w-[--radix-popper-anchor-width] p-0", children: jsxRuntime.jsx(Command, { className: "max-h-[200px] w-full sm:max-h-[270px]", children: jsxRuntime.jsxs(CommandList, { children: [jsxRuntime.jsx("div", { className: "bg-popover sticky top-0 z-10", children: jsxRuntime.jsx(CommandInput, { placeholder: "Search country..." }) }), jsxRuntime.jsx(CommandEmpty, { children: "No country found." }), jsxRuntime.jsx(CommandGroup, { children: options
|
|
33482
|
+
.filter((x) => x.name)
|
|
33483
|
+
.map((option, key) => (jsxRuntime.jsxs(CommandItem, { className: "flex w-full items-center gap-2", onSelect: () => handleSelect(option), children: [jsxRuntime.jsxs("div", { className: "flex w-0 flex-grow space-x-2 overflow-hidden", children: [jsxRuntime.jsx("div", { className: "inline-flex h-5 w-5 shrink-0 items-center justify-center overflow-hidden rounded-full", children: jsxRuntime.jsx(u, { countryCode: option.alpha2.toLowerCase(), height: 20 }) }), jsxRuntime.jsx("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: option.name })] }), jsxRuntime.jsx(Check, { className: cn("ml-auto h-4 w-4 shrink-0", option.name === (selectedCountry === null || selectedCountry === void 0 ? void 0 : selectedCountry.name)
|
|
33484
|
+
? "opacity-100"
|
|
33485
|
+
: "opacity-0") })] }, key))) })] }) }) })] }));
|
|
33474
33486
|
};
|
|
33475
33487
|
CountryDropdownComponent.displayName = "CountryDropdownComponent";
|
|
33476
33488
|
const CountryDropdown = React.forwardRef(CountryDropdownComponent);
|
|
@@ -33515,35 +33527,12 @@ function AddressInput() {
|
|
|
33515
33527
|
else {
|
|
33516
33528
|
form.clearErrors("address");
|
|
33517
33529
|
}
|
|
33530
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33518
33531
|
}, [open]);
|
|
33519
|
-
return (
|
|
33520
|
-
|
|
33521
|
-
|
|
33522
|
-
|
|
33523
|
-
React.createElement(FormField, { control: form.control, name: "address", render: () => (React.createElement(FormItem, null,
|
|
33524
|
-
React.createElement(FormLabel, null, t("CheckoutEmbed.CustomerForm.address.address")),
|
|
33525
|
-
React.createElement(FormControl, null,
|
|
33526
|
-
React.createElement(Input, { placeholder: t("CheckoutEmbed.CustomerForm.address.addressPlaceholder"), value: (currentValue === null || currentValue === void 0 ? void 0 : currentValue.line1) ? formatAddress(currentValue) : "", readOnly: true, className: "cursor-pointer" })),
|
|
33527
|
-
React.createElement(FormMessage, null))) }))),
|
|
33528
|
-
React.createElement(DialogContent, { className: "sm:max-w-[500px] transform-none!" },
|
|
33529
|
-
React.createElement(DialogHeader, null,
|
|
33530
|
-
React.createElement(DialogTitle, null, t("CheckoutEmbed.CustomerForm.address.title")),
|
|
33531
|
-
React.createElement(DialogDescription, null, t("CheckoutEmbed.CustomerForm.address.description"))),
|
|
33532
|
-
React.createElement("div", { className: "grid grid-cols-2 gap-4" },
|
|
33533
|
-
React.createElement(InputGroup, { className: "col-span-2", name: "address.line1", label: t("CheckoutEmbed.CustomerForm.address.line1"), placeholder: t("CheckoutEmbed.CustomerForm.address.line1Placeholder"), autoComplete: "address-line1" }),
|
|
33534
|
-
React.createElement(InputGroup, { className: "col-span-2", name: "address.line2", label: t("CheckoutEmbed.CustomerForm.address.line2"), placeholder: t("CheckoutEmbed.CustomerForm.address.line2Placeholder"), autoComplete: "address-line2" }),
|
|
33535
|
-
React.createElement(InputGroup, { name: "address.city", label: t("CheckoutEmbed.CustomerForm.address.city"), placeholder: t("CheckoutEmbed.CustomerForm.address.cityPlaceholder"), autoComplete: "address-level2" }),
|
|
33536
|
-
React.createElement(InputGroup, { name: "address.state", label: t("CheckoutEmbed.CustomerForm.address.state"), placeholder: t("CheckoutEmbed.CustomerForm.address.statePlaceholder"), autoComplete: "address-level1" }),
|
|
33537
|
-
React.createElement(InputGroup, { name: "address.zipCode", label: t("CheckoutEmbed.CustomerForm.address.zipCode"), placeholder: t("CheckoutEmbed.CustomerForm.address.zipCodePlaceholder"), autoComplete: "postal-code" }),
|
|
33538
|
-
React.createElement(FormField, { control: form.control, name: "address.country", render: ({ field }) => (React.createElement(FormItem, null,
|
|
33539
|
-
React.createElement(FormLabel, null, t("CheckoutEmbed.CustomerForm.address.country")),
|
|
33540
|
-
React.createElement(CountryDropdown, { placeholder: t("CheckoutEmbed.CustomerForm.address.countryPlaceholder"), defaultValue: field.value, onChange: (country) => {
|
|
33541
|
-
field.onChange(country.name);
|
|
33542
|
-
form.setValue("address.countryCode", country.alpha2);
|
|
33543
|
-
} }),
|
|
33544
|
-
React.createElement(FormMessage, null))) })),
|
|
33545
|
-
React.createElement(DialogFooter, null,
|
|
33546
|
-
React.createElement(Button, { onClick: handleSave, type: "button", disabled: isValidating }, t("CheckoutEmbed.CustomerForm.address.button")))))));
|
|
33532
|
+
return (jsxRuntime.jsx("div", { className: "w-full md:col-span-2", children: jsxRuntime.jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [jsxRuntime.jsx(DialogTrigger, { asChild: true, children: jsxRuntime.jsx("div", { className: "relative grid gap-2", children: jsxRuntime.jsx(FormField, { control: form.control, name: "address", render: () => (jsxRuntime.jsxs(FormItem, { children: [jsxRuntime.jsx(FormLabel, { children: t("CheckoutEmbed.CustomerForm.address.address") }), jsxRuntime.jsx(FormControl, { children: jsxRuntime.jsx(Input, { placeholder: t("CheckoutEmbed.CustomerForm.address.addressPlaceholder"), value: (currentValue === null || currentValue === void 0 ? void 0 : currentValue.line1) ? formatAddress(currentValue) : "", readOnly: true, className: "cursor-pointer" }) }), jsxRuntime.jsx(FormMessage, {})] })) }) }) }), jsxRuntime.jsxs(DialogContent, { className: "transform-none! sm:max-w-[500px]", children: [jsxRuntime.jsxs(DialogHeader, { children: [jsxRuntime.jsx(DialogTitle, { children: t("CheckoutEmbed.CustomerForm.address.title") }), jsxRuntime.jsx(DialogDescription, { children: t("CheckoutEmbed.CustomerForm.address.description") })] }), jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-4", children: [jsxRuntime.jsx(InputGroup, { className: "col-span-2", name: "address.line1", label: t("CheckoutEmbed.CustomerForm.address.line1"), placeholder: t("CheckoutEmbed.CustomerForm.address.line1Placeholder"), autoComplete: "address-line1" }), jsxRuntime.jsx(InputGroup, { className: "col-span-2", name: "address.line2", label: t("CheckoutEmbed.CustomerForm.address.line2"), placeholder: t("CheckoutEmbed.CustomerForm.address.line2Placeholder"), autoComplete: "address-line2" }), jsxRuntime.jsx(InputGroup, { name: "address.city", label: t("CheckoutEmbed.CustomerForm.address.city"), placeholder: t("CheckoutEmbed.CustomerForm.address.cityPlaceholder"), autoComplete: "address-level2" }), jsxRuntime.jsx(InputGroup, { name: "address.state", label: t("CheckoutEmbed.CustomerForm.address.state"), placeholder: t("CheckoutEmbed.CustomerForm.address.statePlaceholder"), autoComplete: "address-level1" }), jsxRuntime.jsx(InputGroup, { name: "address.zipCode", label: t("CheckoutEmbed.CustomerForm.address.zipCode"), placeholder: t("CheckoutEmbed.CustomerForm.address.zipCodePlaceholder"), autoComplete: "postal-code" }), jsxRuntime.jsx(FormField, { control: form.control, name: "address.country", render: ({ field }) => (jsxRuntime.jsxs(FormItem, { children: [jsxRuntime.jsx(FormLabel, { children: t("CheckoutEmbed.CustomerForm.address.country") }), jsxRuntime.jsx(CountryDropdown, { placeholder: t("CheckoutEmbed.CustomerForm.address.countryPlaceholder"), defaultValue: field.value, onChange: (country) => {
|
|
33533
|
+
field.onChange(country.name);
|
|
33534
|
+
form.setValue("address.countryCode", country.alpha2);
|
|
33535
|
+
} }), jsxRuntime.jsx(FormMessage, {})] })) })] }), jsxRuntime.jsx(DialogFooter, { children: jsxRuntime.jsx(Button, { onClick: handleSave, type: "button", disabled: isValidating, children: t("CheckoutEmbed.CustomerForm.address.button") }) })] })] }) }));
|
|
33547
33536
|
}
|
|
33548
33537
|
|
|
33549
33538
|
function CustomerForm({ initialData, onSubmit, }) {
|
|
@@ -33566,17 +33555,7 @@ function CustomerForm({ initialData, onSubmit, }) {
|
|
|
33566
33555
|
},
|
|
33567
33556
|
mode: "onBlur",
|
|
33568
33557
|
});
|
|
33569
|
-
return (
|
|
33570
|
-
React.createElement("form", { onSubmit: form.handleSubmit(onSubmit), className: "md:grid-cols-2 gap-6 grid" },
|
|
33571
|
-
React.createElement("div", { className: "md:col-span-2" },
|
|
33572
|
-
React.createElement("h2", null, t("CheckoutEmbed.CustomerForm.title"))),
|
|
33573
|
-
React.createElement(InputGroup, { className: "md:col-span-2", name: "email", label: t("CheckoutEmbed.CustomerForm.email"), placeholder: t("CheckoutEmbed.CustomerForm.emailPlaceholder"), type: "email", autoComplete: "email" }),
|
|
33574
|
-
React.createElement(InputGroup, { name: "firstName", label: t("CheckoutEmbed.CustomerForm.firstName"), placeholder: t("CheckoutEmbed.CustomerForm.firstNamePlaceholder"), autoComplete: "given-name" }),
|
|
33575
|
-
React.createElement(InputGroup, { name: "lastName", label: t("CheckoutEmbed.CustomerForm.lastName"), placeholder: t("CheckoutEmbed.CustomerForm.lastNamePlaceholder"), autoComplete: "family-name" }),
|
|
33576
|
-
React.createElement(AddressInput, null),
|
|
33577
|
-
React.createElement(InputGroup, { name: "phone", label: t("CheckoutEmbed.CustomerForm.phone"), placeholder: t("CheckoutEmbed.CustomerForm.phonePlaceholder"), type: "tel", autoComplete: "tel" }),
|
|
33578
|
-
React.createElement("div", { className: "flex md:col-span-2 justify-end pt-2" },
|
|
33579
|
-
React.createElement(SubmitButton, { isValid: form.formState.isValid, isSubmitting: form.formState.isSubmitting }, t("CheckoutEmbed.CustomerForm.button"))))));
|
|
33558
|
+
return (jsxRuntime.jsx(Form, Object.assign({}, form, { children: jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "grid gap-6 md:grid-cols-2", children: [jsxRuntime.jsx("div", { className: "md:col-span-2", children: jsxRuntime.jsx("h2", { children: t("CheckoutEmbed.CustomerForm.title") }) }), jsxRuntime.jsx(InputGroup, { className: "md:col-span-2", name: "email", label: t("CheckoutEmbed.CustomerForm.email"), placeholder: t("CheckoutEmbed.CustomerForm.emailPlaceholder"), type: "email", autoComplete: "email" }), jsxRuntime.jsx(InputGroup, { name: "firstName", label: t("CheckoutEmbed.CustomerForm.firstName"), placeholder: t("CheckoutEmbed.CustomerForm.firstNamePlaceholder"), autoComplete: "given-name" }), jsxRuntime.jsx(InputGroup, { name: "lastName", label: t("CheckoutEmbed.CustomerForm.lastName"), placeholder: t("CheckoutEmbed.CustomerForm.lastNamePlaceholder"), autoComplete: "family-name" }), jsxRuntime.jsx(AddressInput, {}), jsxRuntime.jsx(InputGroup, { name: "phone", label: t("CheckoutEmbed.CustomerForm.phone"), placeholder: t("CheckoutEmbed.CustomerForm.phonePlaceholder"), type: "tel", autoComplete: "tel" }), jsxRuntime.jsx("div", { className: "flex justify-end pt-2 md:col-span-2", children: jsxRuntime.jsx(SubmitButton, { isValid: form.formState.isValid, isSubmitting: form.formState.isSubmitting, children: t("CheckoutEmbed.CustomerForm.button") }) })] }) })));
|
|
33580
33559
|
}
|
|
33581
33560
|
|
|
33582
33561
|
var reactStripe_umd$1 = {exports: {}};
|
|
@@ -35110,22 +35089,15 @@ const CheckoutForm$1 = ({ onSuccess, onError, children, setSubmitting, }) => {
|
|
|
35110
35089
|
const wrapper = document.getElementById("bs-wrapper");
|
|
35111
35090
|
if (!wrapper)
|
|
35112
35091
|
return null;
|
|
35113
|
-
return (
|
|
35114
|
-
|
|
35115
|
-
|
|
35116
|
-
|
|
35117
|
-
|
|
35118
|
-
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
height: rect === null || rect === void 0 ? void 0 : rect.height,
|
|
35123
|
-
} },
|
|
35124
|
-
React.createElement("form", { onSubmit: handleSubmit },
|
|
35125
|
-
React.createElement("div", null,
|
|
35126
|
-
React.createElement(reactStripe_umdExports.PaymentElement, null),
|
|
35127
|
-
React.createElement("p", { style: { color: "#fb2c36" } }, errorMessage)),
|
|
35128
|
-
children)), wrapper)));
|
|
35092
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { ref: containerRef, className: "h-[450px] w-full" }), ReactDOM.createPortal(jsxRuntime.jsx("div", { style: {
|
|
35093
|
+
display: "block",
|
|
35094
|
+
zIndex: 20,
|
|
35095
|
+
position: "absolute",
|
|
35096
|
+
top: rect === null || rect === void 0 ? void 0 : rect.top,
|
|
35097
|
+
left: rect === null || rect === void 0 ? void 0 : rect.left,
|
|
35098
|
+
width: rect === null || rect === void 0 ? void 0 : rect.width,
|
|
35099
|
+
height: rect === null || rect === void 0 ? void 0 : rect.height,
|
|
35100
|
+
}, children: jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(reactStripe_umdExports.PaymentElement, {}), jsxRuntime.jsx("p", { style: { color: "#fb2c36" }, children: errorMessage })] }), children] }) }), wrapper)] }));
|
|
35129
35101
|
};
|
|
35130
35102
|
var CheckoutForm$2 = React.memo(CheckoutForm$1);
|
|
35131
35103
|
|
|
@@ -35137,56 +35109,24 @@ function PaymentElement({ paymentSecret, publicKey, checkoutAppearance, locale,
|
|
|
35137
35109
|
clientSecret: paymentSecret,
|
|
35138
35110
|
fonts: fonts,
|
|
35139
35111
|
};
|
|
35140
|
-
return (
|
|
35141
|
-
React.createElement(CheckoutForm$2, { onSuccess: onSuccess, onError: onError, children: children, setSubmitting: setSubmitting })));
|
|
35112
|
+
return (jsxRuntime.jsx(reactStripe_umdExports.Elements, { stripe: stripePromise, options: options, children: jsxRuntime.jsx(CheckoutForm$2, { onSuccess: onSuccess, onError: onError, setSubmitting: setSubmitting, children: children }) }));
|
|
35142
35113
|
}
|
|
35143
35114
|
var PaymentElement$1 = React.memo(PaymentElement);
|
|
35144
35115
|
|
|
35145
35116
|
function PaymentForm({ paymentSecret, onSuccess, onError, onBack, onDoubleBack, contactEmail, shippingAddress, shippingName, shippingPrice, checkoutAppearance, fonts, locale, publicKey, paymentComponentKey, }) {
|
|
35146
35117
|
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
35147
35118
|
const { t } = useTranslation();
|
|
35148
|
-
return (
|
|
35149
|
-
|
|
35150
|
-
|
|
35151
|
-
|
|
35152
|
-
|
|
35153
|
-
|
|
35154
|
-
React.createElement("p", null,
|
|
35155
|
-
React.createElement("span", { className: "font-medium" }, t("CheckoutEmbed.Shipping.contact")),
|
|
35156
|
-
" ",
|
|
35157
|
-
React.createElement("span", { className: "text-muted-foreground" }, contactEmail)),
|
|
35158
|
-
React.createElement(Button, { variant: "link", size: "link", onClick: onDoubleBack }, t("CheckoutEmbed.Shipping.change"))),
|
|
35159
|
-
React.createElement("div", { className: "flex items-center justify-between text-sm" },
|
|
35160
|
-
React.createElement("p", null,
|
|
35161
|
-
React.createElement("span", { className: "font-medium" }, t("CheckoutEmbed.Shipping.address")),
|
|
35162
|
-
" ",
|
|
35163
|
-
React.createElement("span", { className: "text-muted-foreground" }, shippingAddress)),
|
|
35164
|
-
React.createElement(Button, { variant: "link", size: "link", onClick: onDoubleBack }, t("CheckoutEmbed.Shipping.change"))),
|
|
35165
|
-
React.createElement("div", { className: "flex items-center justify-between text-sm" },
|
|
35166
|
-
React.createElement("p", null,
|
|
35167
|
-
React.createElement("span", { className: "font-medium" }, t("CheckoutEmbed.Shipping.shipping")),
|
|
35168
|
-
" ",
|
|
35169
|
-
React.createElement("span", { className: "text-muted-foreground" },
|
|
35170
|
-
shippingName,
|
|
35171
|
-
" \u00B7 ",
|
|
35172
|
-
shippingPrice)),
|
|
35173
|
-
React.createElement(Button, { variant: "link", size: "link", onClick: onBack }, t("CheckoutEmbed.Shipping.change")))),
|
|
35174
|
-
React.createElement("div", { className: "mt-8" }, paymentSecret && (React.createElement(PaymentElement$1, { key: paymentComponentKey, fonts: fonts, checkoutAppearance: convertCheckoutAppearanceToStripeAppearance(checkoutAppearance, fonts), locale: locale, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, setSubmitting: setIsSubmitting, publicKey: publicKey },
|
|
35175
|
-
React.createElement("div", { style: {
|
|
35176
|
-
display: "flex",
|
|
35177
|
-
justifyContent: "space-between",
|
|
35178
|
-
alignItems: "center",
|
|
35179
|
-
paddingTop: "2rem",
|
|
35180
|
-
} },
|
|
35181
|
-
React.createElement(Button, { type: "button", variant: "ghost", onClick: onBack },
|
|
35182
|
-
React.createElement(ChevronLeft, null),
|
|
35183
|
-
t("CheckoutEmbed.Payment.back")),
|
|
35184
|
-
React.createElement(SubmitButton, { isValid: true, isSubmitting: isSubmitting }, t("CheckoutEmbed.Payment.button"))))))));
|
|
35119
|
+
return (jsxRuntime.jsxs("div", { className: "space-y-6", children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("h2", { className: "mb-2", children: t("CheckoutEmbed.Payment.title") }), jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: t("CheckoutEmbed.Payment.description") })] }), jsxRuntime.jsxs("div", { className: "space-y-2", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: shippingAddress })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onDoubleBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.shipping") }), " ", jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [shippingName, " \u00B7 ", shippingPrice] })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsxRuntime.jsx("div", { className: "mt-8", children: paymentSecret && (jsxRuntime.jsx(PaymentElement$1, { fonts: fonts, checkoutAppearance: convertCheckoutAppearanceToStripeAppearance(checkoutAppearance, fonts), locale: locale, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, setSubmitting: setIsSubmitting, publicKey: publicKey, children: jsxRuntime.jsxs("div", { style: {
|
|
35120
|
+
display: "flex",
|
|
35121
|
+
justifyContent: "space-between",
|
|
35122
|
+
alignItems: "center",
|
|
35123
|
+
paddingTop: "2rem",
|
|
35124
|
+
}, children: [jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", onClick: onBack, children: [jsxRuntime.jsx(ChevronLeft, {}), t("CheckoutEmbed.Payment.back")] }), jsxRuntime.jsx(SubmitButton, { isValid: true, isSubmitting: isSubmitting, children: t("CheckoutEmbed.Payment.button") })] }) }, paymentComponentKey)) })] }));
|
|
35185
35125
|
}
|
|
35186
35126
|
|
|
35187
35127
|
function Skeleton(_a) {
|
|
35188
35128
|
var { className } = _a, props = __rest(_a, ["className"]);
|
|
35189
|
-
return (
|
|
35129
|
+
return (jsxRuntime.jsx("div", Object.assign({ "data-slot": "skeleton", className: cn("bg-accent animate-pulse rounded-md", className) }, props)));
|
|
35190
35130
|
}
|
|
35191
35131
|
|
|
35192
35132
|
function ZasilkovnaShippingOption({ children, onPickupPointSelected, locale, countryCode, apiKey, }) {
|
|
@@ -35225,15 +35165,14 @@ function ZasilkovnaShippingOption({ children, onPickupPointSelected, locale, cou
|
|
|
35225
35165
|
console.error("Packeta widget not found", window);
|
|
35226
35166
|
}
|
|
35227
35167
|
};
|
|
35228
|
-
return (
|
|
35229
|
-
React.createElement("div", { onClick: () => handleClick() }, children)));
|
|
35168
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { onClick: () => handleClick(), children: children }) }));
|
|
35230
35169
|
}
|
|
35231
35170
|
|
|
35232
35171
|
function ShippingOptionWrapper({ rate, children, onPickupPointSelected, locale, countryCode, }) {
|
|
35233
35172
|
if (rate.provider === "zasilkovna") {
|
|
35234
|
-
return (
|
|
35173
|
+
return (jsxRuntime.jsx(ZasilkovnaShippingOption, { onPickupPointSelected: onPickupPointSelected, locale: locale, countryCode: countryCode, apiKey: rate.clientSecret, children: children }));
|
|
35235
35174
|
}
|
|
35236
|
-
return
|
|
35175
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: children });
|
|
35237
35176
|
}
|
|
35238
35177
|
|
|
35239
35178
|
function ShippingMethodForm({ shippingRates, initialData, onSubmit, onBack, contactEmail, shippingAddress, currency, exchangeRate, locale, countryCode, setFormData, formData, }) {
|
|
@@ -35250,77 +35189,38 @@ function ShippingMethodForm({ shippingRates, initialData, onSubmit, onBack, cont
|
|
|
35250
35189
|
},
|
|
35251
35190
|
});
|
|
35252
35191
|
const currentRateId = form.watch("rateId");
|
|
35253
|
-
return (
|
|
35254
|
-
|
|
35255
|
-
|
|
35256
|
-
|
|
35257
|
-
|
|
35258
|
-
|
|
35259
|
-
|
|
35260
|
-
|
|
35261
|
-
|
|
35262
|
-
|
|
35263
|
-
|
|
35264
|
-
|
|
35265
|
-
|
|
35266
|
-
|
|
35267
|
-
|
|
35268
|
-
|
|
35269
|
-
|
|
35270
|
-
|
|
35271
|
-
|
|
35272
|
-
|
|
35273
|
-
|
|
35274
|
-
|
|
35275
|
-
|
|
35276
|
-
|
|
35277
|
-
|
|
35278
|
-
|
|
35279
|
-
|
|
35280
|
-
|
|
35281
|
-
|
|
35282
|
-
rateId,
|
|
35283
|
-
provider: rate.provider,
|
|
35284
|
-
price: intPrice,
|
|
35285
|
-
name: rate.name,
|
|
35286
|
-
pickupPointId: rate.provider === "zasilkovna" ? pickupPointId : "",
|
|
35287
|
-
pickupPointDisplayName: rate.provider === "zasilkovna" ? pickupPointName : "",
|
|
35288
|
-
};
|
|
35289
|
-
form.setValue("rateId", newFormData.rateId);
|
|
35290
|
-
form.setValue("provider", newFormData.provider);
|
|
35291
|
-
form.setValue("name", newFormData.name);
|
|
35292
|
-
form.setValue("price", newFormData.price);
|
|
35293
|
-
form.setValue("pickupPointId", newFormData.pickupPointId);
|
|
35294
|
-
form.setValue("pickupPointDisplayName", newFormData.pickupPointDisplayName);
|
|
35295
|
-
setFormData(Object.assign(Object.assign({}, formData), { shipping: Object.assign({}, newFormData) }));
|
|
35296
|
-
}, locale: locale, countryCode: countryCode },
|
|
35297
|
-
React.createElement("div", { className: clsx("p-4 cursor-pointer rounded-md border bg-background", {
|
|
35298
|
-
"bg-muted border-primary": currentRateId === rateId,
|
|
35299
|
-
}) },
|
|
35300
|
-
React.createElement("div", { className: "flex items-center justify-between w-full" },
|
|
35301
|
-
React.createElement("p", null, rate.name),
|
|
35302
|
-
React.createElement("p", null, displayPrice)),
|
|
35303
|
-
React.createElement("p", { className: "text-sm text-muted-foreground" }, description),
|
|
35304
|
-
pickupPointDisplayName && (React.createElement(React.Fragment, null,
|
|
35305
|
-
React.createElement("hr", { className: "my-2" }),
|
|
35306
|
-
React.createElement("p", { className: "text-sm text-muted-foreground" },
|
|
35307
|
-
t("CheckoutEmbed.Shipping.description.shippedTo"),
|
|
35308
|
-
" ",
|
|
35309
|
-
React.createElement("span", { className: "text-foreground" }, pickupPointDisplayName)))))));
|
|
35310
|
-
}),
|
|
35311
|
-
React.createElement(FormMessage, null, (_a = form.formState.errors.rateId) === null || _a === void 0 ? void 0 : _a.message),
|
|
35312
|
-
React.createElement("div", { className: "flex justify-between items-center pt-4" },
|
|
35313
|
-
React.createElement(Button, { type: "button", variant: "ghost", onClick: onBack },
|
|
35314
|
-
React.createElement(ChevronLeft, null),
|
|
35315
|
-
t("CheckoutEmbed.Shipping.back")),
|
|
35316
|
-
React.createElement(SubmitButton, { isSubmitting: form.formState.isSubmitting, isValid: !!currentRateId }, t("CheckoutEmbed.Shipping.button")))))));
|
|
35192
|
+
return (jsxRuntime.jsxs("div", { className: "space-y-6", children: [jsxRuntime.jsx("h2", { children: t("CheckoutEmbed.Shipping.title") }), jsxRuntime.jsxs("div", { className: "space-y-2 pb-2", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.contact") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: contactEmail })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between text-sm", children: [jsxRuntime.jsxs("p", { children: [jsxRuntime.jsx("span", { className: "font-medium", children: t("CheckoutEmbed.Shipping.address") }), " ", jsxRuntime.jsx("span", { className: "text-muted-foreground", children: shippingAddress })] }), jsxRuntime.jsx(Button, { variant: "link", size: "link", onClick: onBack, children: t("CheckoutEmbed.Shipping.change") })] })] }), jsxRuntime.jsx(Form, Object.assign({}, form, { children: jsxRuntime.jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [shippingRates.length === 0 &&
|
|
35193
|
+
Array.from({ length: 3 }).map((_, index) => (jsxRuntime.jsx(ShippingRateLoading, {}, index))), shippingRates.map((rate) => {
|
|
35194
|
+
const pickupPointDisplayName = form.watch("pickupPointDisplayName");
|
|
35195
|
+
const rateId = rate.provider + rate.name;
|
|
35196
|
+
const intPrice = Math.ceil(Number(rate.price));
|
|
35197
|
+
const displayPrice = storeHelpers.formatPrice(intPrice, currency, exchangeRate);
|
|
35198
|
+
const description = rate.provider === "zasilkovna"
|
|
35199
|
+
? t("CheckoutEmbed.Shipping.description.zasilkovna")
|
|
35200
|
+
: t("CheckoutEmbed.Shipping.description.other");
|
|
35201
|
+
return (jsxRuntime.jsx(ShippingOptionWrapper, { rate: rate, onPickupPointSelected: (pickupPointId, pickupPointName) => {
|
|
35202
|
+
const newFormData = {
|
|
35203
|
+
rateId,
|
|
35204
|
+
provider: rate.provider,
|
|
35205
|
+
price: intPrice,
|
|
35206
|
+
name: rate.name,
|
|
35207
|
+
pickupPointId: rate.provider === "zasilkovna" ? pickupPointId : "",
|
|
35208
|
+
pickupPointDisplayName: rate.provider === "zasilkovna" ? pickupPointName : "",
|
|
35209
|
+
};
|
|
35210
|
+
form.setValue("rateId", newFormData.rateId);
|
|
35211
|
+
form.setValue("provider", newFormData.provider);
|
|
35212
|
+
form.setValue("name", newFormData.name);
|
|
35213
|
+
form.setValue("price", newFormData.price);
|
|
35214
|
+
form.setValue("pickupPointId", newFormData.pickupPointId);
|
|
35215
|
+
form.setValue("pickupPointDisplayName", newFormData.pickupPointDisplayName);
|
|
35216
|
+
setFormData(Object.assign(Object.assign({}, formData), { shipping: Object.assign({}, newFormData) }));
|
|
35217
|
+
}, locale: locale, countryCode: countryCode, children: jsxRuntime.jsxs("div", { className: clsx("bg-background cursor-pointer rounded-md border p-4", {
|
|
35218
|
+
"bg-muted border-primary": currentRateId === rateId,
|
|
35219
|
+
}), children: [jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxRuntime.jsx("p", { children: rate.name }), jsxRuntime.jsx("p", { children: displayPrice })] }), jsxRuntime.jsx("p", { className: "text-muted-foreground text-sm", children: description }), pickupPointDisplayName && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("hr", { className: "my-2" }), jsxRuntime.jsxs("p", { className: "text-muted-foreground text-sm", children: [t("CheckoutEmbed.Shipping.description.shippedTo"), " ", jsxRuntime.jsx("span", { className: "text-foreground", children: pickupPointDisplayName })] })] }))] }) }, rateId));
|
|
35220
|
+
}), jsxRuntime.jsx(FormMessage, { children: (_a = form.formState.errors.rateId) === null || _a === void 0 ? void 0 : _a.message }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-4", children: [jsxRuntime.jsxs(Button, { type: "button", variant: "ghost", onClick: onBack, children: [jsxRuntime.jsx(ChevronLeft, {}), t("CheckoutEmbed.Shipping.back")] }), jsxRuntime.jsx(SubmitButton, { isSubmitting: form.formState.isSubmitting, isValid: !!currentRateId, children: t("CheckoutEmbed.Shipping.button") })] })] }) }))] }));
|
|
35317
35221
|
}
|
|
35318
35222
|
function ShippingRateLoading() {
|
|
35319
|
-
return (
|
|
35320
|
-
React.createElement("div", { className: "flex items-center justify-between w-full" },
|
|
35321
|
-
React.createElement(Skeleton, { className: "w-12 h-5" }),
|
|
35322
|
-
React.createElement(Skeleton, { className: "w-16 h-5" })),
|
|
35323
|
-
React.createElement(Skeleton, { className: "w-40 h-3.5" })));
|
|
35223
|
+
return (jsxRuntime.jsxs("div", { className: clsx("bg-background grid cursor-pointer gap-[10px] rounded-md border p-4"), children: [jsxRuntime.jsxs("div", { className: "flex w-full items-center justify-between", children: [jsxRuntime.jsx(Skeleton, { className: "h-5 w-12" }), jsxRuntime.jsx(Skeleton, { className: "h-5 w-16" })] }), jsxRuntime.jsx(Skeleton, { className: "h-3.5 w-40" })] }));
|
|
35324
35224
|
}
|
|
35325
35225
|
|
|
35326
35226
|
const useFormStore = create()(persist((set) => ({
|
|
@@ -35354,9 +35254,11 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
|
|
|
35354
35254
|
if (!isCustomerValid)
|
|
35355
35255
|
setStep("customer");
|
|
35356
35256
|
}
|
|
35257
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35357
35258
|
}, [step, formData]);
|
|
35358
35259
|
React.useEffect(() => {
|
|
35359
35260
|
validateStep();
|
|
35261
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35360
35262
|
}, [step]);
|
|
35361
35263
|
React.useEffect(() => {
|
|
35362
35264
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21;
|
|
@@ -35416,6 +35318,7 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
|
|
|
35416
35318
|
},
|
|
35417
35319
|
} }));
|
|
35418
35320
|
}
|
|
35321
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35419
35322
|
}, [customer]);
|
|
35420
35323
|
React.useEffect(() => {
|
|
35421
35324
|
if (step !== "shipping")
|
|
@@ -35433,6 +35336,7 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
|
|
|
35433
35336
|
}
|
|
35434
35337
|
});
|
|
35435
35338
|
getShippingRates();
|
|
35339
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35436
35340
|
}, [step, clientSecret, checkoutId]);
|
|
35437
35341
|
// Handle address form submission
|
|
35438
35342
|
const handleCustomerSubmit = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -35494,33 +35398,22 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
|
|
|
35494
35398
|
};
|
|
35495
35399
|
const renderStep = () => {
|
|
35496
35400
|
if (step === "payment" && formData.customer && formData.shipping) {
|
|
35497
|
-
return (
|
|
35401
|
+
return (jsxRuntime.jsx(PaymentForm, { paymentComponentKey: paymentComponentKey, locale: locale, fonts: fonts, checkoutAppearance: checkoutAppearance, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, onBack: handleBack, onDoubleBack: handleDoubleBack, contactEmail: formData.customer.email, shippingAddress: formatAddress(formData.customer.address), shippingName: formData.shipping.name, shippingPrice: storeHelpers.formatPrice(formData.shipping.price, currency, exchangeRate), publicKey: publicKey }));
|
|
35498
35402
|
}
|
|
35499
35403
|
if (step === "shipping" && formData.customer) {
|
|
35500
|
-
return (
|
|
35404
|
+
return (jsxRuntime.jsx(ShippingMethodForm, { setFormData: setFormData, formData: formData, shippingRates: shippingRates, initialData: formData.shipping, onSubmit: handleShippingSubmit, onBack: handleBack, contactEmail: formData.customer.email, shippingAddress: formatAddress(formData.customer.address), currency: currency, exchangeRate: exchangeRate, locale: locale, countryCode: formData.customer.address.countryCode }));
|
|
35501
35405
|
}
|
|
35502
|
-
return (
|
|
35406
|
+
return (jsxRuntime.jsx(CustomerForm, { initialData: formData.customer, onSubmit: handleCustomerSubmit }));
|
|
35503
35407
|
};
|
|
35504
|
-
return
|
|
35408
|
+
return jsxRuntime.jsx("div", { className: "relative h-max min-h-full w-full", children: renderStep() });
|
|
35505
35409
|
}
|
|
35506
35410
|
|
|
35507
35411
|
function CheckoutFormLoading() {
|
|
35508
35412
|
const { t } = useTranslation();
|
|
35509
|
-
return (
|
|
35510
|
-
React.createElement("div", { className: "md:col-span-2" },
|
|
35511
|
-
React.createElement("h2", null, t("CheckoutEmbed.CustomerForm.title"))),
|
|
35512
|
-
React.createElement(InputGroupLoading, { className: "md:col-span-2" }),
|
|
35513
|
-
React.createElement(InputGroupLoading, null),
|
|
35514
|
-
React.createElement(InputGroupLoading, null),
|
|
35515
|
-
React.createElement(InputGroupLoading, { className: "md:col-span-2" }),
|
|
35516
|
-
React.createElement(InputGroupLoading, null),
|
|
35517
|
-
React.createElement("div", { className: "flex md:col-span-2 justify-end pt-2" },
|
|
35518
|
-
React.createElement(Skeleton, { className: "w-32 h-10" }))));
|
|
35413
|
+
return (jsxRuntime.jsxs("div", { className: "grid gap-6 md:grid-cols-2", children: [jsxRuntime.jsx("div", { className: "md:col-span-2", children: jsxRuntime.jsx("h2", { children: t("CheckoutEmbed.CustomerForm.title") }) }), jsxRuntime.jsx(InputGroupLoading, { className: "md:col-span-2" }), jsxRuntime.jsx(InputGroupLoading, {}), jsxRuntime.jsx(InputGroupLoading, {}), jsxRuntime.jsx(InputGroupLoading, { className: "md:col-span-2" }), jsxRuntime.jsx(InputGroupLoading, {}), jsxRuntime.jsx("div", { className: "flex justify-end pt-2 md:col-span-2", children: jsxRuntime.jsx(Skeleton, { className: "h-10 w-32" }) })] }));
|
|
35519
35414
|
}
|
|
35520
35415
|
function InputGroupLoading({ className }) {
|
|
35521
|
-
return (
|
|
35522
|
-
React.createElement(Skeleton, { className: "w-10 h-3" }),
|
|
35523
|
-
React.createElement(Skeleton, { className: "w-full h-10" })));
|
|
35416
|
+
return (jsxRuntime.jsxs("div", { className: clsx("flex flex-col gap-2", className), children: [jsxRuntime.jsx(Skeleton, { className: "h-3 w-10" }), jsxRuntime.jsx(Skeleton, { className: "h-10 w-full" })] }));
|
|
35524
35417
|
}
|
|
35525
35418
|
|
|
35526
35419
|
function DiscountCode({ applyDiscountCode, }) {
|
|
@@ -35545,15 +35438,10 @@ function DiscountCode({ applyDiscountCode, }) {
|
|
|
35545
35438
|
setIsLoading(false);
|
|
35546
35439
|
}
|
|
35547
35440
|
});
|
|
35548
|
-
return (
|
|
35549
|
-
|
|
35550
|
-
|
|
35551
|
-
|
|
35552
|
-
setError("");
|
|
35553
|
-
setDiscountCode(e.target.value);
|
|
35554
|
-
}, name: "discountCode", placeholder: t("CheckoutEmbed.Summary.discountCodePlaceholder") }),
|
|
35555
|
-
React.createElement(SubmitButton, { isSubmitting: isLoading, isValid: isValid, type: "submit" }, t("CheckoutEmbed.Summary.discountCodeApply"))),
|
|
35556
|
-
error && React.createElement("p", { className: "text-red-500 mt-2 text-sm" }, error)));
|
|
35441
|
+
return (jsxRuntime.jsxs("form", { className: "pb-1", onSubmit: handleSubmit, children: [jsxRuntime.jsx(Label, { className: "mb-2 text-sm font-medium", children: t("CheckoutEmbed.Summary.discountCodeLabel") }), jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [jsxRuntime.jsx(Input, { "aria-invalid": !!error, value: discountCode, onChange: (e) => {
|
|
35442
|
+
setError("");
|
|
35443
|
+
setDiscountCode(e.target.value);
|
|
35444
|
+
}, name: "discountCode", placeholder: t("CheckoutEmbed.Summary.discountCodePlaceholder") }), jsxRuntime.jsx(SubmitButton, { isSubmitting: isLoading, isValid: isValid, type: "submit", children: t("CheckoutEmbed.Summary.discountCodeApply") })] }), error && jsxRuntime.jsx("p", { className: "mt-2 text-sm text-red-500", children: error })] }));
|
|
35557
35445
|
}
|
|
35558
35446
|
|
|
35559
35447
|
function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency, onCancel, exchangeRate, applyDiscountCode, removeDiscount, }) {
|
|
@@ -35582,105 +35470,65 @@ function CheckoutSummary({ appliedDiscounts, lineItems, shipping, tax, currency,
|
|
|
35582
35470
|
return intersection.filter((combination) => currentCombinations.some((currentCombination) => JSON.stringify(currentCombination) === JSON.stringify(combination)));
|
|
35583
35471
|
}, []);
|
|
35584
35472
|
const canCombine = appliedDiscounts.length === 0 || sharedCombinations.length > 0;
|
|
35585
|
-
return (
|
|
35586
|
-
|
|
35587
|
-
|
|
35588
|
-
|
|
35589
|
-
|
|
35590
|
-
|
|
35591
|
-
|
|
35592
|
-
|
|
35593
|
-
|
|
35594
|
-
|
|
35595
|
-
|
|
35596
|
-
|
|
35597
|
-
|
|
35598
|
-
|
|
35599
|
-
|
|
35600
|
-
|
|
35601
|
-
|
|
35602
|
-
|
|
35603
|
-
|
|
35604
|
-
React.createElement("p", null, isShippingFree
|
|
35605
|
-
? t("CheckoutEmbed.Summary.free")
|
|
35606
|
-
: !!shippingPrice
|
|
35607
|
-
? storeHelpers.formatPrice(shippingPrice, currency, exchangeRate)
|
|
35608
|
-
: t("CheckoutEmbed.Summary.calculatedAtNextStep"))),
|
|
35609
|
-
!!tax && (React.createElement("div", { className: "flex justify-between" },
|
|
35610
|
-
React.createElement("p", null, t("CheckoutEmbed.Summary.tax")),
|
|
35611
|
-
React.createElement("p", null, storeHelpers.formatPrice(tax, currency, exchangeRate)))),
|
|
35612
|
-
filteredDiscounts.map(({ discount, amount, id }) => {
|
|
35613
|
-
var _a;
|
|
35614
|
-
return (React.createElement("div", { key: discount.id, className: "flex justify-between text-muted-foreground" },
|
|
35615
|
-
React.createElement(DiscountItem, { id: id, removeDiscount: removeDiscount, label: (_a = ((discount === null || discount === void 0 ? void 0 : discount.code) || (discount === null || discount === void 0 ? void 0 : discount.title))) !== null && _a !== void 0 ? _a : "", canRemove: discount.method === "CODE" }),
|
|
35616
|
-
React.createElement("p", null,
|
|
35617
|
-
"- ",
|
|
35618
|
-
storeHelpers.formatPrice(amount, currency, exchangeRate))));
|
|
35619
|
-
}),
|
|
35620
|
-
React.createElement("div", { className: "flex font-bold justify-between items-center" },
|
|
35621
|
-
React.createElement("p", null, t("CheckoutEmbed.Summary.total")),
|
|
35622
|
-
React.createElement("p", null, storeHelpers.formatPrice(totalWithDiscounts, currency, exchangeRate)))),
|
|
35623
|
-
canCombine && (React.createElement(React.Fragment, null,
|
|
35624
|
-
React.createElement("hr", { className: clsx("order-7 md:order-none", {
|
|
35473
|
+
return (jsxRuntime.jsxs("div", { className: "grid gap-5", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [jsxRuntime.jsxs("div", { onClick: () => setIsOpen(!isOpen), className: "flex items-center gap-2 max-md:cursor-pointer", children: [jsxRuntime.jsx("h2", { children: t("CheckoutEmbed.Summary.title") }), jsxRuntime.jsx(ChevronDown, { className: clsx("size-5 transition-transform md:hidden", {
|
|
35474
|
+
"rotate-180": isOpen,
|
|
35475
|
+
}) })] }), jsxRuntime.jsx("p", { className: "text-lg font-bold tracking-tight md:hidden", children: storeHelpers.formatPrice(total, currency, exchangeRate) }), jsxRuntime.jsx(Button, { className: "max-sm:hidden", variant: "link", size: "link", onClick: onCancel, children: t("CheckoutEmbed.Summary.edit") })] }), jsxRuntime.jsx("hr", {}), jsxRuntime.jsxs("div", { className: clsx("order-4 gap-2 md:order-none", {
|
|
35476
|
+
"hidden md:grid": !isOpen,
|
|
35477
|
+
grid: isOpen,
|
|
35478
|
+
}), children: [jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsx("p", { children: t("CheckoutEmbed.Summary.subtotal") }), jsxRuntime.jsx("p", { children: storeHelpers.formatPrice(subtotal, currency, exchangeRate) })] }), jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsx("p", { children: t("CheckoutEmbed.Summary.shipping") }), jsxRuntime.jsx("p", { children: isShippingFree
|
|
35479
|
+
? t("CheckoutEmbed.Summary.free")
|
|
35480
|
+
: shippingPrice
|
|
35481
|
+
? storeHelpers.formatPrice(shippingPrice, currency, exchangeRate)
|
|
35482
|
+
: t("CheckoutEmbed.Summary.calculatedAtNextStep") })] }), !!tax && (jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsx("p", { children: t("CheckoutEmbed.Summary.tax") }), jsxRuntime.jsx("p", { children: storeHelpers.formatPrice(tax, currency, exchangeRate) })] })), filteredDiscounts.map(({ discount, amount, id }) => {
|
|
35483
|
+
var _a;
|
|
35484
|
+
return (jsxRuntime.jsxs("div", { className: "text-muted-foreground flex justify-between", children: [jsxRuntime.jsx(DiscountItem, { id: id, removeDiscount: removeDiscount, label: (_a = ((discount === null || discount === void 0 ? void 0 : discount.code) || (discount === null || discount === void 0 ? void 0 : discount.title))) !== null && _a !== void 0 ? _a : "", canRemove: discount.method === "CODE" }), jsxRuntime.jsxs("p", { children: ["- ", storeHelpers.formatPrice(amount, currency, exchangeRate)] })] }, discount.id));
|
|
35485
|
+
}), jsxRuntime.jsxs("div", { className: "flex items-center justify-between font-bold", children: [jsxRuntime.jsx("p", { children: t("CheckoutEmbed.Summary.total") }), jsxRuntime.jsx("p", { children: storeHelpers.formatPrice(totalWithDiscounts, currency, exchangeRate) })] })] }), canCombine && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("hr", { className: clsx("order-7 md:order-none", {
|
|
35486
|
+
"hidden md:block": !isOpen,
|
|
35487
|
+
block: isOpen,
|
|
35488
|
+
}) }), jsxRuntime.jsx("div", { className: clsx("order-6 gap-0 md:order-none", {
|
|
35489
|
+
"hidden md:grid": !isOpen,
|
|
35490
|
+
grid: isOpen,
|
|
35491
|
+
}), children: jsxRuntime.jsx(DiscountCode, { applyDiscountCode: applyDiscountCode }) })] })), jsxRuntime.jsx("hr", { className: clsx("order-5 md:order-none", {
|
|
35625
35492
|
"hidden md:block": !isOpen,
|
|
35626
35493
|
block: isOpen,
|
|
35627
|
-
}) }),
|
|
35628
|
-
React.createElement("div", { className: clsx("gap-0 order-6 md:order-none", {
|
|
35494
|
+
}) }), jsxRuntime.jsx("div", { className: clsx("order-3 gap-5 md:order-none", {
|
|
35629
35495
|
"hidden md:grid": !isOpen,
|
|
35630
35496
|
grid: isOpen,
|
|
35631
|
-
})
|
|
35632
|
-
|
|
35633
|
-
|
|
35634
|
-
|
|
35635
|
-
|
|
35636
|
-
|
|
35637
|
-
|
|
35638
|
-
|
|
35639
|
-
|
|
35640
|
-
|
|
35641
|
-
|
|
35642
|
-
|
|
35643
|
-
|
|
35644
|
-
|
|
35645
|
-
|
|
35646
|
-
|
|
35647
|
-
|
|
35648
|
-
|
|
35649
|
-
|
|
35650
|
-
|
|
35651
|
-
|
|
35652
|
-
|
|
35653
|
-
|
|
35654
|
-
|
|
35655
|
-
|
|
35656
|
-
|
|
35657
|
-
|
|
35658
|
-
|
|
35659
|
-
|
|
35660
|
-
|
|
35661
|
-
|
|
35662
|
-
|
|
35663
|
-
|
|
35664
|
-
|
|
35665
|
-
|
|
35666
|
-
const discountedPrice = finalItem.priceInCents - (totalDiscountAmount !== null && totalDiscountAmount !== void 0 ? totalDiscountAmount : 0);
|
|
35667
|
-
return (React.createElement("div", { key: index, className: "flex items-center" },
|
|
35668
|
-
React.createElement("div", { className: "relative" },
|
|
35669
|
-
React.createElement("div", { className: "w-16 h-16 bg-secondary rounded-lg overflow-hidden relative" }, (finalItem === null || finalItem === void 0 ? void 0 : finalItem.images[0]) && (React.createElement("img", { src: finalItem.images[0] ||
|
|
35670
|
-
((_b = item === null || item === void 0 ? void 0 : item.productData) === null || _b === void 0 ? void 0 : _b.images[0]) ||
|
|
35671
|
-
"/placeholder.svg", alt: ((_c = item.productData) === null || _c === void 0 ? void 0 : _c.title) || "", className: "object-cover w-full h-full", sizes: "64px" }))),
|
|
35672
|
-
React.createElement("div", { className: "absolute -top-2 -right-2 w-6 h-6 bg-primary rounded-full flex items-center text-background justify-center text-sm" }, item.quantity)),
|
|
35673
|
-
React.createElement("div", { className: "ml-4 flex-1" },
|
|
35674
|
-
React.createElement("h3", { className: "text-base font-medium" }, (_d = item.productData) === null || _d === void 0 ? void 0 : _d.title),
|
|
35675
|
-
React.createElement("p", { className: "text-muted-foreground text-ellipsis line-clamp-1 md:max-w-[75%] text-sm" }, item.variantOptions
|
|
35676
|
-
.map((option) => `${option.name}: ${option.value}`)
|
|
35677
|
-
.join(", "))),
|
|
35678
|
-
React.createElement("div", { className: "text-right" }, isDiscounted ? (React.createElement("div", { className: "flex flex-col" },
|
|
35679
|
-
React.createElement("p", { className: "text-sm font-medium -mb-0.5 line-through text-muted-foreground" }, storeHelpers.formatPrice((_e = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _e !== void 0 ? _e : 0, currency, exchangeRate)),
|
|
35680
|
-
React.createElement("p", { className: "text-base font-medium" }, discountedPrice <= 0
|
|
35681
|
-
? t("CheckoutEmbed.Summary.free")
|
|
35682
|
-
: storeHelpers.formatPrice(discountedPrice, currency, exchangeRate)))) : (React.createElement("p", { className: "text-base font-medium" }, storeHelpers.formatPrice((_f = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate))))));
|
|
35683
|
-
}))));
|
|
35497
|
+
}), children: lineItems.map((item, index) => {
|
|
35498
|
+
var _a, _b, _c, _d, _e, _f;
|
|
35499
|
+
const finalItem = ((_a = item.productData) === null || _a === void 0 ? void 0 : _a.selectedVariant) || item.productData;
|
|
35500
|
+
const productAppliedDiscounts = appliedDiscounts.filter((discount) => discount.allowedLineItems.some((allowedLineItem) => allowedLineItem.productId === item.productData.productId));
|
|
35501
|
+
const formattedProductAppliedDiscounts = productAppliedDiscounts.map((discount) => {
|
|
35502
|
+
var _a;
|
|
35503
|
+
const elegibleLineItems = discount.allowedLineItems.find((allowedLineItem) => allowedLineItem.productId === item.productData.productId);
|
|
35504
|
+
if (!elegibleLineItems)
|
|
35505
|
+
return 0;
|
|
35506
|
+
const elegibleQuantity = elegibleLineItems.quantity;
|
|
35507
|
+
const elegibleTotalAmount = ((_a = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _a !== void 0 ? _a : 0) * elegibleQuantity;
|
|
35508
|
+
if (discount.discount.valueType === "PERCENTAGE") {
|
|
35509
|
+
const percentage = discount.discount.value / 100;
|
|
35510
|
+
return elegibleTotalAmount * percentage;
|
|
35511
|
+
}
|
|
35512
|
+
else if (discount.discount.valueType === "FREE") {
|
|
35513
|
+
return elegibleTotalAmount;
|
|
35514
|
+
}
|
|
35515
|
+
return elegibleQuantity * discount.discount.value;
|
|
35516
|
+
});
|
|
35517
|
+
const totalDiscountAmount = formattedProductAppliedDiscounts.length > 0
|
|
35518
|
+
? formattedProductAppliedDiscounts.reduce((acc, curr) => {
|
|
35519
|
+
return acc + curr;
|
|
35520
|
+
}, 0)
|
|
35521
|
+
: null;
|
|
35522
|
+
const isDiscounted = !!totalDiscountAmount;
|
|
35523
|
+
const discountedPrice = finalItem.priceInCents - (totalDiscountAmount !== null && totalDiscountAmount !== void 0 ? totalDiscountAmount : 0);
|
|
35524
|
+
return (jsxRuntime.jsxs("div", { className: "flex items-center", children: [jsxRuntime.jsxs("div", { className: "relative", children: [jsxRuntime.jsx("div", { className: "bg-secondary relative h-16 w-16 overflow-hidden rounded-lg", children: (finalItem === null || finalItem === void 0 ? void 0 : finalItem.images[0]) && (jsxRuntime.jsx("img", { src: finalItem.images[0] ||
|
|
35525
|
+
((_b = item === null || item === void 0 ? void 0 : item.productData) === null || _b === void 0 ? void 0 : _b.images[0]) ||
|
|
35526
|
+
"/placeholder.svg", alt: ((_c = item.productData) === null || _c === void 0 ? void 0 : _c.title) || "", className: "h-full w-full object-cover", sizes: "64px" })) }), jsxRuntime.jsx("div", { className: "bg-primary text-background absolute -right-2 -top-2 flex h-6 w-6 items-center justify-center rounded-full text-sm", children: item.quantity })] }), jsxRuntime.jsxs("div", { className: "ml-4 flex-1", children: [jsxRuntime.jsx("h3", { className: "text-base font-medium", children: (_d = item.productData) === null || _d === void 0 ? void 0 : _d.title }), jsxRuntime.jsx("p", { className: "text-muted-foreground line-clamp-1 text-ellipsis text-sm md:max-w-[75%]", children: item.variantOptions
|
|
35527
|
+
.map((option) => `${option.name}: ${option.value}`)
|
|
35528
|
+
.join(", ") })] }), jsxRuntime.jsx("div", { className: "text-right", children: isDiscounted ? (jsxRuntime.jsxs("div", { className: "flex flex-col", children: [jsxRuntime.jsx("p", { className: "text-muted-foreground -mb-0.5 text-sm font-medium line-through", children: storeHelpers.formatPrice((_e = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _e !== void 0 ? _e : 0, currency, exchangeRate) }), jsxRuntime.jsx("p", { className: "text-base font-medium", children: discountedPrice <= 0
|
|
35529
|
+
? t("CheckoutEmbed.Summary.free")
|
|
35530
|
+
: storeHelpers.formatPrice(discountedPrice, currency, exchangeRate) })] })) : (jsxRuntime.jsx("p", { className: "text-base font-medium", children: storeHelpers.formatPrice((_f = finalItem === null || finalItem === void 0 ? void 0 : finalItem.priceInCents) !== null && _f !== void 0 ? _f : 0, currency, exchangeRate) })) })] }, index));
|
|
35531
|
+
}) })] }));
|
|
35684
35532
|
}
|
|
35685
35533
|
function DiscountItem({ id, removeDiscount, label, canRemove, }) {
|
|
35686
35534
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
@@ -35696,46 +35544,12 @@ function DiscountItem({ id, removeDiscount, label, canRemove, }) {
|
|
|
35696
35544
|
setIsLoading(false);
|
|
35697
35545
|
}
|
|
35698
35546
|
});
|
|
35699
|
-
return (
|
|
35700
|
-
React.createElement("p", null, isLoading ? "Removing..." : label),
|
|
35701
|
-
!isLoading && canRemove && (React.createElement("div", { onClick: handleRemove, className: "flex items-center z-10 relative -m-0.5 hover:bg-muted p-1 rounded-full justify-center hover:text-foreground cursor-pointer" },
|
|
35702
|
-
React.createElement(X$2, { className: "size-3" }),
|
|
35703
|
-
React.createElement("p", { className: "sr-only" }, "Remove")))));
|
|
35547
|
+
return (jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5", children: [jsxRuntime.jsx("p", { children: isLoading ? "Removing..." : label }), !isLoading && canRemove && (jsxRuntime.jsxs("div", { onClick: handleRemove, className: "hover:bg-muted hover:text-foreground relative z-10 -m-0.5 flex cursor-pointer items-center justify-center rounded-full p-1", children: [jsxRuntime.jsx(X$2, { className: "size-3" }), jsxRuntime.jsx("p", { className: "sr-only", children: "Remove" })] }))] }));
|
|
35704
35548
|
}
|
|
35705
35549
|
|
|
35706
35550
|
function CheckoutSummaryLoading() {
|
|
35707
35551
|
const { t } = useTranslation();
|
|
35708
|
-
return (
|
|
35709
|
-
React.createElement("div", { className: "flex justify-between items-center" },
|
|
35710
|
-
React.createElement("div", { className: "flex items-center gap-2 cursor-pointer" },
|
|
35711
|
-
React.createElement("h2", null, t("CheckoutEmbed.Summary.title")),
|
|
35712
|
-
React.createElement(ChevronDown, { className: "md:hidden size-5 transition-transform" })),
|
|
35713
|
-
React.createElement(Skeleton, { className: "w-20 h-[20px] md:hidden" }),
|
|
35714
|
-
React.createElement(Button, { className: "max-sm:hidden", variant: "link", size: "link", asChild: true },
|
|
35715
|
-
React.createElement("a", null, t("CheckoutEmbed.Summary.edit")))),
|
|
35716
|
-
React.createElement("hr", null),
|
|
35717
|
-
React.createElement("div", { className: "hidden md:grid gap-2" },
|
|
35718
|
-
React.createElement("div", { className: "flex justify-between" },
|
|
35719
|
-
React.createElement("p", null, t("CheckoutEmbed.Summary.subtotal")),
|
|
35720
|
-
React.createElement(Skeleton, { className: "w-20 h-[18px]" })),
|
|
35721
|
-
React.createElement("div", { className: "flex justify-between" },
|
|
35722
|
-
React.createElement("p", null, t("CheckoutEmbed.Summary.shipping")),
|
|
35723
|
-
React.createElement(Skeleton, { className: "w-20 h-[18px]" })),
|
|
35724
|
-
React.createElement("div", { className: "flex font-bold justify-between items-center" },
|
|
35725
|
-
React.createElement("p", null, t("CheckoutEmbed.Summary.total")),
|
|
35726
|
-
React.createElement(Skeleton, { className: "w-24 h-[18px]" }))),
|
|
35727
|
-
React.createElement("hr", { className: "hidden md:block" }),
|
|
35728
|
-
React.createElement("div", null,
|
|
35729
|
-
React.createElement(Skeleton, { className: "w-24 h-5 mb-2" }),
|
|
35730
|
-
React.createElement(Skeleton, { className: "h-10 w-full mb-1" })),
|
|
35731
|
-
React.createElement("hr", { className: "hidden md:block" }),
|
|
35732
|
-
Array.from({ length: 2 }).map((_, index) => (React.createElement("div", { key: index, className: "hidden md:flex items-center" },
|
|
35733
|
-
React.createElement(Skeleton, { className: "rounded-lg size-16" }),
|
|
35734
|
-
React.createElement("div", { className: "ml-4 grid gap-2 flex-1" },
|
|
35735
|
-
React.createElement(Skeleton, { className: "w-28 h-5" }),
|
|
35736
|
-
React.createElement(Skeleton, { className: "w-20 h-3.5" })),
|
|
35737
|
-
React.createElement("div", { className: "text-right" },
|
|
35738
|
-
React.createElement(Skeleton, { className: "w-20 h-5" })))))));
|
|
35552
|
+
return (jsxRuntime.jsxs("div", { className: "grid gap-5", children: [jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [jsxRuntime.jsxs("div", { className: "flex cursor-pointer items-center gap-2", children: [jsxRuntime.jsx("h2", { children: t("CheckoutEmbed.Summary.title") }), jsxRuntime.jsx(ChevronDown, { className: "size-5 transition-transform md:hidden" })] }), jsxRuntime.jsx(Skeleton, { className: "h-[20px] w-20 md:hidden" }), jsxRuntime.jsx(Button, { className: "max-sm:hidden", variant: "link", size: "link", asChild: true, children: jsxRuntime.jsx("a", { children: t("CheckoutEmbed.Summary.edit") }) })] }), jsxRuntime.jsx("hr", {}), jsxRuntime.jsxs("div", { className: "hidden gap-2 md:grid", children: [jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsx("p", { children: t("CheckoutEmbed.Summary.subtotal") }), jsxRuntime.jsx(Skeleton, { className: "h-[18px] w-20" })] }), jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsx("p", { children: t("CheckoutEmbed.Summary.shipping") }), jsxRuntime.jsx(Skeleton, { className: "h-[18px] w-20" })] }), jsxRuntime.jsxs("div", { className: "flex items-center justify-between font-bold", children: [jsxRuntime.jsx("p", { children: t("CheckoutEmbed.Summary.total") }), jsxRuntime.jsx(Skeleton, { className: "h-[18px] w-24" })] })] }), jsxRuntime.jsx("hr", { className: "hidden md:block" }), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx(Skeleton, { className: "mb-2 h-5 w-24" }), jsxRuntime.jsx(Skeleton, { className: "mb-1 h-10 w-full" })] }), jsxRuntime.jsx("hr", { className: "hidden md:block" }), Array.from({ length: 2 }).map((_, index) => (jsxRuntime.jsxs("div", { className: "hidden items-center md:flex", children: [jsxRuntime.jsx(Skeleton, { className: "size-16 rounded-lg" }), jsxRuntime.jsxs("div", { className: "ml-4 grid flex-1 gap-2", children: [jsxRuntime.jsx(Skeleton, { className: "h-5 w-28" }), jsxRuntime.jsx(Skeleton, { className: "h-3.5 w-20" })] }), jsxRuntime.jsx("div", { className: "text-right", children: jsxRuntime.jsx(Skeleton, { className: "h-5 w-20" }) })] }, index)))] }));
|
|
35739
35553
|
}
|
|
35740
35554
|
|
|
35741
35555
|
function CheckoutEmbedComponent({ checkoutId, config }) {
|
|
@@ -35743,7 +35557,7 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
|
|
|
35743
35557
|
const { cancelUrl, successUrl, appearance, locale, clientSecret, clientProxy, } = config;
|
|
35744
35558
|
const storeClient = React.useMemo(() => createStoreClient({ proxy: clientProxy }), [clientProxy]);
|
|
35745
35559
|
const iframeRef = React.useRef(null);
|
|
35746
|
-
React.useMemo(() => createI18nInstance(locale), []);
|
|
35560
|
+
React.useMemo(() => createI18nInstance(locale), [locale]);
|
|
35747
35561
|
const { formData, step } = useFormStore();
|
|
35748
35562
|
const paymentSecretPromiseRef = React.useRef(null);
|
|
35749
35563
|
const [paymentSecret, setPaymentSecret] = React.useState(null);
|
|
@@ -35775,6 +35589,7 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
|
|
|
35775
35589
|
return () => {
|
|
35776
35590
|
mounted = false; // Cleanup
|
|
35777
35591
|
};
|
|
35592
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35778
35593
|
}, [checkoutId]); // Only re-run if checkoutId changes
|
|
35779
35594
|
const onSuccess = () => {
|
|
35780
35595
|
resetFormStore(formData);
|
|
@@ -35816,6 +35631,7 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
|
|
|
35816
35631
|
paymentSecretPromiseRef.current = null;
|
|
35817
35632
|
});
|
|
35818
35633
|
}
|
|
35634
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35819
35635
|
}, [paymentSecret, step]);
|
|
35820
35636
|
const applyDiscountCode = (code) => __awaiter(this, void 0, void 0, function* () {
|
|
35821
35637
|
console.log("[Payment Debug] Applying discount code:", code);
|
|
@@ -35914,14 +35730,9 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
|
|
|
35914
35730
|
console.log("[Payment Debug] Clearing revalidation interval");
|
|
35915
35731
|
clearInterval(interval);
|
|
35916
35732
|
};
|
|
35733
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
35917
35734
|
}, []);
|
|
35918
|
-
return (
|
|
35919
|
-
React.createElement("div", { className: "checkout-embed h-max gap-6 md:gap-0 py-4 md:py-12 flex flex-col md:grid md:grid-cols-7 " },
|
|
35920
|
-
React.createElement(Appearance, { appearance: appearance, fonts: config.fonts, iframeRef: iframeRef }),
|
|
35921
|
-
React.createElement("div", { className: "md:col-span-4 px-4 h-max md:px-8" }, loading ? (React.createElement(CheckoutFormLoading, null)) : (React.createElement(CheckoutForm, { locale: locale, setShippingCost: setShippingCost, storeClient: storeClient, fonts: config.fonts, checkoutAppearance: appearance, currency: (_a = checkout === null || checkout === void 0 ? void 0 : checkout.currency) !== null && _a !== void 0 ? _a : "", customer: checkout === null || checkout === void 0 ? void 0 : checkout.customer, cancelUrl: cancelUrl, checkoutId: checkoutId, clientSecret: clientSecret, onSuccess: onSuccess, onError: onError, exchangeRate: (_b = checkout === null || checkout === void 0 ? void 0 : checkout.exchangeRate) !== null && _b !== void 0 ? _b : 1, publicKey: publicKey, paymentSecret: paymentSecret, paymentComponentKey: paymentComponentKey }))),
|
|
35922
|
-
React.createElement("div", { className: "md:col-span-3 px-4 md:px-8 h-max order-first md:order-last" },
|
|
35923
|
-
React.createElement(Toaster, null),
|
|
35924
|
-
loading ? (React.createElement(CheckoutSummaryLoading, null)) : (React.createElement(CheckoutSummary, { currency: (_c = checkout === null || checkout === void 0 ? void 0 : checkout.currency) !== null && _c !== void 0 ? _c : "", lineItems: (_d = checkout === null || checkout === void 0 ? void 0 : checkout.lineItems) !== null && _d !== void 0 ? _d : [], shipping: checkout === null || checkout === void 0 ? void 0 : checkout.shipping, tax: checkout === null || checkout === void 0 ? void 0 : checkout.tax, onCancel: onCancel, exchangeRate: (_e = checkout === null || checkout === void 0 ? void 0 : checkout.exchangeRate) !== null && _e !== void 0 ? _e : 1, applyDiscountCode: applyDiscountCode, appliedDiscounts: (_f = checkout === null || checkout === void 0 ? void 0 : checkout.appliedDiscounts) !== null && _f !== void 0 ? _f : [], removeDiscount: removeDiscount }))))));
|
|
35735
|
+
return (jsxRuntime.jsx(IframeWrapper, { iframeRef: iframeRef, children: jsxRuntime.jsxs("div", { className: "checkout-embed flex h-max flex-col gap-6 py-4 md:grid md:grid-cols-7 md:gap-0 md:py-12", children: [jsxRuntime.jsx(Appearance, { appearance: appearance, fonts: config.fonts, iframeRef: iframeRef }), jsxRuntime.jsx("div", { className: "h-max px-4 md:col-span-4 md:px-8", children: loading ? (jsxRuntime.jsx(CheckoutFormLoading, {})) : (jsxRuntime.jsx(CheckoutForm, { locale: locale, setShippingCost: setShippingCost, storeClient: storeClient, fonts: config.fonts, checkoutAppearance: appearance, currency: (_a = checkout === null || checkout === void 0 ? void 0 : checkout.currency) !== null && _a !== void 0 ? _a : "", customer: checkout === null || checkout === void 0 ? void 0 : checkout.customer, cancelUrl: cancelUrl, checkoutId: checkoutId, clientSecret: clientSecret, onSuccess: onSuccess, onError: onError, exchangeRate: (_b = checkout === null || checkout === void 0 ? void 0 : checkout.exchangeRate) !== null && _b !== void 0 ? _b : 1, publicKey: publicKey, paymentSecret: paymentSecret, paymentComponentKey: paymentComponentKey })) }), jsxRuntime.jsxs("div", { className: "order-first h-max px-4 md:order-last md:col-span-3 md:px-8", children: [jsxRuntime.jsx(Toaster, {}), loading ? (jsxRuntime.jsx(CheckoutSummaryLoading, {})) : (jsxRuntime.jsx(CheckoutSummary, { currency: (_c = checkout === null || checkout === void 0 ? void 0 : checkout.currency) !== null && _c !== void 0 ? _c : "", lineItems: (_d = checkout === null || checkout === void 0 ? void 0 : checkout.lineItems) !== null && _d !== void 0 ? _d : [], shipping: checkout === null || checkout === void 0 ? void 0 : checkout.shipping, tax: checkout === null || checkout === void 0 ? void 0 : checkout.tax, onCancel: onCancel, exchangeRate: (_e = checkout === null || checkout === void 0 ? void 0 : checkout.exchangeRate) !== null && _e !== void 0 ? _e : 1, applyDiscountCode: applyDiscountCode, appliedDiscounts: (_f = checkout === null || checkout === void 0 ? void 0 : checkout.appliedDiscounts) !== null && _f !== void 0 ? _f : [], removeDiscount: removeDiscount }))] })] }) }));
|
|
35925
35736
|
}
|
|
35926
35737
|
const CheckoutEmbed = React.memo(CheckoutEmbedComponent);
|
|
35927
35738
|
|