@cimplify/sdk 0.44.12 → 0.44.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/advanced.d.mts +1 -1
  2. package/dist/advanced.d.ts +1 -1
  3. package/dist/advanced.js +21 -21
  4. package/dist/advanced.mjs +2 -2
  5. package/dist/{chunk-6TVQQYQ5.mjs → chunk-6AZZ6AOF.mjs} +21 -1
  6. package/dist/{chunk-EZK2FXTM.mjs → chunk-7NML226B.mjs} +1 -1
  7. package/dist/{chunk-BAWKQRIB.js → chunk-CFD4J32N.js} +21 -21
  8. package/dist/{chunk-OMAP327U.js → chunk-MBGQP6FZ.js} +62 -61
  9. package/dist/{chunk-V2O5AO7I.js → chunk-MNIKXG7W.js} +26 -0
  10. package/dist/{chunk-3WD6U5RD.mjs → chunk-UXLQ7WXI.mjs} +4 -3
  11. package/dist/chunk-XL4CX75J.js +9370 -0
  12. package/dist/chunk-ZLEFMQC6.mjs +9318 -0
  13. package/dist/cli/commands/deploy.mjs +9 -1
  14. package/dist/{client-lvLvB1_K.d.ts → client-D6ZisKco.d.ts} +7 -0
  15. package/dist/{client-CkGlXZRd.d.mts → client-Dh-bHyhU.d.mts} +7 -0
  16. package/dist/index.d.mts +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.js +106 -106
  19. package/dist/index.mjs +3 -3
  20. package/dist/mock/cli.mjs +172 -23
  21. package/dist/mock/library.d.mts +2 -2
  22. package/dist/mock/library.d.ts +2 -2
  23. package/dist/mock/library.js +172 -23
  24. package/dist/mock/library.mjs +172 -23
  25. package/dist/mock/msw.d.mts +1 -1
  26. package/dist/mock/msw.d.ts +1 -1
  27. package/dist/mock/msw.js +172 -23
  28. package/dist/mock/msw.mjs +172 -23
  29. package/dist/react.d.mts +1 -1
  30. package/dist/react.d.ts +1 -1
  31. package/dist/react.js +80 -80
  32. package/dist/react.mjs +3 -3
  33. package/dist/server-CWpUlLOQ.d.mts +1003 -0
  34. package/dist/server-CWpUlLOQ.d.ts +1003 -0
  35. package/dist/{server-CUbuQxOV.d.ts → server-CnECAQDQ.d.mts} +28 -6
  36. package/dist/{server-CUbuQxOV.d.mts → server-CnECAQDQ.d.ts} +28 -6
  37. package/dist/server.d.mts +2 -2
  38. package/dist/server.d.ts +2 -2
  39. package/dist/server.js +5 -5
  40. package/dist/server.mjs +3 -3
  41. package/dist/testing/suite.d.mts +60 -0
  42. package/dist/testing/suite.d.ts +60 -0
  43. package/dist/testing/suite.js +169 -0
  44. package/dist/testing/suite.mjs +165 -0
  45. package/dist/testing.d.mts +1359 -0
  46. package/dist/testing.d.ts +1359 -0
  47. package/dist/testing.js +213 -0
  48. package/dist/testing.mjs +4 -0
  49. package/dist/utils.js +28 -28
  50. package/dist/utils.mjs +1 -1
  51. package/package.json +18 -3
  52. package/registry/account.json +15 -0
  53. package/registry/billing-plan-selector.json +16 -0
  54. package/registry/cart-drawer.json +17 -0
  55. package/registry/currency-selector.json +15 -0
  56. package/registry/customer-input-fields.json +15 -0
  57. package/registry/delivery-estimate.json +16 -0
  58. package/registry/index.json +105 -0
  59. package/registry/location-picker.json +15 -0
  60. package/registry/recently-viewed.json +16 -0
  61. package/registry/recommendation-carousel.json +16 -0
  62. package/registry/resource-picker.json +15 -0
  63. package/registry/session-message-banner.json +15 -0
  64. package/templates/storefront-bakery/AGENTS.md +12 -0
  65. package/templates/storefront-bakery/__tests__/brand.test.ts +4 -0
  66. package/templates/storefront-bakery/__tests__/cart-flow.test.ts +4 -0
  67. package/templates/storefront-bakery/__tests__/contract.test.ts +4 -0
  68. package/templates/storefront-bakery/package.json +11 -3
  69. package/templates/storefront-bakery/vitest.config.ts +9 -0
  70. package/templates/storefront-fashion/AGENTS.md +21 -1
  71. package/templates/storefront-fashion/__tests__/brand.test.ts +4 -0
  72. package/templates/storefront-fashion/__tests__/cart-flow.test.ts +4 -0
  73. package/templates/storefront-fashion/__tests__/contract.test.ts +4 -0
  74. package/templates/storefront-fashion/package.json +11 -3
  75. package/templates/storefront-fashion/vitest.config.ts +9 -0
  76. package/templates/storefront-grocery/AGENTS.md +12 -0
  77. package/templates/storefront-grocery/__tests__/brand.test.ts +4 -0
  78. package/templates/storefront-grocery/__tests__/cart-flow.test.ts +4 -0
  79. package/templates/storefront-grocery/__tests__/contract.test.ts +4 -0
  80. package/templates/storefront-grocery/package.json +11 -3
  81. package/templates/storefront-grocery/vitest.config.ts +9 -0
  82. package/templates/storefront-restaurant/AGENTS.md +12 -0
  83. package/templates/storefront-restaurant/__tests__/brand.test.ts +4 -0
  84. package/templates/storefront-restaurant/__tests__/cart-flow.test.ts +4 -0
  85. package/templates/storefront-restaurant/__tests__/contract.test.ts +4 -0
  86. package/templates/storefront-restaurant/package.json +11 -3
  87. package/templates/storefront-restaurant/vitest.config.ts +9 -0
  88. package/templates/storefront-retail/AGENTS.md +12 -0
  89. package/templates/storefront-retail/__tests__/brand.test.ts +4 -0
  90. package/templates/storefront-retail/__tests__/cart-flow.test.ts +4 -0
  91. package/templates/storefront-retail/__tests__/contract.test.ts +4 -0
  92. package/templates/storefront-retail/package.json +11 -3
  93. package/templates/storefront-retail/vitest.config.ts +9 -0
  94. package/templates/storefront-services/AGENTS.md +12 -0
  95. package/templates/storefront-services/__tests__/brand.test.ts +4 -0
  96. package/templates/storefront-services/__tests__/cart-flow.test.ts +4 -0
  97. package/templates/storefront-services/__tests__/contract.test.ts +4 -0
  98. package/templates/storefront-services/package.json +11 -3
  99. package/templates/storefront-services/vitest.config.ts +9 -0
