@salesgenterp/ui-components 0.4.554 → 0.4.556
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/index.js +363 -222
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +364 -223
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -49,7 +49,7 @@ import TableRow$1 from '@mui/material/TableRow';
|
|
|
49
49
|
import { Virtuoso } from 'react-virtuoso';
|
|
50
50
|
import Box$1 from '@mui/material/Box';
|
|
51
51
|
import TableSortLabel$1 from '@mui/material/TableSortLabel';
|
|
52
|
-
import { FiZap, FiCheck, FiCopy, FiShoppingCart, FiGift, FiArrowRight, FiPlusCircle, FiTag,
|
|
52
|
+
import { FiZap, FiCheck, FiCopy, FiShoppingCart, FiPercent, FiGift, FiArrowRight, FiPlusCircle, FiTag, FiLayers, FiTruck } from 'react-icons/fi';
|
|
53
53
|
import { createPortal } from 'react-dom';
|
|
54
54
|
import { HiSparkles, HiChevronUpDown } from 'react-icons/hi2';
|
|
55
55
|
import { paramCase } from 'param-case';
|
|
@@ -2937,6 +2937,21 @@ var saveExcessPayment = function saveExcessPayment(_ref2) {
|
|
|
2937
2937
|
return Promise.reject(e);
|
|
2938
2938
|
}
|
|
2939
2939
|
};
|
|
2940
|
+
var verifyExcessPaymentToken = function verifyExcessPaymentToken(_ref3) {
|
|
2941
|
+
var apiEndPoint = _ref3.apiEndPoint,
|
|
2942
|
+
token = _ref3.token,
|
|
2943
|
+
excessPaymentToken = _ref3.excessPaymentToken;
|
|
2944
|
+
try {
|
|
2945
|
+
return Promise.resolve(API({
|
|
2946
|
+
url: "/ecommerce/customer/verifyExcessPaymentLink?token=" + excessPaymentToken,
|
|
2947
|
+
apiEndPoint: apiEndPoint,
|
|
2948
|
+
token: token,
|
|
2949
|
+
method: 'POST'
|
|
2950
|
+
}));
|
|
2951
|
+
} catch (e) {
|
|
2952
|
+
return Promise.reject(e);
|
|
2953
|
+
}
|
|
2954
|
+
};
|
|
2940
2955
|
|
|
2941
2956
|
var ExcessPaymentForm = function ExcessPaymentForm(_ref) {
|
|
2942
2957
|
var paymentMethods = _ref.paymentMethods,
|
|
@@ -3030,7 +3045,8 @@ var ExcessPaymentDialog = function ExcessPaymentDialog(_ref2) {
|
|
|
3030
3045
|
token = _ref2.token,
|
|
3031
3046
|
styles = _ref2.styles,
|
|
3032
3047
|
onSave = _ref2.onSave,
|
|
3033
|
-
customerData = _ref2.customerData
|
|
3048
|
+
customerData = _ref2.customerData,
|
|
3049
|
+
excessPaymentToken = _ref2.excessPaymentToken;
|
|
3034
3050
|
var _useForm = useForm({
|
|
3035
3051
|
defaultValues: {
|
|
3036
3052
|
paymentModeId: '',
|
|
@@ -3101,26 +3117,51 @@ var ExcessPaymentDialog = function ExcessPaymentDialog(_ref2) {
|
|
|
3101
3117
|
token: token,
|
|
3102
3118
|
asyncService: function asyncService() {
|
|
3103
3119
|
try {
|
|
3104
|
-
return Promise.resolve(
|
|
3120
|
+
return Promise.resolve(verifyExcessPaymentToken({
|
|
3105
3121
|
apiEndPoint: apiEndPoint,
|
|
3106
|
-
token: token
|
|
3122
|
+
token: token,
|
|
3123
|
+
excessPaymentToken: excessPaymentToken
|
|
3107
3124
|
}));
|
|
3108
3125
|
} catch (e) {
|
|
3109
3126
|
return Promise.reject(e);
|
|
3110
3127
|
}
|
|
3111
3128
|
}
|
|
3112
3129
|
}, function (data) {
|
|
3113
|
-
|
|
3114
|
-
return
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3130
|
+
if (data === false) {
|
|
3131
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
3132
|
+
style: {
|
|
3133
|
+
color: 'red',
|
|
3134
|
+
textAlign: 'center',
|
|
3135
|
+
padding: '16px 8px'
|
|
3136
|
+
}
|
|
3137
|
+
}, "This excess payment link has already been used. An excess payment was previously added using this link.");
|
|
3138
|
+
}
|
|
3139
|
+
return /*#__PURE__*/React__default.createElement(AsyncDataLoadComponent, {
|
|
3140
|
+
apiEndPoint: apiEndPoint,
|
|
3141
|
+
token: token,
|
|
3142
|
+
asyncService: function asyncService() {
|
|
3143
|
+
try {
|
|
3144
|
+
return Promise.resolve(getPaymentMethods({
|
|
3145
|
+
apiEndPoint: apiEndPoint,
|
|
3146
|
+
token: token
|
|
3147
|
+
}));
|
|
3148
|
+
} catch (e) {
|
|
3149
|
+
return Promise.reject(e);
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
}, function (paymentMethodsData) {
|
|
3153
|
+
var paymentMethods = (paymentMethodsData === null || paymentMethodsData === void 0 ? void 0 : paymentMethodsData.filter(function (item) {
|
|
3154
|
+
return item === null || item === void 0 ? void 0 : item.ecommerce;
|
|
3155
|
+
})) || [];
|
|
3156
|
+
return /*#__PURE__*/React__default.createElement(ExcessPaymentForm, {
|
|
3157
|
+
loading: loading,
|
|
3158
|
+
paymentMethods: paymentMethods,
|
|
3159
|
+
control: control,
|
|
3160
|
+
styles: styles,
|
|
3161
|
+
handleSubmit: handleSubmit,
|
|
3162
|
+
onSubmit: onSubmit,
|
|
3163
|
+
onClose: onClose
|
|
3164
|
+
});
|
|
3124
3165
|
});
|
|
3125
3166
|
})));
|
|
3126
3167
|
};
|
|
@@ -3143,7 +3184,7 @@ var totalIcons = [{
|
|
|
3143
3184
|
icon: /*#__PURE__*/React__default.createElement(TbFileDollar, null)
|
|
3144
3185
|
}];
|
|
3145
3186
|
var Dashboard = function Dashboard(_ref) {
|
|
3146
|
-
var _customerData$custome, _selectDates$salesOrd, _selectDates$recentIn, _selectDates$salesOrd2, _selectDates$recentIn2, _customerData$custome2, _customerData$custome3, _customerData$custome4;
|
|
3187
|
+
var _queryParams$excessPa, _customerData$custome, _selectDates$salesOrd, _selectDates$recentIn, _selectDates$salesOrd2, _selectDates$recentIn2, _customerData$custome2, _customerData$custome3, _customerData$custome4;
|
|
3147
3188
|
var apiEndPoint = _ref.apiEndPoint,
|
|
3148
3189
|
serviceApiEndPoint = _ref.serviceApiEndPoint,
|
|
3149
3190
|
token = _ref.token,
|
|
@@ -3209,11 +3250,13 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3209
3250
|
var _useState8 = useState(0),
|
|
3210
3251
|
value = _useState8[0],
|
|
3211
3252
|
setValue = _useState8[1];
|
|
3253
|
+
var showSalesOrderTable = !hideSalesOrderTab;
|
|
3254
|
+
var showInvoiceTable = !hideInvoiceTab;
|
|
3255
|
+
var showTableSection = showSalesOrderTable || showInvoiceTable;
|
|
3212
3256
|
useEffect(function () {
|
|
3213
|
-
if (hideSalesOrderTab) {
|
|
3257
|
+
if (hideSalesOrderTab && !hideInvoiceTab) {
|
|
3214
3258
|
setValue(1);
|
|
3215
|
-
}
|
|
3216
|
-
if (hideInvoiceTab) {
|
|
3259
|
+
} else if (hideInvoiceTab && !hideSalesOrderTab) {
|
|
3217
3260
|
setValue(0);
|
|
3218
3261
|
}
|
|
3219
3262
|
}, [hideSalesOrderTab, hideInvoiceTab]);
|
|
@@ -3510,6 +3553,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3510
3553
|
setTriggerTableData: setTriggerTableData,
|
|
3511
3554
|
styles: styles
|
|
3512
3555
|
}), (isExcessPaymentModal === null || isExcessPaymentModal === void 0 ? void 0 : isExcessPaymentModal.open) && /*#__PURE__*/React__default.createElement(ExcessPaymentDialog, {
|
|
3556
|
+
excessPaymentToken: (_queryParams$excessPa = queryParams === null || queryParams === void 0 ? void 0 : queryParams.excessPayment) != null ? _queryParams$excessPa : '',
|
|
3513
3557
|
customerData: customerData,
|
|
3514
3558
|
apiEndPoint: apiEndPoint,
|
|
3515
3559
|
token: token,
|
|
@@ -3653,7 +3697,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3653
3697
|
style: {
|
|
3654
3698
|
marginTop: '1rem'
|
|
3655
3699
|
}
|
|
3656
|
-
})))))), /*#__PURE__*/React__default.createElement(TableContainer, null, /*#__PURE__*/React__default.createElement(APITable, {
|
|
3700
|
+
})))))), showTableSection && /*#__PURE__*/React__default.createElement(TableContainer, null, /*#__PURE__*/React__default.createElement(APITable, {
|
|
3657
3701
|
key: value,
|
|
3658
3702
|
cacheFilters: true,
|
|
3659
3703
|
extraFilterParams: value === 0 ? selectDates.recentInvoices : selectDates.salesOrders,
|
|
@@ -3664,7 +3708,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3664
3708
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
3665
3709
|
item: true,
|
|
3666
3710
|
xs: 12
|
|
3667
|
-
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
3711
|
+
}, showSalesOrderTable && showInvoiceTable && /*#__PURE__*/React__default.createElement(Box, {
|
|
3668
3712
|
sx: {
|
|
3669
3713
|
borderBottom: 1,
|
|
3670
3714
|
borderColor: 'divider'
|
|
@@ -3675,9 +3719,9 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
3675
3719
|
"aria-label": "basic tabs example",
|
|
3676
3720
|
primaryColor: primaryColor,
|
|
3677
3721
|
fontColor: fontColor
|
|
3678
|
-
},
|
|
3722
|
+
}, /*#__PURE__*/React__default.createElement(Tab, _extends({
|
|
3679
3723
|
label: "Sales Orders"
|
|
3680
|
-
}, a11yProps(0))),
|
|
3724
|
+
}, a11yProps(0))), /*#__PURE__*/React__default.createElement(Tab, _extends({
|
|
3681
3725
|
label: "Recent Invoices"
|
|
3682
3726
|
}, a11yProps(1)))))), /*#__PURE__*/React__default.createElement(TypographyContainer$2, {
|
|
3683
3727
|
variant: "h4",
|
|
@@ -8157,6 +8201,10 @@ var formatCurrency = function formatCurrency(amount) {
|
|
|
8157
8201
|
maximumFractionDigits: 2
|
|
8158
8202
|
});
|
|
8159
8203
|
};
|
|
8204
|
+
var getPerQuantitySaveLabel = function getPerQuantitySaveLabel(amount, coupon) {
|
|
8205
|
+
var prefix = (coupon === null || coupon === void 0 ? void 0 : coupon.maxAllowedDiscount) > 0 ? 'Save up to' : 'Save';
|
|
8206
|
+
return prefix + " $" + formatCurrency(amount) + " per quantity";
|
|
8207
|
+
};
|
|
8160
8208
|
var getUnitSaving = function getUnitSaving(coupon, productPrice) {
|
|
8161
8209
|
if (coupon !== null && coupon !== void 0 && coupon.percentage && coupon !== null && coupon !== void 0 && coupon.offPercentage && productPrice > 0) {
|
|
8162
8210
|
return productPrice * (coupon.offPercentage / 100);
|
|
@@ -8175,10 +8223,19 @@ var formatCartCount = function formatCartCount(cartQuantity) {
|
|
|
8175
8223
|
var formatRemainingQuantity = function formatRemainingQuantity(remaining) {
|
|
8176
8224
|
return remaining + " more " + (remaining === 1 ? 'quantity' : 'quantities');
|
|
8177
8225
|
};
|
|
8226
|
+
var formatQuantityLabel = function formatQuantityLabel(count) {
|
|
8227
|
+
return count + " " + (count === 1 ? 'quantity' : 'quantities');
|
|
8228
|
+
};
|
|
8178
8229
|
var isBuyXGetFreeProduct = function isBuyXGetFreeProduct(coupon) {
|
|
8179
8230
|
var _coupon$freeProducts;
|
|
8180
8231
|
return (coupon === null || coupon === void 0 ? void 0 : coupon.discountType) === 'BuyXGetFreeProduct' || (coupon === null || coupon === void 0 ? void 0 : (_coupon$freeProducts = coupon.freeProducts) === null || _coupon$freeProducts === void 0 ? void 0 : _coupon$freeProducts.length) > 0 && (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0;
|
|
8181
8232
|
};
|
|
8233
|
+
var isBuyXGetDiscount = function isBuyXGetDiscount(coupon) {
|
|
8234
|
+
if ((coupon === null || coupon === void 0 ? void 0 : coupon.discountType) === 'BuyXGetDiscount') return true;
|
|
8235
|
+
if (isBuyXGetFreeProduct(coupon)) return false;
|
|
8236
|
+
if (!((coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0) || (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToGet) > 0) return false;
|
|
8237
|
+
return Boolean(coupon === null || coupon === void 0 ? void 0 : coupon.offPercentage) || Boolean(coupon === null || coupon === void 0 ? void 0 : coupon.offAmount);
|
|
8238
|
+
};
|
|
8182
8239
|
var getBuyXGetFreeProductOffPercent = function getBuyXGetFreeProductOffPercent(coupon) {
|
|
8183
8240
|
var pct = Number(coupon === null || coupon === void 0 ? void 0 : coupon.offPercentage);
|
|
8184
8241
|
if (Number.isFinite(pct) && pct > 0) return pct;
|
|
@@ -8192,6 +8249,22 @@ var getBuyXGetFreeProductOfferLabel = function getBuyXGetFreeProductOfferLabel(c
|
|
|
8192
8249
|
if (offPercent >= 100) return 'free';
|
|
8193
8250
|
return offPercent + "% off on these products";
|
|
8194
8251
|
};
|
|
8252
|
+
var getBuyXGetDiscountOffLabel = function getBuyXGetDiscountOffLabel(coupon, productPrice) {
|
|
8253
|
+
if (productPrice === void 0) {
|
|
8254
|
+
productPrice = 0;
|
|
8255
|
+
}
|
|
8256
|
+
if (coupon !== null && coupon !== void 0 && coupon.percentage && coupon !== null && coupon !== void 0 && coupon.offPercentage) {
|
|
8257
|
+
return coupon.offPercentage + "% off";
|
|
8258
|
+
}
|
|
8259
|
+
var unitSaving = getUnitSaving(coupon, productPrice);
|
|
8260
|
+
if (unitSaving) {
|
|
8261
|
+
return "$" + formatCurrency(unitSaving) + " off";
|
|
8262
|
+
}
|
|
8263
|
+
if ((coupon === null || coupon === void 0 ? void 0 : coupon.offAmount) > 0) {
|
|
8264
|
+
return "$" + formatCurrency(coupon.offAmount) + " off";
|
|
8265
|
+
}
|
|
8266
|
+
return 'discount';
|
|
8267
|
+
};
|
|
8195
8268
|
var getFreeProductHref = function getFreeProductHref(product) {
|
|
8196
8269
|
return "/product-details/" + paramCase((product === null || product === void 0 ? void 0 : product.productAlias) || (product === null || product === void 0 ? void 0 : product.productName) || '') + "?id=" + (product === null || product === void 0 ? void 0 : product.productId);
|
|
8197
8270
|
};
|
|
@@ -8200,8 +8273,8 @@ var getBuyXGetFreeProductMessages = function getBuyXGetFreeProductMessages(quant
|
|
|
8200
8273
|
offPercentage = 100;
|
|
8201
8274
|
}
|
|
8202
8275
|
var isFullyFree = offPercentage >= 100;
|
|
8203
|
-
var
|
|
8204
|
-
var benefitSummary = isFullyFree ? "
|
|
8276
|
+
var addQtyLabel = formatQuantityLabel(quantityToBuy);
|
|
8277
|
+
var benefitSummary = isFullyFree ? "Add " + addQtyLabel + " of this product and get " + quantityToGet + " " + (quantityToGet === 1 ? 'free product' : 'free products') : "Add " + addQtyLabel + " of this product and get " + offPercentage + "% off on these products";
|
|
8205
8278
|
var lines = [benefitSummary];
|
|
8206
8279
|
if (cartQuantity <= 0) {
|
|
8207
8280
|
return lines;
|
|
@@ -8217,7 +8290,7 @@ var getBuyXGetFreeProductMessages = function getBuyXGetFreeProductMessages(quant
|
|
|
8217
8290
|
};
|
|
8218
8291
|
var getBuyXGetYMessages = function getBuyXGetYMessages(quantityToBuy, quantityToGet, cartQuantity) {
|
|
8219
8292
|
var totalNeeded = quantityToBuy + quantityToGet;
|
|
8220
|
-
var lines = ["
|
|
8293
|
+
var lines = ["Add " + formatQuantityLabel(quantityToBuy) + ", get " + formatQuantityLabel(quantityToGet) + " for free"];
|
|
8221
8294
|
if (cartQuantity <= 0) {
|
|
8222
8295
|
return lines;
|
|
8223
8296
|
}
|
|
@@ -8230,8 +8303,34 @@ var getBuyXGetYMessages = function getBuyXGetYMessages(quantityToBuy, quantityTo
|
|
|
8230
8303
|
lines.push(formatCartCount(cartQuantity));
|
|
8231
8304
|
lines.push("Add " + formatRemainingQuantity(_remaining) + " to apply this coupon");
|
|
8232
8305
|
} else {
|
|
8233
|
-
|
|
8234
|
-
|
|
8306
|
+
lines.push(formatCartCount(cartQuantity) + " \xB7 Apply this coupon to get " + formatQuantityLabel(quantityToGet) + " for free");
|
|
8307
|
+
}
|
|
8308
|
+
return lines;
|
|
8309
|
+
};
|
|
8310
|
+
var getBuyXGetDiscountMessages = function getBuyXGetDiscountMessages(coupon, _temp) {
|
|
8311
|
+
var _ref = _temp === void 0 ? {} : _temp,
|
|
8312
|
+
_ref$productPrice = _ref.productPrice,
|
|
8313
|
+
productPrice = _ref$productPrice === void 0 ? 0 : _ref$productPrice,
|
|
8314
|
+
_ref$cartQuantity = _ref.cartQuantity,
|
|
8315
|
+
cartQuantity = _ref$cartQuantity === void 0 ? 0 : _ref$cartQuantity;
|
|
8316
|
+
var quantityToBuy = (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) || 0;
|
|
8317
|
+
var offLabel = getBuyXGetDiscountOffLabel(coupon, productPrice);
|
|
8318
|
+
var addLabel = formatQuantityLabel(quantityToBuy);
|
|
8319
|
+
var unitSaving = getUnitSaving(coupon, productPrice);
|
|
8320
|
+
var lines = ["Add " + addLabel + ", get " + offLabel];
|
|
8321
|
+
if (unitSaving) {
|
|
8322
|
+
lines[0] = "Add " + addLabel + ", get " + offLabel + " \xB7 " + getPerQuantitySaveLabel(unitSaving, coupon);
|
|
8323
|
+
}
|
|
8324
|
+
if (cartQuantity <= 0) {
|
|
8325
|
+
return lines;
|
|
8326
|
+
}
|
|
8327
|
+
if (cartQuantity < quantityToBuy) {
|
|
8328
|
+
var remaining = quantityToBuy - cartQuantity;
|
|
8329
|
+
lines.push(formatCartCount(cartQuantity));
|
|
8330
|
+
lines.push("Add " + formatRemainingQuantity(remaining) + " to qualify");
|
|
8331
|
+
} else {
|
|
8332
|
+
var totalSaving = unitSaving ? unitSaving * cartQuantity : null;
|
|
8333
|
+
lines.push(totalSaving ? formatCartCount(cartQuantity) + " \xB7 Apply this coupon to get $" + formatCurrency(totalSaving) + " off" : formatCartCount(cartQuantity) + " \xB7 Apply this coupon to get " + offLabel);
|
|
8235
8334
|
}
|
|
8236
8335
|
return lines;
|
|
8237
8336
|
};
|
|
@@ -8239,10 +8338,21 @@ var getCouponTypeIcon = function getCouponTypeIcon(coupon) {
|
|
|
8239
8338
|
if (isBuyXGetFreeProduct(coupon)) {
|
|
8240
8339
|
return isFullyFreeBuyXOffer(coupon) ? FiGift : FiPercent;
|
|
8241
8340
|
}
|
|
8341
|
+
if (isBuyXGetDiscount(coupon)) return FiLayers;
|
|
8242
8342
|
if ((coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0 && (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToGet) > 0) return FiLayers;
|
|
8243
8343
|
if (coupon !== null && coupon !== void 0 && coupon.offPercentage) return FiPercent;
|
|
8244
8344
|
return FiTag;
|
|
8245
8345
|
};
|
|
8346
|
+
var getCouponLimitMessages = function getCouponLimitMessages(coupon) {
|
|
8347
|
+
var lines = [];
|
|
8348
|
+
if ((coupon === null || coupon === void 0 ? void 0 : coupon.maxAllowedDiscount) > 0) {
|
|
8349
|
+
lines.push("Maximum saving is up to $" + formatCurrency(coupon.maxAllowedDiscount) + ".");
|
|
8350
|
+
}
|
|
8351
|
+
if ((coupon === null || coupon === void 0 ? void 0 : coupon.maxAllowedAmount) > 0) {
|
|
8352
|
+
lines.push("Applies when your order is more than $" + formatCurrency(coupon.maxAllowedAmount) + ".");
|
|
8353
|
+
}
|
|
8354
|
+
return lines;
|
|
8355
|
+
};
|
|
8246
8356
|
var getDetailMeta = function getDetailMeta(line) {
|
|
8247
8357
|
if (line.includes('added in the cart') && line.includes('Apply')) {
|
|
8248
8358
|
return {
|
|
@@ -8273,15 +8383,21 @@ var getDetailMeta = function getDetailMeta(line) {
|
|
|
8273
8383
|
tone: 'info'
|
|
8274
8384
|
};
|
|
8275
8385
|
};
|
|
8276
|
-
var getCouponBenefit = function getCouponBenefit(coupon,
|
|
8277
|
-
var
|
|
8278
|
-
|
|
8279
|
-
productPrice =
|
|
8280
|
-
|
|
8281
|
-
cartQuantity =
|
|
8386
|
+
var getCouponBenefit = function getCouponBenefit(coupon, _temp2) {
|
|
8387
|
+
var _ref2 = _temp2 === void 0 ? {} : _temp2,
|
|
8388
|
+
_ref2$productPrice = _ref2.productPrice,
|
|
8389
|
+
productPrice = _ref2$productPrice === void 0 ? 0 : _ref2$productPrice,
|
|
8390
|
+
_ref2$cartQuantity = _ref2.cartQuantity,
|
|
8391
|
+
cartQuantity = _ref2$cartQuantity === void 0 ? 0 : _ref2$cartQuantity;
|
|
8282
8392
|
if (isBuyXGetFreeProduct(coupon)) {
|
|
8283
8393
|
return getBuyXGetFreeProductMessages(coupon.quantityToBuy, coupon.quantityToGet, cartQuantity, getBuyXGetFreeProductOffPercent(coupon));
|
|
8284
8394
|
}
|
|
8395
|
+
if (isBuyXGetDiscount(coupon)) {
|
|
8396
|
+
return getBuyXGetDiscountMessages(coupon, {
|
|
8397
|
+
productPrice: productPrice,
|
|
8398
|
+
cartQuantity: cartQuantity
|
|
8399
|
+
});
|
|
8400
|
+
}
|
|
8285
8401
|
var hasBuyXGetY = (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0 && (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToGet) > 0;
|
|
8286
8402
|
if (hasBuyXGetY) {
|
|
8287
8403
|
return getBuyXGetYMessages(coupon.quantityToBuy, coupon.quantityToGet, cartQuantity);
|
|
@@ -8290,9 +8406,9 @@ var getCouponBenefit = function getCouponBenefit(coupon, _temp) {
|
|
|
8290
8406
|
if (!unitSaving) return null;
|
|
8291
8407
|
var lines = [];
|
|
8292
8408
|
if (coupon !== null && coupon !== void 0 && coupon.offPercentage) {
|
|
8293
|
-
lines.push(coupon.offPercentage + "% off \xB7
|
|
8409
|
+
lines.push(coupon.offPercentage + "% off \xB7 " + getPerQuantitySaveLabel(unitSaving, coupon));
|
|
8294
8410
|
} else {
|
|
8295
|
-
lines.push(
|
|
8411
|
+
lines.push(getPerQuantitySaveLabel(unitSaving, coupon));
|
|
8296
8412
|
}
|
|
8297
8413
|
if (cartQuantity > 0) {
|
|
8298
8414
|
var totalSaving = unitSaving * cartQuantity;
|
|
@@ -8300,47 +8416,44 @@ var getCouponBenefit = function getCouponBenefit(coupon, _temp) {
|
|
|
8300
8416
|
}
|
|
8301
8417
|
return lines;
|
|
8302
8418
|
};
|
|
8303
|
-
var getSuggestionPreviewText = function getSuggestionPreviewText(coupon,
|
|
8304
|
-
var
|
|
8305
|
-
|
|
8306
|
-
productPrice =
|
|
8307
|
-
|
|
8308
|
-
cartQuantity =
|
|
8419
|
+
var getSuggestionPreviewText = function getSuggestionPreviewText(coupon, _temp3) {
|
|
8420
|
+
var _ref3 = _temp3 === void 0 ? {} : _temp3,
|
|
8421
|
+
_ref3$productPrice = _ref3.productPrice,
|
|
8422
|
+
productPrice = _ref3$productPrice === void 0 ? 0 : _ref3$productPrice,
|
|
8423
|
+
_ref3$cartQuantity = _ref3.cartQuantity,
|
|
8424
|
+
cartQuantity = _ref3$cartQuantity === void 0 ? 0 : _ref3$cartQuantity;
|
|
8309
8425
|
if (!coupon) return null;
|
|
8310
8426
|
if (isBuyXGetFreeProduct(coupon)) {
|
|
8311
|
-
var
|
|
8427
|
+
var quantityToBuy = coupon.quantityToBuy || 1;
|
|
8312
8428
|
var quantityToGet = coupon.quantityToGet || 1;
|
|
8313
|
-
var
|
|
8429
|
+
var addQtyLabel = formatQuantityLabel(quantityToBuy);
|
|
8314
8430
|
var offPercent = getBuyXGetFreeProductOffPercent(coupon);
|
|
8315
8431
|
if (offPercent >= 100) {
|
|
8316
|
-
return "
|
|
8432
|
+
return "Add " + addQtyLabel + " of this product and get " + quantityToGet + " " + (quantityToGet === 1 ? 'free product' : 'free products') + ". Click View All offers to know more";
|
|
8317
8433
|
}
|
|
8318
|
-
return "
|
|
8434
|
+
return "Add " + addQtyLabel + " of this product and get " + offPercent + "% off on some products. Click View All offers to know more";
|
|
8319
8435
|
}
|
|
8320
|
-
|
|
8321
|
-
if (hasBuyXGetY) {
|
|
8436
|
+
if (isBuyXGetDiscount(coupon)) {
|
|
8322
8437
|
var _getCouponBenefit;
|
|
8323
8438
|
return ((_getCouponBenefit = getCouponBenefit(coupon, {
|
|
8324
8439
|
productPrice: productPrice,
|
|
8325
8440
|
cartQuantity: cartQuantity
|
|
8326
8441
|
})) === null || _getCouponBenefit === void 0 ? void 0 : _getCouponBenefit[0]) || null;
|
|
8327
8442
|
}
|
|
8328
|
-
var
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
if (hasBuyQuantityRequirement && unitSaving) {
|
|
8336
|
-
var _qtyLabel = quantityToBuy === 1 ? 'quantity' : 'quantities';
|
|
8337
|
-
return "Buy " + quantityToBuy + " " + _qtyLabel + ", save $" + formatCurrency(unitSaving) + " per item";
|
|
8443
|
+
var hasBuyXGetY = (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0 && (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToGet) > 0;
|
|
8444
|
+
if (hasBuyXGetY) {
|
|
8445
|
+
var _getCouponBenefit2;
|
|
8446
|
+
return ((_getCouponBenefit2 = getCouponBenefit(coupon, {
|
|
8447
|
+
productPrice: productPrice,
|
|
8448
|
+
cartQuantity: cartQuantity
|
|
8449
|
+
})) === null || _getCouponBenefit2 === void 0 ? void 0 : _getCouponBenefit2[0]) || null;
|
|
8338
8450
|
}
|
|
8451
|
+
var unitSaving = getUnitSaving(coupon, productPrice);
|
|
8339
8452
|
if (coupon !== null && coupon !== void 0 && coupon.offPercentage && unitSaving) {
|
|
8340
|
-
return "get " + coupon.offPercentage + "% off,
|
|
8453
|
+
return "get " + coupon.offPercentage + "% off, " + getPerQuantitySaveLabel(unitSaving, coupon).toLowerCase();
|
|
8341
8454
|
}
|
|
8342
8455
|
if (unitSaving) {
|
|
8343
|
-
return
|
|
8456
|
+
return getPerQuantitySaveLabel(unitSaving, coupon).toLowerCase();
|
|
8344
8457
|
}
|
|
8345
8458
|
return null;
|
|
8346
8459
|
};
|
|
@@ -8360,6 +8473,23 @@ var getSavingsBadge = function getSavingsBadge(coupon, productPrice) {
|
|
|
8360
8473
|
bottom: 'GIFT'
|
|
8361
8474
|
};
|
|
8362
8475
|
}
|
|
8476
|
+
if (isBuyXGetDiscount(coupon)) {
|
|
8477
|
+
if (coupon !== null && coupon !== void 0 && coupon.percentage && coupon !== null && coupon !== void 0 && coupon.offPercentage) {
|
|
8478
|
+
return {
|
|
8479
|
+
variant: 'percent',
|
|
8480
|
+
top: coupon.offPercentage + "%",
|
|
8481
|
+
bottom: 'OFF'
|
|
8482
|
+
};
|
|
8483
|
+
}
|
|
8484
|
+
var _unitSaving = getUnitSaving(coupon, productPrice);
|
|
8485
|
+
if (_unitSaving) {
|
|
8486
|
+
return {
|
|
8487
|
+
variant: 'amount',
|
|
8488
|
+
top: "$" + formatCurrency(_unitSaving),
|
|
8489
|
+
bottom: 'SAVE'
|
|
8490
|
+
};
|
|
8491
|
+
}
|
|
8492
|
+
}
|
|
8363
8493
|
if ((coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0 && (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToGet) > 0) {
|
|
8364
8494
|
return {
|
|
8365
8495
|
variant: 'bogo',
|
|
@@ -8404,8 +8534,29 @@ var getProgressInfo = function getProgressInfo(coupon, cartQuantity) {
|
|
|
8404
8534
|
target: _target,
|
|
8405
8535
|
percent: _percent,
|
|
8406
8536
|
qualified: qualified,
|
|
8407
|
-
unitLabel: _target === 1 ? '
|
|
8408
|
-
message: qualified ? "You're eligible — apply your code at checkout!" : _remaining2 === 1 ? "Only 1 more
|
|
8537
|
+
unitLabel: _target === 1 ? 'Quantity' : 'Quantities',
|
|
8538
|
+
message: qualified ? "You're eligible — apply your code at checkout!" : _remaining2 === 1 ? "Only 1 more quantity to unlock " + unlockLabel + "!" : "Only " + _remaining2 + " more quantities to unlock " + unlockLabel + "!"
|
|
8539
|
+
};
|
|
8540
|
+
}
|
|
8541
|
+
if (isBuyXGetDiscount(coupon)) {
|
|
8542
|
+
var _target2 = coupon.quantityToBuy || 0;
|
|
8543
|
+
if (!_target2) return null;
|
|
8544
|
+
var _current2 = Math.min(cartQuantity, _target2);
|
|
8545
|
+
var _percent2 = Math.min(100, _current2 / _target2 * 100);
|
|
8546
|
+
var _remaining3 = Math.max(0, _target2 - cartQuantity);
|
|
8547
|
+
var _qualified = cartQuantity >= _target2;
|
|
8548
|
+
var offLabel = getBuyXGetDiscountOffLabel(coupon);
|
|
8549
|
+
return {
|
|
8550
|
+
type: 'buyxgetdiscount',
|
|
8551
|
+
current: _current2,
|
|
8552
|
+
target: _target2,
|
|
8553
|
+
percent: _percent2,
|
|
8554
|
+
qualified: _qualified,
|
|
8555
|
+
unitLabel: _target2 === 1 ? 'Quantity' : 'Quantities',
|
|
8556
|
+
showTimeline: true,
|
|
8557
|
+
quantityToBuy: _target2,
|
|
8558
|
+
offLabel: offLabel,
|
|
8559
|
+
message: _qualified ? "You're eligible — apply your code at checkout!" : _remaining3 === 1 ? "Only 1 more quantity to unlock " + offLabel + "!" : "Only " + _remaining3 + " more quantities to unlock " + offLabel + "!"
|
|
8409
8560
|
};
|
|
8410
8561
|
}
|
|
8411
8562
|
var hasBuyXGetY = (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0 && (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToGet) > 0;
|
|
@@ -8423,18 +8574,18 @@ var getProgressInfo = function getProgressInfo(coupon, cartQuantity) {
|
|
|
8423
8574
|
};
|
|
8424
8575
|
}
|
|
8425
8576
|
if (cartQuantity >= quantityToBuy) {
|
|
8426
|
-
var
|
|
8427
|
-
var
|
|
8428
|
-
var
|
|
8429
|
-
var
|
|
8577
|
+
var _current3 = cartQuantity;
|
|
8578
|
+
var _target3 = totalNeeded;
|
|
8579
|
+
var _percent3 = Math.min(100, _current3 / _target3 * 100);
|
|
8580
|
+
var _remaining4 = totalNeeded - cartQuantity;
|
|
8430
8581
|
return {
|
|
8431
8582
|
type: 'quantity',
|
|
8432
|
-
current:
|
|
8433
|
-
target:
|
|
8434
|
-
percent:
|
|
8583
|
+
current: _current3,
|
|
8584
|
+
target: _target3,
|
|
8585
|
+
percent: _percent3,
|
|
8435
8586
|
qualified: false,
|
|
8436
|
-
unitLabel:
|
|
8437
|
-
message:
|
|
8587
|
+
unitLabel: _target3 === 1 ? 'Quantity' : 'Quantities',
|
|
8588
|
+
message: _remaining4 === 1 ? 'Only 1 more quantity to apply this coupon' : "Only " + _remaining4 + " more quantities to apply this coupon",
|
|
8438
8589
|
showTimeline: true,
|
|
8439
8590
|
quantityToBuy: quantityToBuy,
|
|
8440
8591
|
quantityToGet: quantityToGet
|
|
@@ -8450,8 +8601,8 @@ var getProgressInfo = function getProgressInfo(coupon, cartQuantity) {
|
|
|
8450
8601
|
target: target,
|
|
8451
8602
|
percent: percent,
|
|
8452
8603
|
qualified: false,
|
|
8453
|
-
unitLabel: target === 1 ? '
|
|
8454
|
-
message: remaining === 1 ? 'Only 1 more
|
|
8604
|
+
unitLabel: target === 1 ? 'Quantity' : 'Quantities',
|
|
8605
|
+
message: remaining === 1 ? 'Only 1 more quantity to qualify' : "Only " + remaining + " more quantities to qualify",
|
|
8455
8606
|
showTimeline: true,
|
|
8456
8607
|
quantityToBuy: quantityToBuy,
|
|
8457
8608
|
quantityToGet: quantityToGet
|
|
@@ -8460,17 +8611,17 @@ var getProgressInfo = function getProgressInfo(coupon, cartQuantity) {
|
|
|
8460
8611
|
var isProgressDetailLine = function isProgressDetailLine(line) {
|
|
8461
8612
|
return line === null || line === void 0 ? void 0 : line.startsWith('Add ');
|
|
8462
8613
|
};
|
|
8463
|
-
var DiscountSuggestionsModal = function DiscountSuggestionsModal(
|
|
8464
|
-
var open =
|
|
8465
|
-
onClose =
|
|
8466
|
-
productName =
|
|
8467
|
-
|
|
8468
|
-
productDiscounts =
|
|
8469
|
-
primaryColor =
|
|
8470
|
-
|
|
8471
|
-
cartQuantity =
|
|
8472
|
-
|
|
8473
|
-
productPrice =
|
|
8614
|
+
var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref4) {
|
|
8615
|
+
var open = _ref4.open,
|
|
8616
|
+
onClose = _ref4.onClose,
|
|
8617
|
+
productName = _ref4.productName,
|
|
8618
|
+
_ref4$productDiscount = _ref4.productDiscounts,
|
|
8619
|
+
productDiscounts = _ref4$productDiscount === void 0 ? [] : _ref4$productDiscount,
|
|
8620
|
+
primaryColor = _ref4.primaryColor,
|
|
8621
|
+
_ref4$cartQuantity = _ref4.cartQuantity,
|
|
8622
|
+
cartQuantity = _ref4$cartQuantity === void 0 ? 0 : _ref4$cartQuantity,
|
|
8623
|
+
_ref4$productPrice = _ref4.productPrice,
|
|
8624
|
+
productPrice = _ref4$productPrice === void 0 ? 0 : _ref4$productPrice;
|
|
8474
8625
|
var _useState = useState(null),
|
|
8475
8626
|
copiedCode = _useState[0],
|
|
8476
8627
|
setCopiedCode = _useState[1];
|
|
@@ -8478,7 +8629,7 @@ var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref3) {
|
|
|
8478
8629
|
var copyCouponCode = useCallback(function (code) {
|
|
8479
8630
|
try {
|
|
8480
8631
|
if (!code) return Promise.resolve();
|
|
8481
|
-
var
|
|
8632
|
+
var _temp4 = _catch(function () {
|
|
8482
8633
|
var _navigator, _navigator$clipboard;
|
|
8483
8634
|
return Promise.resolve((_navigator = navigator) === null || _navigator === void 0 ? void 0 : (_navigator$clipboard = _navigator.clipboard) === null || _navigator$clipboard === void 0 ? void 0 : _navigator$clipboard.writeText(code)).then(function () {
|
|
8484
8635
|
var _window;
|
|
@@ -8490,7 +8641,7 @@ var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref3) {
|
|
|
8490
8641
|
}, function (error) {
|
|
8491
8642
|
console.error('Failed to copy coupon code', error);
|
|
8492
8643
|
});
|
|
8493
|
-
return Promise.resolve(
|
|
8644
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(function () {}) : void 0);
|
|
8494
8645
|
} catch (e) {
|
|
8495
8646
|
return Promise.reject(e);
|
|
8496
8647
|
}
|
|
@@ -8516,10 +8667,10 @@ var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref3) {
|
|
|
8516
8667
|
};
|
|
8517
8668
|
document.addEventListener('keydown', handleKeyDown);
|
|
8518
8669
|
return function () {
|
|
8519
|
-
scrollLocks.forEach(function (
|
|
8520
|
-
var el =
|
|
8521
|
-
overflow =
|
|
8522
|
-
overscrollBehavior =
|
|
8670
|
+
scrollLocks.forEach(function (_ref5) {
|
|
8671
|
+
var el = _ref5.el,
|
|
8672
|
+
overflow = _ref5.overflow,
|
|
8673
|
+
overscrollBehavior = _ref5.overscrollBehavior;
|
|
8523
8674
|
el.style.overflow = overflow;
|
|
8524
8675
|
el.style.overscrollBehavior = overscrollBehavior;
|
|
8525
8676
|
});
|
|
@@ -8584,8 +8735,9 @@ var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref3) {
|
|
|
8584
8735
|
productPrice: productPrice,
|
|
8585
8736
|
cartQuantity: cartQuantity
|
|
8586
8737
|
});
|
|
8738
|
+
var limitMessages = getCouponLimitMessages(coupon);
|
|
8587
8739
|
var benefitSummary = (benefit === null || benefit === void 0 ? void 0 : benefit[0]) || null;
|
|
8588
|
-
var benefitDetails = (benefit === null || benefit === void 0 ? void 0 : benefit.length) > 1 ? benefit.slice(1) : [];
|
|
8740
|
+
var benefitDetails = [].concat((benefit === null || benefit === void 0 ? void 0 : benefit.length) > 1 ? benefit.slice(1) : [], limitMessages);
|
|
8589
8741
|
var statusDetails = benefitDetails.filter(function (line) {
|
|
8590
8742
|
return !isProgressDetailLine(line);
|
|
8591
8743
|
});
|
|
@@ -8601,7 +8753,8 @@ var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref3) {
|
|
|
8601
8753
|
var savingsBadge = getSavingsBadge(coupon, productPrice);
|
|
8602
8754
|
var progressInfo = getProgressInfo(coupon, cartQuantity);
|
|
8603
8755
|
var hasBuyXGetY = (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToBuy) > 0 && (coupon === null || coupon === void 0 ? void 0 : coupon.quantityToGet) > 0;
|
|
8604
|
-
var
|
|
8756
|
+
var isQtyDiscount = isBuyXGetDiscount(coupon);
|
|
8757
|
+
var showTimeline = (hasBuyXGetY || isQtyDiscount) && ((progressInfo === null || progressInfo === void 0 ? void 0 : progressInfo.showTimeline) || (progressInfo === null || progressInfo === void 0 ? void 0 : progressInfo.type) === 'buyxgety' || (progressInfo === null || progressInfo === void 0 ? void 0 : progressInfo.type) === 'buyxgetdiscount');
|
|
8605
8758
|
return /*#__PURE__*/React__default.createElement(OfferCard, {
|
|
8606
8759
|
key: (_coupon$discountId = coupon === null || coupon === void 0 ? void 0 : coupon.discountId) != null ? _coupon$discountId : coupon === null || coupon === void 0 ? void 0 : coupon.couponCode,
|
|
8607
8760
|
$accentColor: accentColor,
|
|
@@ -8611,7 +8764,7 @@ var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref3) {
|
|
|
8611
8764
|
$variant: savingsBadge.variant
|
|
8612
8765
|
}, /*#__PURE__*/React__default.createElement(BadgeTop, null, savingsBadge.top), /*#__PURE__*/React__default.createElement(BadgeBottom, null, savingsBadge.bottom)), /*#__PURE__*/React__default.createElement(CardHeaderCopy, null, /*#__PURE__*/React__default.createElement(CardMetaRow, null, /*#__PURE__*/React__default.createElement(TypePill, {
|
|
8613
8766
|
$accentColor: accentColor
|
|
8614
|
-
}, /*#__PURE__*/React__default.createElement(TypeIcon, null), /*#__PURE__*/React__default.createElement("span", null, isBuyXGetFreeProduct(coupon) ? isFullyFreeOffer ? 'Free Gift' : getBuyXGetFreeProductOffPercent(coupon) + "% Off" : hasBuyXGetY ? '
|
|
8767
|
+
}, /*#__PURE__*/React__default.createElement(TypeIcon, null), /*#__PURE__*/React__default.createElement("span", null, isBuyXGetFreeProduct(coupon) ? isFullyFreeOffer ? 'Free Gift' : getBuyXGetFreeProductOffPercent(coupon) + "% Off" : isQtyDiscount ? 'Add & Save' : hasBuyXGetY ? 'Add & Get' : coupon !== null && coupon !== void 0 && coupon.offPercentage ? 'Percent Off' : 'Instant Save')), (progressInfo === null || progressInfo === void 0 ? void 0 : progressInfo.qualified) && /*#__PURE__*/React__default.createElement(QualifiedPill, {
|
|
8615
8768
|
$accentColor: accentColor
|
|
8616
8769
|
}, /*#__PURE__*/React__default.createElement(HiSparkles, null), "Ready")), /*#__PURE__*/React__default.createElement(TitleRow, null, /*#__PURE__*/React__default.createElement(OfferTitle, {
|
|
8617
8770
|
title: coupon === null || coupon === void 0 ? void 0 : coupon.discountName
|
|
@@ -8632,36 +8785,24 @@ var DiscountSuggestionsModal = function DiscountSuggestionsModal(_ref3) {
|
|
|
8632
8785
|
onClick: function onClick() {
|
|
8633
8786
|
return copyCouponCode(coupon === null || coupon === void 0 ? void 0 : coupon.couponCode);
|
|
8634
8787
|
}
|
|
8635
|
-
}, isCopied ? /*#__PURE__*/React__default.createElement("div", {
|
|
8636
|
-
style: {
|
|
8637
|
-
display: 'flex',
|
|
8638
|
-
alignItems: 'center',
|
|
8639
|
-
gap: '4px'
|
|
8640
|
-
}
|
|
8641
|
-
}, /*#__PURE__*/React__default.createElement(FiCheck, null), /*#__PURE__*/React__default.createElement("span", null, "Copied")) : /*#__PURE__*/React__default.createElement("div", {
|
|
8642
|
-
style: {
|
|
8643
|
-
display: 'flex',
|
|
8644
|
-
alignItems: 'center',
|
|
8645
|
-
gap: '4px'
|
|
8646
|
-
}
|
|
8647
|
-
}, /*#__PURE__*/React__default.createElement(FiCopy, null), /*#__PURE__*/React__default.createElement("span", null, "Copy")))))))), benefitSummary && /*#__PURE__*/React__default.createElement(OfferDescription, null, benefitSummary), showTimeline && /*#__PURE__*/React__default.createElement(BuyXTimeline, {
|
|
8788
|
+
}, isCopied ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(FiCheck, null), /*#__PURE__*/React__default.createElement("span", null, "Copied")) : /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(FiCopy, null), /*#__PURE__*/React__default.createElement("span", null, "Copy")))))))), benefitSummary && /*#__PURE__*/React__default.createElement(OfferDescription, null, benefitSummary), showTimeline && /*#__PURE__*/React__default.createElement(BuyXTimeline, {
|
|
8648
8789
|
$accentColor: accentColor
|
|
8649
8790
|
}, /*#__PURE__*/React__default.createElement(TimelineStep, null, /*#__PURE__*/React__default.createElement(TimelineIcon, {
|
|
8650
8791
|
$accentColor: accentColor
|
|
8651
|
-
}, /*#__PURE__*/React__default.createElement(FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(TimelineLabel, null, "
|
|
8792
|
+
}, /*#__PURE__*/React__default.createElement(FiShoppingCart, null)), /*#__PURE__*/React__default.createElement(TimelineLabel, null, "Add ", coupon.quantityToBuy)), /*#__PURE__*/React__default.createElement(TimelineTrack, {
|
|
8652
8793
|
$accentColor: accentColor
|
|
8653
8794
|
}, /*#__PURE__*/React__default.createElement(TimelineArrow, {
|
|
8654
8795
|
$accentColor: accentColor
|
|
8655
8796
|
})), /*#__PURE__*/React__default.createElement(TimelineStep, null, /*#__PURE__*/React__default.createElement(TimelineIcon, {
|
|
8656
8797
|
$accentColor: accentColor,
|
|
8657
8798
|
$highlight: true
|
|
8658
|
-
}, /*#__PURE__*/React__default.createElement(FiGift, null)), /*#__PURE__*/React__default.createElement(TimelineLabel, null, "Get ", coupon.quantityToGet
|
|
8799
|
+
}, isQtyDiscount ? /*#__PURE__*/React__default.createElement(FiPercent, null) : /*#__PURE__*/React__default.createElement(FiGift, null)), /*#__PURE__*/React__default.createElement(TimelineLabel, null, isQtyDiscount ? "Get " + ((progressInfo === null || progressInfo === void 0 ? void 0 : progressInfo.offLabel) || getBuyXGetDiscountOffLabel(coupon, productPrice)) : "Get " + coupon.quantityToGet + " FREE"))), ((progressInfo === null || progressInfo === void 0 ? void 0 : progressInfo.type) === 'quantity' || (progressInfo === null || progressInfo === void 0 ? void 0 : progressInfo.type) === 'buyxgetdiscount') && !progressInfo.qualified && /*#__PURE__*/React__default.createElement(ProgressBlock, null, /*#__PURE__*/React__default.createElement(ProgressTrack, {
|
|
8659
8800
|
$accentColor: accentColor,
|
|
8660
8801
|
role: "progressbar",
|
|
8661
8802
|
"aria-valuenow": progressInfo.current,
|
|
8662
8803
|
"aria-valuemin": 0,
|
|
8663
8804
|
"aria-valuemax": progressInfo.target,
|
|
8664
|
-
"aria-label": progressInfo.current + " of " + progressInfo.target + "
|
|
8805
|
+
"aria-label": progressInfo.current + " of " + progressInfo.target + " quantities toward eligibility"
|
|
8665
8806
|
}, /*#__PURE__*/React__default.createElement(ProgressFill, {
|
|
8666
8807
|
$accentColor: accentColor,
|
|
8667
8808
|
$percent: progressInfo.percent
|
|
@@ -8703,95 +8844,95 @@ var DialogTitle = styled.h2(_templateObject11$3 || (_templateObject11$3 = _tagge
|
|
|
8703
8844
|
var CloseButton = styled.button(_templateObject12$2 || (_templateObject12$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0.5rem;\n right: 0.5rem;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n padding: 0;\n border: none;\n border-radius: 50%;\n background: transparent;\n color: rgba(0, 0, 0, 0.54);\n cursor: pointer;\n transition: background-color 0.2s ease;\n\n svg {\n font-size: 1.25rem;\n }\n\n &:hover {\n background-color: rgba(0, 0, 0, 0.04);\n }\n\n &:focus-visible {\n outline: 2px solid #437c0f;\n outline-offset: 1px;\n }\n"])));
|
|
8704
8845
|
var ScrollableBody = styled.div(_templateObject13$2 || (_templateObject13$2 = _taggedTemplateLiteralLoose(["\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n -webkit-overflow-scrolling: touch;\n padding: 0.85rem;\n"])));
|
|
8705
8846
|
var EmptyState$1 = styled.p(_templateObject14$2 || (_templateObject14$2 = _taggedTemplateLiteralLoose(["\n margin: 0;\n padding: 1.5rem 0.5rem;\n text-align: center;\n font-size: 0.9rem;\n font-weight: 600;\n color: #5a6354;\n"])));
|
|
8706
|
-
var SavingsCenter = styled.section(_templateObject15$2 || (_templateObject15$2 = _taggedTemplateLiteralLoose(["\n --accent: ", ";\n position: relative;\n width: 100%;\n border-radius: 0.85rem;\n border: 1px solid ", ";\n background: linear-gradient(165deg, #ffffff 0%, #fafcf7 45%, #f6f9f2 100%);\n overflow: hidden;\n box-shadow: 0 1px 2px rgba(16, 22, 10, 0.04),\n 0 8px 24px ", ";\n animation: ", " 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;\n font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',\n 'Inter', Roboto, sans-serif;\n ", "\n"])), function (
|
|
8707
|
-
var $accentColor = _ref5.$accentColor;
|
|
8708
|
-
return $accentColor;
|
|
8709
|
-
}, function (_ref6) {
|
|
8847
|
+
var SavingsCenter = styled.section(_templateObject15$2 || (_templateObject15$2 = _taggedTemplateLiteralLoose(["\n --accent: ", ";\n position: relative;\n width: 100%;\n border-radius: 0.85rem;\n border: 1px solid ", ";\n background: linear-gradient(165deg, #ffffff 0%, #fafcf7 45%, #f6f9f2 100%);\n overflow: hidden;\n box-shadow: 0 1px 2px rgba(16, 22, 10, 0.04),\n 0 8px 24px ", ";\n animation: ", " 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;\n font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI',\n 'Inter', Roboto, sans-serif;\n ", "\n"])), function (_ref6) {
|
|
8710
8848
|
var $accentColor = _ref6.$accentColor;
|
|
8711
|
-
return $accentColor
|
|
8849
|
+
return $accentColor;
|
|
8712
8850
|
}, function (_ref7) {
|
|
8713
8851
|
var $accentColor = _ref7.$accentColor;
|
|
8852
|
+
return $accentColor + "20";
|
|
8853
|
+
}, function (_ref8) {
|
|
8854
|
+
var $accentColor = _ref8.$accentColor;
|
|
8714
8855
|
return $accentColor + "10";
|
|
8715
8856
|
}, fadeSlideUp, reducedMotion);
|
|
8716
|
-
var AmbientGlow = styled.div(_templateObject16$2 || (_templateObject16$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: -40%;\n right: -15%;\n width: 55%;\n height: 80%;\n background: radial-gradient(\n circle,\n ", " 0%,\n transparent 70%\n );\n pointer-events: none;\n"])), function (
|
|
8717
|
-
var $accentColor =
|
|
8857
|
+
var AmbientGlow = styled.div(_templateObject16$2 || (_templateObject16$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: -40%;\n right: -15%;\n width: 55%;\n height: 80%;\n background: radial-gradient(\n circle,\n ", " 0%,\n transparent 70%\n );\n pointer-events: none;\n"])), function (_ref9) {
|
|
8858
|
+
var $accentColor = _ref9.$accentColor;
|
|
8718
8859
|
return $accentColor + "18";
|
|
8719
8860
|
});
|
|
8720
|
-
var Sparkle = styled.span(_templateObject17$2 || (_templateObject17$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: ", ";\n left: ", ";\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background: ", ";\n box-shadow: 0 0 12px ", ";\n animation: ", " 4s ease-in-out infinite;\n animation-delay: ", ";\n pointer-events: none;\n opacity: 0.3;\n\n ", "\n"])), function (
|
|
8721
|
-
var $top =
|
|
8861
|
+
var Sparkle = styled.span(_templateObject17$2 || (_templateObject17$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: ", ";\n left: ", ";\n width: ", ";\n height: ", ";\n border-radius: 50%;\n background: ", ";\n box-shadow: 0 0 12px ", ";\n animation: ", " 4s ease-in-out infinite;\n animation-delay: ", ";\n pointer-events: none;\n opacity: 0.3;\n\n ", "\n"])), function (_ref10) {
|
|
8862
|
+
var $top = _ref10.$top;
|
|
8722
8863
|
return $top;
|
|
8723
|
-
}, function (_ref10) {
|
|
8724
|
-
var $left = _ref10.$left;
|
|
8725
|
-
return $left;
|
|
8726
8864
|
}, function (_ref11) {
|
|
8727
|
-
var $
|
|
8728
|
-
return $
|
|
8865
|
+
var $left = _ref11.$left;
|
|
8866
|
+
return $left;
|
|
8729
8867
|
}, function (_ref12) {
|
|
8730
8868
|
var $size = _ref12.$size;
|
|
8731
8869
|
return $size === 'sm' ? '4px' : '6px';
|
|
8732
8870
|
}, function (_ref13) {
|
|
8733
|
-
var $
|
|
8734
|
-
return $
|
|
8871
|
+
var $size = _ref13.$size;
|
|
8872
|
+
return $size === 'sm' ? '4px' : '6px';
|
|
8735
8873
|
}, function (_ref14) {
|
|
8736
8874
|
var $accentColor = _ref14.$accentColor;
|
|
8875
|
+
return $accentColor;
|
|
8876
|
+
}, function (_ref15) {
|
|
8877
|
+
var $accentColor = _ref15.$accentColor;
|
|
8737
8878
|
return $accentColor + "80";
|
|
8738
|
-
}, sparkleFloat, function (
|
|
8739
|
-
var $delay =
|
|
8879
|
+
}, sparkleFloat, function (_ref16) {
|
|
8880
|
+
var $delay = _ref16.$delay;
|
|
8740
8881
|
return $delay;
|
|
8741
8882
|
}, reducedMotion);
|
|
8742
|
-
var SectionHeader = styled.header(_templateObject18$2 || (_templateObject18$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.6rem;\n padding: 0.65rem 0.8rem;\n background: linear-gradient(\n 135deg,\n ", " 0%,\n ", " 55%,\n transparent 100%\n );\n border-bottom: 1px solid ", ";\n position: relative;\n overflow: hidden;\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 105deg,\n transparent 38%,\n rgba(255, 255, 255, 0.45) 50%,\n transparent 62%\n );\n background-size: 200% 100%;\n animation: ", " 6s ease-in-out infinite;\n pointer-events: none;\n }\n\n ", "\n"])), function (
|
|
8743
|
-
var $accentColor = _ref16.$accentColor;
|
|
8744
|
-
return $accentColor + "16";
|
|
8745
|
-
}, function (_ref17) {
|
|
8883
|
+
var SectionHeader = styled.header(_templateObject18$2 || (_templateObject18$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.6rem;\n padding: 0.65rem 0.8rem;\n background: linear-gradient(\n 135deg,\n ", " 0%,\n ", " 55%,\n transparent 100%\n );\n border-bottom: 1px solid ", ";\n position: relative;\n overflow: hidden;\n\n &::after {\n content: '';\n position: absolute;\n inset: 0;\n background: linear-gradient(\n 105deg,\n transparent 38%,\n rgba(255, 255, 255, 0.45) 50%,\n transparent 62%\n );\n background-size: 200% 100%;\n animation: ", " 6s ease-in-out infinite;\n pointer-events: none;\n }\n\n ", "\n"])), function (_ref17) {
|
|
8746
8884
|
var $accentColor = _ref17.$accentColor;
|
|
8747
|
-
return $accentColor + "
|
|
8885
|
+
return $accentColor + "16";
|
|
8748
8886
|
}, function (_ref18) {
|
|
8749
8887
|
var $accentColor = _ref18.$accentColor;
|
|
8888
|
+
return $accentColor + "05";
|
|
8889
|
+
}, function (_ref19) {
|
|
8890
|
+
var $accentColor = _ref19.$accentColor;
|
|
8750
8891
|
return $accentColor + "12";
|
|
8751
8892
|
}, shimmer, reducedMotion);
|
|
8752
|
-
var HeaderIconWrap = styled.div(_templateObject19$2 || (_templateObject19$2 = _taggedTemplateLiteralLoose(["\n --icon-shadow: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 0.55rem;\n flex-shrink: 0;\n color: #fff;\n background: linear-gradient(\n 145deg,\n ", " 0%,\n ", " 100%\n );\n box-shadow: 0 4px 12px var(--icon-shadow);\n z-index: 1;\n\n svg {\n font-size: 1.05rem;\n }\n"])), function (
|
|
8753
|
-
var $accentColor = _ref19.$accentColor;
|
|
8754
|
-
return $accentColor + "40";
|
|
8755
|
-
}, function (_ref20) {
|
|
8893
|
+
var HeaderIconWrap = styled.div(_templateObject19$2 || (_templateObject19$2 = _taggedTemplateLiteralLoose(["\n --icon-shadow: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2rem;\n height: 2rem;\n border-radius: 0.55rem;\n flex-shrink: 0;\n color: #fff;\n background: linear-gradient(\n 145deg,\n ", " 0%,\n ", " 100%\n );\n box-shadow: 0 4px 12px var(--icon-shadow);\n z-index: 1;\n\n svg {\n font-size: 1.05rem;\n }\n"])), function (_ref20) {
|
|
8756
8894
|
var $accentColor = _ref20.$accentColor;
|
|
8757
|
-
return $accentColor;
|
|
8895
|
+
return $accentColor + "40";
|
|
8758
8896
|
}, function (_ref21) {
|
|
8759
8897
|
var $accentColor = _ref21.$accentColor;
|
|
8898
|
+
return $accentColor;
|
|
8899
|
+
}, function (_ref22) {
|
|
8900
|
+
var $accentColor = _ref22.$accentColor;
|
|
8760
8901
|
return $accentColor + "cc";
|
|
8761
8902
|
});
|
|
8762
8903
|
var HeaderCopy = styled.div(_templateObject20$1 || (_templateObject20$1 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n z-index: 1;\n"])));
|
|
8763
|
-
var Eyebrow = styled.span(_templateObject21$1 || (_templateObject21$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n font-size: 0.6rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: ", ";\n\n svg {\n font-size: 0.65rem;\n }\n"])), function (
|
|
8764
|
-
var $accentColor =
|
|
8904
|
+
var Eyebrow = styled.span(_templateObject21$1 || (_templateObject21$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n font-size: 0.6rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.08em;\n color: ", ";\n\n svg {\n font-size: 0.65rem;\n }\n"])), function (_ref23) {
|
|
8905
|
+
var $accentColor = _ref23.$accentColor;
|
|
8765
8906
|
return $accentColor;
|
|
8766
8907
|
});
|
|
8767
8908
|
var SectionHeading = styled.h3(_templateObject22$1 || (_templateObject22$1 = _taggedTemplateLiteralLoose(["\n margin: 0.1rem 0 0;\n font-size: 0.95rem;\n font-weight: 800;\n letter-spacing: -0.02em;\n color: #12180d;\n line-height: 1.2;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
8768
|
-
var OfferCountBadge = styled.div(_templateObject23$1 || (_templateObject23$1 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n gap: 0.28rem;\n padding: 0.28rem 0.55rem;\n border-radius: 999px;\n background: rgba(18, 24, 13, 0.92);\n color: #f8fff0;\n font-size: 0.65rem;\n font-weight: 600;\n z-index: 1;\n\n strong {\n font-size: 0.82rem;\n font-weight: 800;\n line-height: 1;\n }\n\n svg {\n font-size: 0.72rem;\n color: ", ";\n }\n"])), function (
|
|
8769
|
-
var $accentColor =
|
|
8909
|
+
var OfferCountBadge = styled.div(_templateObject23$1 || (_templateObject23$1 = _taggedTemplateLiteralLoose(["\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n gap: 0.28rem;\n padding: 0.28rem 0.55rem;\n border-radius: 999px;\n background: rgba(18, 24, 13, 0.92);\n color: #f8fff0;\n font-size: 0.65rem;\n font-weight: 600;\n z-index: 1;\n\n strong {\n font-size: 0.82rem;\n font-weight: 800;\n line-height: 1;\n }\n\n svg {\n font-size: 0.72rem;\n color: ", ";\n }\n"])), function (_ref24) {
|
|
8910
|
+
var $accentColor = _ref24.$accentColor;
|
|
8770
8911
|
return $accentColor;
|
|
8771
8912
|
});
|
|
8772
8913
|
var OfferStack = styled.div(_templateObject24$1 || (_templateObject24$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding: 0.55rem;\n"])));
|
|
8773
|
-
var OfferCard = styled.article(_templateObject25$1 || (_templateObject25$1 = _taggedTemplateLiteralLoose(["\n border-radius: 0.7rem;\n border: 1px solid ", ";\n background: #fff;\n box-shadow: 0 1px 4px rgba(16, 20, 12, 0.04);\n opacity: 0;\n animation: ", " 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;\n animation-delay: ", "s;\n transition: box-shadow 0.2s ease, border-color 0.2s ease;\n overflow: hidden;\n\n &:hover {\n border-color: ", ";\n box-shadow: 0 4px 14px ", ";\n }\n\n &:focus-within {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n ", "\n"])), function (
|
|
8774
|
-
var $accentColor =
|
|
8914
|
+
var OfferCard = styled.article(_templateObject25$1 || (_templateObject25$1 = _taggedTemplateLiteralLoose(["\n border-radius: 0.7rem;\n border: 1px solid ", ";\n background: #fff;\n box-shadow: 0 1px 4px rgba(16, 20, 12, 0.04);\n opacity: 0;\n animation: ", " 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;\n animation-delay: ", "s;\n transition: box-shadow 0.2s ease, border-color 0.2s ease;\n overflow: hidden;\n\n &:hover {\n border-color: ", ";\n box-shadow: 0 4px 14px ", ";\n }\n\n &:focus-within {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n ", "\n"])), function (_ref25) {
|
|
8915
|
+
var $accentColor = _ref25.$accentColor;
|
|
8775
8916
|
return $accentColor + "20";
|
|
8776
|
-
}, fadeSlideUp, function (
|
|
8777
|
-
var $index =
|
|
8917
|
+
}, fadeSlideUp, function (_ref26) {
|
|
8918
|
+
var $index = _ref26.$index;
|
|
8778
8919
|
return 0.06 + $index * 0.04;
|
|
8779
|
-
}, function (_ref26) {
|
|
8780
|
-
var $accentColor = _ref26.$accentColor;
|
|
8781
|
-
return $accentColor + "45";
|
|
8782
8920
|
}, function (_ref27) {
|
|
8783
8921
|
var $accentColor = _ref27.$accentColor;
|
|
8784
|
-
return $accentColor + "
|
|
8922
|
+
return $accentColor + "45";
|
|
8785
8923
|
}, function (_ref28) {
|
|
8786
8924
|
var $accentColor = _ref28.$accentColor;
|
|
8925
|
+
return $accentColor + "12";
|
|
8926
|
+
}, function (_ref29) {
|
|
8927
|
+
var $accentColor = _ref29.$accentColor;
|
|
8787
8928
|
return $accentColor + "50";
|
|
8788
8929
|
}, reducedMotion);
|
|
8789
8930
|
var CardBody = styled.div(_templateObject26$1 || (_templateObject26$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 0.35rem;\n padding: 0.6rem 0.65rem;\n"])));
|
|
8790
8931
|
var CardHeader = styled.div(_templateObject27$1 || (_templateObject27$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n gap: 0.55rem;\n"])));
|
|
8791
8932
|
var CardHeaderCopy = styled.div(_templateObject28$1 || (_templateObject28$1 = _taggedTemplateLiteralLoose(["\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 0.15rem;\n"])));
|
|
8792
|
-
var SavingsBadge = styled.div(_templateObject29$1 || (_templateObject29$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-width: 3.1rem;\n padding: 0.3rem 0.35rem;\n border-radius: 0.5rem;\n flex-shrink: 0;\n text-align: center;\n color: #fff;\n line-height: 1;\n background: ", ";\n box-shadow: 0 3px 10px ", ";\n"])), function (
|
|
8793
|
-
var $accentColor =
|
|
8794
|
-
$variant =
|
|
8933
|
+
var SavingsBadge = styled.div(_templateObject29$1 || (_templateObject29$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-width: 3.1rem;\n padding: 0.3rem 0.35rem;\n border-radius: 0.5rem;\n flex-shrink: 0;\n text-align: center;\n color: #fff;\n line-height: 1;\n background: ", ";\n box-shadow: 0 3px 10px ", ";\n"])), function (_ref30) {
|
|
8934
|
+
var $accentColor = _ref30.$accentColor,
|
|
8935
|
+
$variant = _ref30.$variant;
|
|
8795
8936
|
if ($variant === 'gift') {
|
|
8796
8937
|
return "linear-gradient(145deg, #e8a317 0%, #c47d0a 100%)";
|
|
8797
8938
|
}
|
|
@@ -8799,152 +8940,152 @@ var SavingsBadge = styled.div(_templateObject29$1 || (_templateObject29$1 = _tag
|
|
|
8799
8940
|
return "linear-gradient(145deg, " + $accentColor + " 0%, #2d5f0a 100%)";
|
|
8800
8941
|
}
|
|
8801
8942
|
return "linear-gradient(145deg, " + $accentColor + " 0%, " + $accentColor + "cc 100%)";
|
|
8802
|
-
}, function (
|
|
8803
|
-
var $accentColor =
|
|
8943
|
+
}, function (_ref31) {
|
|
8944
|
+
var $accentColor = _ref31.$accentColor;
|
|
8804
8945
|
return $accentColor + "28";
|
|
8805
8946
|
});
|
|
8806
8947
|
var BadgeTop = styled.span(_templateObject30$1 || (_templateObject30$1 = _taggedTemplateLiteralLoose(["\n font-size: 0.82rem;\n font-weight: 900;\n letter-spacing: -0.02em;\n"])));
|
|
8807
8948
|
var BadgeBottom = styled.span(_templateObject31$1 || (_templateObject31$1 = _taggedTemplateLiteralLoose(["\n margin-top: 0.1rem;\n font-size: 0.52rem;\n font-weight: 800;\n letter-spacing: 0.08em;\n opacity: 0.92;\n"])));
|
|
8808
8949
|
var CardMetaRow = styled.div(_templateObject32$1 || (_templateObject32$1 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.28rem;\n"])));
|
|
8809
|
-
var TypePill = styled.span(_templateObject33$1 || (_templateObject33$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.22rem;\n padding: 0.12rem 0.4rem;\n border-radius: 999px;\n font-size: 0.6rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n\n svg {\n font-size: 0.65rem;\n }\n"])), function (
|
|
8810
|
-
var $accentColor = _ref31.$accentColor;
|
|
8811
|
-
return $accentColor;
|
|
8812
|
-
}, function (_ref32) {
|
|
8950
|
+
var TypePill = styled.span(_templateObject33$1 || (_templateObject33$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.22rem;\n padding: 0.12rem 0.4rem;\n border-radius: 999px;\n font-size: 0.6rem;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n\n svg {\n font-size: 0.65rem;\n }\n"])), function (_ref32) {
|
|
8813
8951
|
var $accentColor = _ref32.$accentColor;
|
|
8814
|
-
return $accentColor
|
|
8952
|
+
return $accentColor;
|
|
8815
8953
|
}, function (_ref33) {
|
|
8816
8954
|
var $accentColor = _ref33.$accentColor;
|
|
8955
|
+
return $accentColor + "10";
|
|
8956
|
+
}, function (_ref34) {
|
|
8957
|
+
var $accentColor = _ref34.$accentColor;
|
|
8817
8958
|
return $accentColor + "22";
|
|
8818
8959
|
});
|
|
8819
|
-
var QualifiedPill = styled.span(_templateObject34$1 || (_templateObject34$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.2rem;\n padding: 0.12rem 0.4rem;\n border-radius: 999px;\n font-size: 0.6rem;\n font-weight: 700;\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n\n svg {\n font-size: 0.62rem;\n }\n"])), function (
|
|
8820
|
-
var $accentColor = _ref34.$accentColor;
|
|
8821
|
-
return $accentColor;
|
|
8822
|
-
}, function (_ref35) {
|
|
8960
|
+
var QualifiedPill = styled.span(_templateObject34$1 || (_templateObject34$1 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 0.2rem;\n padding: 0.12rem 0.4rem;\n border-radius: 999px;\n font-size: 0.6rem;\n font-weight: 700;\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n\n svg {\n font-size: 0.62rem;\n }\n"])), function (_ref35) {
|
|
8823
8961
|
var $accentColor = _ref35.$accentColor;
|
|
8824
|
-
return $accentColor
|
|
8962
|
+
return $accentColor;
|
|
8825
8963
|
}, function (_ref36) {
|
|
8826
8964
|
var $accentColor = _ref36.$accentColor;
|
|
8965
|
+
return $accentColor + "12";
|
|
8966
|
+
}, function (_ref37) {
|
|
8967
|
+
var $accentColor = _ref37.$accentColor;
|
|
8827
8968
|
return $accentColor + "30";
|
|
8828
8969
|
});
|
|
8829
8970
|
var TitleRow = styled.div(_templateObject35 || (_templateObject35 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.45rem;\n min-width: 0;\n flex-wrap: wrap;\n"])));
|
|
8830
8971
|
var OfferTitle = styled.h4(_templateObject36 || (_templateObject36 = _taggedTemplateLiteralLoose(["\n margin: 0;\n flex: 1;\n min-width: 0;\n font-size: 0.88rem;\n font-weight: 800;\n letter-spacing: -0.015em;\n color: #141a10;\n line-height: 1.25;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
8831
8972
|
var OfferDescription = styled.p(_templateObject37 || (_templateObject37 = _taggedTemplateLiteralLoose(["\n margin: 0;\n font-size: 0.74rem;\n font-weight: 500;\n color: #4a5540;\n line-height: 1.35;\n"])));
|
|
8832
|
-
var BuyXTimeline = styled.div(_templateObject38 || (_templateObject38 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.35rem;\n padding: 0.4rem 0.55rem;\n border-radius: 0.5rem;\n background: ", ";\n border: 1px solid ", ";\n"])), function (
|
|
8833
|
-
var $accentColor = _ref37.$accentColor;
|
|
8834
|
-
return $accentColor + "07";
|
|
8835
|
-
}, function (_ref38) {
|
|
8973
|
+
var BuyXTimeline = styled.div(_templateObject38 || (_templateObject38 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.35rem;\n padding: 0.4rem 0.55rem;\n border-radius: 0.5rem;\n background: ", ";\n border: 1px solid ", ";\n"])), function (_ref38) {
|
|
8836
8974
|
var $accentColor = _ref38.$accentColor;
|
|
8975
|
+
return $accentColor + "07";
|
|
8976
|
+
}, function (_ref39) {
|
|
8977
|
+
var $accentColor = _ref39.$accentColor;
|
|
8837
8978
|
return $accentColor + "14";
|
|
8838
8979
|
});
|
|
8839
8980
|
var TimelineStep = styled.div(_templateObject39 || (_templateObject39 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.25rem;\n min-width: 0;\n"])));
|
|
8840
|
-
var TimelineIcon = styled.div(_templateObject40 || (_templateObject40 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.45rem;\n height: 1.45rem;\n border-radius: 0.35rem;\n color: ", ";\n background: ", ";\n\n svg {\n font-size: 0.72rem;\n }\n"])), function (
|
|
8841
|
-
var $accentColor = _ref39.$accentColor,
|
|
8842
|
-
$highlight = _ref39.$highlight;
|
|
8843
|
-
return $highlight ? '#fff' : $accentColor;
|
|
8844
|
-
}, function (_ref40) {
|
|
8981
|
+
var TimelineIcon = styled.div(_templateObject40 || (_templateObject40 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1.45rem;\n height: 1.45rem;\n border-radius: 0.35rem;\n color: ", ";\n background: ", ";\n\n svg {\n font-size: 0.72rem;\n }\n"])), function (_ref40) {
|
|
8845
8982
|
var $accentColor = _ref40.$accentColor,
|
|
8846
8983
|
$highlight = _ref40.$highlight;
|
|
8984
|
+
return $highlight ? '#fff' : $accentColor;
|
|
8985
|
+
}, function (_ref41) {
|
|
8986
|
+
var $accentColor = _ref41.$accentColor,
|
|
8987
|
+
$highlight = _ref41.$highlight;
|
|
8847
8988
|
return $highlight ? $accentColor : $accentColor + "14";
|
|
8848
8989
|
});
|
|
8849
8990
|
var TimelineLabel = styled.span(_templateObject41 || (_templateObject41 = _taggedTemplateLiteralLoose(["\n font-size: 0.65rem;\n font-weight: 700;\n color: #3a4334;\n white-space: nowrap;\n"])));
|
|
8850
8991
|
var TimelineTrack = styled.div(_templateObject42 || (_templateObject42 = _taggedTemplateLiteralLoose(["\n flex: 1;\n display: flex;\n align-items: center;\n min-width: 2rem;\n padding: 0 0.15rem;\n"])));
|
|
8851
|
-
var TimelineArrow = styled.div(_templateObject43 || (_templateObject43 = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 2px;\n border-radius: 999px;\n background: linear-gradient(\n 90deg,\n ", ",\n ", "\n );\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n right: -1px;\n top: 50%;\n transform: translateY(-50%);\n border: 5px solid transparent;\n border-left-color: ", ";\n }\n"])), function (
|
|
8852
|
-
var $accentColor = _ref41.$accentColor;
|
|
8853
|
-
return $accentColor + "44";
|
|
8854
|
-
}, function (_ref42) {
|
|
8992
|
+
var TimelineArrow = styled.div(_templateObject43 || (_templateObject43 = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 2px;\n border-radius: 999px;\n background: linear-gradient(\n 90deg,\n ", ",\n ", "\n );\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n right: -1px;\n top: 50%;\n transform: translateY(-50%);\n border: 5px solid transparent;\n border-left-color: ", ";\n }\n"])), function (_ref42) {
|
|
8855
8993
|
var $accentColor = _ref42.$accentColor;
|
|
8856
|
-
return $accentColor;
|
|
8994
|
+
return $accentColor + "44";
|
|
8857
8995
|
}, function (_ref43) {
|
|
8858
8996
|
var $accentColor = _ref43.$accentColor;
|
|
8859
8997
|
return $accentColor;
|
|
8998
|
+
}, function (_ref44) {
|
|
8999
|
+
var $accentColor = _ref44.$accentColor;
|
|
9000
|
+
return $accentColor;
|
|
8860
9001
|
});
|
|
8861
9002
|
var ProgressBlock = styled.div(_templateObject44 || (_templateObject44 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n"])));
|
|
8862
9003
|
var ProgressTrack = styled.div(_templateObject45 || (_templateObject45 = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 0.35rem;\n border-radius: 999px;\n background: #e8ede3;\n overflow: hidden;\n"])));
|
|
8863
|
-
var ProgressFill = styled.div(_templateObject46 || (_templateObject46 = _taggedTemplateLiteralLoose(["\n height: 100%;\n width: ", "%;\n border-radius: 999px;\n background: linear-gradient(\n 90deg,\n ", " 0%,\n ", " 100%\n );\n animation: ", " 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;\n transition: width 0.4s ease;\n\n ", "\n"])), function (
|
|
8864
|
-
var $percent =
|
|
9004
|
+
var ProgressFill = styled.div(_templateObject46 || (_templateObject46 = _taggedTemplateLiteralLoose(["\n height: 100%;\n width: ", "%;\n border-radius: 999px;\n background: linear-gradient(\n 90deg,\n ", " 0%,\n ", " 100%\n );\n animation: ", " 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;\n transition: width 0.4s ease;\n\n ", "\n"])), function (_ref45) {
|
|
9005
|
+
var $percent = _ref45.$percent;
|
|
8865
9006
|
return $percent;
|
|
8866
|
-
}, function (_ref45) {
|
|
8867
|
-
var $accentColor = _ref45.$accentColor;
|
|
8868
|
-
return $accentColor + "cc";
|
|
8869
9007
|
}, function (_ref46) {
|
|
8870
9008
|
var $accentColor = _ref46.$accentColor;
|
|
9009
|
+
return $accentColor + "cc";
|
|
9010
|
+
}, function (_ref47) {
|
|
9011
|
+
var $accentColor = _ref47.$accentColor;
|
|
8871
9012
|
return $accentColor;
|
|
8872
9013
|
}, progressGrow, reducedMotion);
|
|
8873
9014
|
var ProgressMeta = styled.div(_templateObject47 || (_templateObject47 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: 0.2rem 0.5rem;\n"])));
|
|
8874
9015
|
var ProgressCount = styled.div(_templateObject48 || (_templateObject48 = _taggedTemplateLiteralLoose(["\n font-size: 0.7rem;\n font-weight: 600;\n color: #2f3829;\n\n strong {\n font-size: 0.78rem;\n font-weight: 800;\n }\n\n span {\n color: #6a7364;\n }\n"])));
|
|
8875
9016
|
var ProgressHint = styled.span(_templateObject49 || (_templateObject49 = _taggedTemplateLiteralLoose(["\n font-size: 0.68rem;\n font-weight: 600;\n color: #7a5e12;\n line-height: 1.3;\n"])));
|
|
8876
|
-
var SuccessBanner = styled.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.3rem;\n padding: 0.32rem 0.5rem;\n border-radius: 0.45rem;\n font-size: 0.7rem;\n font-weight: 600;\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n\n svg {\n flex-shrink: 0;\n font-size: 0.75rem;\n }\n"])), function (
|
|
8877
|
-
var $accentColor = _ref47.$accentColor;
|
|
8878
|
-
return $accentColor;
|
|
8879
|
-
}, function (_ref48) {
|
|
9017
|
+
var SuccessBanner = styled.div(_templateObject50 || (_templateObject50 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.3rem;\n padding: 0.32rem 0.5rem;\n border-radius: 0.45rem;\n font-size: 0.7rem;\n font-weight: 600;\n color: ", ";\n background: ", ";\n border: 1px solid ", ";\n\n svg {\n flex-shrink: 0;\n font-size: 0.75rem;\n }\n"])), function (_ref48) {
|
|
8880
9018
|
var $accentColor = _ref48.$accentColor;
|
|
8881
|
-
return $accentColor
|
|
9019
|
+
return $accentColor;
|
|
8882
9020
|
}, function (_ref49) {
|
|
8883
9021
|
var $accentColor = _ref49.$accentColor;
|
|
9022
|
+
return $accentColor + "10";
|
|
9023
|
+
}, function (_ref50) {
|
|
9024
|
+
var $accentColor = _ref50.$accentColor;
|
|
8884
9025
|
return $accentColor + "25";
|
|
8885
9026
|
});
|
|
8886
9027
|
var StatusList = styled.div(_templateObject51 || (_templateObject51 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n"])));
|
|
8887
|
-
var StatusItem = styled.div(_templateObject52 || (_templateObject52 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n gap: 0.3rem;\n padding: 0.28rem 0.45rem;\n border-radius: 0.45rem;\n font-size: 0.7rem;\n font-weight: 600;\n line-height: 1.35;\n opacity: 0;\n animation: ", " 0.28s ease forwards;\n animation-delay: ", "s;\n\n background-color: ", ";\n\n color: ", ";\n\n border: 1px solid\n ", ";\n\n svg {\n flex-shrink: 0;\n margin-top: 0.1rem;\n font-size: 0.82rem;\n }\n\n ", "\n"])), chipIn, function (
|
|
8888
|
-
var $chipIndex =
|
|
9028
|
+
var StatusItem = styled.div(_templateObject52 || (_templateObject52 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: flex-start;\n gap: 0.3rem;\n padding: 0.28rem 0.45rem;\n border-radius: 0.45rem;\n font-size: 0.7rem;\n font-weight: 600;\n line-height: 1.35;\n opacity: 0;\n animation: ", " 0.28s ease forwards;\n animation-delay: ", "s;\n\n background-color: ", ";\n\n color: ", ";\n\n border: 1px solid\n ", ";\n\n svg {\n flex-shrink: 0;\n margin-top: 0.1rem;\n font-size: 0.82rem;\n }\n\n ", "\n"])), chipIn, function (_ref51) {
|
|
9029
|
+
var $chipIndex = _ref51.$chipIndex;
|
|
8889
9030
|
return 0.1 + $chipIndex * 0.05;
|
|
8890
|
-
}, function (_ref51) {
|
|
8891
|
-
var $accentColor = _ref51.$accentColor,
|
|
8892
|
-
$tone = _ref51.$tone;
|
|
8893
|
-
if ($tone === 'warning') return '#fff8eb';
|
|
8894
|
-
if ($tone === 'success') return $accentColor + "10";
|
|
8895
|
-
return '#f4f6f1';
|
|
8896
9031
|
}, function (_ref52) {
|
|
8897
9032
|
var $accentColor = _ref52.$accentColor,
|
|
8898
9033
|
$tone = _ref52.$tone;
|
|
8899
|
-
if ($tone === 'warning') return '#
|
|
8900
|
-
if ($tone === 'success') return $accentColor;
|
|
8901
|
-
return '#
|
|
9034
|
+
if ($tone === 'warning') return '#fff8eb';
|
|
9035
|
+
if ($tone === 'success') return $accentColor + "10";
|
|
9036
|
+
return '#f4f6f1';
|
|
8902
9037
|
}, function (_ref53) {
|
|
8903
9038
|
var $accentColor = _ref53.$accentColor,
|
|
8904
9039
|
$tone = _ref53.$tone;
|
|
9040
|
+
if ($tone === 'warning') return '#8a6400';
|
|
9041
|
+
if ($tone === 'success') return $accentColor;
|
|
9042
|
+
return '#45503c';
|
|
9043
|
+
}, function (_ref54) {
|
|
9044
|
+
var $accentColor = _ref54.$accentColor,
|
|
9045
|
+
$tone = _ref54.$tone;
|
|
8905
9046
|
if ($tone === 'warning') return '#f0d48a';
|
|
8906
9047
|
if ($tone === 'success') return $accentColor + "28";
|
|
8907
9048
|
return '#e0e5da';
|
|
8908
9049
|
}, reducedMotion);
|
|
8909
9050
|
var GiftSection = styled.div(_templateObject53 || (_templateObject53 = _taggedTemplateLiteralLoose(["\n padding-top: 0.35rem;\n border-top: 1px solid #eef1e9;\n"])));
|
|
8910
|
-
var GiftSectionHeader = styled.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.28rem;\n margin-bottom: 0.3rem;\n font-size: 0.62rem;\n font-weight: 800;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: ", ";\n\n svg {\n font-size: 0.72rem;\n }\n"])), function (
|
|
8911
|
-
var $accentColor =
|
|
9051
|
+
var GiftSectionHeader = styled.div(_templateObject54 || (_templateObject54 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.28rem;\n margin-bottom: 0.3rem;\n font-size: 0.62rem;\n font-weight: 800;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: ", ";\n\n svg {\n font-size: 0.72rem;\n }\n"])), function (_ref55) {
|
|
9052
|
+
var $accentColor = _ref55.$accentColor;
|
|
8912
9053
|
return $accentColor;
|
|
8913
9054
|
});
|
|
8914
9055
|
var GiftList = styled.div(_templateObject55 || (_templateObject55 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 0.22rem;\n"])));
|
|
8915
|
-
var GiftLink = styled.a(_templateObject56 || (_templateObject56 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.35rem;\n padding: 0.32rem 0.45rem;\n border-radius: 0.4rem;\n border: 1px solid ", ";\n background: #fafcf8;\n color: #2a3325;\n font-size: 0.72rem;\n font-weight: 600;\n line-height: 1.3;\n text-decoration: none;\n cursor: pointer;\n transition: background-color 0.18s ease, border-color 0.18s ease;\n\n span {\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n svg {\n flex-shrink: 0;\n font-size: 0.72rem;\n color: ", ";\n transition: transform 0.18s ease;\n }\n\n &:hover {\n border-color: ", ";\n background: ", ";\n\n svg {\n transform: translateX(2px);\n }\n }\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n ", "\n"])), function (
|
|
8916
|
-
var $accentColor = _ref55.$accentColor;
|
|
8917
|
-
return $accentColor + "1e";
|
|
8918
|
-
}, function (_ref56) {
|
|
9056
|
+
var GiftLink = styled.a(_templateObject56 || (_templateObject56 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.35rem;\n padding: 0.32rem 0.45rem;\n border-radius: 0.4rem;\n border: 1px solid ", ";\n background: #fafcf8;\n color: #2a3325;\n font-size: 0.72rem;\n font-weight: 600;\n line-height: 1.3;\n text-decoration: none;\n cursor: pointer;\n transition: background-color 0.18s ease, border-color 0.18s ease;\n\n span {\n flex: 1;\n min-width: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n svg {\n flex-shrink: 0;\n font-size: 0.72rem;\n color: ", ";\n transition: transform 0.18s ease;\n }\n\n &:hover {\n border-color: ", ";\n background: ", ";\n\n svg {\n transform: translateX(2px);\n }\n }\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 1px;\n }\n\n ", "\n"])), function (_ref56) {
|
|
8919
9057
|
var $accentColor = _ref56.$accentColor;
|
|
8920
|
-
return $accentColor;
|
|
9058
|
+
return $accentColor + "1e";
|
|
8921
9059
|
}, function (_ref57) {
|
|
8922
9060
|
var $accentColor = _ref57.$accentColor;
|
|
8923
9061
|
return $accentColor;
|
|
8924
9062
|
}, function (_ref58) {
|
|
8925
9063
|
var $accentColor = _ref58.$accentColor;
|
|
8926
|
-
return $accentColor
|
|
9064
|
+
return $accentColor;
|
|
8927
9065
|
}, function (_ref59) {
|
|
8928
9066
|
var $accentColor = _ref59.$accentColor;
|
|
9067
|
+
return $accentColor + "08";
|
|
9068
|
+
}, function (_ref60) {
|
|
9069
|
+
var $accentColor = _ref60.$accentColor;
|
|
8929
9070
|
return $accentColor;
|
|
8930
9071
|
}, reducedMotion);
|
|
8931
9072
|
var CodeRow = styled.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 0.3rem;\n flex-shrink: 0;\n"])));
|
|
8932
|
-
var CodeValue = styled.code(_templateObject58 || (_templateObject58 = _taggedTemplateLiteralLoose(["\n min-width: 0;\n max-width: 8.5rem;\n padding: 0.28rem 0.45rem;\n border-radius: 0.4rem;\n border: 1.5px dashed ", ";\n background: #fff;\n font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;\n font-size: 0.68rem;\n font-weight: 800;\n letter-spacing: 0.04em;\n color: #141a10;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (
|
|
8933
|
-
var $accentColor =
|
|
9073
|
+
var CodeValue = styled.code(_templateObject58 || (_templateObject58 = _taggedTemplateLiteralLoose(["\n min-width: 0;\n max-width: 8.5rem;\n padding: 0.28rem 0.45rem;\n border-radius: 0.4rem;\n border: 1.5px dashed ", ";\n background: #fff;\n font-family: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;\n font-size: 0.68rem;\n font-weight: 800;\n letter-spacing: 0.04em;\n color: #141a10;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n"])), function (_ref61) {
|
|
9074
|
+
var $accentColor = _ref61.$accentColor;
|
|
8934
9075
|
return $accentColor;
|
|
8935
9076
|
});
|
|
8936
|
-
var PrimaryCopyButton = styled.button(_templateObject59 || (_templateObject59 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.22rem;\n flex-shrink: 0;\n height: 1.7rem;\n padding: 0 0.55rem;\n border: none;\n border-radius: 0.4rem;\n font-size: 0.68rem;\n font-weight: 800;\n color: #fff;\n cursor: pointer;\n background: ", ";\n box-shadow: 0 2px 8px ", ";\n transition: transform 0.15s ease, background 0.2s ease;\n animation: ", " 0.35s ease;\n\n svg {\n font-size: 0.72rem;\n }\n\n &:hover {\n transform: translateY(-1px);\n }\n\n &:active {\n transform: scale(0.98);\n }\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n\n ", "\n"])), function (
|
|
8937
|
-
var $accentColor =
|
|
8938
|
-
$copied =
|
|
9077
|
+
var PrimaryCopyButton = styled.button(_templateObject59 || (_templateObject59 = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 0.22rem;\n flex-shrink: 0;\n height: 1.7rem;\n padding: 0 0.55rem;\n border: none;\n border-radius: 0.4rem;\n font-size: 0.68rem;\n font-weight: 800;\n color: #fff;\n cursor: pointer;\n background: ", ";\n box-shadow: 0 2px 8px ", ";\n transition: transform 0.15s ease, background 0.2s ease;\n animation: ", " 0.35s ease;\n\n svg {\n font-size: 0.72rem;\n }\n\n &:hover {\n transform: translateY(-1px);\n }\n\n &:active {\n transform: scale(0.98);\n }\n\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n\n ", "\n"])), function (_ref62) {
|
|
9078
|
+
var $accentColor = _ref62.$accentColor,
|
|
9079
|
+
$copied = _ref62.$copied;
|
|
8939
9080
|
return $copied ? "linear-gradient(145deg, " + $accentColor + " 0%, " + $accentColor + "dd 100%)" : 'linear-gradient(145deg, #1a2114 0%, #0f140c 100%)';
|
|
8940
|
-
}, function (_ref62) {
|
|
8941
|
-
var $accentColor = _ref62.$accentColor;
|
|
8942
|
-
return $accentColor + "28";
|
|
8943
9081
|
}, function (_ref63) {
|
|
8944
|
-
var $
|
|
8945
|
-
return $
|
|
9082
|
+
var $accentColor = _ref63.$accentColor;
|
|
9083
|
+
return $accentColor + "28";
|
|
8946
9084
|
}, function (_ref64) {
|
|
8947
|
-
var $
|
|
9085
|
+
var $copied = _ref64.$copied;
|
|
9086
|
+
return $copied ? copyPop : 'none';
|
|
9087
|
+
}, function (_ref65) {
|
|
9088
|
+
var $accentColor = _ref65.$accentColor;
|
|
8948
9089
|
return $accentColor;
|
|
8949
9090
|
}, reducedMotion);
|
|
8950
9091
|
|
|
@@ -9192,7 +9333,7 @@ var CardRow = function CardRow(_ref3) {
|
|
|
9192
9333
|
discountName: row === null || row === void 0 ? void 0 : row.couponCode
|
|
9193
9334
|
}), showDiscountSuggestions && showDiscountButton && firstSuggestion && /*#__PURE__*/React__default.createElement(DiscountSuggestionPreview, {
|
|
9194
9335
|
coupon: firstSuggestion,
|
|
9195
|
-
productPrice: (row === null || row === void 0 ? void 0 : row.standardPrice) || 0,
|
|
9336
|
+
productPrice: (row === null || row === void 0 ? void 0 : row.tierPrice) || (row === null || row === void 0 ? void 0 : row.standardPrice) || 0,
|
|
9196
9337
|
cartQuantity: (row === null || row === void 0 ? void 0 : row.quantity) || 0,
|
|
9197
9338
|
primaryColor: accentColor,
|
|
9198
9339
|
loading: loading,
|
|
@@ -9296,7 +9437,7 @@ var CardRow = function CardRow(_ref3) {
|
|
|
9296
9437
|
productDiscounts: productDiscounts,
|
|
9297
9438
|
primaryColor: accentColor,
|
|
9298
9439
|
cartQuantity: (row === null || row === void 0 ? void 0 : row.quantity) || 0,
|
|
9299
|
-
productPrice: (row === null || row === void 0 ? void 0 : row.standardPrice) || 0
|
|
9440
|
+
productPrice: (row === null || row === void 0 ? void 0 : row.tierPrice) || (row === null || row === void 0 ? void 0 : row.standardPrice) || 0
|
|
9300
9441
|
})));
|
|
9301
9442
|
};
|
|
9302
9443
|
|
|
@@ -9750,7 +9891,7 @@ var CartPageProductCard = function CartPageProductCard(_ref3) {
|
|
|
9750
9891
|
discountAmount: item === null || item === void 0 ? void 0 : item.discountAmount
|
|
9751
9892
|
}))), showDiscountSuggestions && showDiscountButton && firstSuggestion && /*#__PURE__*/React__default.createElement(DiscountSuggestionPreview, {
|
|
9752
9893
|
coupon: firstSuggestion,
|
|
9753
|
-
productPrice: (item === null || item === void 0 ? void 0 : item.standardPrice) || 0,
|
|
9894
|
+
productPrice: (item === null || item === void 0 ? void 0 : item.tierPrice) || (item === null || item === void 0 ? void 0 : item.standardPrice) || 0,
|
|
9754
9895
|
cartQuantity: (item === null || item === void 0 ? void 0 : item.quantity) || 0,
|
|
9755
9896
|
primaryColor: accentColor,
|
|
9756
9897
|
loading: loading,
|
|
@@ -9814,7 +9955,7 @@ var CartPageProductCard = function CartPageProductCard(_ref3) {
|
|
|
9814
9955
|
productDiscounts: productDiscounts,
|
|
9815
9956
|
primaryColor: accentColor,
|
|
9816
9957
|
cartQuantity: (item === null || item === void 0 ? void 0 : item.quantity) || 0,
|
|
9817
|
-
productPrice: (item === null || item === void 0 ? void 0 : item.standardPrice) || 0
|
|
9958
|
+
productPrice: (item === null || item === void 0 ? void 0 : item.tierPrice) || (item === null || item === void 0 ? void 0 : item.standardPrice) || 0
|
|
9818
9959
|
}));
|
|
9819
9960
|
};
|
|
9820
9961
|
|
|
@@ -13631,7 +13772,7 @@ var Step2 = function Step2(_ref) {
|
|
|
13631
13772
|
icon: /*#__PURE__*/React__default.createElement(FiTruck, {
|
|
13632
13773
|
className: "icon"
|
|
13633
13774
|
})
|
|
13634
|
-
}), /*#__PURE__*/React__default.createElement(StepsContent, null, showShipping && /*#__PURE__*/React__default.createElement(
|
|
13775
|
+
}), /*#__PURE__*/React__default.createElement(StepsContent, null, showShipping && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Grid, {
|
|
13635
13776
|
container: true
|
|
13636
13777
|
}, /*#__PURE__*/React__default.createElement(Grid, {
|
|
13637
13778
|
item: true,
|