@burdenoff/microfe-billing 2026.1116.1 → 2026.1119.2

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 (62) hide show
  1. package/dist/billing/modules/addons/pages/AddonCreatePage.js +143 -143
  2. package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonEditPage.js +170 -170
  4. package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
  5. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +148 -148
  6. package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
  7. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +115 -115
  8. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
  9. package/dist/billing/modules/billing/pages/InvoicesListPage.js +136 -136
  10. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  11. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +129 -129
  12. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
  13. package/dist/billing/modules/billing/pages/RefundsPage.js +325 -325
  14. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  15. package/dist/billing/modules/billing/pages/UserRefundsPage.js +149 -149
  16. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  17. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +99 -98
  18. package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
  19. package/dist/billing/modules/checkout/components/StoreShippingSection.js +125 -124
  20. package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
  21. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +61 -60
  22. package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
  23. package/dist/billing/modules/coupons/pages/CouponsListPage.js +177 -177
  24. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  25. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +231 -231
  26. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  27. package/dist/billing/modules/coupons/pages/EditCouponPage.js +139 -139
  28. package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
  29. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +54 -54
  30. package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
  31. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +65 -65
  32. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  33. package/dist/billing/modules/credits/pages/CreditsPage.js +95 -95
  34. package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
  35. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +232 -231
  36. package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
  37. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +328 -328
  38. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  39. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +57 -57
  40. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  41. package/dist/billing/modules/earnings/pages/EarningsPage.js +53 -53
  42. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  43. package/dist/billing/modules/earnings/pages/PayoutsPage.js +100 -100
  44. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  45. package/dist/billing/modules/plans/pages/PlanCreatePage.js +150 -150
  46. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  47. package/dist/billing/modules/plans/pages/PlanEditPage.js +125 -125
  48. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  49. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +113 -113
  50. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
  51. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +132 -132
  52. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
  53. package/dist/billing/modules/settings/pages/SettingsPage.js +101 -101
  54. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  55. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +125 -125
  56. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  57. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +51 -50
  58. package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
  59. package/dist/billing/modules/usage/pages/UsagePage.js +107 -107
  60. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  61. package/dist/billing/shared/components/GeoPricingOverridesEditor.js +1 -0
  62. package/package.json +2 -2
@@ -1,9 +1,10 @@
1
1
  import { useCreateShippingAddress as e, useEstimateOrderShipping as t, useMyShippingAddresses as n, useShippingMethods as r } from "../hooks/useStoreShipping.js";