package/dist/react.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React$1, { ReactNode } from 'react';
2
2
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.mjs';
3
3
  export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.mjs';
4
- import { C as CimplifyClient, an as ProcessCheckoutResult, ap as CheckoutStatus, aq as CheckoutStatusContext, bZ as Location, bW as Business, k as ReorderResult, b4 as OrderStatus, bh as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, ca as Service, cf as AvailableSlot, cg as DayAvailability, cl as CustomerBooking, cr as CancelBookingResult, J as ActivityStateResponse, E as SessionMessage, K as ActivityRecommendation, W as DeliveryFeeResponse, d0 as FxRateResponse, c4 as StorefrontBootstrap, a0 as ChatWidgetStarter, Y as ChatMessage, ab as ElementsOptions, de as AuthenticatedData, da as AddressInfo, db as PaymentMethodInfo, a5 as CimplifyElements, dg as ElementsCheckoutResult, am as ProcessCheckoutOptions, bg as LineItem, cb as Staff, c2 as Room } from './client-CkGlXZRd.mjs';
4
+ import { C as CimplifyClient, an as ProcessCheckoutResult, ap as CheckoutStatus, aq as CheckoutStatusContext, bZ as Location, bW as Business, k as ReorderResult, b4 as OrderStatus, bh as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, ca as Service, cf as AvailableSlot, cg as DayAvailability, cl as CustomerBooking, cr as CancelBookingResult, J as ActivityStateResponse, E as SessionMessage, K as ActivityRecommendation, W as DeliveryFeeResponse, d0 as FxRateResponse, c4 as StorefrontBootstrap, a0 as ChatWidgetStarter, Y as ChatMessage, ab as ElementsOptions, de as AuthenticatedData, da as AddressInfo, db as PaymentMethodInfo, a5 as CimplifyElements, dg as ElementsCheckoutResult, am as ProcessCheckoutOptions, bg as LineItem, cb as Staff, c2 as Room } from './client-Dh-bHyhU.mjs';
5
5
  import { a as CurrencyCode, U as Product, d as Pagination, h as CimplifyError, a7 as ProductWithDetails, am as Category, M as Money, bh as BundleSelectionInput, aM as ComponentSelectionInput, bk as BundleSelectionData, bn as CompositeSelectionData, ao as Collection, aU as ProductTaxonomy, aV as TaxonomyWithChildren, aT as ProductTimeProfile, aY as Deal, aZ as ProductDealInfo, a_ as DiscountValidation, at as BundleSummary, aN as CompositePriceResult, c1 as SubscriptionStatus, c2 as Subscription, c5 as SubscriptionWithDetails, H as CustomAttributeDefinition, N as PropertyFacet, b_ as ProductBillingPlan, a8 as VariantView, ac as VariantAxisWithValues, ai as AddOnWithOptions, ay as BundleComponentView, ar as BundlePriceType, aJ as CompositeGroupView, bs as DisplayCart, a3 as ProductInputField, J as CustomAttributeValue, L as ProductProperty, a5 as QuantityPricingTier } from './payment-DA1i5hhk.mjs';
6
6
  import { P as ProductWithPrice } from './price-s1XN0edJ.mjs';
7
7
  import { ClassValue } from 'clsx';
package/dist/react.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import React$1, { ReactNode } from 'react';
2
2
  import { A as AdSlot, a as AdPosition, e as AdContextValue } from './ads-BxbWrwqp.js';
3
3
  export { c as AdConfig, g as getVariantDisplayName } from './ads-BxbWrwqp.js';
4
- import { C as CimplifyClient, an as ProcessCheckoutResult, ap as CheckoutStatus, aq as CheckoutStatusContext, bZ as Location, bW as Business, k as ReorderResult, b4 as OrderStatus, bh as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, ca as Service, cf as AvailableSlot, cg as DayAvailability, cl as CustomerBooking, cr as CancelBookingResult, J as ActivityStateResponse, E as SessionMessage, K as ActivityRecommendation, W as DeliveryFeeResponse, d0 as FxRateResponse, c4 as StorefrontBootstrap, a0 as ChatWidgetStarter, Y as ChatMessage, ab as ElementsOptions, de as AuthenticatedData, da as AddressInfo, db as PaymentMethodInfo, a5 as CimplifyElements, dg as ElementsCheckoutResult, am as ProcessCheckoutOptions, bg as LineItem, cb as Staff, c2 as Room } from './client-lvLvB1_K.js';
4
+ import { C as CimplifyClient, an as ProcessCheckoutResult, ap as CheckoutStatus, aq as CheckoutStatusContext, bZ as Location, bW as Business, k as ReorderResult, b4 as OrderStatus, bh as Order, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, P as PriceQuote, g as QuoteUiMessage, ca as Service, cf as AvailableSlot, cg as DayAvailability, cl as CustomerBooking, cr as CancelBookingResult, J as ActivityStateResponse, E as SessionMessage, K as ActivityRecommendation, W as DeliveryFeeResponse, d0 as FxRateResponse, c4 as StorefrontBootstrap, a0 as ChatWidgetStarter, Y as ChatMessage, ab as ElementsOptions, de as AuthenticatedData, da as AddressInfo, db as PaymentMethodInfo, a5 as CimplifyElements, dg as ElementsCheckoutResult, am as ProcessCheckoutOptions, bg as LineItem, cb as Staff, c2 as Room } from './client-D6ZisKco.js';
5
5
  import { a as CurrencyCode, U as Product, d as Pagination, h as CimplifyError, a7 as ProductWithDetails, am as Category, M as Money, bh as BundleSelectionInput, aM as ComponentSelectionInput, bk as BundleSelectionData, bn as CompositeSelectionData, ao as Collection, aU as ProductTaxonomy, aV as TaxonomyWithChildren, aT as ProductTimeProfile, aY as Deal, aZ as ProductDealInfo, a_ as DiscountValidation, at as BundleSummary, aN as CompositePriceResult, c1 as SubscriptionStatus, c2 as Subscription, c5 as SubscriptionWithDetails, H as CustomAttributeDefinition, N as PropertyFacet, b_ as ProductBillingPlan, a8 as VariantView, ac as VariantAxisWithValues, ai as AddOnWithOptions, ay as BundleComponentView, ar as BundlePriceType, aJ as CompositeGroupView, bs as DisplayCart, a3 as ProductInputField, J as CustomAttributeValue, L as ProductProperty, a5 as QuantityPricingTier } from './payment-DA1i5hhk.js';
6
6
  import { P as ProductWithPrice } from './price-Bv4G8aOO.js';
7
7
  import { ClassValue } from 'clsx';
package/dist/react.js CHANGED
@@ -2,9 +2,9 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkBGCEKFLA_js = require('./chunk-BGCEKFLA.js');
5
- var chunkOMAP327U_js = require('./chunk-OMAP327U.js');
6
- var chunkBAWKQRIB_js = require('./chunk-BAWKQRIB.js');
7
- var chunkV2O5AO7I_js = require('./chunk-V2O5AO7I.js');
5
+ var chunkMBGQP6FZ_js = require('./chunk-MBGQP6FZ.js');
6
+ var chunkCFD4J32N_js = require('./chunk-CFD4J32N.js');
7
+ var chunkMNIKXG7W_js = require('./chunk-MNIKXG7W.js');
8
8
  var React10 = require('react');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
  var clsx = require('clsx');
@@ -568,12 +568,12 @@ function attachInternalItemMetadata(item) {
568
568
  return { ...item, _lineKey: lineKeyFromItem(item) };
569
569
  }
570
570
  function calculateLineSubtotal(item) {
571
- let unitPrice = chunkV2O5AO7I_js.parsePrice(item.product.default_price);
571
+ let unitPrice = chunkMNIKXG7W_js.parsePrice(item.product.default_price);
572
572
  if (item.variant?.price_adjustment) {
573
- unitPrice += chunkV2O5AO7I_js.parsePrice(item.variant.price_adjustment);
573
+ unitPrice += chunkMNIKXG7W_js.parsePrice(item.variant.price_adjustment);
574
574
  }
575
575
  for (const option of item.addOnOptions || []) {
576
- if (option.default_price) unitPrice += chunkV2O5AO7I_js.parsePrice(option.default_price);
576
+ if (option.default_price) unitPrice += chunkMNIKXG7W_js.parsePrice(option.default_price);
577
577
  }
578
578
  return roundMoney(unitPrice * item.quantity);
579
579
  }
@@ -1152,7 +1152,7 @@ var DEFAULT_COUNTRY = "US";
1152
1152
  function createDefaultClient() {
1153
1153
  const processRef = globalThis.process;
1154
1154
  const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
1155
- return chunkOMAP327U_js.createCimplifyClient({ publicKey: envPublicKey });
1155
+ return chunkMBGQP6FZ_js.createCimplifyClient({ publicKey: envPublicKey });
1156
1156
  }