2
2
  import { useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
3
- import { AlertTriangle as c, Check as l, Loader2 as u, MapPin as d, Plus as f, Truck as p, X as m } from "lucide-react";
4
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
3
+ import { ThemedSelect as c } from "@burdenoff/fe-libs/ui";
4
+ import { AlertTriangle as l, Check as u, Loader2 as d, MapPin as f, Plus as p, Truck as m, X as h } from "lucide-react";
5
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
5
6
  // src/billing/modules/checkout/components/StoreShippingSection.tsx
6
- var ee = [
7
+ var y = [
7
8
  {
8
9
  value: "IN",
9
10
  label: "India"
@@ -40,7 +41,7 @@ var ee = [
40
41
  value: "AE",
41
42
  label: "UAE"
42
43
  }
43
- ], v = {
44
+ ], b = {
44
45
  fullName: "",
45
46
  phone: "",
46
47
  addressLine1: "",
@@ -50,7 +51,7 @@ var ee = [
50
51
  postalCode: "",
51
52
  country: "IN"
52
53
  };
53
- function y(e, t) {
54
+ function x(e, t) {
54
55
  try {
55
56
  return e.toLocaleString("en", {
56
57
  style: "currency",
@@ -60,34 +61,34 @@ function y(e, t) {
60
61
  return `${t || "USD"} ${e.toFixed(2)}`;
61
62
  }
62
63
  }
63
- function b(e, t) {
64
+ function S(e, t) {
64
65
  if (e == null && t == null) return null;
65
66
  if (e != null && t != null) return e === t ? `${e} days` : `${e}–${t} days`;
66
67
  let n = e ?? t;
67
68
  return n == null ? null : `${n} days`;
68
69
  }
69
- var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
70
- let { addresses: w, loading: T, refetch: E } = n(), { createShippingAddress: D, loading: O } = e(), { methods: k, loading: A } = r(), [j, { data: M, loading: N, error: P }] = t(), [F, I] = s(null), [L, R] = s(null), [z, B] = s(!1), [V, H] = s(v), [U, W] = s({}), [G, K] = s(null), q = o(C);
70
+ var C = ({ storeOrderId: C, currency: w, onChange: T }) => {
71
+ let { addresses: E, loading: D, refetch: O } = n(), { createShippingAddress: k, loading: A } = e(), { methods: j, loading: ee } = r(), [M, { data: te, loading: N, error: P }] = t(), [F, I] = s(null), [L, R] = s(null), [z, B] = s(!1), [V, H] = s(b), [U, W] = s({}), [G, K] = s(null), q = o(T);
71
72
  i(() => {
72
- q.current = C;
73
+ q.current = T;
73
74
  });
74
- let J = a(() => w.find((e) => e.id === F), [w, F]), Y = a(() => {
75
+ let J = a(() => E.find((e) => e.id === F), [E, F]), Y = a(() => {
75
76
  if (!J) return [];
76
77
  let e = J.country;
77
- return k.filter((t) => t.isActive && (t.availableCountries.length === 0 || t.availableCountries.includes(e)) && !t.excludedCountries.includes(e)).sort((e, t) => e.displayOrder - t.displayOrder);
78
- }, [k, J]);
78
+ return j.filter((t) => t.isActive && (t.availableCountries.length === 0 || t.availableCountries.includes(e)) && !t.excludedCountries.includes(e)).sort((e, t) => e.displayOrder - t.displayOrder);
79
+ }, [j, J]);
79
80
  i(() => {
80
- if (!F && w.length > 0) {
81
- let e = w.find((e) => e.isDefault) ?? w[0];
81
+ if (!F && E.length > 0) {
82
+ let e = E.find((e) => e.isDefault) ?? E[0];
82
83
  I(e.id);
83
84
  }
84
- }, [w, F]), i(() => {
85
+ }, [E, F]), i(() => {
85
86
  L && !Y.some((e) => e.id === L) && R(null);
86
87
  }, [Y, L]), i(() => {
87
88
  !L && Y.length === 1 && R(Y[0].id);
88
89
  }, [Y, L]), i(() => {
89
- J && L && j({ variables: { input: {
90
- orderId: x,
90
+ J && L && M({ variables: { input: {
91
+ orderId: C,
91
92
  shippingMethodId: L,
92
93
  destinationCountry: J.country,
93
94
  destinationPostalCode: J.postalCode
@@ -97,11 +98,11 @@ var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
97
98
  J?.country,
98
99
  J?.postalCode,
99
100
  L,
100
- x,
101
- j,
101
+ C,
102
+ M,
102
103
  J
103
104
  ]);
104
- let X = M?.estimateOrderShipping, Z = !!(F && L && !N && X && X.shippingMethodId === L);
105
+ let X = te?.estimateOrderShipping, Z = !!(F && L && !N && X && X.shippingMethodId === L);
105
106
  i(() => {
106
107
  q.current({
107
108
  shippingAddressId: F,
@@ -119,14 +120,14 @@ var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
119
120
  let Q = (e, t) => H((n) => ({
120
121
  ...n,
121
122
  [e]: t
122
- })), te = () => {
123
+ })), ne = () => {
123
124
  let e = {};
124
125
  return V.fullName.trim() || (e.fullName = "Recipient name is required"), V.addressLine1.trim() || (e.addressLine1 = "Street address is required"), V.city.trim() || (e.city = "City is required"), V.postalCode.trim() || (e.postalCode = "Postal code is required"), V.country.trim() || (e.country = "Country is required"), W(e), Object.keys(e).length === 0;
125
- }, ne = async () => {
126
- if (te()) {
126
+ }, re = async () => {
127
+ if (ne()) {
127
128
  K(null);
128
129
  try {
129
- let e = await D({
130
+ let e = await k({
130
131
  fullName: V.fullName.trim(),
131
132
  ...V.phone.trim() ? { phone: V.phone.trim() } : {},
132
133
  addressLine1: V.addressLine1.trim(),
@@ -135,66 +136,66 @@ var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
135
136
  ...V.state.trim() ? { state: V.state.trim() } : {},
136
137
  postalCode: V.postalCode.trim(),
137
138
  country: V.country,
138
- isDefault: w.length === 0
139
+ isDefault: E.length === 0
139
140
  });
140
141
  if (!e) {
141
142
  K("Failed to save address. Please try again.");
142
143
  return;
143
144
  }
144
- await E(), I(e.id), R(null), H(v), W({}), B(!1);
145
+ await O(), I(e.id), R(null), H(b), W({}), B(!1);
145
146
  } catch {
146
147
  K("Failed to save address. Please try again.");
147
148
  }
148
149
  }
149
150
  }, $ = (e) => `w-full px-3 py-2 text-sm border rounded-input bg-bg-surface text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${e ? "border-status-error-border" : "border-border-subtle"}`;
150
- return /* @__PURE__ */ _("div", {
151
+ return /* @__PURE__ */ v("div", {
151
152
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6 space-y-5",
152
153
  children: [
153
- /* @__PURE__ */ _("div", {
154
+ /* @__PURE__ */ v("div", {
154
155
  className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
155
- children: [/* @__PURE__ */ g(p, { className: "size-4 text-text-secondary" }), "Shipping"]
156
+ children: [/* @__PURE__ */ _(m, { className: "size-4 text-text-secondary" }), "Shipping"]
156
157
  }),
157
- /* @__PURE__ */ _("section", {
158
+ /* @__PURE__ */ v("section", {
158
159
  className: "space-y-3",
159
160
  children: [
160
- /* @__PURE__ */ _("div", {
161
+ /* @__PURE__ */ v("div", {
161
162
  className: "flex items-center justify-between",
162
- children: [/* @__PURE__ */ _("div", {
163
+ children: [/* @__PURE__ */ v("div", {
163
164
  className: "flex items-center gap-2 text-sm font-medium text-text-primary",
164
- children: [/* @__PURE__ */ g(d, { className: "size-4 text-text-secondary" }), "Delivery address"]
165
- }), !z && /* @__PURE__ */ _("button", {
165
+ children: [/* @__PURE__ */ _(f, { className: "size-4 text-text-secondary" }), "Delivery address"]
166
+ }), !z && /* @__PURE__ */ v("button", {
166
167
  type: "button",
167
168
  onClick: () => {
168
169
  B(!0), K(null);
169
170
  },
170
171
  className: "inline-flex items-center gap-1 text-xs font-medium text-text-link hover:underline",
171
- children: [/* @__PURE__ */ g(f, { className: "size-3.5" }), "Add address"]
172
+ children: [/* @__PURE__ */ _(p, { className: "size-3.5" }), "Add address"]
172
173
  })]
173
174
  }),
174
- T && w.length === 0 ? /* @__PURE__ */ _("div", {
175
+ D && E.length === 0 ? /* @__PURE__ */ v("div", {
175
176
  className: "flex items-center gap-2 text-sm text-text-secondary",
176
- children: [/* @__PURE__ */ g(u, { className: "size-4 animate-spin" }), "Loading addresses…"]
177
- }) : /* @__PURE__ */ _(h, { children: [w.length === 0 && !z && /* @__PURE__ */ g("p", {
177
+ children: [/* @__PURE__ */ _(d, { className: "size-4 animate-spin" }), "Loading addresses…"]
178
+ }) : /* @__PURE__ */ v(g, { children: [E.length === 0 && !z && /* @__PURE__ */ _("p", {
178
179
  className: "text-sm text-text-secondary",
179
180
  children: "No saved delivery addresses yet. Add one to continue."
180
- }), w.length > 0 && /* @__PURE__ */ g("div", {
181
+ }), E.length > 0 && /* @__PURE__ */ _("div", {
181
182
  className: "space-y-2",
182
- children: w.map((e) => {
183
+ children: E.map((e) => {
183
184
  let t = e.id === F;
184
- return /* @__PURE__ */ g("button", {
185
+ return /* @__PURE__ */ _("button", {
185
186
  type: "button",
186
187
  onClick: () => {
187
188
  I(e.id), R(null);
188
189
  },
189
190
  className: `w-full text-left p-3 rounded-input border transition-colors ${t ? "border-action-primary-bg bg-bg-sunken" : "border-border-subtle hover:bg-bg-sunken"}`,
190
- children: /* @__PURE__ */ _("div", {
191
+ children: /* @__PURE__ */ v("div", {
191
192
  className: "flex items-start justify-between gap-2",
192
- children: [/* @__PURE__ */ _("div", {
193
+ children: [/* @__PURE__ */ v("div", {
193
194
  className: "text-sm",
194
195
  children: [
195
- /* @__PURE__ */ _("p", {
196
+ /* @__PURE__ */ v("p", {
196
197
  className: "font-medium text-text-primary",
197
- children: [e.fullName, e.label ? /* @__PURE__ */ _("span", {
198
+ children: [e.fullName, e.label ? /* @__PURE__ */ v("span", {
198
199
  className: "ml-2 text-xs text-text-muted",
199
200
  children: [
200
201
  "(",
@@ -203,7 +204,7 @@ var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
203
204
  ]
204
205
  }) : null]
205
206
  }),
206
- /* @__PURE__ */ g("p", {
207
+ /* @__PURE__ */ _("p", {
207
208
  className: "text-text-secondary text-xs mt-0.5",
208
209
  children: [
209
210
  e.addressLine1,
@@ -214,134 +215,134 @@ var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
214
215
  e.country
215
216
  ].filter(Boolean).join(", ")
216
217
  }),
217
- e.phone && /* @__PURE__ */ g("p", {
218
+ e.phone && /* @__PURE__ */ _("p", {
218
219
  className: "text-text-muted text-xs mt-0.5",
219
220
  children: e.phone
220
221
  })
221
222
  ]
222
- }), t && /* @__PURE__ */ g(l, { className: "size-4 text-action-primary-bg shrink-0 mt-0.5" })]
223
+ }), t && /* @__PURE__ */ _(u, { className: "size-4 text-action-primary-bg shrink-0 mt-0.5" })]
223
224
  })
224
225
  }, e.id);
225
226
  })
226
227
  })] }),
227
- z && /* @__PURE__ */ _("div", {
228
+ z && /* @__PURE__ */ v("div", {
228
229
  className: "rounded-input border border-border-subtle p-3 space-y-3 bg-bg-sunken",
229
230
  children: [
230
- /* @__PURE__ */ _("div", {
231
+ /* @__PURE__ */ v("div", {
231
232
  className: "flex items-center justify-between",
232
- children: [/* @__PURE__ */ g("span", {
233
+ children: [/* @__PURE__ */ _("span", {
233
234
  className: "text-sm font-medium text-text-primary",
234
235
  children: "New delivery address"
235
- }), /* @__PURE__ */ g("button", {
236
+ }), /* @__PURE__ */ _("button", {
236
237
  type: "button",
237
238
  onClick: () => {
238
239
  B(!1), W({}), K(null);
239
240
  },
240
241
  className: "p-1 text-text-secondary hover:text-text-primary rounded-button",
241
- children: /* @__PURE__ */ g(m, { className: "size-4" })
242
+ children: /* @__PURE__ */ _(h, { className: "size-4" })
242
243
  })]
243
244
  }),
244
- G && /* @__PURE__ */ g("div", {
245
+ G && /* @__PURE__ */ _("div", {
245
246
  className: "p-2 rounded-lg bg-status-error-bg-subtle border border-status-error-border text-xs text-status-error-text",
246
247
  children: G
247
248
  }),
248
- /* @__PURE__ */ _("div", { children: [
249
- /* @__PURE__ */ g("label", {
249
+ /* @__PURE__ */ v("div", { children: [
250
+ /* @__PURE__ */ _("label", {
250
251
  className: "block text-xs text-text-secondary mb-1",
251
252
  children: "Recipient name"
252
253
  }),
253
- /* @__PURE__ */ g("input", {
254
+ /* @__PURE__ */ _("input", {
254
255
  type: "text",
255
256
  value: V.fullName,
256
257
  onChange: (e) => Q("fullName", e.target.value),
257
258
  placeholder: "Jane Doe",
258
259
  className: $(!!U.fullName)
259
260
  }),
260
- U.fullName && /* @__PURE__ */ g("p", {
261
+ U.fullName && /* @__PURE__ */ _("p", {
261
262
  className: "mt-1 text-xs text-status-error-text",
262
263
  children: U.fullName
263
264
  })
264
265
  ] }),
265
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
266
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
266
267
  className: "block text-xs text-text-secondary mb-1",
267
- children: ["Phone ", /* @__PURE__ */ g("span", {
268
+ children: ["Phone ", /* @__PURE__ */ _("span", {
268
269
  className: "text-text-muted",
269
270
  children: "(optional)"
270
271
  })]
271
- }), /* @__PURE__ */ g("input", {
272
+ }), /* @__PURE__ */ _("input", {
272
273
  type: "tel",
273
274
  value: V.phone,
274
275
  onChange: (e) => Q("phone", e.target.value),
275
276
  placeholder: "+91 98765 43210",
276
277
  className: $(!1)
277
278
  })] }),
278
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
279
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
279
280
  className: "block text-xs text-text-secondary mb-1",
280
281
  children: "Country"
281
- }), /* @__PURE__ */ g("select", {
282
+ }), /* @__PURE__ */ _(c, {
282
283
  value: V.country,
283
284
  onChange: (e) => Q("country", e.target.value),
284
285
  className: `${$(!!U.country)} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`,
285
- children: ee.map((e) => /* @__PURE__ */ g("option", {
286
+ children: y.map((e) => /* @__PURE__ */ _("option", {
286
287
  value: e.value,
287
288
  children: e.label
288
289
  }, e.value))
289
290
  })] }),
290
- /* @__PURE__ */ _("div", { children: [
291
- /* @__PURE__ */ g("label", {
291
+ /* @__PURE__ */ v("div", { children: [
292
+ /* @__PURE__ */ _("label", {
292
293
  className: "block text-xs text-text-secondary mb-1",
293
294
  children: "Street address"
294
295
  }),
295
- /* @__PURE__ */ g("input", {
296
+ /* @__PURE__ */ _("input", {
296
297
  type: "text",
297
298
  value: V.addressLine1,
298
299
  onChange: (e) => Q("addressLine1", e.target.value),
299
300
  placeholder: "123 Main St",
300
301
  className: $(!!U.addressLine1)
301
302
  }),
302
- U.addressLine1 && /* @__PURE__ */ g("p", {
303
+ U.addressLine1 && /* @__PURE__ */ _("p", {
303
304
  className: "mt-1 text-xs text-status-error-text",
304
305
  children: U.addressLine1
305
306
  })
306
307
  ] }),
307
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
308
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
308
309
  className: "block text-xs text-text-secondary mb-1",
309
- children: ["Apartment, suite, etc. ", /* @__PURE__ */ g("span", {
310
+ children: ["Apartment, suite, etc. ", /* @__PURE__ */ _("span", {
310
311
  className: "text-text-muted",
311
312
  children: "(optional)"
312
313
  })]
313
- }), /* @__PURE__ */ g("input", {
314
+ }), /* @__PURE__ */ _("input", {
314
315
  type: "text",
315
316
  value: V.addressLine2,
316
317
  onChange: (e) => Q("addressLine2", e.target.value),
317
318
  placeholder: "Apt 4B",
318
319
  className: $(!1)
319
320
  })] }),
320
- /* @__PURE__ */ _("div", {
321
+ /* @__PURE__ */ v("div", {
321
322
  className: "grid grid-cols-2 gap-3",
322
- children: [/* @__PURE__ */ _("div", { children: [
323
- /* @__PURE__ */ g("label", {
323
+ children: [/* @__PURE__ */ v("div", { children: [
324
+ /* @__PURE__ */ _("label", {
324
325
  className: "block text-xs text-text-secondary mb-1",
325
326
  children: "City"
326
327
  }),
327
- /* @__PURE__ */ g("input", {
328
+ /* @__PURE__ */ _("input", {
328
329
  type: "text",
329
330
  value: V.city,
330
331
  onChange: (e) => Q("city", e.target.value),
331
332
  placeholder: "Mumbai",
332
333
  className: $(!!U.city)
333
334
  }),
334
- U.city && /* @__PURE__ */ g("p", {
335
+ U.city && /* @__PURE__ */ _("p", {
335
336
  className: "mt-1 text-xs text-status-error-text",
336
337
  children: U.city
337
338
  })
338
- ] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
339
+ ] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("label", {
339
340
  className: "block text-xs text-text-secondary mb-1",
340
- children: ["State ", /* @__PURE__ */ g("span", {
341
+ children: ["State ", /* @__PURE__ */ _("span", {
341
342
  className: "text-text-muted",
342
343
  children: "(optional)"
343
344
  })]
344
- }), /* @__PURE__ */ g("input", {
345
+ }), /* @__PURE__ */ _("input", {
345
346
  type: "text",
346
347
  value: V.state,
347
348
  onChange: (e) => Q("state", e.target.value),
@@ -349,48 +350,48 @@ var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
349
350
  className: $(!1)
350
351
  })] })]
351
352
  }),
352
- /* @__PURE__ */ _("div", { children: [
353
- /* @__PURE__ */ g("label", {
353
+ /* @__PURE__ */ v("div", { children: [
354
+ /* @__PURE__ */ _("label", {
354
355
  className: "block text-xs text-text-secondary mb-1",
355
356
  children: "Postal code"
356
357
  }),
357
- /* @__PURE__ */ g("input", {
358
+ /* @__PURE__ */ _("input", {
358
359
  type: "text",
359
360
  value: V.postalCode,
360
361
  onChange: (e) => Q("postalCode", e.target.value),
361
362
  placeholder: "400001",
362
363
  className: $(!!U.postalCode)
363
364
  }),
364
- U.postalCode && /* @__PURE__ */ g("p", {
365
+ U.postalCode && /* @__PURE__ */ _("p", {
365
366
  className: "mt-1 text-xs text-status-error-text",
366
367
  children: U.postalCode
367
368
  })
368
369
  ] }),
369
- /* @__PURE__ */ g("div", {
370
+ /* @__PURE__ */ _("div", {
370
371
  className: "flex justify-end",
371
- children: /* @__PURE__ */ _("button", {
372
+ children: /* @__PURE__ */ v("button", {
372
373
  type: "button",
373
- onClick: ne,
374
- disabled: O,
374
+ onClick: re,
375
+ disabled: A,
375
376
  className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium text-action-primary-text bg-action-primary-bg hover:bg-action-primary-bgHover rounded-lg transition-colors disabled:opacity-50",
376
- children: [O && /* @__PURE__ */ g(u, { className: "size-4 animate-spin" }), "Save address"]
377
+ children: [A && /* @__PURE__ */ _(d, { className: "size-4 animate-spin" }), "Save address"]
377
378
  })
378
379
  })
379
380
  ]
380
381
  })
381
382
  ]
382
383
  }),
383
- /* @__PURE__ */ _("section", {
384
+ /* @__PURE__ */ v("section", {
384
385
  className: "space-y-3",
385
386
  children: [
386
- /* @__PURE__ */ _("div", {
387
+ /* @__PURE__ */ v("div", {
387
388
  className: "flex items-center gap-2 text-sm font-medium text-text-primary",
388
- children: [/* @__PURE__ */ g(p, { className: "size-4 text-text-secondary" }), "Shipping method"]
389
+ children: [/* @__PURE__ */ _(m, { className: "size-4 text-text-secondary" }), "Shipping method"]
389
390
  }),
390
- J ? A && k.length === 0 ? /* @__PURE__ */ _("div", {
391
+ J ? ee && j.length === 0 ? /* @__PURE__ */ v("div", {
391
392
  className: "flex items-center gap-2 text-sm text-text-secondary",
392
- children: [/* @__PURE__ */ g(u, { className: "size-4 animate-spin" }), "Loading options…"]
393
- }) : Y.length === 0 ? /* @__PURE__ */ _("p", {
393
+ children: [/* @__PURE__ */ _(d, { className: "size-4 animate-spin" }), "Loading options…"]
394
+ }) : Y.length === 0 ? /* @__PURE__ */ v("p", {
394
395
  className: "text-sm text-text-secondary",
395
396
  children: [
396
397
  "No shipping methods available for ",
@@ -398,89 +399,89 @@ var x = ({ storeOrderId: x, currency: S, onChange: C }) => {
398
399
  ". Try a different address."
399
400
  ]
400
401
  }) : Y.length === 1 ? (() => {
401
- let e = Y[0], t = b(e.estimatedMinDays, e.estimatedMaxDays), n = Z && X, r = !!P && !N;
402
- return /* @__PURE__ */ g("div", {
402
+ let e = Y[0], t = S(e.estimatedMinDays, e.estimatedMaxDays), n = Z && X, r = !!P && !N;
403
+ return /* @__PURE__ */ _("div", {
403
404
  className: `w-full p-3 rounded-input border bg-bg-sunken ${r ? "border-status-error-border" : "border-action-primary-bg"}`,
404
- children: /* @__PURE__ */ _("div", {
405
+ children: /* @__PURE__ */ v("div", {
405
406
  className: "flex items-start justify-between gap-3",
406
- children: [/* @__PURE__ */ _("div", {
407
+ children: [/* @__PURE__ */ v("div", {
407
408
  className: "text-sm",
408
- children: [/* @__PURE__ */ g("p", {
409
+ children: [/* @__PURE__ */ _("p", {
409
410
  className: "font-medium text-text-primary",
410
411
  children: e.name
411
- }), /* @__PURE__ */ _("p", {
412
+ }), /* @__PURE__ */ v("p", {
412
413
  className: "text-text-secondary text-xs mt-0.5",
413
414
  children: [e.carrier ? `${e.carrier} · ` : "", t ?? "Delivery time varies"]
414
415
  })]
415
- }), /* @__PURE__ */ g("div", {
416
+ }), /* @__PURE__ */ _("div", {
416
417
  className: "flex items-center gap-2 shrink-0",
417
- children: N ? /* @__PURE__ */ g(u, { className: "size-4 animate-spin text-text-secondary" }) : r ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("span", {
418
+ children: N ? /* @__PURE__ */ _(d, { className: "size-4 animate-spin text-text-secondary" }) : r ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
418
419
  className: "text-sm font-semibold text-status-error-text",
419
420
  children: "Not available"
420
- }), /* @__PURE__ */ g(c, { className: "size-4 text-status-error-text" })] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("span", {
421
+ }), /* @__PURE__ */ _(l, { className: "size-4 text-status-error-text" })] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("span", {
421
422
  className: "text-sm font-semibold text-text-primary",
422
- children: n ? y(X.cost, X.currency || S) : y(e.baseCost, e.currency || S)
423
- }), /* @__PURE__ */ g(l, { className: "size-4 text-action-primary-bg" })] })
423
+ children: n ? x(X.cost, X.currency || w) : x(e.baseCost, e.currency || w)
424
+ }), /* @__PURE__ */ _(u, { className: "size-4 text-action-primary-bg" })] })
424
425
  })]
425
426
  })
426
427
  });
427
- })() : /* @__PURE__ */ g("div", {
428
+ })() : /* @__PURE__ */ _("div", {
428
429
  className: "space-y-2",
429
430
  children: Y.map((e) => {
430
- let t = e.id === L, n = b(e.estimatedMinDays, e.estimatedMaxDays), r = t && Z && X, i = t && !!P && !N;
431
- return /* @__PURE__ */ g("button", {
431
+ let t = e.id === L, n = S(e.estimatedMinDays, e.estimatedMaxDays), r = t && Z && X, i = t && !!P && !N;
432
+ return /* @__PURE__ */ _("button", {
432
433
  type: "button",
433
434
  onClick: () => R(e.id),
434
435
  className: `w-full text-left p-3 rounded-input border transition-colors ${i ? "border-status-error-border bg-bg-sunken" : t ? "border-action-primary-bg bg-bg-sunken" : "border-border-subtle hover:bg-bg-sunken"}`,
435
- children: /* @__PURE__ */ _("div", {
436
+ children: /* @__PURE__ */ v("div", {
436
437
  className: "flex items-start justify-between gap-3",
437
- children: [/* @__PURE__ */ _("div", {
438
+ children: [/* @__PURE__ */ v("div", {
438
439
  className: "text-sm",
439
- children: [/* @__PURE__ */ g("p", {
440
+ children: [/* @__PURE__ */ _("p", {
440
441
  className: "font-medium text-text-primary",
441
442
  children: e.name
442
- }), /* @__PURE__ */ _("p", {
443
+ }), /* @__PURE__ */ v("p", {
443
444
  className: "text-text-secondary text-xs mt-0.5",
444
445
  children: [e.carrier ? `${e.carrier} · ` : "", n ?? "Delivery time varies"]
445
446
  })]
446
- }), /* @__PURE__ */ g("div", {
447
+ }), /* @__PURE__ */ _("div", {
447
448
  className: "text-right shrink-0",
448
- children: t && N ? /* @__PURE__ */ g(u, { className: "size-4 animate-spin text-text-secondary" }) : i ? /* @__PURE__ */ _("span", {
449
+ children: t && N ? /* @__PURE__ */ _(d, { className: "size-4 animate-spin text-text-secondary" }) : i ? /* @__PURE__ */ v("span", {
449
450
  className: "inline-flex items-center gap-1 text-sm font-semibold text-status-error-text",
450
- children: [/* @__PURE__ */ g(c, { className: "size-4" }), "Not available"]
451
- }) : /* @__PURE__ */ g("span", {
451
+ children: [/* @__PURE__ */ _(l, { className: "size-4" }), "Not available"]
452
+ }) : /* @__PURE__ */ _("span", {
452
453
  className: "text-sm font-semibold text-text-primary",
453
- children: r ? y(X.cost, X.currency || S) : y(e.baseCost, e.currency || S)
454
+ children: r ? x(X.cost, X.currency || w) : x(e.baseCost, e.currency || w)
454
455
  })
455
456
  })]
456
457
  })
457
458
  }, e.id);
458
459
  })
459
- }) : /* @__PURE__ */ g("p", {
460
+ }) : /* @__PURE__ */ _("p", {
460
461
  className: "text-sm text-text-secondary",
461
462
  children: "Select a delivery address to see options."
462
463
  }),
463
- Z && X && /* @__PURE__ */ _("p", {
464
+ Z && X && /* @__PURE__ */ v("p", {
464
465
  className: "text-xs text-text-secondary",
465
466
  children: [
466
467
  "Estimated shipping: ",
467
- y(X.cost, X.currency || S),
468
+ x(X.cost, X.currency || w),
468
469
  X.estimatedDeliveryDate ? ` · arrives around ${new Date(X.estimatedDeliveryDate).toLocaleDateString()}` : ""
469
470
  ]
470
471
  }),
471
- P && !N && /* @__PURE__ */ _("div", {
472
+ P && !N && /* @__PURE__ */ v("div", {
472
473
  role: "alert",
473
474
  className: "flex items-start gap-2 rounded-lg border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
474
- children: [/* @__PURE__ */ g(c, {
475
+ children: [/* @__PURE__ */ _(l, {
475
476
  className: "size-4 shrink-0 mt-0.5",
476
477
  "aria-hidden": "true"
477
- }), /* @__PURE__ */ g("span", { children: P.message || "Sorry, this item can't be delivered to your address right now. Please try a different delivery address or contact support." })]
478
+ }), /* @__PURE__ */ _("span", { children: P.message || "Sorry, this item can't be delivered to your address right now. Please try a different delivery address or contact support." })]
478
479
  })
479
480
  ]
480
481
  })
481
482
  ]
482
483
  });
483
484
  };
484
- export { x as StoreShippingSection };
485
+ export { C as StoreShippingSection };
485
486
 
486
487
  //# sourceMappingURL=StoreShippingSection.js.map