1157
1157
  function getStoredLocationId() {
1158
1158
  if (typeof window === "undefined" || !window.localStorage) {
@@ -1236,7 +1236,7 @@ function CimplifyProvider({
1236
1236
  const setDisplayCurrency = React10.useCallback(
1237
1237
  (currency) => {
1238
1238
  const normalized = currency?.trim().toUpperCase() || null;
1239
- if (normalized && !chunkV2O5AO7I_js.isSupportedCurrency(normalized)) {
1239
+ if (normalized && !chunkMNIKXG7W_js.isSupportedCurrency(normalized)) {
1240
1240
  return;
1241
1241
  }
1242
1242
  setDisplayCurrencyOverride(normalized);
@@ -1898,7 +1898,7 @@ function Price({ amount, currency, className, prefix }) {
1898
1898
  const resolvedAmount = typeof convertedAmount === "string" ? parseFloat(convertedAmount) || 0 : convertedAmount;
1899
1899
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { className, children: [
1900
1900
  prefix,
1901
- chunkV2O5AO7I_js.formatPrice(resolvedAmount, resolvedCurrency)
1901
+ chunkMNIKXG7W_js.formatPrice(resolvedAmount, resolvedCurrency)
1902
1902
  ] });
1903
1903
  }
1904
1904
  function createCachedQuery(config) {
@@ -2905,16 +2905,16 @@ function useProductPrice(input) {
2905
2905
  if (bundleTotalPrice != null) {
2906
2906
  unitPrice = bundleTotalPrice;
2907
2907
  } else if (compositePrice) {
2908
- unitPrice = chunkV2O5AO7I_js.parsePrice(compositePrice.final_price);
2908
+ unitPrice = chunkMNIKXG7W_js.parsePrice(compositePrice.final_price);
2909
2909
  } else {
2910
- unitPrice = chunkV2O5AO7I_js.parsePrice(product.default_price);
2910
+ unitPrice = chunkMNIKXG7W_js.parsePrice(product.default_price);
2911
2911
  if (variant?.price_adjustment) {
2912
- unitPrice += chunkV2O5AO7I_js.parsePrice(variant.price_adjustment);
2912
+ unitPrice += chunkMNIKXG7W_js.parsePrice(variant.price_adjustment);
2913
2913
  }
2914
2914
  if (addOnOptions) {
2915
2915
  for (const option of addOnOptions) {
2916
2916
  if (option.default_price) {
2917
- unitPrice += chunkV2O5AO7I_js.parsePrice(option.default_price);
2917
+ unitPrice += chunkMNIKXG7W_js.parsePrice(option.default_price);
2918
2918
  }
2919
2919
  }
2920
2920
  }
@@ -3658,19 +3658,19 @@ function AuthElement({
3658
3658
  }, [onReady, onAuthenticated, onRequiresOtp, onError]);
3659
3659
  React10.useEffect(() => {
3660
3660
  if (!elements || !containerRef.current) return;
3661
- const element = elements.create(chunkBAWKQRIB_js.ELEMENT_TYPES.AUTH, { prefillEmail });
3661
+ const element = elements.create(chunkCFD4J32N_js.ELEMENT_TYPES.AUTH, { prefillEmail });
3662
3662
  elementRef.current = element;
3663
- element.on(chunkBAWKQRIB_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
3663
+ element.on(chunkCFD4J32N_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
3664
3664
  element.on(
3665
- chunkBAWKQRIB_js.EVENT_TYPES.AUTHENTICATED,
3665
+ chunkCFD4J32N_js.EVENT_TYPES.AUTHENTICATED,
3666
3666
  (data) => onAuthenticatedRef.current?.(data)
3667
3667
  );
3668
3668
  element.on(
3669
- chunkBAWKQRIB_js.EVENT_TYPES.REQUIRES_OTP,
3669
+ chunkCFD4J32N_js.EVENT_TYPES.REQUIRES_OTP,
3670
3670
  (data) => onRequiresOtpRef.current?.(data)
3671
3671
  );
3672
3672
  element.on(
3673
- chunkBAWKQRIB_js.EVENT_TYPES.ERROR,
3673
+ chunkCFD4J32N_js.EVENT_TYPES.ERROR,
3674
3674
  (data) => onErrorRef.current?.(data)
3675
3675
  );
3676
3676
  element.mount(containerRef.current);
@@ -3699,15 +3699,15 @@ function AddressElement({
3699
3699
  }, [onReady, onChange, onError]);
3700
3700
  React10.useEffect(() => {
3701
3701
  if (!elements || !containerRef.current) return;
3702
- const element = elements.create(chunkBAWKQRIB_js.ELEMENT_TYPES.ADDRESS, { mode });
3702
+ const element = elements.create(chunkCFD4J32N_js.ELEMENT_TYPES.ADDRESS, { mode });
3703
3703
  elementRef.current = element;
3704
- element.on(chunkBAWKQRIB_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
3704
+ element.on(chunkCFD4J32N_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
3705
3705
  element.on(
3706
- chunkBAWKQRIB_js.EVENT_TYPES.CHANGE,
3706
+ chunkCFD4J32N_js.EVENT_TYPES.CHANGE,
3707
3707
  (data) => onChangeRef.current?.(data)
3708
3708
  );
3709
3709
  element.on(
3710
- chunkBAWKQRIB_js.EVENT_TYPES.ERROR,
3710
+ chunkCFD4J32N_js.EVENT_TYPES.ERROR,
3711
3711
  (data) => onErrorRef.current?.(data)
3712
3712
  );
3713
3713
  element.mount(containerRef.current);
@@ -3737,15 +3737,15 @@ function PaymentElement({
3737
3737
  }, [onReady, onChange, onError]);
3738
3738
  React10.useEffect(() => {
3739
3739
  if (!elements || !containerRef.current) return;
3740
- const element = elements.create(chunkBAWKQRIB_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
3740
+ const element = elements.create(chunkCFD4J32N_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
3741
3741
  elementRef.current = element;
3742
- element.on(chunkBAWKQRIB_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
3742
+ element.on(chunkCFD4J32N_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
3743
3743
  element.on(
3744
- chunkBAWKQRIB_js.EVENT_TYPES.CHANGE,
3744
+ chunkCFD4J32N_js.EVENT_TYPES.CHANGE,
3745
3745
  (data) => onChangeRef.current?.(data)
3746
3746
  );
3747
3747
  element.on(
3748
- chunkBAWKQRIB_js.EVENT_TYPES.ERROR,
3748
+ chunkCFD4J32N_js.EVENT_TYPES.ERROR,
3749
3749
  (data) => onErrorRef.current?.(data)
3750
3750
  );
3751
3751
  element.mount(containerRef.current);
@@ -3901,7 +3901,7 @@ function VariantSelector({
3901
3901
  if (!variants || variants.length <= 1) {
3902
3902
  return null;
3903
3903
  }
3904
- basePrice != null ? chunkV2O5AO7I_js.parsePrice(basePrice) : 0;
3904
+ basePrice != null ? chunkMNIKXG7W_js.parsePrice(basePrice) : 0;
3905
3905
  if (variantAxes && variantAxes.length > 0) {
3906
3906
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-variant-selector": true, className: cn("space-y-5", className, classNames?.root), children: variantAxes.map((axis) => {
3907
3907
  const labelId = `${idPrefix}-axis-${axis.id}`;
@@ -3977,7 +3977,7 @@ function VariantSelector({
3977
3977
  className: cn("divide-y divide-border", classNames?.list),
3978
3978
  children: variants.map((variant) => {
3979
3979
  const isSelected = selectedVariantId === variant.id;
3980
- const adjustment = chunkV2O5AO7I_js.parsePrice(variant.price_adjustment);
3980
+ const adjustment = chunkMNIKXG7W_js.parsePrice(variant.price_adjustment);
3981
3981
  return /* @__PURE__ */ jsxRuntime.jsxs(
3982
3982
  radio.Radio.Root,
3983
3983
  {
@@ -4243,16 +4243,16 @@ function BundleSelector({
4243
4243
  }, [components, selections, onReady]);
4244
4244
  const totalPrice = React10.useMemo(() => {
4245
4245
  if (pricingType === "fixed" && bundlePrice) {
4246
- return chunkV2O5AO7I_js.parsePrice(bundlePrice);
4246
+ return chunkMNIKXG7W_js.parsePrice(bundlePrice);
4247
4247
  }
4248
4248
  const componentsTotal = components.reduce((sum, comp) => {
4249
4249
  return sum + getComponentPrice(comp, variantChoices[comp.id]) * comp.quantity;
4250
4250
  }, 0);
4251
4251
  if (pricingType === "percentage_discount" && discountValue) {
4252
- return componentsTotal * (1 - chunkV2O5AO7I_js.parsePrice(discountValue) / 100);
4252
+ return componentsTotal * (1 - chunkMNIKXG7W_js.parsePrice(discountValue) / 100);
4253
4253
  }
4254
4254
  if (pricingType === "fixed_discount" && discountValue) {
4255
- return componentsTotal - chunkV2O5AO7I_js.parsePrice(discountValue);
4255
+ return componentsTotal - chunkMNIKXG7W_js.parsePrice(discountValue);
4256
4256
  }
4257
4257
  return componentsTotal;
4258
4258
  }, [components, variantChoices, pricingType, bundlePrice, discountValue]);
@@ -4313,15 +4313,15 @@ function BundleSelector({
4313
4313
  }
4314
4314
  function getComponentPrice(component, selectedVariantId) {
4315
4315
  if (!selectedVariantId || component.available_variants.length === 0) {
4316
- return chunkV2O5AO7I_js.parsePrice(component.effective_price);
4316
+ return chunkMNIKXG7W_js.parsePrice(component.effective_price);
4317
4317
  }
4318
4318
  if (selectedVariantId === component.variant_id) {
4319
- return chunkV2O5AO7I_js.parsePrice(component.effective_price);
4319
+ return chunkMNIKXG7W_js.parsePrice(component.effective_price);
4320
4320
  }
4321
4321
  const bakedAdj = component.variant_id ? component.available_variants.find((v) => v.id === component.variant_id) : void 0;
4322
4322
  const selectedAdj = component.available_variants.find((v) => v.id === selectedVariantId);
4323
- if (!selectedAdj) return chunkV2O5AO7I_js.parsePrice(component.effective_price);
4324
- return chunkV2O5AO7I_js.parsePrice(component.effective_price) - chunkV2O5AO7I_js.parsePrice(bakedAdj?.price_adjustment ?? "0") + chunkV2O5AO7I_js.parsePrice(selectedAdj.price_adjustment);
4323
+ if (!selectedAdj) return chunkMNIKXG7W_js.parsePrice(component.effective_price);
4324
+ return chunkMNIKXG7W_js.parsePrice(component.effective_price) - chunkMNIKXG7W_js.parsePrice(bakedAdj?.price_adjustment ?? "0") + chunkMNIKXG7W_js.parsePrice(selectedAdj.price_adjustment);
4325
4325
  }
4326
4326
  function formatDuration(minutes, unit) {
4327
4327
  if (unit === "hours" || !unit && minutes >= 60 && minutes % 60 === 0) {
@@ -4434,7 +4434,7 @@ function BundleComponentCard({
4434
4434
  className: cn("mt-3 divide-y divide-border", classNames?.variantPicker),
4435
4435
  children: component.available_variants.map((variant) => {
4436
4436
  const isSelected = selectedVariantId === variant.id;
4437
- const adjustment = chunkV2O5AO7I_js.parsePrice(variant.price_adjustment);
4437
+ const adjustment = chunkMNIKXG7W_js.parsePrice(variant.price_adjustment);
4438
4438
  return /* @__PURE__ */ jsxRuntime.jsxs(
4439
4439
  radio.Radio.Root,
4440
4440
  {
@@ -4880,7 +4880,7 @@ function CompositeSelector({
4880
4880
  "data-cimplify-composite-summary": true,
4881
4881
  className: cn("border-t border-border pt-4 space-y-1 text-sm", classNames?.summary),
4882
4882
  children: [
4883
- chunkV2O5AO7I_js.parsePrice(priceResult.base_price) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
4883
+ chunkMNIKXG7W_js.parsePrice(priceResult.base_price) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
4884
4884
  "div",
4885
4885
  {
4886
4886
  "data-cimplify-composite-summary-line": true,
@@ -4891,7 +4891,7 @@ function CompositeSelector({
4891
4891
  ]
4892
4892
  }
4893
4893
  ),
4894
- chunkV2O5AO7I_js.parsePrice(priceResult.components_total) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
4894
+ chunkMNIKXG7W_js.parsePrice(priceResult.components_total) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs(
4895
4895
  "div",
4896
4896
  {
4897
4897
  "data-cimplify-composite-summary-line": true,
@@ -5187,7 +5187,7 @@ function InputField({
5187
5187
  onFileUpload,
5188
5188
  classNames
5189
5189
  }) {
5190
- const hasPriceAdjustment = field.price_adjustment != null && chunkV2O5AO7I_js.parsePrice(field.price_adjustment) > 0;
5190
+ const hasPriceAdjustment = field.price_adjustment != null && chunkMNIKXG7W_js.parsePrice(field.price_adjustment) > 0;
5191
5191
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-customer-input": true, "data-field-type": field.field_type, className: classNames?.field, children: [
5192
5192
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-1.5", children: [
5193
5193
  /* @__PURE__ */ jsxRuntime.jsx("label", { className: cn("text-sm font-semibold", classNames?.label), children: field.name }),
@@ -6081,18 +6081,18 @@ function ProductCustomizer({
6081
6081
  }, [selectedAddOnOptionIds]);
6082
6082
  const localTotalPrice = React10.useMemo(() => {
6083
6083
  if (isComposite && compositePrice) {
6084
- return chunkV2O5AO7I_js.parsePrice(compositePrice.final_price) * quantity;
6084
+ return chunkMNIKXG7W_js.parsePrice(compositePrice.final_price) * quantity;
6085
6085
  }
6086
6086
  if (isBundle && bundleTotalPrice != null) {
6087
6087
  return bundleTotalPrice * quantity;
6088
6088
  }
6089
- let price = chunkV2O5AO7I_js.parsePrice(product.default_price);
6089
+ let price = chunkMNIKXG7W_js.parsePrice(product.default_price);
6090
6090
  if (selectedVariant?.price_adjustment) {
6091
- price += chunkV2O5AO7I_js.parsePrice(selectedVariant.price_adjustment);
6091
+ price += chunkMNIKXG7W_js.parsePrice(selectedVariant.price_adjustment);
6092
6092
  }
6093
6093
  for (const option of selectedAddOnOptions) {
6094
6094
  if (option.default_price) {
6095
- price += chunkV2O5AO7I_js.parsePrice(option.default_price);
6095
+ price += chunkMNIKXG7W_js.parsePrice(option.default_price);
6096
6096
  }
6097
6097
  }
6098
6098
  return price * quantity;
@@ -6141,7 +6141,7 @@ function ProductCustomizer({
6141
6141
  const priceInfo = quote.quoted_total_price_info ?? quote.final_price_info;
6142
6142
  const perUnit = priceInfo.pre_tax_price;
6143
6143
  if (perUnit === void 0 || perUnit === null) return void 0;
6144
- return chunkV2O5AO7I_js.parsePrice(perUnit) * quantity;
6144
+ return chunkMNIKXG7W_js.parsePrice(perUnit) * quantity;
6145
6145
  }, [quote, quantity]);
6146
6146
  const displayTotalPrice = quotedTotalPrice ?? localTotalPrice;
6147
6147
  const handleVariantChange = React10.useCallback(
@@ -6263,7 +6263,7 @@ function ProductCustomizer({
6263
6263
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.deposit_amount })
6264
6264
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
6265
6265
  "Deposit required: ",
6266
- chunkV2O5AO7I_js.parsePrice(product.deposit_amount),
6266
+ chunkMNIKXG7W_js.parsePrice(product.deposit_amount),
6267
6267
  "%"
6268
6268
  ] }) }),
6269
6269
  product.allergies && product.allergies.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-cimplify-customizer-allergens": true, className: cn("flex flex-wrap gap-1.5", classNames?.allergens), children: product.allergies.map((allergen) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -6324,7 +6324,7 @@ function ProductCustomizer({
6324
6324
  ] })
6325
6325
  ] }),
6326
6326
  product.quantity_pricing && product.quantity_pricing.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-customizer-unit-price": true, className: "text-sm text-muted-foreground text-right shrink-0", children: [
6327
- /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkV2O5AO7I_js.getUnitPriceAtQuantity(product.quantity_pricing, quantity, chunkV2O5AO7I_js.parsePrice(product.default_price)), className: "font-medium text-foreground" }),
6327
+ /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getUnitPriceAtQuantity(product.quantity_pricing, quantity, chunkMNIKXG7W_js.parsePrice(product.default_price)), className: "font-medium text-foreground" }),
6328
6328
  " ea."
6329
6329
  ] }),
6330
6330
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -6448,7 +6448,7 @@ function CartLineItemRow({
6448
6448
  const hasComposite = item.compositeSelections && item.compositeSelections.length > 0;
6449
6449
  const hasBundle = item.bundleSelections && item.bundleSelections.length > 0;
6450
6450
  const isOptimistic = item.isOptimistic === true;
6451
- const lineTotal = chunkV2O5AO7I_js.parsePrice(unitPrice) * item.quantity;
6451
+ const lineTotal = chunkMNIKXG7W_js.parsePrice(unitPrice) * item.quantity;
6452
6452
  const imageUrl = item.product.image_url;
6453
6453
  const variantLabel = item.variant ? chunkBGCEKFLA_js.getVariantDisplayName(item.variant, item.product.name) : null;
6454
6454
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -6681,15 +6681,15 @@ function CartSummary({
6681
6681
  ] }),
6682
6682
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: subtotal, className: "tabular-nums" })
6683
6683
  ] }),
6684
- totalDiscounts != null && chunkV2O5AO7I_js.parsePrice(totalDiscounts) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-discount": true, className: cn("flex items-baseline justify-between", classNames?.discount), children: [
6684
+ totalDiscounts != null && chunkMNIKXG7W_js.parsePrice(totalDiscounts) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-discount": true, className: cn("flex items-baseline justify-between", classNames?.discount), children: [
6685
6685
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Discount" }),
6686
6686
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: totalDiscounts, prefix: "-", className: "tabular-nums text-primary" })
6687
6687
  ] }),
6688
6688
  deliveryFee != null && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-delivery-fee": true, className: cn("flex items-baseline justify-between", classNames?.deliveryFee), children: [
6689
6689
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Delivery" }),
6690
- chunkV2O5AO7I_js.parsePrice(deliveryFee) > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: deliveryFee, className: "tabular-nums" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-primary", children: "Free" })
6690
+ chunkMNIKXG7W_js.parsePrice(deliveryFee) > 0 ? /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: deliveryFee, className: "tabular-nums" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-primary", children: "Free" })
6691
6691
  ] }),
6692
- serviceCharge != null && chunkV2O5AO7I_js.parsePrice(serviceCharge) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-service-charge": true, className: cn("flex items-baseline justify-between", classNames?.serviceCharge), children: [
6692
+ serviceCharge != null && chunkMNIKXG7W_js.parsePrice(serviceCharge) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-service-charge": true, className: cn("flex items-baseline justify-between", classNames?.serviceCharge), children: [
6693
6693
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "Service charge" }),
6694
6694
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: serviceCharge, className: "tabular-nums" })
6695
6695
  ] }),
@@ -6779,16 +6779,16 @@ function SaleBadge({
6779
6779
  className,
6780
6780
  classNames
6781
6781
  }) {
6782
- const onSale = chunkV2O5AO7I_js.isOnSale(product);
6782
+ const onSale = chunkMNIKXG7W_js.isOnSale(product);
6783
6783
  const hasDeal = dealInfo !== void 0;
6784
6784
  if (!hasDeal && !onSale && !label) {
6785
6785
  return null;
6786
6786
  }
6787
6787
  let percentage = null;
6788
6788
  if (hasDeal && dealInfo.benefit_type === "percentage") {
6789
- percentage = chunkV2O5AO7I_js.parsePrice(dealInfo.value);
6789
+ percentage = chunkMNIKXG7W_js.parsePrice(dealInfo.value);
6790
6790
  } else if (onSale) {
6791
- percentage = chunkV2O5AO7I_js.getDiscountPercentage(product);
6791
+ percentage = chunkMNIKXG7W_js.getDiscountPercentage(product);
6792
6792
  }
6793
6793
  const badgeText = label ?? dealInfo?.label ?? (percentage != null && percentage > 0 ? `${percentage}% off` : null);
6794
6794
  if (!badgeText) {
@@ -6807,7 +6807,7 @@ function SaleBadge({
6807
6807
  "%"
6808
6808
  ] }),
6809
6809
  /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-label": true, className: classNames?.label, children: badgeText }),
6810
- showOriginalPrice && onSale && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkV2O5AO7I_js.getBasePrice(product) }) })
6810
+ showOriginalPrice && onSale && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-sale-original-price": true, className: classNames?.originalPrice, children: /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product) }) })
6811
6811
  ]
6812
6812
  }
6813
6813
  );
@@ -7060,8 +7060,8 @@ function SoldOutOverlay() {
7060
7060
  );
7061
7061
  }
7062
7062
  function SaleBadge2({ product }) {
7063
- if (!chunkV2O5AO7I_js.isOnSale(product)) return null;
7064
- const pct = chunkV2O5AO7I_js.getDiscountPercentage(product);
7063
+ if (!chunkMNIKXG7W_js.isOnSale(product)) return null;
7064
+ const pct = chunkMNIKXG7W_js.getDiscountPercentage(product);
7065
7065
  if (!pct || pct <= 0) return null;
7066
7066
  return /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-card-sale-badge": true, className: "inline-flex items-center text-[11px] font-semibold tracking-wide bg-destructive text-destructive-foreground px-2 py-0.5 rounded-md", children: [
7067
7067
  "-",
@@ -7154,7 +7154,7 @@ function RetailProductCard({
7154
7154
  }) {
7155
7155
  const image = product.image_url || product.images?.[0] || "";
7156
7156
  const outOfStock = product.inventory_status?.in_stock === false;
7157
- const onSale = chunkV2O5AO7I_js.isOnSale(product);
7157
+ const onSale = chunkMNIKXG7W_js.isOnSale(product);
7158
7158
  const swatches = getColorSwatches(product);
7159
7159
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, disabled: outOfStock, className, children: [
7160
7160
  outOfStock && /* @__PURE__ */ jsxRuntime.jsx(SoldOutOverlay, {}),
@@ -7172,7 +7172,7 @@ function RetailProductCard({
7172
7172
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[14.5px] font-semibold text-foreground leading-snug tracking-tight mt-1 truncate", children: product.name }),
7173
7173
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-2", children: [
7174
7174
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
7175
- onSale && /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkV2O5AO7I_js.getBasePrice(product), className: "text-xs text-muted-foreground line-through" })
7175
+ onSale && /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product), className: "text-xs text-muted-foreground line-through" })
7176
7176
  ] }),
7177
7177
  swatches.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 mt-2.5", children: swatches.map((name) => /* @__PURE__ */ jsxRuntime.jsx(
7178
7178
  "span",
@@ -7189,9 +7189,9 @@ function RetailProductCard({
7189
7189
  function PriceRange({ product, currency, className }) {
7190
7190
  const context = useOptionalCimplify();
7191
7191
  const resolvedCurrency = currency ?? context?.displayCurrency ?? "USD";
7192
- const range = chunkV2O5AO7I_js.getPriceRange(product);
7192
+ const range = chunkMNIKXG7W_js.getPriceRange(product);
7193
7193
  if (!range) return null;
7194
- return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-price-range": true, className, children: chunkV2O5AO7I_js.formatPriceRange(range.min, range.max, resolvedCurrency) });
7194
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-price-range": true, className, children: chunkMNIKXG7W_js.formatPriceRange(range.min, range.max, resolvedCurrency) });
7195
7195
  }
7196
7196
  function WholesaleProductCard({
7197
7197
  product,
@@ -7280,8 +7280,8 @@ function BundleProductCard({
7280
7280
  const image = product.image_url || product.images?.[0] || "";
7281
7281
  const components = product.components || [];
7282
7282
  const componentCount = components.length;
7283
- const onSale = chunkV2O5AO7I_js.isOnSale(product);
7284
- const discount = chunkV2O5AO7I_js.getDiscountPercentage(product);
7283
+ const onSale = chunkMNIKXG7W_js.isOnSale(product);
7284
+ const discount = chunkMNIKXG7W_js.getDiscountPercentage(product);
7285
7285
  const hasVariantChoice = components.some((c) => c.allow_variant_choice);
7286
7286
  return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
7287
7287
  /* @__PURE__ */ jsxRuntime.jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "square", renderImage, children: [
@@ -7308,7 +7308,7 @@ function BundleProductCard({
7308
7308
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mt-2.5", children: [
7309
7309
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-sm font-bold" }),
7310
7310
  onSale && product.bundle_price && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
7311
- /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkV2O5AO7I_js.getBasePrice(product), className: "text-xs text-muted-foreground line-through" }),
7311
+ /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product), className: "text-xs text-muted-foreground line-through" }),
7312
7312
  discount != null && discount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] font-semibold text-emerald-600", children: [
7313
7313
  "Save ",
7314
7314
  discount,
@@ -8220,7 +8220,7 @@ function SearchInput({
8220
8220
  }
8221
8221
  ),
8222
8222
  /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-name": true, className: classNames?.resultName, style: { flex: 1, textAlign: "left" }, children: product.name }),
8223
- product.default_price !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-price": true, className: classNames?.resultPrice, style: { flexShrink: 0 }, children: chunkV2O5AO7I_js.formatPrice(product.default_price) })
8223
+ product.default_price !== void 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "data-cimplify-search-result-price": true, className: classNames?.resultPrice, style: { flexShrink: 0 }, children: chunkMNIKXG7W_js.formatPrice(product.default_price) })
8224
8224
  ] })
8225
8225
  },
8226
8226
  product.id
@@ -8714,19 +8714,19 @@ function OrderSummary({
8714
8714
  order.customer_notes.map((note, index) => /* @__PURE__ */ jsxRuntime.jsx("p", { "data-cimplify-order-note": true, children: note }, index))
8715
8715
  ] }),
8716
8716
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-totals": true, className: classNames?.totals, children: [
8717
- order.total_discount != null && chunkV2O5AO7I_js.parsePrice(order.total_discount) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-discount": true, children: [
8717
+ order.total_discount != null && chunkMNIKXG7W_js.parsePrice(order.total_discount) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-discount": true, children: [
8718
8718
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Discount" }),
8719
8719
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.total_discount, prefix: "-" })
8720
8720
  ] }),
8721
- order.delivery_fee != null && chunkV2O5AO7I_js.parsePrice(order.delivery_fee) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-delivery-fee": true, children: [
8721
+ order.delivery_fee != null && chunkMNIKXG7W_js.parsePrice(order.delivery_fee) > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-delivery-fee": true, children: [
8722
8722
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Delivery fee" }),
8723
8723
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.delivery_fee })
8724
8724
  ] }),
8725
- order.service_charge != null && chunkV2O5AO7I_js.parsePrice(order.service_charge) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-service-charge": true, children: [
8725
+ order.service_charge != null && chunkMNIKXG7W_js.parsePrice(order.service_charge) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-service-charge": true, children: [
8726
8726
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Service charge" }),
8727
8727
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.service_charge })
8728
8728
  ] }),
8729
- order.tax != null && chunkV2O5AO7I_js.parsePrice(order.tax) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-tax": true, children: [
8729
+ order.tax != null && chunkMNIKXG7W_js.parsePrice(order.tax) !== 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-order-tax": true, children: [
8730
8730
  /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Tax" }),
8731
8731
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: order.tax })
8732
8732
  ] }),
@@ -10015,7 +10015,7 @@ function DefaultProductLayout({
10015
10015
  }) {
10016
10016
  const images = product.images || (product.image_url ? [product.image_url] : []);
10017
10017
  const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
10018
- const onSale = chunkV2O5AO7I_js.isOnSale(product);
10018
+ const onSale = chunkMNIKXG7W_js.isOnSale(product);
10019
10019
  const hasPhysicalDetails = product.sku || product.vendor || product.material;
10020
10020
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "default", className: cn("space-y-8", className), children: [
10021
10021
  renderBreadcrumb?.(product),
@@ -10037,10 +10037,10 @@ function DefaultProductLayout({
10037
10037
  /* @__PURE__ */ jsxRuntime.jsx("h1", { "data-cimplify-product-layout-name": true, className: "text-3xl lg:text-4xl font-extrabold tracking-tight", children: product.name }),
10038
10038
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-baseline gap-3", children: hasRange ? /* @__PURE__ */ jsxRuntime.jsx(PriceRange, { product, className: "text-2xl font-extrabold" }) : onSale ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10039
10039
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-2xl font-extrabold" }),
10040
- /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkV2O5AO7I_js.getBasePrice(product), className: "text-lg text-muted-foreground line-through" }),
10040
+ /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: chunkMNIKXG7W_js.getBasePrice(product), className: "text-lg text-muted-foreground line-through" }),
10041
10041
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-bold text-destructive bg-destructive/10 px-2 py-0.5", children: [
10042
10042
  "Save ",
10043
- chunkV2O5AO7I_js.getDiscountPercentage(product),
10043
+ chunkMNIKXG7W_js.getDiscountPercentage(product),
10044
10044
  "%"
10045
10045
  ] })
10046
10046
  ] }) : /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: product.default_price, className: "text-2xl font-semibold" }) }),
@@ -10259,7 +10259,7 @@ function ServiceProductLayout({
10259
10259
  }) {
10260
10260
  const images = product.images || (product.image_url ? [product.image_url] : []);
10261
10261
  const hasDeposit = product.deposit_type && product.deposit_type !== "none" && product.deposit_amount;
10262
- const depositAmount = hasDeposit ? chunkV2O5AO7I_js.parsePrice(product.deposit_amount) : 0;
10262
+ const depositAmount = hasDeposit ? chunkMNIKXG7W_js.parsePrice(product.deposit_amount) : 0;
10263
10263
  const cancellationHours = product.cancellation_window_minutes ? Math.floor(product.cancellation_window_minutes / 60) : null;
10264
10264
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "service", className: cn("space-y-8", className), children: [
10265
10265
  renderBreadcrumb?.(product),
@@ -10327,7 +10327,7 @@ function ServiceProductLayout({
10327
10327
  /* @__PURE__ */ jsxRuntime.jsx(Price, { amount: depositAmount, className: "font-medium text-foreground" }),
10328
10328
  " deposit charged at booking"
10329
10329
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10330
- chunkV2O5AO7I_js.parsePrice(product.deposit_amount),
10330
+ chunkMNIKXG7W_js.parsePrice(product.deposit_amount),
10331
10331
  "% deposit charged at booking"
10332
10332
  ] }) })
10333
10333
  ] })
@@ -10486,13 +10486,13 @@ function BundleProductLayout({
10486
10486
  }) {
10487
10487
  const images = product.images || (product.image_url ? [product.image_url] : []);
10488
10488
  const components = product.components || [];
10489
- const onSale = chunkV2O5AO7I_js.isOnSale(product);
10490
- const discount = chunkV2O5AO7I_js.getDiscountPercentage(product);
10489
+ const onSale = chunkMNIKXG7W_js.isOnSale(product);
10490
+ const discount = chunkMNIKXG7W_js.getDiscountPercentage(product);
10491
10491
  const baseTotal = components.reduce(
10492
- (sum, c) => sum + chunkV2O5AO7I_js.parsePrice(c.effective_price ?? 0) * (c.quantity ?? 1),
10492
+ (sum, c) => sum + chunkMNIKXG7W_js.parsePrice(c.effective_price ?? 0) * (c.quantity ?? 1),
10493
10493
  0
10494
10494
  );
10495
- const bundlePrice = chunkV2O5AO7I_js.parsePrice(product.default_price);
10495
+ const bundlePrice = chunkMNIKXG7W_js.parsePrice(product.default_price);
10496
10496
  const savings = baseTotal > bundlePrice ? baseTotal - bundlePrice : 0;
10497
10497
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-product-layout": "bundle", className: cn("space-y-8", className), children: [
10498
10498
  renderBreadcrumb?.(product),
@@ -10984,7 +10984,7 @@ function CartDrawer({
10984
10984
  }) {
10985
10985
  const { isOpen, close } = useCartDrawer();
10986
10986
  const cart = useCart();
10987
- const subtotalNum = chunkV2O5AO7I_js.parsePrice(cart.subtotal);
10987
+ const subtotalNum = chunkMNIKXG7W_js.parsePrice(cart.subtotal);
10988
10988
  const animatedSubtotal = useAnimatedNumber(subtotalNum);
10989
10989
  React10.useEffect(() => {
10990
10990
  if (!isOpen) return;
@@ -11378,9 +11378,9 @@ function CatalogueCollectionLayout({
11378
11378
  result = result.filter((p) => p.tags?.includes(activeCategory));
11379
11379
  }
11380
11380
  if (sortBy === "price-asc") {
11381
- result = [...result].sort((a, b) => chunkV2O5AO7I_js.parsePrice(a.default_price) - chunkV2O5AO7I_js.parsePrice(b.default_price));
11381
+ result = [...result].sort((a, b) => chunkMNIKXG7W_js.parsePrice(a.default_price) - chunkMNIKXG7W_js.parsePrice(b.default_price));
11382
11382
  } else if (sortBy === "price-desc") {
11383
- result = [...result].sort((a, b) => chunkV2O5AO7I_js.parsePrice(b.default_price) - chunkV2O5AO7I_js.parsePrice(a.default_price));
11383
+ result = [...result].sort((a, b) => chunkMNIKXG7W_js.parsePrice(b.default_price) - chunkMNIKXG7W_js.parsePrice(a.default_price));
11384
11384
  } else if (sortBy === "name") {
11385
11385
  result = [...result].sort((a, b) => a.name.localeCompare(b.name));
11386
11386
  }
package/dist/react.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, RENDER_HINT } from './chunk-IRJFDKFV.mjs';
3
3
  export { getVariantDisplayName } from './chunk-IRJFDKFV.mjs';
4
- import { createCimplifyClient } from './chunk-3WD6U5RD.mjs';
5
- import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-EZK2FXTM.mjs';
6
- import { isSupportedCurrency, formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-6TVQQYQ5.mjs';
4
+ import { createCimplifyClient } from './chunk-UXLQ7WXI.mjs';
5
+ import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-7NML226B.mjs';
6
+ import { isSupportedCurrency, formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-6AZZ6AOF.mjs';
7
7
  import React10, { createContext, useRef, useState, useCallback, useEffect, useContext, useMemo, useId, useSyncExternalStore } from 'react';
8
8
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
9
9
  import { clsx } from 'clsx';