@apextelemed/partner-core 0.13.0 → 0.14.0-dev.36

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 (41) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +3 -3
  3. package/dist/api/index.jsx +3 -3
  4. package/dist/chunk/{UNQZRRYX.jsx → 5CG4SVEX.jsx} +2 -2
  5. package/dist/chunk/{YELJZYFE.jsx → 6662ZOKC.jsx} +2 -2
  6. package/dist/chunk/{RSAMD7KK.js → 6CLDGBGD.js} +13 -2
  7. package/dist/chunk/6CLDGBGD.js.map +1 -0
  8. package/dist/chunk/{OE4ALLK3.jsx → GZX7PF2S.jsx} +2 -2
  9. package/dist/chunk/{EG2CAC22.js → HDNJFBNL.js} +3 -3
  10. package/dist/chunk/{EG2CAC22.js.map → HDNJFBNL.js.map} +1 -1
  11. package/dist/chunk/{QS6YNYNN.js → LDN265PO.js} +3 -3
  12. package/dist/chunk/{QS6YNYNN.js.map → LDN265PO.js.map} +1 -1
  13. package/dist/chunk/{4VOAA5ZL.jsx → M7N4MMT5.jsx} +5 -5
  14. package/dist/chunk/{P372URP5.jsx → MCTFP3KN.jsx} +12 -4
  15. package/dist/chunk/{LKJPXG6G.jsx → N46NURCY.jsx} +12 -1
  16. package/dist/chunk/{LT3QM56G.jsx → Q63J5O7F.jsx} +1274 -1175
  17. package/dist/chunk/{6EJC5ZCY.js → T6VCKNSU.js} +6 -6
  18. package/dist/chunk/{6EJC5ZCY.js.map → T6VCKNSU.js.map} +1 -1
  19. package/dist/chunk/{347UQ7P6.js → TH5NFD6V.js} +3 -3
  20. package/dist/chunk/{347UQ7P6.js.map → TH5NFD6V.js.map} +1 -1
  21. package/dist/chunk/{Z4E33FZW.js → XKB3T5K4.js} +13 -5
  22. package/dist/chunk/XKB3T5K4.js.map +1 -0
  23. package/dist/chunk/{G7ATLWOZ.js → YTKBUMDA.js} +382 -275
  24. package/dist/chunk/YTKBUMDA.js.map +1 -0
  25. package/dist/{client-yGM1eXH_.d.ts → client-cMWe3BQ3.d.ts} +57 -1
  26. package/dist/flows/index.d.ts +1 -1
  27. package/dist/flows/index.js +6 -6
  28. package/dist/flows/index.jsx +6 -6
  29. package/dist/index/index.d.ts +1 -1
  30. package/dist/index/index.js +7 -7
  31. package/dist/index/index.jsx +7 -7
  32. package/dist/pages/index.d.ts +1 -1
  33. package/dist/pages/index.js +5 -5
  34. package/dist/pages/index.jsx +5 -5
  35. package/dist/stores/index.d.ts +1 -1
  36. package/dist/stores/index.js +2 -2
  37. package/dist/stores/index.jsx +2 -2
  38. package/package.json +1 -1
  39. package/dist/chunk/G7ATLWOZ.js.map +0 -1
  40. package/dist/chunk/RSAMD7KK.js.map +0 -1
  41. package/dist/chunk/Z4E33FZW.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
2
- import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, READINESS_LABEL, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isImageAttachment, buildRefillView, toTrackerRequest } from './Z4E33FZW.js';
3
- import { fetchFunnelConfig } from './EG2CAC22.js';
2
+ import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, availableStateOptions, US_STATE_OPTIONS, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, READINESS_LABEL, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isImageAttachment, buildRefillView, toTrackerRequest } from './XKB3T5K4.js';
3
+ import { fetchFunnelConfig } from './HDNJFBNL.js';
4
4
  import { usePrimitives } from './67KHO66G.js';
5
- import { cart_default, auth_default, affiliateAuth_default } from './347UQ7P6.js';
6
- import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './RSAMD7KK.js';
5
+ import { cart_default, auth_default, affiliateAuth_default } from './TH5NFD6V.js';
6
+ import { usersApi, adminApi, membersApi, offersApi, affiliatePortalApi, authApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ApiError, subscriptionsApi } from './6CLDGBGD.js';
7
7
  import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, Portal, template } from 'solid-js/web';
8
8
  import { createContext, createSignal, createEffect, on, Show, For, createResource, createMemo, untrack, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext, Index } from 'solid-js';
9
9
  import { isQuestionVisible } from '@apextelemed/survey-core';
@@ -5366,6 +5366,15 @@ function centsToUsd(cents) {
5366
5366
  if (cents == null) return "-";
5367
5367
  return `$${(cents / 100).toFixed(2)}`;
5368
5368
  }
5369
+ function refundableCents(p) {
5370
+ return Math.max(0, (p.amountCents ?? 0) - (p.refundedAmountCents ?? 0) - (p.scheduledRefundCents ?? 0));
5371
+ }
5372
+ function refundToast(res, amountCents) {
5373
+ if (res?.scheduled) {
5374
+ return `Refund of ${centsToUsd(amountCents)} scheduled. The charge hasn't settled yet, so it goes out automatically once it does (usually by tomorrow).`;
5375
+ }
5376
+ return res?.remainingCents && res.remainingCents > 0 ? `Refunded ${centsToUsd(amountCents)}. ${centsToUsd(res.remainingCents)} still refundable.` : "Refund issued.";
5377
+ }
5369
5378
  function fmtPrice(dollars) {
5370
5379
  if (dollars == null) return "-";
5371
5380
  return `$${Number(dollars).toFixed(2)}`;
@@ -10830,7 +10839,7 @@ var _tmpl$720 = /* @__PURE__ */ template(`<li> \u2014 `);
10830
10839
  var _tmpl$819 = /* @__PURE__ */ template(`<div><p class=app-admin-alert__detail style=margin-bottom:0.5rem>The gateway has not settled this charge yet, so it can only be reversed in full right now. Partial refunds work once it settles, usually the next business day.</p><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Refund the full <!> instead`);
10831
10840
  var _tmpl$917 = /* @__PURE__ */ template(`<div class="app-admin-alert app-admin-alert--danger"role=alert style=flex-direction:column;gap:0.5rem><p class=app-admin-alert__title>`);
10832
10841
  function RefundModal(props) {
10833
- const remaining = () => Math.max(0, props.payment.amountCents - (props.payment.refundedAmountCents ?? 0));
10842
+ const remaining = () => refundableCents(props.payment);
10834
10843
  const [dollars, setDollars] = createSignal((remaining() / 100).toFixed(2));
10835
10844
  const [reason, setReason] = createSignal("");
10836
10845
  const [alsoCancel, setAlsoCancel] = createSignal(false);
@@ -10915,13 +10924,29 @@ function RefundModal(props) {
10915
10924
  return (props.payment.refundedAmountCents ?? 0) > 0;
10916
10925
  },
10917
10926
  get children() {
10918
- return [" ", memo(() => centsToUsd(props.payment.refundedAmountCents)), " already refunded; ", memo(() => centsToUsd(remaining())), " remains."];
10927
+ return [" ", memo(() => centsToUsd(props.payment.refundedAmountCents)), " already refunded."];
10928
+ }
10929
+ }), null);
10930
+ insert(_el$2, createComponent(Show, {
10931
+ get when() {
10932
+ return (props.payment.scheduledRefundCents ?? 0) > 0;
10933
+ },
10934
+ get children() {
10935
+ return [" ", memo(() => centsToUsd(props.payment.scheduledRefundCents)), " scheduled to be refunded once the charge settles."];
10936
+ }
10937
+ }), null);
10938
+ insert(_el$2, createComponent(Show, {
10939
+ get when() {
10940
+ return remaining() < props.payment.amountCents;
10941
+ },
10942
+ get children() {
10943
+ return [" ", memo(() => centsToUsd(remaining())), " remains."];
10919
10944
  }
10920
10945
  }), null);
10921
10946
  insert(_el$, createComponent(FormRow, {
10922
10947
  label: "Amount to refund (USD)",
10923
10948
  get hint() {
10924
- return `Up to ${centsToUsd(remaining())}.`;
10949
+ return `Up to ${centsToUsd(remaining())}. If the charge hasn't settled yet, a partial refund is scheduled and goes out automatically once it does.`;
10925
10950
  },
10926
10951
  get children() {
10927
10952
  var _el$6 = _tmpl$161();
@@ -11230,8 +11255,61 @@ function Muted(props) {
11230
11255
  return _el$15;
11231
11256
  })();
11232
11257
  }
11233
- var _tmpl$170 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Amount</th><th>Status</th><th>Type</th><th>Detail</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
11234
- var _tmpl$250 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem> refunded`);
11258
+ var _tmpl$170 = /* @__PURE__ */ template(`<div class=app-admin-text-muted data-testid=scheduled-refund-note style=font-size:0.75rem><span title="The charge hasn't settled yet. The refund goes out automatically once it does."> refund scheduled</span> \xB7 <button type=button class=app-admin-link-btn style=font-size:inherit>`);
11259
+ var _tmpl$250 = /* @__PURE__ */ template(`<div data-testid=scheduled-refund-problem role=status style=font-size:0.75rem;color:var(--app-admin-danger-fg)>Scheduled refund of <!> did not go out (<!>): <!>. The customer has not been refunded. \xB7 <button type=button class=app-admin-link-btn style=font-size:inherit>Dismiss`);
11260
+ function ScheduledRefundNote(props) {
11261
+ const [busy, setBusy] = createSignal(false);
11262
+ const run = async (action) => {
11263
+ setBusy(true);
11264
+ try {
11265
+ await action();
11266
+ props.onChanged?.();
11267
+ } catch (err) {
11268
+ toastError(err instanceof Error ? err.message : "Something went wrong");
11269
+ } finally {
11270
+ setBusy(false);
11271
+ }
11272
+ };
11273
+ const cancel = () => run(async () => {
11274
+ const res = await adminApi.cancelScheduledRefunds(props.paymentId);
11275
+ if (res.cancelled.length > 0) toastSuccess("Scheduled refund cancelled.");
11276
+ else toastError("Nothing to cancel \u2014 the refund may already have gone out.");
11277
+ });
11278
+ const dismiss = () => run(async () => {
11279
+ await adminApi.dismissScheduledRefundProblem(props.paymentId);
11280
+ });
11281
+ return [createComponent(Show, {
11282
+ get when() {
11283
+ return (props.scheduledRefundCents ?? 0) > 0;
11284
+ },
11285
+ get children() {
11286
+ var _el$ = _tmpl$170(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling, _el$5 = _el$4.nextSibling;
11287
+ insert(_el$2, () => centsToUsd(props.scheduledRefundCents), _el$3);
11288
+ _el$5.$$click = () => void cancel();
11289
+ insert(_el$5, () => busy() ? "Cancelling\u2026" : "Cancel");
11290
+ effect(() => _el$5.disabled = busy());
11291
+ return _el$;
11292
+ }
11293
+ }), createComponent(Show, {
11294
+ get when() {
11295
+ return props.scheduledRefundProblem;
11296
+ },
11297
+ children: (p) => (() => {
11298
+ var _el$6 = _tmpl$250(), _el$7 = _el$6.firstChild, _el$11 = _el$7.nextSibling, _el$8 = _el$11.nextSibling, _el$12 = _el$8.nextSibling, _el$9 = _el$12.nextSibling, _el$13 = _el$9.nextSibling, _el$0 = _el$13.nextSibling, _el$10 = _el$0.nextSibling;
11299
+ insert(_el$6, () => centsToUsd(p().amountCents), _el$11);
11300
+ insert(_el$6, () => fmtDate(p().at), _el$12);
11301
+ insert(_el$6, () => p().reason, _el$13);
11302
+ _el$10.$$click = () => void dismiss();
11303
+ effect(() => _el$10.disabled = busy());
11304
+ return _el$6;
11305
+ })()
11306
+ })];
11307
+ }
11308
+ delegateEvents(["click"]);
11309
+
11310
+ // src/pages/admin/customers/sections/PaymentsTable.tsx
11311
+ var _tmpl$171 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Amount</th><th>Status</th><th>Type</th><th>Detail</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
11312
+ var _tmpl$251 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem> refunded`);
11235
11313
  var _tmpl$337 = /* @__PURE__ */ template(`<div>`);
11236
11314
  var _tmpl$430 = /* @__PURE__ */ template(`<div class=app-admin-text-mono style=font-size:0.75rem>`);
11237
11315
  var _tmpl$525 = /* @__PURE__ */ template(`<div>Refunded `);
@@ -11244,7 +11322,7 @@ function typeWord(p) {
11244
11322
  }
11245
11323
  function PaymentsTable(props) {
11246
11324
  const sorted = () => [...props.payments].sort((a, b) => Date.parse(b.createdAt ?? "") - Date.parse(a.createdAt ?? ""));
11247
- const refundable = (p) => p.status === "succeeded" && (p.amountCents ?? 0) - (p.refundedAmountCents ?? 0) > 0;
11325
+ const refundable = (p) => p.status === "succeeded" && refundableCents(p) > 0;
11248
11326
  return createComponent(Show, {
11249
11327
  get when() {
11250
11328
  return props.payments.length > 0;
@@ -11255,7 +11333,7 @@ function PaymentsTable(props) {
11255
11333
  });
11256
11334
  },
11257
11335
  get children() {
11258
- var _el$ = _tmpl$170(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$3.nextSibling;
11336
+ var _el$ = _tmpl$171(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$3.nextSibling;
11259
11337
  insert(_el$1, createComponent(For, {
11260
11338
  get each() {
11261
11339
  return sorted();
@@ -11269,11 +11347,25 @@ function PaymentsTable(props) {
11269
11347
  return memo(() => (p.refundedAmountCents ?? 0) > 0)() && p.status !== "refunded";
11270
11348
  },
11271
11349
  get children() {
11272
- var _el$13 = _tmpl$250(), _el$14 = _el$13.firstChild;
11350
+ var _el$13 = _tmpl$251(), _el$14 = _el$13.firstChild;
11273
11351
  insert(_el$13, () => centsToUsd(p.refundedAmountCents), _el$14);
11274
11352
  return _el$13;
11275
11353
  }
11276
11354
  }), null);
11355
+ insert(_el$12, createComponent(ScheduledRefundNote, {
11356
+ get paymentId() {
11357
+ return p.id;
11358
+ },
11359
+ get scheduledRefundCents() {
11360
+ return p.scheduledRefundCents;
11361
+ },
11362
+ get scheduledRefundProblem() {
11363
+ return p.scheduledRefundProblem;
11364
+ },
11365
+ get onChanged() {
11366
+ return props.onChanged;
11367
+ }
11368
+ }), null);
11277
11369
  insert(_el$15, createComponent(StatusBadge, {
11278
11370
  get status() {
11279
11371
  return p.status;
@@ -11319,7 +11411,7 @@ function PaymentsTable(props) {
11319
11411
  _el$23.$$click = () => props.onRefund(p);
11320
11412
  insert(_el$23, (() => {
11321
11413
  var _c$ = memo(() => props.busyId === p.id);
11322
- return () => _c$() ? "\u2026" : (p.refundedAmountCents ?? 0) > 0 ? "Refund rest" : "Refund";
11414
+ return () => _c$() ? "\u2026" : refundableCents(p) < (p.amountCents ?? 0) ? "Refund rest" : "Refund";
11323
11415
  })());
11324
11416
  effect(() => _el$23.disabled = props.busyId === p.id);
11325
11417
  return _el$23;
@@ -11334,8 +11426,8 @@ function PaymentsTable(props) {
11334
11426
  });
11335
11427
  }
11336
11428
  delegateEvents(["click"]);
11337
- var _tmpl$171 = /* @__PURE__ */ template(`<input class=app-admin-input>`);
11338
- var _tmpl$251 = /* @__PURE__ */ template(`<form style="display:grid;grid-template-columns:1fr 1fr;gap:0.5rem"><div style="grid-column:1 / -1;display:flex;gap:0.5rem"><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
11429
+ var _tmpl$179 = /* @__PURE__ */ template(`<input class=app-admin-input>`);
11430
+ var _tmpl$256 = /* @__PURE__ */ template(`<form style="display:grid;grid-template-columns:1fr 1fr;gap:0.5rem"><div style="grid-column:1 / -1;display:flex;gap:0.5rem"><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel`);
11339
11431
  var _tmpl$338 = /* @__PURE__ */ template(`<div class=app-admin-section-stack>`);
11340
11432
  var _tmpl$431 = /* @__PURE__ */ template(`<div style=display:flex;align-items:center;justify-content:space-between;gap:0.5rem><span style=font-size:0.875rem></span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Edit name`);
11341
11433
  var _tmpl$526 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>No name on file`);
@@ -11386,12 +11478,12 @@ function ProfileCard(props) {
11386
11478
  })();
11387
11479
  },
11388
11480
  get children() {
11389
- var _el$2 = _tmpl$251(), _el$5 = _el$2.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
11481
+ var _el$2 = _tmpl$256(), _el$5 = _el$2.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
11390
11482
  _el$2.addEventListener("submit", save);
11391
11483
  insert(_el$2, createComponent(FormRow, {
11392
11484
  label: "First name",
11393
11485
  get children() {
11394
- var _el$3 = _tmpl$171();
11486
+ var _el$3 = _tmpl$179();
11395
11487
  _el$3.$$input = (e) => setFirst(e.currentTarget.value);
11396
11488
  effect(() => _el$3.disabled = saving());
11397
11489
  effect(() => _el$3.value = first());
@@ -11401,7 +11493,7 @@ function ProfileCard(props) {
11401
11493
  insert(_el$2, createComponent(FormRow, {
11402
11494
  label: "Last name",
11403
11495
  get children() {
11404
- var _el$4 = _tmpl$171();
11496
+ var _el$4 = _tmpl$179();
11405
11497
  _el$4.$$input = (e) => setLast(e.currentTarget.value);
11406
11498
  effect(() => _el$4.disabled = saving());
11407
11499
  effect(() => _el$4.value = last());
@@ -11467,8 +11559,8 @@ function ProfileCard(props) {
11467
11559
  })();
11468
11560
  }
11469
11561
  delegateEvents(["input", "click"]);
11470
- var _tmpl$179 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11471
- var _tmpl$256 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"title="Apex could not be reached; showing the last status we stored.">cached`);
11562
+ var _tmpl$180 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11563
+ var _tmpl$257 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"title="Apex could not be reached; showing the last status we stored.">cached`);
11472
11564
  var _tmpl$339 = /* @__PURE__ */ template(`<article class=app-admin-card-soft style="padding:1rem 1.25rem"><div style="display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0.5rem 0.75rem"><div style=display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap;min-width:0><span style=font-weight:600></span></div><span class=app-admin-text-muted style=font-size:0.8125rem> \xB7 submitted </span></div><div style=margin-top:1rem></div><div style=margin-top:0.875rem>`);
11473
11565
  var _tmpl$432 = /* @__PURE__ */ template(`<a target=_blank rel="noopener noreferrer"class=app-admin-text-mono style=color:var(--app-admin-primary-soft-fg)>`);
11474
11566
  var _tmpl$527 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>`);
@@ -11523,7 +11615,7 @@ function RequestCard(props) {
11523
11615
  return r().dosage;
11524
11616
  },
11525
11617
  get children() {
11526
- var _el$5 = _tmpl$179();
11618
+ var _el$5 = _tmpl$180();
11527
11619
  insert(_el$5, () => r().dosage);
11528
11620
  return _el$5;
11529
11621
  }
@@ -11538,7 +11630,7 @@ function RequestCard(props) {
11538
11630
  return !r().live;
11539
11631
  },
11540
11632
  get children() {
11541
- return _tmpl$256();
11633
+ return _tmpl$257();
11542
11634
  }
11543
11635
  }), null);
11544
11636
  insert(_el$7, () => STATUS_WORD[r().status] ?? r().status.replace(/_/g, " "), _el$8);
@@ -11655,8 +11747,8 @@ function discountTerms(s) {
11655
11747
  }
11656
11748
 
11657
11749
  // src/pages/admin/customers/sections/SubscriptionCard.tsx
11658
- var _tmpl$180 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11659
- var _tmpl$257 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change amount`);
11750
+ var _tmpl$181 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.875rem>`);
11751
+ var _tmpl$258 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change amount`);
11660
11752
  var _tmpl$340 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Change schedule`);
11661
11753
  var _tmpl$433 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">`);
11662
11754
  var _tmpl$528 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
@@ -11665,7 +11757,7 @@ var _tmpl$724 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap style=
11665
11757
  var _tmpl$821 = /* @__PURE__ */ template(`<div style=margin-top:0.875rem><button type=button class=app-admin-link-btn> billing attempts (<!>)`);
11666
11758
  var _tmpl$918 = /* @__PURE__ */ template(`<article class=app-admin-card-soft style="padding:1rem 1.25rem"><div style=display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:0.75rem><div style=min-width:0><div style=display:flex;align-items:center;gap:0.5rem;flex-wrap:wrap><span style=font-weight:600></span></div><div class=app-admin-text-muted style=font-size:0.875rem;margin-top:0.25rem> \xB7 </div></div><div style=display:flex;flex-wrap:wrap;gap:0.375rem></div></div><div style=margin-top:0.875rem>`);
11667
11759
  var _tmpl$015 = /* @__PURE__ */ template(`<span class=app-admin-text-mono style=font-size:0.8125rem>`);
11668
- var _tmpl$181 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">Resolve`);
11760
+ var _tmpl$188 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-warning">Resolve`);
11669
11761
  var _tmpl$1012 = /* @__PURE__ */ template(`<tr><td data-label=When class=app-admin-text-muted></td><td data-label=Period class=app-admin-text-muted></td><td data-label=Amount></td><td data-label=Outcome><span></span></td><td data-label=Reason class=app-admin-text-muted></td><td data-label class=app-admin-table-cell--no-label>`);
11670
11762
  function attemptTone(status) {
11671
11763
  if (status === "succeeded") return "success";
@@ -11688,7 +11780,7 @@ function SubscriptionCard(props) {
11688
11780
  return s().dosage;
11689
11781
  },
11690
11782
  get children() {
11691
- var _el$6 = _tmpl$180();
11783
+ var _el$6 = _tmpl$181();
11692
11784
  insert(_el$6, () => s().dosage);
11693
11785
  return _el$6;
11694
11786
  }
@@ -11706,7 +11798,7 @@ function SubscriptionCard(props) {
11706
11798
  },
11707
11799
  get children() {
11708
11800
  return [(() => {
11709
- var _el$0 = _tmpl$257();
11801
+ var _el$0 = _tmpl$258();
11710
11802
  _el$0.$$click = () => props.onEditAmount(s());
11711
11803
  effect((_p$) => {
11712
11804
  var _v$ = gateway(), _v$2 = gateway() ? "The gateway holds this price; move the subscription to platform billing first." : void 0;
@@ -11839,7 +11931,7 @@ function SubscriptionCard(props) {
11839
11931
  return a.status === "pending" || a.status === "indeterminate";
11840
11932
  },
11841
11933
  get children() {
11842
- var _el$32 = _tmpl$181();
11934
+ var _el$32 = _tmpl$188();
11843
11935
  _el$32.$$click = () => props.onResolveAttempt(s(), a);
11844
11936
  effect(() => _el$32.disabled = props.busy === `resolve-${a.id}`);
11845
11937
  return _el$32;
@@ -11861,8 +11953,8 @@ function SubscriptionCard(props) {
11861
11953
  })();
11862
11954
  }
11863
11955
  delegateEvents(["click"]);
11864
- var _tmpl$188 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>Showing the latest <!>.`);
11865
- var _tmpl$258 = /* @__PURE__ */ template(`<div class=app-admin-section-stack style=gap:0.5rem><div class=app-admin-text-muted style=font-size:0.8125rem> thread</div><ul style=list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem>`);
11956
+ var _tmpl$189 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>Showing the latest <!>.`);
11957
+ var _tmpl$259 = /* @__PURE__ */ template(`<div class=app-admin-section-stack style=gap:0.5rem><div class=app-admin-text-muted style=font-size:0.8125rem> thread</div><ul style=list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.5rem>`);
11866
11958
  var _tmpl$341 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>No support conversations.`);
11867
11959
  var _tmpl$434 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Open`);
11868
11960
  var _tmpl$529 = /* @__PURE__ */ template(`<li style=display:flex;align-items:center;justify-content:space-between;gap:0.5rem><div style=min-width:0><div style=font-size:0.875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div class=app-admin-text-muted style=font-size:0.75rem></div></div><div style=display:flex;align-items:center;gap:0.375rem;flex-shrink:0>`);
@@ -11882,7 +11974,7 @@ function SupportSummary(props) {
11882
11974
  return _tmpl$341();
11883
11975
  },
11884
11976
  get children() {
11885
- var _el$ = _tmpl$258(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
11977
+ var _el$ = _tmpl$259(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$2.nextSibling;
11886
11978
  insert(_el$2, () => s().threadCount, _el$3);
11887
11979
  insert(_el$2, () => s().threadCount === 1 ? "" : "s", null);
11888
11980
  insert(_el$2, createComponent(Show, {
@@ -11962,7 +12054,7 @@ function SupportSummary(props) {
11962
12054
  return s().threadCount > s().threads.length;
11963
12055
  },
11964
12056
  get children() {
11965
- var _el$5 = _tmpl$188(), _el$6 = _el$5.firstChild, _el$8 = _el$6.nextSibling; _el$8.nextSibling;
12057
+ var _el$5 = _tmpl$189(), _el$6 = _el$5.firstChild, _el$8 = _el$6.nextSibling; _el$8.nextSibling;
11966
12058
  insert(_el$5, () => s().threads.length, _el$8);
11967
12059
  return _el$5;
11968
12060
  }
@@ -11974,8 +12066,8 @@ function SupportSummary(props) {
11974
12066
  delegateEvents(["click"]);
11975
12067
 
11976
12068
  // src/pages/admin/customers/CustomerDetail.tsx
11977
- var _tmpl$189 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
11978
- var _tmpl$259 = /* @__PURE__ */ template(`<button type=button class=app-admin-back><span aria-hidden=true>\u2190</span>Customers`);
12069
+ var _tmpl$190 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
12070
+ var _tmpl$260 = /* @__PURE__ */ template(`<button type=button class=app-admin-back><span aria-hidden=true>\u2190</span>Customers`);
11979
12071
  var _tmpl$343 = /* @__PURE__ */ template(`<div style=text-align:center><button type=button class=app-admin-link-btn>Try again`);
11980
12072
  var _tmpl$435 = /* @__PURE__ */ template(`<p class=app-admin-notice style=margin:0>Some sections did not load (<!>). <button type=button class=app-admin-link-btn>Reload`);
11981
12073
  var _tmpl$530 = /* @__PURE__ */ template(`<div class=app-admin-alerts data-testid=customer-attention>`);
@@ -11984,7 +12076,7 @@ var _tmpl$725 = /* @__PURE__ */ template(`<span>`);
11984
12076
  var _tmpl$822 = /* @__PURE__ */ template(`<span>Joined `);
11985
12077
  var _tmpl$919 = /* @__PURE__ */ template(`<span style=display:inline-flex;align-items:center;gap:0.5rem><span></span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"style="padding:0.1rem 0.5rem">Edit`);
11986
12078
  var _tmpl$016 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=text-transform:none>Savings member`);
11987
- var _tmpl$190 = /* @__PURE__ */ template(`<span style=font-size:0.9375rem>`);
12079
+ var _tmpl$191 = /* @__PURE__ */ template(`<span style=font-size:0.9375rem>`);
11988
12080
  var _tmpl$1013 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost">`);
11989
12081
  var _tmpl$1115 = /* @__PURE__ */ template(`<div class=app-admin-section-stack>`);
11990
12082
  var _tmpl$1212 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>Older requests are shown from stored status only.`);
@@ -12207,10 +12299,10 @@ function CustomerDetail(props) {
12207
12299
  }
12208
12300
  }
12209
12301
  if (failed.length > 0) {
12210
- toastError(`Refund succeeded, but the subscription was NOT canceled \u2014 billing will continue. ${failed.join("; ")}`);
12302
+ toastError(`${res?.scheduled ? "Refund scheduled" : "Refund succeeded"}, but the subscription was NOT canceled \u2014 billing will continue. ${failed.join("; ")}`);
12211
12303
  }
12212
12304
  }
12213
- toastSuccess(res?.remainingCents && res.remainingCents > 0 ? `Refunded ${centsToUsd(req.amountCents ?? payment.amountCents)}. ${centsToUsd(res.remainingCents)} still refundable.` : "Refund issued.");
12305
+ toastSuccess(refundToast(res, req.amountCents ?? refundableCents(payment)));
12214
12306
  void refetch();
12215
12307
  return {
12216
12308
  ok: true
@@ -12270,7 +12362,7 @@ function CustomerDetail(props) {
12270
12362
  };
12271
12363
  const pendingRequests = () => (o()?.requests.items ?? []).filter((r) => r.status === "pending");
12272
12364
  return (() => {
12273
- var _el$ = _tmpl$189();
12365
+ var _el$ = _tmpl$190();
12274
12366
  insert(_el$, createComponent(Show, {
12275
12367
  get when() {
12276
12368
  return !overview.loading;
@@ -12285,7 +12377,7 @@ function CustomerDetail(props) {
12285
12377
  },
12286
12378
  get fallback() {
12287
12379
  return [(() => {
12288
- var _el$2 = _tmpl$259();
12380
+ var _el$2 = _tmpl$260();
12289
12381
  addEventListener(_el$2, "click", props.onBack, true);
12290
12382
  return _el$2;
12291
12383
  })(), createComponent(EmptyState, {
@@ -12381,7 +12473,7 @@ function CustomerDetail(props) {
12381
12473
  });
12382
12474
  }
12383
12475
  }), (() => {
12384
- var _el$21 = _tmpl$190();
12476
+ var _el$21 = _tmpl$191();
12385
12477
  insert(_el$21, reason);
12386
12478
  return _el$21;
12387
12479
  })()];
@@ -12556,7 +12648,8 @@ function CustomerDetail(props) {
12556
12648
  get busyId() {
12557
12649
  return memo(() => !!busy()?.startsWith("refund-"))() ? busy().slice(7) : null;
12558
12650
  },
12559
- onRefund: setRefundFor
12651
+ onRefund: setRefundFor,
12652
+ onChanged: () => void refetch()
12560
12653
  });
12561
12654
  }
12562
12655
  }), createComponent(Show, {
@@ -12705,6 +12798,7 @@ function CustomerDetail(props) {
12705
12798
  id: p().id,
12706
12799
  amountCents: p().amountCents ?? 0,
12707
12800
  refundedAmountCents: p().refundedAmountCents,
12801
+ scheduledRefundCents: p().scheduledRefundCents,
12708
12802
  createdAt: p().createdAt ?? void 0,
12709
12803
  customerEmail: o()?.customer.email
12710
12804
  };
@@ -12764,8 +12858,8 @@ function CustomerDetail(props) {
12764
12858
  })();
12765
12859
  }
12766
12860
  delegateEvents(["click", "input"]);
12767
- var _tmpl$191 = /* @__PURE__ */ template(`<label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Savings members only`);
12768
- var _tmpl$260 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1rem;border-top:1px solid var(--app-admin-border-soft);display:flex;justify-content:center"><button type=button class="app-admin-btn app-admin-btn-ghost">`);
12861
+ var _tmpl$199 = /* @__PURE__ */ template(`<label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Savings members only`);
12862
+ var _tmpl$261 = /* @__PURE__ */ template(`<div style="padding:0.75rem 1rem;border-top:1px solid var(--app-admin-border-soft);display:flex;justify-content:center"><button type=button class="app-admin-btn app-admin-btn-ghost">`);
12769
12863
  var _tmpl$344 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Customer</th><th>Status</th><th>Plan</th><th>Prescription</th><th>Last activity</th><th>Joined</th></tr></thead><tbody>`);
12770
12864
  var _tmpl$436 = /* @__PURE__ */ template(`<div style=margin-top:0.75rem><button type=button class=app-admin-link-btn>Retry`);
12771
12865
  var _tmpl$531 = /* @__PURE__ */ template(`<div><div style=display:flex;flex-direction:column;gap:0.875rem;margin-bottom:1.25rem><div style=max-width:28rem><input type=search placeholder="Search by name or email"aria-label="Search customers"class=app-admin-input></div><div class=app-admin-chips role=group aria-label="Filter by status"></div><div style=display:flex;flex-wrap:wrap;gap:1rem;font-size:0.8125rem;color:var(--app-admin-fg-muted)><label style=display:inline-flex;align-items:center;gap:0.375rem><input type=checkbox>Never completed intake`);
@@ -12919,7 +13013,7 @@ function CustomerList(props) {
12919
13013
  return showSavingsToggle();
12920
13014
  },
12921
13015
  get children() {
12922
- var _el$7 = _tmpl$191(), _el$8 = _el$7.firstChild;
13016
+ var _el$7 = _tmpl$199(), _el$8 = _el$7.firstChild;
12923
13017
  _el$8.addEventListener("change", (e) => setSavingsOnly(e.currentTarget.checked));
12924
13018
  effect(() => _el$8.checked = savingsOnly());
12925
13019
  return _el$7;
@@ -13023,7 +13117,7 @@ function CustomerList(props) {
13023
13117
  return hasMore();
13024
13118
  },
13025
13119
  get children() {
13026
- var _el$14 = _tmpl$260(), _el$15 = _el$14.firstChild;
13120
+ var _el$14 = _tmpl$261(), _el$15 = _el$14.firstChild;
13027
13121
  _el$15.$$click = loadMore;
13028
13122
  insert(_el$15, () => loadingMore() ? "Loading\u2026" : "Load more");
13029
13123
  effect(() => _el$15.disabled = loadingMore());
@@ -13135,8 +13229,8 @@ function Customers(props = {}) {
13135
13229
  })
13136
13230
  });
13137
13231
  }
13138
- var _tmpl$199 = /* @__PURE__ */ template(`<div data-testid=admin-stats style="display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))">`);
13139
- var _tmpl$261 = /* @__PURE__ */ template(`<div>`);
13232
+ var _tmpl$200 = /* @__PURE__ */ template(`<div data-testid=admin-stats style="display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))">`);
13233
+ var _tmpl$266 = /* @__PURE__ */ template(`<div>`);
13140
13234
  var _tmpl$345 = /* @__PURE__ */ template(`<span style="display:block;font-size:0.875rem;color:var(--app-admin-fg-muted);margin:0 0 0.5rem">`);
13141
13235
  var _tmpl$437 = /* @__PURE__ */ template(`<span class=app-admin-heading style=display:block;font-size:1.875rem;margin:0>`);
13142
13236
  var _tmpl$532 = /* @__PURE__ */ template(`<div style="display:grid;gap:1rem;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));padding:1rem 1.25rem">`);
@@ -13194,7 +13288,7 @@ function Dashboard(props) {
13194
13288
  ];
13195
13289
  };
13196
13290
  return (() => {
13197
- var _el$ = _tmpl$261();
13291
+ var _el$ = _tmpl$266();
13198
13292
  insert(_el$, createComponent(PageTitle, {
13199
13293
  children: "Dashboard"
13200
13294
  }), null);
@@ -13216,7 +13310,7 @@ function Dashboard(props) {
13216
13310
  });
13217
13311
  },
13218
13312
  get children() {
13219
- var _el$2 = _tmpl$199();
13313
+ var _el$2 = _tmpl$200();
13220
13314
  insert(_el$2, createComponent(For, {
13221
13315
  get each() {
13222
13316
  return cards();
@@ -13345,8 +13439,8 @@ function RecurringRevenue(props) {
13345
13439
  return _el$5;
13346
13440
  })();
13347
13441
  }
13348
- var _tmpl$200 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Connected<!> \xB7 `);
13349
- var _tmpl$266 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--admin-border, #e2e8f0);border-radius:10px;margin-bottom:20px;background:var(--admin-surface, #fff)"><div><div style=font-weight:600>QuickBooks Payments</div></div><button class="btn btn-primary">`);
13442
+ var _tmpl$201 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Connected<!> \xB7 `);
13443
+ var _tmpl$267 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 20px;border:1px solid var(--admin-border, #e2e8f0);border-radius:10px;margin-bottom:20px;background:var(--admin-surface, #fff)"><div><div style=font-weight:600>QuickBooks Payments</div></div><button class="btn btn-primary">`);
13350
13444
  var _tmpl$346 = /* @__PURE__ */ template(`<div style="color:var(--admin-text-muted, #64748b);font-size:14px">Not connected \u2014 connect your QuickBooks account to accept payments.`);
13351
13445
  function QuickBooksCard() {
13352
13446
  const [status, {
@@ -13385,7 +13479,7 @@ function QuickBooksCard() {
13385
13479
  return status()?.provider === "quickbooks";
13386
13480
  },
13387
13481
  get children() {
13388
- var _el$ = _tmpl$266(), _el$2 = _el$.firstChild; _el$2.firstChild; var _el$8 = _el$2.nextSibling;
13482
+ var _el$ = _tmpl$267(), _el$2 = _el$.firstChild; _el$2.firstChild; var _el$8 = _el$2.nextSibling;
13389
13483
  insert(_el$2, createComponent(Show, {
13390
13484
  get when() {
13391
13485
  return status()?.connected;
@@ -13394,7 +13488,7 @@ function QuickBooksCard() {
13394
13488
  return _tmpl$346();
13395
13489
  },
13396
13490
  get children() {
13397
- var _el$4 = _tmpl$200(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling; _el$7.nextSibling;
13491
+ var _el$4 = _tmpl$201(), _el$5 = _el$4.firstChild, _el$7 = _el$5.nextSibling; _el$7.nextSibling;
13398
13492
  insert(_el$4, (() => {
13399
13493
  var _c$ = memo(() => !!status()?.realmId);
13400
13494
  return () => _c$() ? ` \xB7 company ${status().realmId}` : "";
@@ -13416,8 +13510,8 @@ function QuickBooksCard() {
13416
13510
  delegateEvents(["click"]);
13417
13511
 
13418
13512
  // src/pages/admin/Payments.tsx
13419
- var _tmpl$201 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Customer</th><th>Amount</th><th>Status</th><th>Transaction ID</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
13420
- var _tmpl$267 = /* @__PURE__ */ template(`<div>`);
13513
+ var _tmpl$208 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Customer</th><th>Amount</th><th>Status</th><th>Transaction ID</th><th style=width:6rem>Actions</th></tr></thead><tbody>`);
13514
+ var _tmpl$268 = /* @__PURE__ */ template(`<div>`);
13421
13515
  var _tmpl$347 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:inherit>`);
13422
13516
  var _tmpl$438 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem> refunded`);
13423
13517
  var _tmpl$533 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
@@ -13480,10 +13574,10 @@ function Payments() {
13480
13574
  }
13481
13575
  }
13482
13576
  if (failed.length > 0) {
13483
- toastError(`Refund succeeded, but the subscription was NOT canceled \u2014 billing will continue. ${failed.join("; ")}`);
13577
+ toastError(`${res?.scheduled ? "Refund scheduled" : "Refund succeeded"}, but the subscription was NOT canceled \u2014 billing will continue. ${failed.join("; ")}`);
13484
13578
  }
13485
13579
  }
13486
- toastSuccess(res?.remainingCents && res.remainingCents > 0 ? `Refunded ${centsToUsd(req.amountCents ?? payment.amountCents)}. ${centsToUsd(res.remainingCents)} still refundable.` : "Refund issued.");
13580
+ toastSuccess(refundToast(res, req.amountCents ?? refundableCents(payment)));
13487
13581
  setRefreshKey((k) => k + 1);
13488
13582
  return {
13489
13583
  ok: true
@@ -13497,9 +13591,9 @@ function Payments() {
13497
13591
  };
13498
13592
  }
13499
13593
  };
13500
- const refundable = (p) => p.status === "succeeded" && p.amountCents - (p.refundedAmountCents ?? 0) > 0;
13594
+ const refundable = (p) => p.status === "succeeded" && refundableCents(p) > 0;
13501
13595
  return (() => {
13502
- var _el$ = _tmpl$267();
13596
+ var _el$ = _tmpl$268();
13503
13597
  insert(_el$, createComponent(PageTitle, {
13504
13598
  children: "Payments"
13505
13599
  }), null);
@@ -13512,7 +13606,7 @@ function Payments() {
13512
13606
  return createComponent(LoadingSpinner, {});
13513
13607
  },
13514
13608
  get children() {
13515
- var _el$2 = _tmpl$201(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling; _el$1.nextSibling; var _el$11 = _el$5.nextSibling;
13609
+ var _el$2 = _tmpl$208(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling; _el$1.nextSibling; var _el$11 = _el$5.nextSibling;
13516
13610
  insert(_el$11, createComponent(For, {
13517
13611
  get each() {
13518
13612
  return payments() ?? [];
@@ -13545,6 +13639,18 @@ function Payments() {
13545
13639
  return _el$17;
13546
13640
  }
13547
13641
  }), null);
13642
+ insert(_el$16, createComponent(ScheduledRefundNote, {
13643
+ get paymentId() {
13644
+ return payment.id;
13645
+ },
13646
+ get scheduledRefundCents() {
13647
+ return payment.scheduledRefundCents;
13648
+ },
13649
+ get scheduledRefundProblem() {
13650
+ return payment.scheduledRefundProblem;
13651
+ },
13652
+ onChanged: () => setRefreshKey((k) => k + 1)
13653
+ }), null);
13548
13654
  insert(_el$19, createComponent(StatusBadge, {
13549
13655
  get status() {
13550
13656
  return payment.status;
@@ -13599,6 +13705,7 @@ function Payments() {
13599
13705
  id: target().payment.id,
13600
13706
  amountCents: target().payment.amountCents,
13601
13707
  refundedAmountCents: target().payment.refundedAmountCents,
13708
+ scheduledRefundCents: target().payment.scheduledRefundCents,
13602
13709
  createdAt: target().payment.date,
13603
13710
  customerEmail: target().payment.customerEmail
13604
13711
  };
@@ -13646,8 +13753,8 @@ function clearApexDrugCache() {
13646
13753
  cache = null;
13647
13754
  inflight = null;
13648
13755
  }
13649
- var _tmpl$208 = /* @__PURE__ */ template(`<div class=app-admin-popover role=dialog tabindex=-1>`);
13650
- var _tmpl$268 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style="font-size:0.7rem;margin:0.75rem 0 0.25rem">Per strength (blank = base price)`);
13756
+ var _tmpl$209 = /* @__PURE__ */ template(`<div class=app-admin-popover role=dialog tabindex=-1>`);
13757
+ var _tmpl$269 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style="font-size:0.7rem;margin:0.75rem 0 0.25rem">Per strength (blank = base price)`);
13651
13758
  var _tmpl$348 = /* @__PURE__ */ template(`<div class=app-admin-popover-rows>`);
13652
13759
  var _tmpl$439 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
13653
13760
  var _tmpl$534 = /* @__PURE__ */ template(`<form><div class=app-admin-popover-title>Price</div><label class=app-admin-label for=admin-cell-price-base></label><input id=admin-cell-price-base type=number step=0.01 min=0 inputmode=decimal class=app-admin-input><div class=app-admin-popover-actions><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Cancel</button><button type=submit class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
@@ -13721,7 +13828,7 @@ function CellPopover(props) {
13721
13828
  return createComponent(Portal, {
13722
13829
  mount,
13723
13830
  get children() {
13724
- var _el$ = _tmpl$208();
13831
+ var _el$ = _tmpl$209();
13725
13832
  _el$.$$click = (e) => e.stopPropagation();
13726
13833
  var _ref$ = card;
13727
13834
  typeof _ref$ === "function" ? use(_ref$, _el$) : card = _el$;
@@ -13854,7 +13961,7 @@ function PricePopover(props) {
13854
13961
  return memo(() => !!perDose())() && rows().length > 0;
13855
13962
  },
13856
13963
  get children() {
13857
- return [_tmpl$268(), (() => {
13964
+ return [_tmpl$269(), (() => {
13858
13965
  var _el$7 = _tmpl$348();
13859
13966
  insert(_el$7, createComponent(For, {
13860
13967
  get each() {
@@ -14012,8 +14119,8 @@ function CategoriesPopover(props) {
14012
14119
  });
14013
14120
  }
14014
14121
  delegateEvents(["click", "input"]);
14015
- var _tmpl$209 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
14016
- var _tmpl$269 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status data-testid=catalog-missing><strong>This product's catalog item is gone.</strong> The prescribing platform no longer lists it, so strengths and pharmacies can't be edited and the product can't be sold. Any prices on file are listed under \u201CNo longer offered\u201D. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Check again`);
14122
+ var _tmpl$270 = /* @__PURE__ */ template(`<div class=app-admin-field-error role=alert>`);
14123
+ var _tmpl$271 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--danger"role=status data-testid=catalog-missing><strong>This product's catalog item is gone.</strong> The prescribing platform no longer lists it, so strengths and pharmacies can't be edited and the product can't be sold. Any prices on file are listed under \u201CNo longer offered\u201D. <button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Check again`);
14017
14124
  var _tmpl$349 = /* @__PURE__ */ template(`<div class="app-admin-banner app-admin-banner--warn"role=status data-testid=catalog-read-only><span><strong>Strengths and pharmacies are read-only right now.</strong> <!> Prices and product details can still be edited.</span><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Try again`);
14018
14125
  var _tmpl$440 = /* @__PURE__ */ template(`<p data-testid=catalog-stored-prices>Showing the prices on file. Which strengths are currently offered can't be checked until the prescribing platform answers.`);
14019
14126
  var _tmpl$535 = /* @__PURE__ */ template(`<ul class=app-admin-catalog-list>`);
@@ -14092,7 +14199,7 @@ function FieldError(props) {
14092
14199
  return props.message;
14093
14200
  },
14094
14201
  get children() {
14095
- var _el$ = _tmpl$209();
14202
+ var _el$ = _tmpl$270();
14096
14203
  insert(_el$, () => props.message);
14097
14204
  effect(() => setAttribute(_el$, "id", props.id));
14098
14205
  return _el$;
@@ -14117,7 +14224,7 @@ function CatalogStatusBanner(props) {
14117
14224
  return state().kind === "missing";
14118
14225
  },
14119
14226
  get children() {
14120
- var _el$2 = _tmpl$269(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling;
14227
+ var _el$2 = _tmpl$271(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling;
14121
14228
  _el$6.$$click = () => void props.editor.reload();
14122
14229
  return _el$2;
14123
14230
  }
@@ -15220,8 +15327,8 @@ function NewCatalogProductDialog(props) {
15220
15327
  delegateEvents(["click", "input"]);
15221
15328
 
15222
15329
  // src/pages/admin/Products.tsx
15223
- var _tmpl$270 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
15224
- var _tmpl$271 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
15330
+ var _tmpl$277 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);margin-bottom:0.5rem">`);
15331
+ var _tmpl$278 = /* @__PURE__ */ template(`<div style=position:relative><img style="width:100%;height:8rem;object-fit:cover;border-radius:var(--app-admin-radius);border:1px solid var(--app-admin-border)"><div style="position:absolute;inset:0;background:rgba(0,0,0,0.6);border-radius:var(--app-admin-radius);display:flex;align-items:center;justify-content:center;gap:0.75rem;opacity:0;transition:opacity 0.15s"><button type=button class="app-admin-btn app-admin-btn-ghost"style=background:rgba(255,255,255,0.15);color:white></button><button type=button class="app-admin-btn app-admin-btn-danger">Remove`);
15225
15332
  var _tmpl$350 = /* @__PURE__ */ template(`<div style=margin-bottom:1.25rem><input type=file accept=image/* style=display:none>`);
15226
15333
  var _tmpl$441 = /* @__PURE__ */ template(`<button type=button style="width:100%;height:8rem;border:2px dashed var(--app-admin-border-strong);border-radius:var(--app-admin-radius);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.5rem;color:var(--app-admin-fg-muted);background:transparent;cursor:pointer;font-size:0.75rem"><span>\u{1F4F7}</span><span>`);
15227
15334
  var _tmpl$537 = /* @__PURE__ */ template(`<option value>`);
@@ -15248,7 +15355,7 @@ var _tmpl$2311 = /* @__PURE__ */ template(`<div style="border-top:1px solid var(
15248
15355
  var _tmpl$2411 = /* @__PURE__ */ template(`<div><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0>Edit Product</h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class="app-admin-text-mono app-admin-text-muted"style="font-size:0.75rem;background:var(--app-admin-surface-light);padding:0.25rem 0.5rem;border-radius:var(--app-admin-radius-sm);margin-bottom:1.5rem">Drug ID: </div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text class=app-admin-input></div><div><label class=app-admin-label>Description</label><textarea rows=3 class=app-admin-input style=resize:vertical></textarea></div><div><label class=app-admin-label for=admin-product-price>Price ($)</label><input id=admin-product-price type=number step=0.01></div><div><label class=app-admin-label>Categories</label></div><div><label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox><span>Featured product</span></label></div><div><label class=app-admin-label>Benefits (one per line)</label><textarea rows=4 class=app-admin-input style=resize:vertical></textarea></div><div class=app-admin-btn-row style=padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button style=flex:1>`);
15249
15356
  var _tmpl$2511 = /* @__PURE__ */ template(`<button type=button style=font-size:0.75rem>`);
15250
15357
  var _tmpl$2611 = /* @__PURE__ */ template(`<input type=text class=app-admin-input>`);
15251
- var _tmpl$277 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>This drug publishes no Apex SKUs; requests are sent by drug id only (the prescriber selects the SKU).`);
15358
+ var _tmpl$279 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>This drug publishes no Apex SKUs; requests are sent by drug id only (the prescriber selects the SKU).`);
15252
15359
  var _tmpl$286 = /* @__PURE__ */ template(`<p style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0>`);
15253
15360
  var _tmpl$295 = /* @__PURE__ */ template(`<select class=app-admin-input title="Bind this strength to a pharmacy SKU"style=flex:1;min-width:0>`);
15254
15361
  var _tmpl$305 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.25rem><span style=font-size:0.8125rem;color:var(--app-admin-fg)></span><div style=display:flex;gap:0.5rem;align-items:center><input type=number step=0.01 class=app-admin-input style=width:7rem>`);
@@ -15389,7 +15496,7 @@ function ThumbnailUpload(props) {
15389
15496
  return error();
15390
15497
  },
15391
15498
  get children() {
15392
- var _el$3 = _tmpl$270();
15499
+ var _el$3 = _tmpl$277();
15393
15500
  insert(_el$3, error);
15394
15501
  return _el$3;
15395
15502
  }
@@ -15408,7 +15515,7 @@ function ThumbnailUpload(props) {
15408
15515
  })();
15409
15516
  },
15410
15517
  get children() {
15411
- var _el$4 = _tmpl$271(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
15518
+ var _el$4 = _tmpl$278(), _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
15412
15519
  _el$6.addEventListener("mouseleave", (e) => e.currentTarget.style.opacity = "0");
15413
15520
  _el$6.addEventListener("mouseenter", (e) => e.currentTarget.style.opacity = "1");
15414
15521
  _el$7.$$click = () => fileInput.click();
@@ -15825,7 +15932,7 @@ function ProductEditPanel(props) {
15825
15932
  return apexSkus().length > 0;
15826
15933
  },
15827
15934
  get fallback() {
15828
- return _tmpl$277();
15935
+ return _tmpl$279();
15829
15936
  },
15830
15937
  get children() {
15831
15938
  return [(() => {
@@ -16879,8 +16986,8 @@ function daysAgo(iso) {
16879
16986
  }
16880
16987
 
16881
16988
  // src/pages/admin/Offers.tsx
16882
- var _tmpl$278 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
16883
- var _tmpl$279 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
16989
+ var _tmpl$280 = /* @__PURE__ */ template(`<div role=alert style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
16990
+ var _tmpl$281 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=font-size:0.8125rem;margin:0>Changes apply to grants issued from now on. Grants already issued keep the terms they were issued with.`);
16884
16991
  var _tmpl$351 = /* @__PURE__ */ template(`<input type=number min=1 max=120 aria-label="Number of further charges"class=app-admin-input style=margin-top:0.5rem>`);
16885
16992
  var _tmpl$444 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"aria-label=Close style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label for=offer-name>Name</label><input id=offer-name type=text maxlength=120 placeholder="$10 off every month"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label for=offer-discount-type>Discount type</label><select id=offer-discount-type class=app-admin-input><option value=fixed>Fixed $ off</option><option value=percent>Percent off</option></select></div><div><label class=app-admin-label for=offer-discount-value></label><input id=offer-discount-value type=number min=0 class=app-admin-input></div></div><div><label class=app-admin-label for=offer-duration>Applies to</label><select id=offer-duration class=app-admin-input><option value=indefinite>Every charge</option><option value=none>First charge only</option><option value=finite>First charge + N further charges</option></select></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(none ticked = any product)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><label style=display:flex;align-items:flex-start;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active<span class=app-admin-text-muted style=display:block;font-size:0.75rem>Off: nobody new is given it. People already holding it keep it.</span></span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
16886
16993
  var _tmpl$538 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
@@ -16986,7 +17093,7 @@ function OfferEditPanel(props) {
16986
17093
  return error();
16987
17094
  },
16988
17095
  get children() {
16989
- var _el$6 = _tmpl$278();
17096
+ var _el$6 = _tmpl$280();
16990
17097
  insert(_el$6, error);
16991
17098
  return _el$6;
16992
17099
  }
@@ -16996,7 +17103,7 @@ function OfferEditPanel(props) {
16996
17103
  return editing();
16997
17104
  },
16998
17105
  get children() {
16999
- return _tmpl$279();
17106
+ return _tmpl$281();
17000
17107
  }
17001
17108
  }), _el$9);
17002
17109
  _el$1.$$input = (e) => setName(e.currentTarget.value);
@@ -17505,8 +17612,8 @@ function Offers() {
17505
17612
  });
17506
17613
  }
17507
17614
  delegateEvents(["click", "input"]);
17508
- var _tmpl$280 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
17509
- var _tmpl$281 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
17615
+ var _tmpl$287 = /* @__PURE__ */ template(`<div style="background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);border:1px solid var(--app-admin-danger-bg-strong);font-size:0.875rem;border-radius:var(--app-admin-radius-sm);padding:0.5rem 0.75rem;margin-bottom:1rem">`);
17616
+ var _tmpl$288 = /* @__PURE__ */ template(`<input type=number min=1 placeholder="Number of rebills"class=app-admin-input style=margin-top:0.5rem>`);
17510
17617
  var _tmpl$355 = /* @__PURE__ */ template(`<div class=app-admin-side-panel style=width:440px><div style=padding:1.5rem><div style=display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem><h2 class=app-admin-heading style=font-size:1.125rem;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div style=display:flex;flex-direction:column;gap:1rem><div><label class=app-admin-label>Name</label><input type=text placeholder="Spring sale"class=app-admin-input></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Discount type</label><select class=app-admin-input><option value=percent>Percent off</option><option value=fixed>Fixed $ off</option></select></div><div><label class=app-admin-label></label><input type=number min=0 class=app-admin-input></div></div><div style="display:grid;grid-template-columns:1fr 1fr;gap:0.75rem"><div><label class=app-admin-label>Start date</label><input type=datetime-local class=app-admin-input></div><div><label class=app-admin-label>End date</label><input type=datetime-local class=app-admin-input></div></div><div><label class=app-admin-label>Products <span style=text-transform:none;letter-spacing:normal;opacity:0.7>(required)</span></label><div class=app-admin-card-soft style=padding:0.5rem;max-height:11rem;overflow-y:auto></div></div><div><label class=app-admin-label>Recurring (subscriptions)</label><select class=app-admin-input><option value=none>Initial charge only</option><option value=finite>First N rebills</option><option value=indefinite>All recurring charges (indefinite)</option></select></div><label style=display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem><input type=checkbox><span style=font-size:0.875rem>Exclusive (cannot stack with other discounts)</span></label><label style=display:flex;align-items:center;gap:0.5rem><input type=checkbox><span style=font-size:0.875rem>Active</span></label><div style=display:flex;gap:0.75rem;padding-top:0.5rem><button type=button class="app-admin-btn app-admin-btn-ghost"style=flex:1>Cancel</button><button type=button class="app-admin-btn app-admin-btn-primary"style=flex:1>`);
17511
17618
  var _tmpl$445 = /* @__PURE__ */ template(`<div style=color:var(--app-admin-fg-muted);font-size:0.875rem;padding:0.5rem>No products available.`);
17512
17619
  var _tmpl$539 = /* @__PURE__ */ template(`<label style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0.5rem;border-radius:var(--app-admin-radius-sm);cursor:pointer"><input type=checkbox><span style=font-size:0.875rem>`);
@@ -17581,7 +17688,7 @@ function SaleEditPanel(props) {
17581
17688
  return error();
17582
17689
  },
17583
17690
  get children() {
17584
- var _el$6 = _tmpl$280();
17691
+ var _el$6 = _tmpl$287();
17585
17692
  insert(_el$6, error);
17586
17693
  return _el$6;
17587
17694
  }
@@ -17620,7 +17727,7 @@ function SaleEditPanel(props) {
17620
17727
  return recurringMode() === "finite";
17621
17728
  },
17622
17729
  get children() {
17623
- var _el$32 = _tmpl$281();
17730
+ var _el$32 = _tmpl$288();
17624
17731
  _el$32.$$input = (e) => setRecurringCharges(parseInt(e.currentTarget.value, 10) || 0);
17625
17732
  effect(() => _el$32.value = recurringCharges());
17626
17733
  return _el$32;
@@ -17798,8 +17905,8 @@ function formatWaiting(iso, now = Date.now()) {
17798
17905
  function isWaitingOnSupport(thread) {
17799
17906
  return thread.lastSender === "customer" && thread.status !== "closed" && thread.status !== "transferred";
17800
17907
  }
17801
- var _tmpl$287 = /* @__PURE__ */ template(`<div><div class=app-admin-text-muted>`);
17802
- var _tmpl$288 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
17908
+ var _tmpl$289 = /* @__PURE__ */ template(`<div><div class=app-admin-text-muted>`);
17909
+ var _tmpl$290 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=flex-shrink:0>`);
17803
17910
  var _tmpl$356 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;gap:0.5rem;padding:0.375rem 0;border-bottom:1px solid var(--app-admin-border-soft);font-size:0.8125rem"><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap>`);
17804
17911
  var _tmpl$446 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col app-admin-support-rail"style=padding:0>`);
17805
17912
  var _tmpl$540 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>Open customer record`);
@@ -17811,7 +17918,7 @@ var _tmpl$023 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=ma
17811
17918
  var _tmpl$1104 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.8125rem>None open.`);
17812
17919
  function RailSection(props) {
17813
17920
  return (() => {
17814
- var _el$ = _tmpl$287(), _el$2 = _el$.firstChild;
17921
+ var _el$ = _tmpl$289(), _el$2 = _el$.firstChild;
17815
17922
  insert(_el$2, () => props.title);
17816
17923
  insert(_el$, () => props.children, null);
17817
17924
  effect((_$p) => style(_el$2, panelSectionHeader, _$p));
@@ -17827,7 +17934,7 @@ function RailRow(props) {
17827
17934
  return props.right;
17828
17935
  },
17829
17936
  get children() {
17830
- var _el$5 = _tmpl$288();
17937
+ var _el$5 = _tmpl$290();
17831
17938
  insert(_el$5, () => props.right);
17832
17939
  return _el$5;
17833
17940
  }
@@ -18027,8 +18134,8 @@ function SupportCustomerRail(props) {
18027
18134
  })();
18028
18135
  }
18029
18136
  delegateEvents(["click"]);
18030
- var _tmpl$289 = /* @__PURE__ */ template(`<div style="padding:0.625rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>`);
18031
- var _tmpl$290 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
18137
+ var _tmpl$291 = /* @__PURE__ */ template(`<div style="padding:0.625rem;border-top:1px solid var(--app-admin-border)"><button type=button class="app-admin-btn app-admin-btn-ghost"style=width:100%>`);
18138
+ var _tmpl$296 = /* @__PURE__ */ template(`<div class="app-admin-card app-admin-support-col"style=padding:0><div class=app-admin-support-scroll data-scrollable>`);
18032
18139
  var _tmpl$357 = /* @__PURE__ */ template(`<span aria-hidden=true style=width:0.5rem;height:0.5rem;border-radius:999px;background:var(--app-admin-primary);flex-shrink:0>`);
18033
18140
  var _tmpl$447 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;font-weight:600;color:var(--app-admin-warning-fg)>Waiting `);
18034
18141
  var _tmpl$541 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--info"style=font-size:0.6875rem>From care team`);
@@ -18036,7 +18143,7 @@ var _tmpl$638 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style
18036
18143
  var _tmpl$735 = /* @__PURE__ */ template(`<button type=button class=app-admin-support-row><div style=display:flex;align-items:center;gap:0.5rem><span style=flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></span><span class=app-admin-text-muted style=font-size:0.75rem;flex-shrink:0></span></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.1875rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap></div><div style=display:flex;align-items:center;gap:0.3125rem;margin-top:0.375rem;flex-wrap:wrap><span style=flex:1>`);
18037
18144
  function SupportQueue(props) {
18038
18145
  return (() => {
18039
- var _el$ = _tmpl$290(), _el$2 = _el$.firstChild;
18146
+ var _el$ = _tmpl$296(), _el$2 = _el$.firstChild;
18040
18147
  insert(_el$2, createComponent(Show, {
18041
18148
  get when() {
18042
18149
  return !props.loading;
@@ -18136,7 +18243,7 @@ function SupportQueue(props) {
18136
18243
  return props.hasMore;
18137
18244
  },
18138
18245
  get children() {
18139
- var _el$3 = _tmpl$289(), _el$4 = _el$3.firstChild;
18246
+ var _el$3 = _tmpl$291(), _el$4 = _el$3.firstChild;
18140
18247
  _el$4.$$click = () => props.onLoadMore();
18141
18248
  insert(_el$4, () => props.loadingMore ? "Loading\u2026" : "Load more");
18142
18249
  effect(() => _el$4.disabled = props.loadingMore);
@@ -18147,8 +18254,8 @@ function SupportQueue(props) {
18147
18254
  })();
18148
18255
  }
18149
18256
  delegateEvents(["click"]);
18150
- var _tmpl$291 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.8 stroke-linecap=round stroke-linejoin=round aria-hidden=true style=vertical-align:-2px;margin-right:0.375rem><path d="M21.4 11.05 12.25 20.2a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.67 3.67 0 1 1 5.19 5.19l-9.2 9.19a1.83 1.83 0 1 1-2.59-2.59l8.49-8.48">`);
18151
- var _tmpl$296 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
18257
+ var _tmpl$297 = /* @__PURE__ */ template(`<svg width=14 height=14 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=1.8 stroke-linecap=round stroke-linejoin=round aria-hidden=true style=vertical-align:-2px;margin-right:0.375rem><path d="M21.4 11.05 12.25 20.2a5.5 5.5 0 0 1-7.78-7.78l9.19-9.19a3.67 3.67 0 1 1 5.19 5.19l-9.2 9.19a1.83 1.83 0 1 1-2.59-2.59l8.49-8.48">`);
18258
+ var _tmpl$298 = /* @__PURE__ */ template(`<button type=button style=display:block;padding:0;border:none;background:none;cursor:pointer;margin-top:0.5rem><img loading=lazy style=max-width:100%;max-height:15rem;border-radius:0.5rem;display:block>`, true, false, false);
18152
18259
  var _tmpl$358 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost"style=margin-top:0.5rem;font-size:0.75rem>`);
18153
18260
  var _tmpl$448 = /* @__PURE__ */ template(`<p style=margin:0;white-space:pre-wrap;line-height:1.5>`);
18154
18261
  var _tmpl$543 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.75rem 0.875rem;margin-bottom:0.5rem"><div style=display:flex;justify-content:space-between;gap:1rem;margin-bottom:0.25rem><strong style=font-size:0.75rem></strong><span class=app-admin-text-muted style=font-size:0.75rem>`);
@@ -18385,7 +18492,7 @@ ${body}` : body);
18385
18492
  if (url) window.open(url, "_blank", "noopener");
18386
18493
  else setError("Could not open that attachment.");
18387
18494
  }
18388
- const ClipIcon = () => _tmpl$291();
18495
+ const ClipIcon = () => _tmpl$297();
18389
18496
  const Attachment = (p) => {
18390
18497
  const isImage = () => p.attachment.mimeType.startsWith("image/");
18391
18498
  const [url, setUrl] = createSignal(null);
@@ -18409,7 +18516,7 @@ ${body}` : body);
18409
18516
  })();
18410
18517
  },
18411
18518
  get children() {
18412
- var _el$2 = _tmpl$296(), _el$3 = _el$2.firstChild;
18519
+ var _el$2 = _tmpl$298(), _el$3 = _el$2.firstChild;
18413
18520
  _el$2.$$click = () => openAttachment(p.attachment.id);
18414
18521
  _el$3.addEventListener("error", () => {
18415
18522
  if (retried) {
@@ -18742,8 +18849,8 @@ ${body}` : body);
18742
18849
  delegateEvents(["click", "input", "keydown"]);
18743
18850
 
18744
18851
  // src/pages/admin/Support.tsx
18745
- var _tmpl$297 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
18746
- var _tmpl$298 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning"> awaiting a reply`);
18852
+ var _tmpl$299 = /* @__PURE__ */ template(`<div class=app-admin-support><div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap;margin-bottom:0.75rem></div><div style=display:flex;gap:0.5rem;margin-bottom:0.5rem;flex-wrap:wrap></div><div style=display:flex;gap:0.375rem;margin-bottom:1rem;flex-wrap:wrap></div><div class=app-admin-support-grid>`);
18853
+ var _tmpl$2100 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--warning"> awaiting a reply`);
18747
18854
  var _tmpl$359 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> open`);
18748
18855
  var _tmpl$449 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"> all time`);
18749
18856
  var _tmpl$544 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>Longest wait `);
@@ -18888,7 +18995,7 @@ function Support(props = {}) {
18888
18995
  return formatWaiting(oldest.lastMessageAt);
18889
18996
  };
18890
18997
  return (() => {
18891
- var _el$ = _tmpl$297(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
18998
+ var _el$ = _tmpl$299(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling;
18892
18999
  insert(_el$, createComponent(PageTitle, {
18893
19000
  subtitle: "Customer messages from the member portal",
18894
19001
  children: "Support"
@@ -18898,7 +19005,7 @@ function Support(props = {}) {
18898
19005
  return stats();
18899
19006
  },
18900
19007
  children: (s) => [(() => {
18901
- var _el$6 = _tmpl$298(), _el$7 = _el$6.firstChild;
19008
+ var _el$6 = _tmpl$2100(), _el$7 = _el$6.firstChild;
18902
19009
  insert(_el$6, () => s().unread, _el$7);
18903
19010
  return _el$6;
18904
19011
  })(), (() => {
@@ -18986,8 +19093,8 @@ function Support(props = {}) {
18986
19093
  })();
18987
19094
  }
18988
19095
  delegateEvents(["click"]);
18989
- var _tmpl$299 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
18990
- var _tmpl$2100 = /* @__PURE__ */ template(`<div>`);
19096
+ var _tmpl$300 = /* @__PURE__ */ template(`<div class=app-admin-card style=overflow:hidden><table class=app-admin-table><thead><tr><th>Date</th><th>Provider</th><th>Event Type</th><th>Status</th><th style=width:2.5rem></th></tr></thead><tbody>`);
19097
+ var _tmpl$2101 = /* @__PURE__ */ template(`<div>`);
18991
19098
  var _tmpl$360 = /* @__PURE__ */ template(`<tr class=is-clickable><td data-label=Date class=app-admin-text-muted></td><td data-label=Provider style=font-weight:500></td><td data-label="Event type"class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem></td><td data-label=Status></td><td class=app-admin-text-muted style=font-size:0.75rem><span style="display:inline-block;transition:transform 0.15s">\u25B6`);
18992
19099
  var _tmpl$450 = /* @__PURE__ */ template(`<tr><td colspan=5><pre class="app-admin-text-mono app-admin-text-muted"style=font-size:0.75rem;background:var(--app-admin-surface-light);border-radius:var(--app-admin-radius-sm);padding:1rem;overflow-x:auto;white-space:pre-wrap;word-break:break-all;margin:0>`);
18993
19100
  function Webhooks() {
@@ -19006,7 +19113,7 @@ function Webhooks() {
19006
19113
  setExpanded((prev) => prev === id ? null : id);
19007
19114
  };
19008
19115
  return (() => {
19009
- var _el$ = _tmpl$2100();
19116
+ var _el$ = _tmpl$2101();
19010
19117
  insert(_el$, createComponent(PageTitle, {
19011
19118
  children: "Webhook Events"
19012
19119
  }), null);
@@ -19018,7 +19125,7 @@ function Webhooks() {
19018
19125
  return createComponent(LoadingSpinner, {});
19019
19126
  },
19020
19127
  get children() {
19021
- var _el$2 = _tmpl$299(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
19128
+ var _el$2 = _tmpl$300(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling; _el$9.nextSibling; var _el$1 = _el$4.nextSibling;
19022
19129
  insert(_el$1, createComponent(For, {
19023
19130
  get each() {
19024
19131
  return webhooks() ?? [];
@@ -19269,8 +19376,8 @@ function buildEmailBodyExtensions(lookup) {
19269
19376
  }
19270
19377
 
19271
19378
  // src/pages/admin/EmailBodyEditor.tsx
19272
- var _tmpl$300 = /* @__PURE__ */ template(`<button type=button>`);
19273
- var _tmpl$2101 = /* @__PURE__ */ template(`<strong>B`);
19379
+ var _tmpl$301 = /* @__PURE__ */ template(`<button type=button>`);
19380
+ var _tmpl$2102 = /* @__PURE__ */ template(`<strong>B`);
19274
19381
  var _tmpl$361 = /* @__PURE__ */ template(`<em>I`);
19275
19382
  var _tmpl$451 = /* @__PURE__ */ template(`<u>U`);
19276
19383
  var _tmpl$545 = /* @__PURE__ */ template(`<div class=app-admin-email-menu role=menu aria-label=Placeholders>`);
@@ -19534,7 +19641,7 @@ function EmailBodyEditor(props) {
19534
19641
  moveFocus(items, document.activeElement, e.key === "ArrowRight" ? 1 : -1);
19535
19642
  };
19536
19643
  const ToolButton = (p) => (() => {
19537
- var _el$ = _tmpl$300();
19644
+ var _el$ = _tmpl$301();
19538
19645
  addEventListener(_el$, "click", p.onClick, true);
19539
19646
  _el$.$$mousedown = (e) => e.preventDefault();
19540
19647
  insert(_el$, () => p.children);
@@ -19561,7 +19668,7 @@ function EmailBodyEditor(props) {
19561
19668
  pressed: () => isActive("bold"),
19562
19669
  onClick: () => run((ed) => ed.chain().focus().toggleBold().run()),
19563
19670
  get children() {
19564
- return _tmpl$2101();
19671
+ return _tmpl$2102();
19565
19672
  }
19566
19673
  }), _el$7);
19567
19674
  insert(_el$3, createComponent(ToolButton, {
@@ -19758,8 +19865,8 @@ function EmailBodyEditor(props) {
19758
19865
  delegateEvents(["mousedown", "click", "keydown", "input"]);
19759
19866
 
19760
19867
  // src/pages/admin/EmailTextEditor.tsx
19761
- var _tmpl$301 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
19762
- var _tmpl$2102 = /* @__PURE__ */ template(`<div style="padding:0.75rem 0.875rem;background:var(--app-admin-info-bg);border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm)"><p style=font-size:0.75rem;font-weight:600;margin-bottom:0.5rem>Placeholders<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; replaced with the real value when the email is sent. Click the subject or the body, then a placeholder to insert it.</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
19868
+ var _tmpl$306 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.5rem 0 0">`);
19869
+ var _tmpl$2103 = /* @__PURE__ */ template(`<div style="padding:0.75rem 0.875rem;background:var(--app-admin-info-bg);border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm)"><p style=font-size:0.75rem;font-weight:600;margin-bottom:0.5rem>Placeholders<span style=font-weight:400;color:var(--app-admin-fg-muted)> &mdash; replaced with the real value when the email is sent. Click the subject or the body, then a placeholder to insert it.</span></p><div style=display:flex;flex-wrap:wrap;gap:0.375rem>`);
19763
19870
  var _tmpl$365 = /* @__PURE__ */ template(`<p class=app-admin-field-error role=alert>This email is too long to save (<!> of <!> characters, formatting included). Shorten it.`);
19764
19871
  var _tmpl$454 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.25rem><div><label class=app-admin-label>Subject</label><input type=text aria-label=Subject class=app-admin-input><p style=font-size:0.75rem;color:var(--app-admin-fg-subtle);margin-top:0.25rem>/</p></div><div><span class=app-admin-label>Body`);
19765
19872
  var _tmpl$546 = /* @__PURE__ */ template(`<button type=button class=app-admin-email-token-btn>`);
@@ -19800,7 +19907,7 @@ function TemplateTextEditor(props) {
19800
19907
  return props.placeholders.length > 0;
19801
19908
  },
19802
19909
  get children() {
19803
- var _el$2 = _tmpl$2102(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling; var _el$6 = _el$3.nextSibling;
19910
+ var _el$2 = _tmpl$2103(), _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling; var _el$6 = _el$3.nextSibling;
19804
19911
  insert(_el$6, createComponent(For, {
19805
19912
  get each() {
19806
19913
  return props.placeholders;
@@ -19832,7 +19939,7 @@ function TemplateTextEditor(props) {
19832
19939
  return props.note;
19833
19940
  },
19834
19941
  get children() {
19835
- var _el$7 = _tmpl$301();
19942
+ var _el$7 = _tmpl$306();
19836
19943
  insert(_el$7, () => props.note);
19837
19944
  return _el$7;
19838
19945
  }
@@ -19882,8 +19989,8 @@ function TemplateTextEditor(props) {
19882
19989
  delegateEvents(["input", "mousedown", "click"]);
19883
19990
 
19884
19991
  // src/pages/admin/EmailTemplates.tsx
19885
- var _tmpl$306 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
19886
- var _tmpl$2103 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:0.4rem 0.5rem;font-size:0.7rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;border:none;background:transparent;color:var(--app-admin-fg-subtle);cursor:pointer"><span></span><span style=font-size:0.65rem>`);
19992
+ var _tmpl$307 = /* @__PURE__ */ template(`<button type=button style="display:block;width:100%;text-align:left;padding:0.5rem 0.75rem;font-size:0.8rem;font-weight:500;border:none;border-radius:var(--app-admin-radius-sm);cursor:pointer;transition:color 0.15s, background 0.15s">`);
19993
+ var _tmpl$2104 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:0.4rem 0.5rem;font-size:0.7rem;font-weight:700;letter-spacing:0.03em;text-transform:uppercase;border:none;background:transparent;color:var(--app-admin-fg-subtle);cursor:pointer"><span></span><span style=font-size:0.65rem>`);
19887
19994
  var _tmpl$366 = /* @__PURE__ */ template(`<div style=display:flex;gap:1.5rem;align-items:flex-start><div class=app-admin-card style=min-width:14rem;max-width:14rem;padding:0.5rem;flex-shrink:0;max-height:70vh;overflow-y:auto;position:sticky;top:1rem><div style=margin-bottom:0.25rem>`);
19888
19995
  var _tmpl$455 = /* @__PURE__ */ template(`<div>`);
19889
19996
  var _tmpl$547 = /* @__PURE__ */ template(`<div class=app-admin-empty>No email templates configured.`);
@@ -20216,7 +20323,7 @@ function EmailTemplates(props = {}) {
20216
20323
  }
20217
20324
  };
20218
20325
  const navButton = (opts) => (() => {
20219
- var _el$ = _tmpl$306();
20326
+ var _el$ = _tmpl$307();
20220
20327
  addEventListener(_el$, "click", opts.onClick, true);
20221
20328
  insert(_el$, () => opts.label);
20222
20329
  effect((_p$) => {
@@ -20231,7 +20338,7 @@ function EmailTemplates(props = {}) {
20231
20338
  return _el$;
20232
20339
  })();
20233
20340
  const groupHeader = (label3) => (() => {
20234
- var _el$2 = _tmpl$2103(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
20341
+ var _el$2 = _tmpl$2104(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
20235
20342
  _el$2.$$click = () => toggleCategory(label3);
20236
20343
  insert(_el$3, label3);
20237
20344
  insert(_el$4, () => collapsed()[label3] ? "\u25B8" : "\u25BE");
@@ -20421,8 +20528,8 @@ function EmailTemplates(props = {}) {
20421
20528
  })();
20422
20529
  }
20423
20530
  delegateEvents(["click", "input"]);
20424
- var _tmpl$307 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
20425
- var _tmpl$2104 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th></th></tr></thead><tbody>`);
20531
+ var _tmpl$308 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.`);
20532
+ var _tmpl$2105 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Waiting</th><th>Step</th><th></th></tr></thead><tbody>`);
20426
20533
  var _tmpl$367 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
20427
20534
  var _tmpl$456 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
20428
20535
  var _tmpl$548 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step> of </td><td class=app-admin-table-cell--end><div style=display:flex;gap:0.375rem;justify-content:flex-end><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm"></button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
@@ -20452,7 +20559,7 @@ var _tmpl$2612 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admi
20452
20559
  var _tmpl$2710 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Archive`);
20453
20560
  var _tmpl$2810 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">`);
20454
20561
  var _tmpl$2910 = /* @__PURE__ */ template(`<span style=margin-left:0.375rem;opacity:0.7>`);
20455
- var _tmpl$308 = /* @__PURE__ */ template(`<button type=button role=tab style="padding:0.625rem 1rem;margin-bottom:-1px;font-size:0.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-bottom:2px solid;background:none;border-top:none;border-left:none;border-right:none;cursor:pointer">`);
20562
+ var _tmpl$309 = /* @__PURE__ */ template(`<button type=button role=tab style="padding:0.625rem 1rem;margin-bottom:-1px;font-size:0.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;border-bottom:2px solid;background:none;border-top:none;border-left:none;border-right:none;cursor:pointer">`);
20456
20563
  var _tmpl$3113 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Add step`);
20457
20564
  var _tmpl$3212 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Email \u203A Templates`);
20458
20565
  var _tmpl$3312 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;display:flex;gap:0.75rem;align-items:center;flex-wrap:wrap"><span class=app-admin-text-muted style=font-size:0.8125rem>A step sends a marketing template. Create one under Email \u203A Templates first.`);
@@ -20567,7 +20674,7 @@ function SequenceQueue(props) {
20567
20674
  return !props.sequence.autoSend;
20568
20675
  },
20569
20676
  get children() {
20570
- return _tmpl$307();
20677
+ return _tmpl$308();
20571
20678
  }
20572
20679
  }), createComponent(Show, {
20573
20680
  get when() {
@@ -20589,7 +20696,7 @@ function SequenceQueue(props) {
20589
20696
  });
20590
20697
  },
20591
20698
  get children() {
20592
- var _el$2 = _tmpl$2104(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
20699
+ var _el$2 = _tmpl$2105(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
20593
20700
  insert(_el$4, createComponent(For, {
20594
20701
  get each() {
20595
20702
  return rows();
@@ -21011,7 +21118,7 @@ function SequenceEditor(props) {
21011
21118
  return tabKeys();
21012
21119
  },
21013
21120
  children: (key) => (() => {
21014
- var _el$90 = _tmpl$308();
21121
+ var _el$90 = _tmpl$309();
21015
21122
  _el$90.$$click = () => setTab(key);
21016
21123
  insert(_el$90, () => TAB_LABEL[key], null);
21017
21124
  insert(_el$90, createComponent(Show, {
@@ -21561,9 +21668,9 @@ function Sequences() {
21561
21668
  delegateEvents(["click", "input"]);
21562
21669
 
21563
21670
  // src/pages/admin/Funnel.tsx
21564
- var _tmpl$309 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
21565
- var _tmpl$2105 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>`);
21566
- var _tmpl$369 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center;margin-top:0.25rem><input type=checkbox>Savings program only (<!>)`);
21671
+ var _tmpl$369 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
21672
+ var _tmpl$2106 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>`);
21673
+ var _tmpl$370 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center;margin-top:0.25rem><input type=checkbox>Savings program only (<!>)`);
21567
21674
  var _tmpl$458 = /* @__PURE__ */ template(`<th>Account`);
21568
21675
  var _tmpl$549 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;padding:0.625rem 1.25rem;margin:0">Showing the 50 most recent of <!>.`);
21569
21676
  var _tmpl$645 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;display:grid;gap:0.5rem"></div><div style="padding:0.5rem 1.25rem 0.75rem;border-top:1px solid var(--app-admin-border-soft)"></div><table class=app-admin-table><thead><tr><th style=width:2rem><input type=checkbox aria-label="Select all"></th><th>Person</th><th>Where they stopped</th><th>Since</th></tr></thead><tbody>`);
@@ -21582,14 +21689,14 @@ var _tmpl$1616 = /* @__PURE__ */ template(`<span style=font-size:0.6875rem;color
21582
21689
  var _tmpl$1716 = /* @__PURE__ */ template(`<div style=flex:1;display:flex;flex-direction:column;align-items:center;gap:0.25rem;height:100%;justify-content:flex-end><div style="width:100%;max-width:1.75rem;border-radius:4px 4px 0 0"></div><span style=font-size:0.625rem;color:var(--app-admin-fg-subtle)>`);
21583
21690
  function CardHeader(props) {
21584
21691
  return (() => {
21585
- var _el$ = _tmpl$2105(), _el$2 = _el$.firstChild;
21692
+ var _el$ = _tmpl$2106(), _el$2 = _el$.firstChild;
21586
21693
  insert(_el$2, () => props.title);
21587
21694
  insert(_el$, createComponent(Show, {
21588
21695
  get when() {
21589
21696
  return props.note;
21590
21697
  },
21591
21698
  get children() {
21592
- var _el$3 = _tmpl$309();
21699
+ var _el$3 = _tmpl$369();
21593
21700
  insert(_el$3, () => props.note);
21594
21701
  return _el$3;
21595
21702
  }
@@ -21675,7 +21782,7 @@ function SegmentSection(props) {
21675
21782
  return hasSavings();
21676
21783
  },
21677
21784
  get children() {
21678
- var _el$6 = _tmpl$369(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
21785
+ var _el$6 = _tmpl$370(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
21679
21786
  _el$7.addEventListener("change", (e) => setSavingsOnly(e.currentTarget.checked));
21680
21787
  insert(_el$6, () => props.summary.savingsMembers, _el$0);
21681
21788
  effect(() => _el$7.checked = savingsOnly());
@@ -21919,9 +22026,9 @@ function Funnel() {
21919
22026
  })();
21920
22027
  }
21921
22028
  delegateEvents(["click"]);
21922
- var _tmpl$370 = /* @__PURE__ */ template(`<div>`);
21923
- var _tmpl$2106 = /* @__PURE__ */ template(`<div style=min-width:7.5rem><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em></div><div class=app-admin-heading style=font-size:1.375rem;font-weight:600;line-height:1.3>`);
21924
- var _tmpl$371 = /* @__PURE__ */ template(`<div style="display:flex;flex-wrap:wrap;gap:1.25rem 2rem;margin-bottom:1.25rem">`);
22029
+ var _tmpl$371 = /* @__PURE__ */ template(`<div>`);
22030
+ var _tmpl$2107 = /* @__PURE__ */ template(`<div style=min-width:7.5rem><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em></div><div class=app-admin-heading style=font-size:1.375rem;font-weight:600;line-height:1.3>`);
22031
+ var _tmpl$375 = /* @__PURE__ */ template(`<div style="display:flex;flex-wrap:wrap;gap:1.25rem 2rem;margin-bottom:1.25rem">`);
21925
22032
  var _tmpl$459 = /* @__PURE__ */ template(`<table class=app-admin-table style=margin-bottom:1rem><thead><tr><th>Email</th><th>Sent</th><th>Link followed</th><th>Bought after this email</th><th>Unsubscribed after it</th></tr></thead><tbody>`);
21926
22033
  var _tmpl$550 = /* @__PURE__ */ template(`<div> of the <!> bought before any email reached them, so no email is credited above.`);
21927
22034
  var _tmpl$646 = /* @__PURE__ */ template(`<div>No longer in it: <!>.`);
@@ -21959,7 +22066,7 @@ function money(cents) {
21959
22066
  }
21960
22067
  function Figure(props) {
21961
22068
  return (() => {
21962
- var _el$ = _tmpl$2106(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
22069
+ var _el$ = _tmpl$2107(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
21963
22070
  insert(_el$2, () => props.label);
21964
22071
  insert(_el$3, () => props.value);
21965
22072
  insert(_el$, createComponent(Show, {
@@ -21967,7 +22074,7 @@ function Figure(props) {
21967
22074
  return props.note;
21968
22075
  },
21969
22076
  get children() {
21970
- var _el$4 = _tmpl$370();
22077
+ var _el$4 = _tmpl$371();
21971
22078
  insert(_el$4, () => props.note);
21972
22079
  effect((_$p) => style(_el$4, muted, _$p));
21973
22080
  return _el$4;
@@ -22013,7 +22120,7 @@ function SequenceCard(props) {
22013
22120
  },
22014
22121
  get children() {
22015
22122
  return [(() => {
22016
- var _el$5 = _tmpl$371();
22123
+ var _el$5 = _tmpl$375();
22017
22124
  insert(_el$5, createComponent(Figure, {
22018
22125
  label: "Enrolled",
22019
22126
  get value() {
@@ -22234,7 +22341,7 @@ function SequenceResults() {
22234
22341
  }] = createResource(() => apiFetch("/admin/funnel/report"));
22235
22342
  const days = () => report()?.sequences[0]?.attributionDays ?? 30;
22236
22343
  return (() => {
22237
- var _el$62 = _tmpl$370();
22344
+ var _el$62 = _tmpl$371();
22238
22345
  insert(_el$62, createComponent(PageTitle, {
22239
22346
  subtitle: "What each sequence has achieved. \u201CBought\u201D means bought after being enrolled; it does not show the email was the reason.",
22240
22347
  children: "Results"
@@ -22313,9 +22420,9 @@ delegateEvents(["click"]);
22313
22420
  var [supportChannelMode, setSupportChannelMode] = createSignal(null);
22314
22421
 
22315
22422
  // src/pages/admin/EmailNotifications.tsx
22316
- var _tmpl$375 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
22317
- var _tmpl$2107 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center;gap:1rem"><div><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2></div></div><div style="padding:1rem 1.25rem;display:grid;gap:0.875rem">`);
22318
- var _tmpl$376 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
22423
+ var _tmpl$376 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
22424
+ var _tmpl$2108 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center;gap:1rem"><div><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2></div></div><div style="padding:1rem 1.25rem;display:grid;gap:0.875rem">`);
22425
+ var _tmpl$377 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
22319
22426
  var _tmpl$460 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
22320
22427
  var _tmpl$551 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Recipients</div><div style=display:flex;flex-wrap:wrap;gap:0.375rem;margin-bottom:0.5rem></div><div style=display:flex;gap:0.5rem;max-width:28rem><input type=email class=app-admin-input placeholder=admin@example.com aria-label="Add recipient"><button type=button class="app-admin-btn app-admin-btn-sm">Add`);
22321
22428
  var _tmpl$647 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.375rem>Send a copy for</div><div style="display:grid;grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr));gap:0.375rem 1rem">`);
@@ -22338,14 +22445,14 @@ var label2 = {
22338
22445
  };
22339
22446
  function Card(props) {
22340
22447
  return (() => {
22341
- var _el$ = _tmpl$2107(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$6 = _el$2.nextSibling;
22448
+ var _el$ = _tmpl$2108(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$6 = _el$2.nextSibling;
22342
22449
  insert(_el$4, () => props.title);
22343
22450
  insert(_el$3, createComponent(Show, {
22344
22451
  get when() {
22345
22452
  return props.note;
22346
22453
  },
22347
22454
  get children() {
22348
- var _el$5 = _tmpl$375();
22455
+ var _el$5 = _tmpl$376();
22349
22456
  insert(_el$5, () => props.note);
22350
22457
  effect((_$p) => style(_el$5, {
22351
22458
  ...label2
@@ -22360,7 +22467,7 @@ function Card(props) {
22360
22467
  }
22361
22468
  function Toggle(props) {
22362
22469
  return (() => {
22363
- var _el$7 = _tmpl$376(), _el$8 = _el$7.firstChild;
22470
+ var _el$7 = _tmpl$377(), _el$8 = _el$7.firstChild;
22364
22471
  _el$8.addEventListener("change", (e) => props.onChange(e.currentTarget.checked));
22365
22472
  insert(_el$7, () => props.label, null);
22366
22473
  effect(() => _el$8.checked = props.checked);
@@ -22775,9 +22882,9 @@ function EmailNotifications() {
22775
22882
  })();
22776
22883
  }
22777
22884
  delegateEvents(["click", "input", "keydown"]);
22778
- var _tmpl$377 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2><p style="font-size:0.75rem;margin:0.25rem 0 0"></p></div><div>`);
22779
- var _tmpl$2108 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;margin-top:0.25rem>`);
22780
- var _tmpl$378 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><div style=min-width:0><div style=font-size:0.875rem;font-weight:600></div><div style=margin-top:0.125rem></div></div><div style=flex-shrink:0>`);
22885
+ var _tmpl$378 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2><p style="font-size:0.75rem;margin:0.25rem 0 0"></p></div><div>`);
22886
+ var _tmpl$2109 = /* @__PURE__ */ template(`<div style=font-size:0.75rem;margin-top:0.25rem>`);
22887
+ var _tmpl$379 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft)"><div style=min-width:0><div style=font-size:0.875rem;font-weight:600></div><div style=margin-top:0.125rem></div></div><div style=flex-shrink:0>`);
22781
22888
  var _tmpl$461 = /* @__PURE__ */ template(`<div class=app-admin-notice role=alert style=margin-top:1.25rem>Features could not be loaded. `);
22782
22889
  var _tmpl$553 = /* @__PURE__ */ template(`<div>`);
22783
22890
  var _tmpl$648 = /* @__PURE__ */ template(`<button type=button role=switch class=app-admin-toggle><span class=app-admin-toggle__knob>`);
@@ -22802,7 +22909,7 @@ function formatDate2(iso) {
22802
22909
  }
22803
22910
  function Card2(props) {
22804
22911
  return (() => {
22805
- var _el$ = _tmpl$377(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
22912
+ var _el$ = _tmpl$378(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling;
22806
22913
  insert(_el$3, () => props.title);
22807
22914
  insert(_el$4, () => props.note);
22808
22915
  insert(_el$5, () => props.children);
@@ -22814,7 +22921,7 @@ function Card2(props) {
22814
22921
  }
22815
22922
  function Row(props) {
22816
22923
  return (() => {
22817
- var _el$6 = _tmpl$378(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$1 = _el$7.nextSibling;
22924
+ var _el$6 = _tmpl$379(), _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$1 = _el$7.nextSibling;
22818
22925
  insert(_el$8, () => props.feature.label);
22819
22926
  insert(_el$9, () => props.feature.description);
22820
22927
  insert(_el$7, createComponent(Show, {
@@ -22822,7 +22929,7 @@ function Row(props) {
22822
22929
  return props.note;
22823
22930
  },
22824
22931
  get children() {
22825
- var _el$0 = _tmpl$2108();
22932
+ var _el$0 = _tmpl$2109();
22826
22933
  insert(_el$0, () => props.note);
22827
22934
  effect((_$p) => style(_el$0, {
22828
22935
  ...muted2
@@ -23093,9 +23200,9 @@ function Features() {
23093
23200
  delegateEvents(["click", "input"]);
23094
23201
 
23095
23202
  // src/pages/AdminDashboard.tsx
23096
- var _tmpl$379 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
23097
- var _tmpl$2109 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-admin-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
23098
- var _tmpl$380 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
23203
+ var _tmpl$380 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
23204
+ var _tmpl$2119 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-admin-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
23205
+ var _tmpl$381 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"style=position:sticky><div class=app-admin-shell-header><button type=button class=app-admin-shell-menu-trigger aria-label="Open admin menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-admin-shell-header-title></span></div><div class=app-admin-backdrop aria-hidden=true></div><aside class=app-admin-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Admin Panel</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-admin-content>`);
23099
23206
  var _tmpl$464 = /* @__PURE__ */ template(`<h3 style="font-size:0.625rem;font-weight:600;color:var(--app-admin-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:1rem 0 0.375rem;padding:0 0.75rem">`);
23100
23207
  var _tmpl$554 = /* @__PURE__ */ template(`<div role=alert style="margin:1rem 0;padding:1.25rem 1.5rem;border:1px solid var(--app-admin-border);border-radius:var(--app-admin-radius-sm);background:var(--app-admin-surface);color:var(--app-admin-fg)"><div style=font-weight:600;margin-bottom:0.375rem>This section failed to load</div><div style=font-size:0.875rem;color:var(--app-admin-fg-muted);margin-bottom:1rem;word-break:break-word></div><button type=button style="padding:0.5rem 0.875rem;border-radius:var(--app-admin-radius-sm);border:1px solid var(--app-admin-border);background:var(--app-admin-primary-soft);color:var(--app-admin-primary-soft-fg);font-size:0.875rem;font-weight:500;cursor:pointer">Try again`);
23101
23208
  var _tmpl$649 = /* @__PURE__ */ template(`<div class=app-admin-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-admin-bg)><div role=status aria-label="Loading admin"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-admin-border);border-top-color:var(--app-admin-primary);animation:app-admin-gate-spin 0.8s linear infinite"></div><style>@keyframes app-admin-gate-spin { to { transform: rotate(360deg); } }`);
@@ -23230,14 +23337,14 @@ function AdminDashboard(props) {
23230
23337
  };
23231
23338
  const topOffset = () => props.topOffset ?? "0px";
23232
23339
  const TabButton = (btnProps) => (() => {
23233
- var _el$ = _tmpl$2109();
23340
+ var _el$ = _tmpl$2119();
23234
23341
  _el$.$$click = () => handleTabClick(btnProps.tab);
23235
23342
  insert(_el$, createComponent(Show, {
23236
23343
  get when() {
23237
23344
  return props.tabIcons?.[btnProps.tab];
23238
23345
  },
23239
23346
  get children() {
23240
- var _el$2 = _tmpl$379();
23347
+ var _el$2 = _tmpl$380();
23241
23348
  effect(() => className(_el$2, props.tabIcons[btnProps.tab]));
23242
23349
  return _el$2;
23243
23350
  }
@@ -23269,7 +23376,7 @@ function AdminDashboard(props) {
23269
23376
  return createComponent(AdminNavContext.Provider, {
23270
23377
  value: adminNav,
23271
23378
  get children() {
23272
- var _el$3 = _tmpl$380(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
23379
+ var _el$3 = _tmpl$381(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$8.nextSibling;
23273
23380
  _el$5.$$click = () => setDrawerOpen(true);
23274
23381
  insert(_el$6, () => TAB_LABELS[currentTab()]);
23275
23382
  _el$7.$$click = () => setDrawerOpen(false);
@@ -23607,9 +23714,9 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
23607
23714
  }
23608
23715
  return "overview";
23609
23716
  }
23610
- var _tmpl$381 = /* @__PURE__ */ template(`<div class=app-admin-modal-backdrop><div class="app-admin-card app-admin-modal"style=max-width:32rem><div class=app-admin-modal-header><h3 class=app-admin-heading style=font-size:1rem;margin:0>Customer dashboard preview</h3><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class=app-admin-modal-body><div style="padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-warning-bg);color:var(--app-admin-warning-fg);font-size:0.75rem;font-weight:500">Viewing as <!> \u2014 read-only`);
23611
- var _tmpl$2119 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;font-weight:500"><span></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.75rem">Retry`);
23612
- var _tmpl$385 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
23717
+ var _tmpl$385 = /* @__PURE__ */ template(`<div class=app-admin-modal-backdrop><div class="app-admin-card app-admin-modal"style=max-width:32rem><div class=app-admin-modal-header><h3 class=app-admin-heading style=font-size:1rem;margin:0>Customer dashboard preview</h3><button type=button class="app-admin-btn app-admin-btn-ghost"style="border:none;padding:0.25rem 0.5rem;font-size:1.25rem">\xD7</button></div><div class=app-admin-modal-body><div style="padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-warning-bg);color:var(--app-admin-warning-fg);font-size:0.75rem;font-weight:500">Viewing as <!> \u2014 read-only`);
23718
+ var _tmpl$2120 = /* @__PURE__ */ template(`<div style="display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.5rem 0.75rem;border-radius:var(--app-admin-radius-sm);background:var(--app-admin-danger-bg);color:var(--app-admin-danger-fg);font-size:0.75rem;font-weight:500"><span></span><button type=button class="app-admin-btn app-admin-btn-ghost"style="padding:0.25rem 0.75rem">Retry`);
23719
+ var _tmpl$386 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
23613
23720
  var _tmpl$465 = /* @__PURE__ */ template(`<div><h3>Profile</h3><div class=app-admin-card-soft style=padding:0.75rem><p style=font-weight:600;font-size:0.9375rem;margin:0></p><p style="font-size:0.8125rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
23614
23721
  var _tmpl$555 = /* @__PURE__ */ template(`<div><h3>Subscription`);
23615
23722
  var _tmpl$650 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
@@ -23631,7 +23738,7 @@ function PatientDashboardPreview(props) {
23631
23738
  authToken: () => props.token
23632
23739
  });
23633
23740
  return (() => {
23634
- var _el$ = _tmpl$381(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
23741
+ var _el$ = _tmpl$385(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
23635
23742
  _el$.$$click = (e) => {
23636
23743
  if (e.target === e.currentTarget) props.onClose();
23637
23744
  };
@@ -23643,7 +23750,7 @@ function PatientDashboardPreview(props) {
23643
23750
  },
23644
23751
  keyed: true,
23645
23752
  children: (msg) => (() => {
23646
- var _el$1 = _tmpl$2119(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
23753
+ var _el$1 = _tmpl$2120(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
23647
23754
  insert(_el$10, msg);
23648
23755
  _el$11.$$click = () => data.retry();
23649
23756
  return _el$1;
@@ -23662,7 +23769,7 @@ function PatientDashboardPreview(props) {
23662
23769
  return data.profile();
23663
23770
  },
23664
23771
  get fallback() {
23665
- return _tmpl$385();
23772
+ return _tmpl$386();
23666
23773
  },
23667
23774
  children: (profile) => [(() => {
23668
23775
  var _el$13 = _tmpl$465(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
@@ -23821,9 +23928,9 @@ function PatientDashboardPreview(props) {
23821
23928
  })();
23822
23929
  }
23823
23930
  delegateEvents(["click"]);
23824
- var _tmpl$386 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
23825
- var _tmpl$2120 = /* @__PURE__ */ template(`<form><div style=display:grid;gap:1rem;margin-bottom:1.5rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div></div><div style=margin-bottom:1.5rem></div><div style=display:flex;gap:0.75rem>`);
23826
- var _tmpl$387 = /* @__PURE__ */ template(`<div class=pay-method style="max-width:480px;margin:0 auto;padding:2rem 1.25rem"><p style="color:var(--app-portal-fg-muted, #6e6a66);margin-bottom:1.5rem">Enter a new card for your subscription. Your current card stays active until this succeeds.`);
23931
+ var _tmpl$387 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
23932
+ var _tmpl$2121 = /* @__PURE__ */ template(`<form><div style=display:grid;gap:1rem;margin-bottom:1.5rem><div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:1rem"></div></div><div style=margin-bottom:1.5rem></div><div style=display:flex;gap:0.75rem>`);
23933
+ var _tmpl$388 = /* @__PURE__ */ template(`<div class=pay-method style="max-width:480px;margin:0 auto;padding:2rem 1.25rem"><p style="color:var(--app-portal-fg-muted, #6e6a66);margin-bottom:1.5rem">Enter a new card for your subscription. Your current card stays active until this succeeds.`);
23827
23934
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
23828
23935
  function UpdatePaymentMethod(props) {
23829
23936
  const {
@@ -23853,7 +23960,7 @@ function UpdatePaymentMethod(props) {
23853
23960
  if (ok) props.onDone();
23854
23961
  }
23855
23962
  return (() => {
23856
- var _el$ = _tmpl$387(), _el$2 = _el$.firstChild;
23963
+ var _el$ = _tmpl$388(), _el$2 = _el$.firstChild;
23857
23964
  insert(_el$, createComponent(Heading, {
23858
23965
  level: 1,
23859
23966
  get children() {
@@ -23884,14 +23991,14 @@ function UpdatePaymentMethod(props) {
23884
23991
  return memo(() => !!!resolving())() && !noSubscription();
23885
23992
  },
23886
23993
  get children() {
23887
- var _el$3 = _tmpl$2120(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
23994
+ var _el$3 = _tmpl$2121(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
23888
23995
  _el$3.addEventListener("submit", handleSubmit);
23889
23996
  insert(_el$3, createComponent(Show, {
23890
23997
  get when() {
23891
23998
  return flow.error();
23892
23999
  },
23893
24000
  get children() {
23894
- var _el$4 = _tmpl$386();
24001
+ var _el$4 = _tmpl$387();
23895
24002
  insert(_el$4, createComponent(Banner, {
23896
24003
  variant: "error",
23897
24004
  get children() {
@@ -23969,9 +24076,9 @@ function UpdatePaymentMethod(props) {
23969
24076
  return _el$;
23970
24077
  })();
23971
24078
  }
23972
- var _tmpl$388 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
23973
- var _tmpl$2121 = /* @__PURE__ */ template(`<div class=ship><p class=ship__eta></p><div class=ship__chip-row><button type=button class=ship__chip><span class=ship__num></span><i class="ph ph-copy ship__copy-icon"aria-hidden=true></i><span class=ship__copied>Copied \u2713</span></button></div><span class=portal-sr-only role=status aria-live=polite>`);
23974
- var _tmpl$389 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
24079
+ var _tmpl$389 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
24080
+ var _tmpl$2122 = /* @__PURE__ */ template(`<div class=ship><p class=ship__eta></p><div class=ship__chip-row><button type=button class=ship__chip><span class=ship__num></span><i class="ph ph-copy ship__copy-icon"aria-hidden=true></i><span class=ship__copied>Copied \u2713</span></button></div><span class=portal-sr-only role=status aria-live=polite>`);
24081
+ var _tmpl$390 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
23975
24082
  var _tmpl$466 = /* @__PURE__ */ template(`<div class=refill data-testid=refill-strip><div class=refill__head><span class=lab-label>Your plan</span></div><div class=refill__rail>`);
23976
24083
  var _tmpl$556 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
23977
24084
  var _tmpl$651 = /* @__PURE__ */ template(`<div><span class=refill__dot aria-hidden=true></span><span class="lab-label refill__label"></span><span class=refill__date></span><span class=refill__rel>`);
@@ -24007,7 +24114,7 @@ function TrackingChip(props) {
24007
24114
  }
24008
24115
  };
24009
24116
  return (() => {
24010
- var _el$ = _tmpl$2121(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
24117
+ var _el$ = _tmpl$2122(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
24011
24118
  insert(_el$2, () => props.eta);
24012
24119
  _el$4.$$click = copy;
24013
24120
  insert(_el$5, () => props.number);
@@ -24018,7 +24125,7 @@ function TrackingChip(props) {
24018
24125
  return props.url;
24019
24126
  },
24020
24127
  get children() {
24021
- var _el$8 = _tmpl$388(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
24128
+ var _el$8 = _tmpl$389(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
24022
24129
  insert(_el$8, (() => {
24023
24130
  var _c$ = memo(() => !!props.carrier);
24024
24131
  return () => _c$() ? ` with ${props.carrier}` : "";
@@ -24048,7 +24155,7 @@ function OrderTracker(props) {
24048
24155
  return _tmpl$556();
24049
24156
  },
24050
24157
  get children() {
24051
- var _el$14 = _tmpl$389(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
24158
+ var _el$14 = _tmpl$390(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
24052
24159
  insert(_el$14, () => r().cycleDay, _el$17);
24053
24160
  insert(_el$14, () => r().cycleLength, null);
24054
24161
  return _el$14;
@@ -24298,9 +24405,9 @@ function OrderTracker(props) {
24298
24405
  });
24299
24406
  }
24300
24407
  delegateEvents(["click"]);
24301
- var _tmpl$390 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
24302
- var _tmpl$2122 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
24303
- var _tmpl$391 = /* @__PURE__ */ template(`<div data-testid=rx-row><button type=button class=rx-row__head><span class=rx-row__med></span><span class=rx-row__status></span><i aria-hidden=true>`);
24408
+ var _tmpl$391 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
24409
+ var _tmpl$2123 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
24410
+ var _tmpl$395 = /* @__PURE__ */ template(`<div data-testid=rx-row><button type=button class=rx-row__head><span class=rx-row__med></span><span class=rx-row__status></span><i aria-hidden=true>`);
24304
24411
  var STATUS_LABEL = {
24305
24412
  pending: "Under review",
24306
24413
  approved: "Approved",
@@ -24317,7 +24424,7 @@ function RxRow(props) {
24317
24424
  return STATUS_LABEL[props.rx.status] ?? props.rx.status;
24318
24425
  };
24319
24426
  return (() => {
24320
- var _el$ = _tmpl$391(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
24427
+ var _el$ = _tmpl$395(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
24321
24428
  _el$2.$$click = () => setOpen((v) => !v);
24322
24429
  insert(_el$3, () => props.rx.drugName ?? "Medication", null);
24323
24430
  insert(_el$3, createComponent(Show, {
@@ -24325,7 +24432,7 @@ function RxRow(props) {
24325
24432
  return props.rx.dosage;
24326
24433
  },
24327
24434
  get children() {
24328
- var _el$4 = _tmpl$390(); _el$4.firstChild;
24435
+ var _el$4 = _tmpl$391(); _el$4.firstChild;
24329
24436
  insert(_el$4, () => props.rx.dosage, null);
24330
24437
  return _el$4;
24331
24438
  }
@@ -24336,7 +24443,7 @@ function RxRow(props) {
24336
24443
  return open();
24337
24444
  },
24338
24445
  get children() {
24339
- var _el$8 = _tmpl$2122();
24446
+ var _el$8 = _tmpl$2123();
24340
24447
  insert(_el$8, createComponent(OrderTracker, {
24341
24448
  get request() {
24342
24449
  return props.request;
@@ -24379,9 +24486,9 @@ function RxRow(props) {
24379
24486
  })();
24380
24487
  }
24381
24488
  delegateEvents(["click"]);
24382
- var _tmpl$395 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
24383
- var _tmpl$2123 = /* @__PURE__ */ template(`<div class=plan__empty><h2 class=plan__empty-title>No active plan</h2><p class=plan__empty-text>Start your treatment to set up your monthly plan.</p><a class="portal-btn portal-btn--primary">Start your intake`);
24384
- var _tmpl$396 = /* @__PURE__ */ template(`<p class=membership__dose>`);
24489
+ var _tmpl$396 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
24490
+ var _tmpl$2124 = /* @__PURE__ */ template(`<div class=plan__empty><h2 class=plan__empty-title>No active plan</h2><p class=plan__empty-text>Start your treatment to set up your monthly plan.</p><a class="portal-btn portal-btn--primary">Start your intake`);
24491
+ var _tmpl$397 = /* @__PURE__ */ template(`<p class=membership__dose>`);
24385
24492
  var _tmpl$467 = /* @__PURE__ */ template(`<div data-testid=membership-card><div class=membership__sheen aria-hidden=true></div><div class=membership__top><span class="lab-label membership__status"></span><span class=membership__brand></span></div><h2 class=membership__med></h2><div class=membership__bottom><span class=membership__price><span class=membership__per>/mo</span></span><span class=membership__renew>Renews `);
24386
24493
  var _tmpl$557 = /* @__PURE__ */ template(`<dl class=ledger><div class=ledger__row><dt>Member since</dt><dd></dd></div><div class=ledger__row><dt>Next billing date</dt><dd></dd></div><div class=ledger__row><dt>Billing amount</dt><dd>/mo`);
24387
24494
  var _tmpl$653 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
@@ -24434,14 +24541,14 @@ function PlanBilling(props) {
24434
24541
  }
24435
24542
  };
24436
24543
  return (() => {
24437
- var _el$ = _tmpl$395(); _el$.firstChild;
24544
+ var _el$ = _tmpl$396(); _el$.firstChild;
24438
24545
  insert(_el$, createComponent(Show, {
24439
24546
  get when() {
24440
24547
  return primary();
24441
24548
  },
24442
24549
  get fallback() {
24443
24550
  return (() => {
24444
- var _el$3 = _tmpl$2123(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
24551
+ var _el$3 = _tmpl$2124(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
24445
24552
  effect(() => setAttribute(_el$6, "href", props.intakeHref));
24446
24553
  return _el$3;
24447
24554
  })();
@@ -24456,7 +24563,7 @@ function PlanBilling(props) {
24456
24563
  return sub().dosage;
24457
24564
  },
24458
24565
  get children() {
24459
- var _el$11 = _tmpl$396();
24566
+ var _el$11 = _tmpl$397();
24460
24567
  insert(_el$11, () => sub().dosage);
24461
24568
  return _el$11;
24462
24569
  }
@@ -24558,9 +24665,9 @@ function PlanBilling(props) {
24558
24665
  })();
24559
24666
  }
24560
24667
  delegateEvents(["click"]);
24561
- var _tmpl$397 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
24562
- var _tmpl$2124 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message support</button> and we\u2019ll take care of it.`);
24563
- var _tmpl$398 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
24668
+ var _tmpl$398 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
24669
+ var _tmpl$2125 = /* @__PURE__ */ template(`<p class=account__note>Need to update something? <button type=button class=account__note-link>Message support</button> and we\u2019ll take care of it.`);
24670
+ var _tmpl$399 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
24564
24671
  var _tmpl$468 = /* @__PURE__ */ template(`<div class=account data-testid=account-panel><span class=lab-label>Account</span><h1 class=account__title>Your details</h1><dl class=account__fields></dl><div class=account__support></div><button type=button class="portal-btn portal-btn--ghost account__signout">Sign out`);
24565
24672
  var _tmpl$558 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
24566
24673
  var _tmpl$654 = /* @__PURE__ */ template(`<a class=account__support-link>`);
@@ -24621,7 +24728,7 @@ function AccountPanel(props) {
24621
24728
  return fields().length === 0;
24622
24729
  },
24623
24730
  get children() {
24624
- return _tmpl$397();
24731
+ return _tmpl$398();
24625
24732
  }
24626
24733
  }), _el$0);
24627
24734
  insert(_el$, createComponent(Show, {
@@ -24629,7 +24736,7 @@ function AccountPanel(props) {
24629
24736
  return props.messagingEnabled;
24630
24737
  },
24631
24738
  get children() {
24632
- var _el$6 = _tmpl$2124(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
24739
+ var _el$6 = _tmpl$2125(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
24633
24740
  _el$9.$$click = () => props.onOpenMessages({
24634
24741
  channel: "support",
24635
24742
  category: "account"
@@ -24642,7 +24749,7 @@ function AccountPanel(props) {
24642
24749
  return props.messagingEnabled;
24643
24750
  },
24644
24751
  get children() {
24645
- var _el$1 = _tmpl$398();
24752
+ var _el$1 = _tmpl$399();
24646
24753
  _el$1.$$click = () => props.onOpenMessages();
24647
24754
  return _el$1;
24648
24755
  }
@@ -24663,8 +24770,8 @@ function AccountPanel(props) {
24663
24770
  })();
24664
24771
  }
24665
24772
  delegateEvents(["click"]);
24666
- var _tmpl$399 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
24667
- var _tmpl$2125 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
24773
+ var _tmpl$400 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
24774
+ var _tmpl$2126 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
24668
24775
  var _tmpl$3100 = /* @__PURE__ */ template(`<div class=leaflet data-testid=medication-guide><header class=leaflet__header><span class=lab-label>How to take it</span><h1 class=leaflet__title></h1><p class=leaflet__summary></p></header><section class=leaflet__boxed aria-label="Boxed warning"><div class=leaflet__boxed-head><i class="ph-fill ph-warning"aria-hidden=true></i><span>Important warning</span></div><p></p></section><section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Do not use this medicine if\u2026</h2><ul class="leaflet__list leaflet__list--caution"></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Your dose over time</h2><p class=leaflet__note>A typical step-up. Your prescriber sets your exact doses and timing.</p><ol class=titration></ol></section><section class=leaflet__section><h2 class=leaflet__h2>Giving your injection</h2><ol class=steps></ol></section><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Storing your medicine</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>If you miss a dose</h2><p class=leaflet__body></p></section></div><div class=leaflet__grid><section class=leaflet__section><h2 class=leaflet__h2>Common side effects</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class="leaflet__section leaflet__section--alert"><h2 class=leaflet__h2>Call right away if you notice\u2026</h2><ul class="leaflet__list leaflet__list--alert"></ul></section></div><section class=leaflet__section><h2 class=leaflet__h2>When to contact your care team</h2><ul class=leaflet__list></ul></section><section class=leaflet__section><h2 class=leaflet__h2>Tips for feeling your best</h2><ul class="leaflet__list leaflet__list--check"></ul></section><section class=leaflet__footnote><button type=button class=leaflet__disclose aria-controls=leaflet-disclaimers> the important details<i aria-hidden=true>`);
24669
24776
  var _tmpl$469 = /* @__PURE__ */ template(`<li>`);
24670
24777
  var _tmpl$559 = /* @__PURE__ */ template(`<li><span class=titration__bead aria-hidden=true></span><div class=titration__body><div class=titration__row><span class=titration__dose></span><span class="lab-label titration__phase"></span></div><span class=titration__time></span><p class=titration__note>`);
@@ -24745,7 +24852,7 @@ function MedicationGuide(props) {
24745
24852
  return props.guide.contraception;
24746
24853
  },
24747
24854
  get children() {
24748
- var _el$24 = _tmpl$399(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
24855
+ var _el$24 = _tmpl$400(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
24749
24856
  insert(_el$26, () => props.guide.contraception);
24750
24857
  return _el$24;
24751
24858
  }
@@ -24797,7 +24904,7 @@ function MedicationGuide(props) {
24797
24904
  return showDisclaimers();
24798
24905
  },
24799
24906
  get children() {
24800
- var _el$44 = _tmpl$2125();
24907
+ var _el$44 = _tmpl$2126();
24801
24908
  insert(_el$44, createComponent(For, {
24802
24909
  get each() {
24803
24910
  return props.guide.disclaimers;
@@ -24824,8 +24931,8 @@ function MedicationGuide(props) {
24824
24931
  })();
24825
24932
  }
24826
24933
  delegateEvents(["click"]);
24827
- var _tmpl$400 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
24828
- var _tmpl$2126 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
24934
+ var _tmpl$401 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
24935
+ var _tmpl$2127 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
24829
24936
  var _tmpl$3101 = /* @__PURE__ */ template(`<div class=msg-list__header><div class=msg-list__header-title><button type=button class=msg-list__back aria-label="Choose a different team"data-testid=messages-choose-different><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><h2 class=msg-list__title></h2></div><button type=button class=msg-list__new data-testid=messages-new-support><i class="ph-thin ph-plus"aria-hidden=true></i>New message`);
24830
24937
  var _tmpl$470 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
24831
24938
  var _tmpl$560 = /* @__PURE__ */ template(`<div class="msg-list__state msg-list__state--empty"data-testid=messages-empty><i class="ph-thin ph-chat-circle msg-list__empty-icon"aria-hidden=true></i><p class=msg-list__empty-title>No conversations yet.</p><p class=msg-list__empty-hint>`);
@@ -24846,7 +24953,7 @@ var _tmpl$1720 = /* @__PURE__ */ template(`<p class=msg-compose__error role=aler
24846
24953
  var _tmpl$1818 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=support-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role data-testid=support-compose-reply-note></p></div></div><div class=msg-compose__new><label class=msg-compose__label id=support-category-label>What's this about? <span class=msg-compose__label-optional>(optional)</span></label><div class=msg-compose__categories role=group aria-labelledby=support-category-label></div><label class=msg-compose__label for=support-subject>Subject</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
24847
24954
  var _tmpl$1916 = /* @__PURE__ */ template(`<button type=button>`);
24848
24955
  var _tmpl$2016 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=care-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=care-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message your care team</h3><p class=msg-thread__role>Your prescriber or their team will reply</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=care-body>Message</label><textarea id=care-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell your care team what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=care-compose-attach></label><button type=submit class=msg-compose__send data-testid=care-compose-send>`);
24849
- var _tmpl$2127 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
24956
+ var _tmpl$2128 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
24850
24957
  var _tmpl$2215 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-support-badge>`);
24851
24958
  var _tmpl$2313 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data-testid=messages-gate-note>That conversation isn't available.`);
24852
24959
  var _tmpl$2413 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=messages-gate><div class=msg-thread__header><div><h3 class=msg-thread__name>Messages</h3><p class=msg-thread__role>Who do you want to talk to?</p></div></div><div class=msg-choice__options><button type=button class=msg-choice__option data-testid=gate-care-team><i class="ph-thin ph-heartbeat msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>My care team</span><span class=msg-choice__option-sub>Treatment, medication or side effects</span></button><button type=button class=msg-choice__option data-testid=gate-support><i class="ph-thin ph-lifebuoy msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>Support</span><span class=msg-choice__option-sub>Account, orders, billing or the website`);
@@ -25069,14 +25176,14 @@ function MessagesPanel(props) {
25069
25176
  }
25070
25177
  }
25071
25178
  const ChannelChip = (p) => (() => {
25072
- var _el$ = _tmpl$400();
25179
+ var _el$ = _tmpl$401();
25073
25180
  insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
25074
25181
  insert(_el$, createComponent(Show, {
25075
25182
  get when() {
25076
25183
  return memo(() => p.source === "support")() && categoryLabel(p.category);
25077
25184
  },
25078
25185
  children: (label3) => (() => {
25079
- var _el$2 = _tmpl$2126();
25186
+ var _el$2 = _tmpl$2127();
25080
25187
  insert(_el$2, label3);
25081
25188
  return _el$2;
25082
25189
  })()
@@ -25438,7 +25545,7 @@ function MessagesPanel(props) {
25438
25545
  return careUnreadCount() > 0;
25439
25546
  },
25440
25547
  get children() {
25441
- var _el$77 = _tmpl$2127();
25548
+ var _el$77 = _tmpl$2128();
25442
25549
  insert(_el$77, careUnreadCount);
25443
25550
  return _el$77;
25444
25551
  }
@@ -25726,8 +25833,8 @@ function MessagesPanel(props) {
25726
25833
  })();
25727
25834
  }
25728
25835
  delegateEvents(["click", "input", "keydown"]);
25729
- var _tmpl$401 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
25730
- var _tmpl$2128 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
25836
+ var _tmpl$406 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
25837
+ var _tmpl$2129 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
25731
25838
  var _tmpl$3102 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-empty><p>No submitted questionnaires yet.</p><p class=history-hint>Your intake and refill check-in answers will appear here once you've submitted them.`);
25732
25839
  var _tmpl$471 = /* @__PURE__ */ template(`<li><button type=button class=history-row><span class=history-row__mode></span><span class=history-row__date></span><i class="ph-thin ph-caret-right portal-icon"aria-hidden=true>`);
25733
25840
  var _tmpl$561 = /* @__PURE__ */ template(`<div data-testid=history-detail><button type=button class="portal-btn portal-btn--ghost history-back"><i class="ph-thin ph-caret-left portal-icon"aria-hidden=true></i> All questionnaires`);
@@ -25765,7 +25872,7 @@ function SurveyHistory() {
25765
25872
  return !list.error;
25766
25873
  },
25767
25874
  get fallback() {
25768
- return _tmpl$2128();
25875
+ return _tmpl$2129();
25769
25876
  },
25770
25877
  get children() {
25771
25878
  return createComponent(Show, {
@@ -25776,7 +25883,7 @@ function SurveyHistory() {
25776
25883
  return _tmpl$3102();
25777
25884
  },
25778
25885
  get children() {
25779
- var _el$ = _tmpl$401();
25886
+ var _el$ = _tmpl$406();
25780
25887
  insert(_el$, createComponent(For, {
25781
25888
  get each() {
25782
25889
  return list();
@@ -25873,8 +25980,8 @@ function SurveyHistory() {
25873
25980
  delegateEvents(["click"]);
25874
25981
 
25875
25982
  // src/pages/MemberPortal.tsx
25876
- var _tmpl$406 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
25877
- var _tmpl$2129 = /* @__PURE__ */ template(`<span>`);
25983
+ var _tmpl$407 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
25984
+ var _tmpl$2130 = /* @__PURE__ */ template(`<span>`);
25878
25985
  var _tmpl$3103 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
25879
25986
  var _tmpl$474 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
25880
25987
  var _tmpl$563 = /* @__PURE__ */ template(`<div class=rx-stack>`);
@@ -26020,7 +26127,7 @@ function MemberPortal(props) {
26020
26127
  return memo(() => item.key === "tracker")() && inMotion();
26021
26128
  },
26022
26129
  get children() {
26023
- return _tmpl$406();
26130
+ return _tmpl$407();
26024
26131
  }
26025
26132
  }), null);
26026
26133
  insert(_el$, createComponent(Show, {
@@ -26028,7 +26135,7 @@ function MemberPortal(props) {
26028
26135
  return memo(() => item.key === "messages")() && unreadTotal() > 0;
26029
26136
  },
26030
26137
  get children() {
26031
- var _el$5 = _tmpl$2129();
26138
+ var _el$5 = _tmpl$2130();
26032
26139
  insert(_el$5, (() => {
26033
26140
  var _c$ = memo(() => unreadTotal() > 99);
26034
26141
  return () => _c$() ? "99+" : unreadTotal();
@@ -26339,8 +26446,8 @@ function MemberPortal(props) {
26339
26446
  })();
26340
26447
  }
26341
26448
  delegateEvents(["click"]);
26342
- var _tmpl$407 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-radius:var(--app-affiliate-radius);background:var(--app-affiliate-warning-bg);color:var(--app-affiliate-warning-fg);border:1px solid var(--app-affiliate-border)">Your affiliate account is awaiting approval. Once an admin activates it, your referral link will start earning commissions.`);
26343
- var _tmpl$2130 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Overview`);
26449
+ var _tmpl$408 = /* @__PURE__ */ template(`<div style="padding:1rem 1.25rem;border-radius:var(--app-affiliate-radius);background:var(--app-affiliate-warning-bg);color:var(--app-affiliate-warning-fg);border:1px solid var(--app-affiliate-border)">Your affiliate account is awaiting approval. Once an admin activates it, your referral link will start earning commissions.`);
26450
+ var _tmpl$2131 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Overview`);
26344
26451
  var _tmpl$3104 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
26345
26452
  var _tmpl$475 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
26346
26453
  var _tmpl$564 = /* @__PURE__ */ template(`<div style="padding:1.25rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted);margin-bottom:0.5rem></div><div style=font-family:var(--app-affiliate-font-display);font-size:1.75rem;color:var(--app-affiliate-fg)>`);
@@ -26376,13 +26483,13 @@ function AffiliateOverview() {
26376
26483
  value: `${(s.conversionRate * 100).toFixed(1)}%`
26377
26484
  }];
26378
26485
  return (() => {
26379
- var _el$ = _tmpl$2130(); _el$.firstChild;
26486
+ var _el$ = _tmpl$2131(); _el$.firstChild;
26380
26487
  insert(_el$, createComponent(Show, {
26381
26488
  get when() {
26382
26489
  return isPending();
26383
26490
  },
26384
26491
  get children() {
26385
- return _tmpl$407();
26492
+ return _tmpl$408();
26386
26493
  }
26387
26494
  }), null);
26388
26495
  insert(_el$, createComponent(Show, {
@@ -26411,8 +26518,8 @@ function AffiliateOverview() {
26411
26518
  return _el$;
26412
26519
  })();
26413
26520
  }
26414
- var _tmpl$408 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Date</th><th>Type</th><th>Order total</th><th>Commission</th><th>Status</th></tr></thead><tbody>`);
26415
- var _tmpl$2131 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Conversions`);
26521
+ var _tmpl$409 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Date</th><th>Type</th><th>Order total</th><th>Commission</th><th>Status</th></tr></thead><tbody>`);
26522
+ var _tmpl$2132 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Conversions`);
26416
26523
  var _tmpl$3105 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No conversions yet. Share your referral link to start earning.`);
26417
26524
  var _tmpl$476 = /* @__PURE__ */ template(`<span title="Override commission earned on a sub-affiliate's sale"style="margin-left:0.4rem;padding:0.1rem 0.45rem;border-radius:999px;font-size:0.65rem;font-weight:600;background:var(--app-affiliate-primary-soft);color:var(--app-affiliate-primary-soft-fg)">Override`);
26418
26525
  var _tmpl$565 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Date></td><td data-label=Type></td><td data-label="Order total"></td><td data-label=Commission style=color:var(--app-affiliate-fg);font-weight:600></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600">`);
@@ -26453,7 +26560,7 @@ function AffiliateConversions() {
26453
26560
  limit: 100
26454
26561
  });
26455
26562
  return (() => {
26456
- var _el$ = _tmpl$2131(); _el$.firstChild;
26563
+ var _el$ = _tmpl$2132(); _el$.firstChild;
26457
26564
  insert(_el$, createComponent(Show, {
26458
26565
  get when() {
26459
26566
  return (conversions() ?? []).length > 0;
@@ -26462,7 +26569,7 @@ function AffiliateConversions() {
26462
26569
  return _tmpl$3105();
26463
26570
  },
26464
26571
  get children() {
26465
- var _el$3 = _tmpl$408(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$5.nextSibling;
26572
+ var _el$3 = _tmpl$409(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$5.nextSibling;
26466
26573
  insert(_el$10, createComponent(For, {
26467
26574
  get each() {
26468
26575
  return conversions();
@@ -26547,10 +26654,10 @@ function td() {
26547
26654
  color: "var(--app-affiliate-fg)"
26548
26655
  };
26549
26656
  }
26550
- var _tmpl$409 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Code</th><th>Name</th><th>Status</th><th>Joined</th></tr></thead><tbody>`);
26551
- var _tmpl$2132 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Downline</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>Affiliates you've referred. You earn an override commission on every qualifying sale they make \u2014 those show up as \u201COverride\u201D rows on your Conversions.`);
26657
+ var _tmpl$477 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden"><table class=app-affiliate-table style=width:100%;border-collapse:collapse;font-size:0.875rem><thead><tr style=background:var(--app-affiliate-surface-light)><th>Code</th><th>Name</th><th>Status</th><th>Joined</th></tr></thead><tbody>`);
26658
+ var _tmpl$2133 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Downline</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>Affiliates you've referred. You earn an override commission on every qualifying sale they make \u2014 those show up as \u201COverride\u201D rows on your Conversions.`);
26552
26659
  var _tmpl$3106 = /* @__PURE__ */ template(`<div style="padding:2rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);color:var(--app-affiliate-fg-muted);text-align:center">No sub-affiliates yet.`);
26553
- var _tmpl$477 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
26660
+ var _tmpl$478 = /* @__PURE__ */ template(`<tr style="border-top:1px solid var(--app-affiliate-border)"><td data-label=Code style=font-family:var(--app-affiliate-font-mono)></td><td data-label=Name></td><td data-label=Status><span style="padding:0.2rem 0.6rem;border-radius:999px;font-size:0.75rem;font-weight:600"></span></td><td data-label=Joined>`);
26554
26661
  function formatDate5(iso) {
26555
26662
  const d = new Date(iso);
26556
26663
  if (Number.isNaN(d.getTime())) return iso;
@@ -26583,7 +26690,7 @@ function AffiliateDownline() {
26583
26690
  downline
26584
26691
  } = useAffiliateDownline();
26585
26692
  return (() => {
26586
- var _el$ = _tmpl$2132(), _el$2 = _el$.firstChild; _el$2.nextSibling;
26693
+ var _el$ = _tmpl$2133(), _el$2 = _el$.firstChild; _el$2.nextSibling;
26587
26694
  insert(_el$, createComponent(Show, {
26588
26695
  get when() {
26589
26696
  return (downline() ?? []).length > 0;
@@ -26592,13 +26699,13 @@ function AffiliateDownline() {
26592
26699
  return _tmpl$3106();
26593
26700
  },
26594
26701
  get children() {
26595
- var _el$4 = _tmpl$409(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling;
26702
+ var _el$4 = _tmpl$477(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$6.nextSibling;
26596
26703
  insert(_el$10, createComponent(For, {
26597
26704
  get each() {
26598
26705
  return downline();
26599
26706
  },
26600
26707
  children: (d) => (() => {
26601
- var _el$12 = _tmpl$477(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
26708
+ var _el$12 = _tmpl$478(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
26602
26709
  insert(_el$13, () => d.affiliateCode);
26603
26710
  insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
26604
26711
  insert(_el$16, () => d.status);
@@ -26661,8 +26768,8 @@ function td2() {
26661
26768
  color: "var(--app-affiliate-fg)"
26662
26769
  };
26663
26770
  }
26664
- var _tmpl$478 = /* @__PURE__ */ template(`<div style="padding:1.5rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);display:flex;flex-direction:column;gap:0.75rem"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>Share this link</div><div style=display:flex;gap:0.5rem;align-items:stretch;flex-wrap:wrap><code style="flex:1;min-width:16rem;padding:0.75rem 1rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-family:var(--app-affiliate-font-mono);color:var(--app-affiliate-fg);word-break:break-all"></code><button type=button style="padding:0.75rem 1.25rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer"></button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>Anyone who visits this URL has a tracking cookie set for the duration of your program. If they sign up and subscribe within the cookie window, you earn commission on the conversion.`);
26665
- var _tmpl$2133 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Referral link`);
26771
+ var _tmpl$479 = /* @__PURE__ */ template(`<div style="padding:1.5rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);display:flex;flex-direction:column;gap:0.75rem"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>Share this link</div><div style=display:flex;gap:0.5rem;align-items:stretch;flex-wrap:wrap><code style="flex:1;min-width:16rem;padding:0.75rem 1rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-family:var(--app-affiliate-font-mono);color:var(--app-affiliate-fg);word-break:break-all"></code><button type=button style="padding:0.75rem 1.25rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer"></button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>Anyone who visits this URL has a tracking cookie set for the duration of your program. If they sign up and subscribe within the cookie window, you earn commission on the conversion.`);
26772
+ var _tmpl$2134 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Referral link`);
26666
26773
  var _tmpl$3107 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
26667
26774
  function AffiliateReferralLink() {
26668
26775
  const {
@@ -26688,7 +26795,7 @@ function AffiliateReferralLink() {
26688
26795
  }
26689
26796
  }
26690
26797
  return (() => {
26691
- var _el$ = _tmpl$2133(); _el$.firstChild;
26798
+ var _el$ = _tmpl$2134(); _el$.firstChild;
26692
26799
  insert(_el$, createComponent(Show, {
26693
26800
  get when() {
26694
26801
  return homepageLink();
@@ -26697,7 +26804,7 @@ function AffiliateReferralLink() {
26697
26804
  return _tmpl$3107();
26698
26805
  },
26699
26806
  get children() {
26700
- var _el$3 = _tmpl$478(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
26807
+ var _el$3 = _tmpl$479(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
26701
26808
  insert(_el$6, homepageLink);
26702
26809
  _el$7.$$click = copy;
26703
26810
  insert(_el$7, () => copied() ? "Copied" : "Copy");
@@ -26708,10 +26815,10 @@ function AffiliateReferralLink() {
26708
26815
  })();
26709
26816
  }
26710
26817
  delegateEvents(["click"]);
26711
- var _tmpl$479 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Account</h1><div><button type=button style="padding:0.75rem 1.25rem;background:transparent;color:var(--app-affiliate-fg);border:1px solid var(--app-affiliate-border-strong);border-radius:var(--app-affiliate-radius-sm);cursor:pointer;font-weight:500">Log out</button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>To update your profile or payment details, contact your program administrator.`);
26712
- var _tmpl$2134 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
26818
+ var _tmpl$480 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:1.5rem><h1 style=font-family:var(--app-affiliate-font-display);font-size:1.5rem;margin:0;color:var(--app-affiliate-fg)>Account</h1><div><button type=button style="padding:0.75rem 1.25rem;background:transparent;color:var(--app-affiliate-fg);border:1px solid var(--app-affiliate-border-strong);border-radius:var(--app-affiliate-radius-sm);cursor:pointer;font-weight:500">Log out</button></div><div style=font-size:0.875rem;color:var(--app-affiliate-fg-muted)>To update your profile or payment details, contact your program administrator.`);
26819
+ var _tmpl$2135 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
26713
26820
  var _tmpl$3108 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
26714
- var _tmpl$480 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:space-between;align-items:center;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-affiliate-border)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)></div><div style=color:var(--app-affiliate-fg)>`);
26821
+ var _tmpl$481 = /* @__PURE__ */ template(`<div style="display:flex;justify-content:space-between;align-items:center;padding:0.875rem 1.25rem;border-bottom:1px solid var(--app-affiliate-border)"><div style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)></div><div style=color:var(--app-affiliate-fg)>`);
26715
26822
  var STATUS_LABEL2 = {
26716
26823
  pending: "Pending approval",
26717
26824
  active: "Active",
@@ -26746,13 +26853,13 @@ function AffiliateSettings() {
26746
26853
  value: a.paymentEmail ?? "\u2014"
26747
26854
  }];
26748
26855
  return (() => {
26749
- var _el$ = _tmpl$479(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
26856
+ var _el$ = _tmpl$480(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
26750
26857
  insert(_el$, createComponent(Show, {
26751
26858
  get when() {
26752
26859
  return affiliate();
26753
26860
  },
26754
26861
  get fallback() {
26755
- return _tmpl$2134();
26862
+ return _tmpl$2135();
26756
26863
  },
26757
26864
  children: (a) => (() => {
26758
26865
  var _el$7 = _tmpl$3108();
@@ -26761,7 +26868,7 @@ function AffiliateSettings() {
26761
26868
  return rows(a());
26762
26869
  },
26763
26870
  children: (row) => (() => {
26764
- var _el$8 = _tmpl$480(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
26871
+ var _el$8 = _tmpl$481(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
26765
26872
  insert(_el$9, () => row.label);
26766
26873
  insert(_el$0, () => row.value);
26767
26874
  return _el$8;
@@ -26777,10 +26884,10 @@ function AffiliateSettings() {
26777
26884
  delegateEvents(["click"]);
26778
26885
 
26779
26886
  // src/pages/AffiliatePortal.tsx
26780
- var _tmpl$481 = /* @__PURE__ */ template(`<div class="app-affiliate-root app-affiliate-shell"style=position:sticky;background:var(--app-affiliate-bg);color:var(--app-affiliate-fg)><div class=app-affiliate-shell-header><button type=button class=app-affiliate-shell-menu-trigger aria-label="Open portal menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-affiliate-shell-header-title></span></div><div class=app-affiliate-backdrop aria-hidden=true></div><aside class=app-affiliate-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-affiliate-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Affiliate Portal</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-affiliate-content>`);
26781
- var _tmpl$2135 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
26887
+ var _tmpl$484 = /* @__PURE__ */ template(`<div class="app-affiliate-root app-affiliate-shell"style=position:sticky;background:var(--app-affiliate-bg);color:var(--app-affiliate-fg)><div class=app-affiliate-shell-header><button type=button class=app-affiliate-shell-menu-trigger aria-label="Open portal menu"><svg width=22 height=22 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round aria-hidden=true><line x1=3 y1=6 x2=21 y2=6></line><line x1=3 y1=12 x2=21 y2=12></line><line x1=3 y1=18 x2=21 y2=18></line></svg></button><span class=app-affiliate-shell-header-title></span></div><div class=app-affiliate-backdrop aria-hidden=true></div><aside class=app-affiliate-sidebar><div style=padding:1.25rem><h2 style="font-size:0.7rem;font-weight:500;color:var(--app-affiliate-fg-muted);text-transform:uppercase;letter-spacing:0.08em;margin:0 0 1rem">Affiliate Portal</h2><nav style=display:flex;flex-direction:column;gap:0.25rem></nav></div></aside><div class=app-affiliate-content>`);
26888
+ var _tmpl$2136 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
26782
26889
  var _tmpl$3109 = /* @__PURE__ */ template(`<button type=button style="display:flex;align-items:center;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem;font-weight:500;text-align:left;border:none;cursor:pointer">`);
26783
- var _tmpl$484 = /* @__PURE__ */ template(`<div class=app-affiliate-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-affiliate-bg)><div role=status aria-label="Loading affiliate portal"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-affiliate-border);border-top-color:var(--app-affiliate-primary);animation:app-affiliate-gate-spin 0.8s linear infinite"></div><style>@keyframes app-affiliate-gate-spin { to { transform: rotate(360deg); } }`);
26890
+ var _tmpl$485 = /* @__PURE__ */ template(`<div class=app-affiliate-root style=display:flex;align-items:center;justify-content:center;position:sticky;background:var(--app-affiliate-bg)><div role=status aria-label="Loading affiliate portal"style="width:1.75rem;height:1.75rem;border-radius:9999px;border:2px solid var(--app-affiliate-border);border-top-color:var(--app-affiliate-primary);animation:app-affiliate-gate-spin 0.8s linear infinite"></div><style>@keyframes app-affiliate-gate-spin { to { transform: rotate(360deg); } }`);
26784
26891
  var TAB_LABELS2 = {
26785
26892
  overview: "Overview",
26786
26893
  conversions: "Conversions",
@@ -26825,7 +26932,7 @@ function AffiliatePortal(props) {
26825
26932
  });
26826
26933
  },
26827
26934
  get children() {
26828
- var _el$ = _tmpl$481(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling;
26935
+ var _el$ = _tmpl$484(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$2.nextSibling, _el$6 = _el$5.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$6.nextSibling;
26829
26936
  _el$3.$$click = () => setDrawerOpen(true);
26830
26937
  insert(_el$4, () => TAB_LABELS2[currentTab()]);
26831
26938
  _el$5.$$click = () => setDrawerOpen(false);
@@ -26841,7 +26948,7 @@ function AffiliatePortal(props) {
26841
26948
  return props.tabIcons?.[tab];
26842
26949
  },
26843
26950
  get children() {
26844
- var _el$10 = _tmpl$2135();
26951
+ var _el$10 = _tmpl$2136();
26845
26952
  effect(() => className(_el$10, props.tabIcons[tab]));
26846
26953
  return _el$10;
26847
26954
  }
@@ -26923,7 +27030,7 @@ function AffiliatePortal(props) {
26923
27030
  }
26924
27031
  function AffiliateGateSpinner(props) {
26925
27032
  return (() => {
26926
- var _el$11 = _tmpl$484(); _el$11.firstChild;
27033
+ var _el$11 = _tmpl$485(); _el$11.firstChild;
26927
27034
  effect((_p$) => {
26928
27035
  var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
26929
27036
  _v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
@@ -26937,11 +27044,11 @@ function AffiliateGateSpinner(props) {
26937
27044
  })();
26938
27045
  }
26939
27046
  delegateEvents(["click"]);
26940
- var _tmpl$485 = /* @__PURE__ */ template(`<div style=position:relative><input><button type=button style="position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;padding:0 0.75rem;background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em">`);
27047
+ var _tmpl$486 = /* @__PURE__ */ template(`<div style=position:relative><input><button type=button style="position:absolute;top:0;right:0;height:100%;display:flex;align-items:center;padding:0 0.75rem;background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;font-size:0.75rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em">`);
26941
27048
  function AffiliatePasswordInput(props) {
26942
27049
  const [visible, setVisible] = createSignal(false);
26943
27050
  return (() => {
26944
- var _el$ = _tmpl$485(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
27051
+ var _el$ = _tmpl$486(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
26945
27052
  _el$2.$$input = (e) => props.onInput(e.currentTarget.value);
26946
27053
  _el$3.$$click = () => setVisible((v) => !v);
26947
27054
  insert(_el$3, () => visible() ? "Hide" : "Show");
@@ -26982,10 +27089,10 @@ function inputStyle() {
26982
27089
  delegateEvents(["input", "click"]);
26983
27090
 
26984
27091
  // src/pages/AffiliateRegister.tsx
26985
- var _tmpl$486 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
26986
- var _tmpl$2136 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
27092
+ var _tmpl$487 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
27093
+ var _tmpl$2137 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
26987
27094
  var _tmpl$3115 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
26988
- var _tmpl$487 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
27095
+ var _tmpl$488 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
26989
27096
  var _tmpl$566 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
26990
27097
  var _tmpl$659 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
26991
27098
  var _tmpl$750 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius-sm);font-size:0.8125rem;line-height:1.5;color:var(--app-affiliate-fg-muted)">A customer's purchase earns you commission only if they reached the site through your referral link \u2014 the site address with <code>?ref=</code> appended:<div style=font-weight:600;word-break:break-all;margin-top:0.25rem;color:var(--app-affiliate-fg)>/?ref=</div>Make sure any marketing materials use that full link for tracking, not just the website address itself.</div><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
@@ -27037,7 +27144,7 @@ function AffiliateRegister(props) {
27037
27144
  insert(_el$6, createComponent(Row2, {
27038
27145
  label: "First name",
27039
27146
  get children() {
27040
- var _el$7 = _tmpl$486();
27147
+ var _el$7 = _tmpl$487();
27041
27148
  _el$7.$$input = (e) => setFirstName(e.currentTarget.value);
27042
27149
  effect((_$p) => style(_el$7, inputStyle2(), _$p));
27043
27150
  effect(() => _el$7.value = firstName());
@@ -27047,7 +27154,7 @@ function AffiliateRegister(props) {
27047
27154
  insert(_el$6, createComponent(Row2, {
27048
27155
  label: "Last name",
27049
27156
  get children() {
27050
- var _el$8 = _tmpl$2136();
27157
+ var _el$8 = _tmpl$2137();
27051
27158
  _el$8.$$input = (e) => setLastName(e.currentTarget.value);
27052
27159
  effect((_$p) => style(_el$8, inputStyle2(), _$p));
27053
27160
  effect(() => _el$8.value = lastName());
@@ -27083,7 +27190,7 @@ function AffiliateRegister(props) {
27083
27190
  label: "Affiliate code",
27084
27191
  hint: "The handle in your referral URL (4+ characters)",
27085
27192
  get children() {
27086
- var _el$0 = _tmpl$487();
27193
+ var _el$0 = _tmpl$488();
27087
27194
  _el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
27088
27195
  effect((_$p) => style(_el$0, inputStyle2(), _$p));
27089
27196
  effect(() => _el$0.value = affiliateCode());
@@ -27176,10 +27283,10 @@ function linkStyle() {
27176
27283
  };
27177
27284
  }
27178
27285
  delegateEvents(["input", "click"]);
27179
- var _tmpl$488 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27180
- var _tmpl$2137 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
27286
+ var _tmpl$489 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27287
+ var _tmpl$2138 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-fg-muted);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>Forgot your password?`);
27181
27288
  var _tmpl$3116 = /* @__PURE__ */ template(`<button type=button style=background:transparent;border:none;color:var(--app-affiliate-primary-soft-fg);cursor:pointer;text-decoration:underline;font-size:0.875rem;padding:0;text-align:center>New affiliate? Apply`);
27182
- var _tmpl$489 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Affiliate login</h1><form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Password</span></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
27289
+ var _tmpl$490 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Affiliate login</h1><form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Password</span></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
27183
27290
  function AffiliateLogin(props) {
27184
27291
  const [email, setEmail] = createSignal("");
27185
27292
  const [password, setPassword] = createSignal("");
@@ -27199,7 +27306,7 @@ function AffiliateLogin(props) {
27199
27306
  }
27200
27307
  }
27201
27308
  return (() => {
27202
- var _el$ = _tmpl$489(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$1 = _el$8.nextSibling;
27309
+ var _el$ = _tmpl$490(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$1 = _el$8.nextSibling;
27203
27310
  _el$4.addEventListener("submit", handleSubmit);
27204
27311
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
27205
27312
  insert(_el$8, createComponent(AffiliatePasswordInput, {
@@ -27215,7 +27322,7 @@ function AffiliateLogin(props) {
27215
27322
  return error();
27216
27323
  },
27217
27324
  get children() {
27218
- var _el$0 = _tmpl$488();
27325
+ var _el$0 = _tmpl$489();
27219
27326
  insert(_el$0, error);
27220
27327
  return _el$0;
27221
27328
  }
@@ -27226,7 +27333,7 @@ function AffiliateLogin(props) {
27226
27333
  return props.onNavigateForgotPassword;
27227
27334
  },
27228
27335
  get children() {
27229
- var _el$10 = _tmpl$2137();
27336
+ var _el$10 = _tmpl$2138();
27230
27337
  _el$10.$$click = () => props.onNavigateForgotPassword?.();
27231
27338
  return _el$10;
27232
27339
  }
@@ -27284,10 +27391,10 @@ function inputStyle3() {
27284
27391
  };
27285
27392
  }
27286
27393
  delegateEvents(["input", "click"]);
27287
- var _tmpl$490 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27288
- var _tmpl$2138 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
27394
+ var _tmpl$491 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27395
+ var _tmpl$2139 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
27289
27396
  var _tmpl$3117 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Reset your password`);
27290
- var _tmpl$491 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27397
+ var _tmpl$494 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27291
27398
  var _tmpl$567 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.8125rem;opacity:0.8>The link is good for one hour. If nothing arrives, check your spam folder \u2014 and make sure this is the address you signed up with.`);
27292
27399
  var _tmpl$660 = /* @__PURE__ */ template(`<button type=button style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600;cursor:pointer">Back to sign in`);
27293
27400
  function ForgotPasswordPage(props) {
@@ -27319,7 +27426,7 @@ function ForgotPasswordPage(props) {
27319
27426
  },
27320
27427
  get fallback() {
27321
27428
  return [(() => {
27322
- var _el$0 = _tmpl$491();
27429
+ var _el$0 = _tmpl$494();
27323
27430
  insert(_el$0, message);
27324
27431
  return _el$0;
27325
27432
  })(), _tmpl$567(), createComponent(Show, {
@@ -27334,7 +27441,7 @@ function ForgotPasswordPage(props) {
27334
27441
  })];
27335
27442
  },
27336
27443
  get children() {
27337
- var _el$4 = _tmpl$2138(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
27444
+ var _el$4 = _tmpl$2139(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
27338
27445
  _el$4.addEventListener("submit", handleSubmit);
27339
27446
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
27340
27447
  insert(_el$4, createComponent(Show, {
@@ -27342,7 +27449,7 @@ function ForgotPasswordPage(props) {
27342
27449
  return error();
27343
27450
  },
27344
27451
  get children() {
27345
- var _el$8 = _tmpl$490();
27452
+ var _el$8 = _tmpl$491();
27346
27453
  insert(_el$8, error);
27347
27454
  return _el$8;
27348
27455
  }
@@ -27392,10 +27499,10 @@ function inputStyle4() {
27392
27499
  };
27393
27500
  }
27394
27501
  delegateEvents(["input", "click"]);
27395
- var _tmpl$494 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27396
- var _tmpl$2139 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
27502
+ var _tmpl$495 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-danger-bg);color:var(--app-affiliate-danger-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27503
+ var _tmpl$2140 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span><input type=password required autocomplete=new-password></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm password</span><input type=password required autocomplete=new-password></label><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
27397
27504
  var _tmpl$3118 = /* @__PURE__ */ template(`<div class=app-affiliate-root style="background:var(--app-affiliate-bg);color:var(--app-affiliate-fg);min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem 1rem"><div style="width:100%;max-width:24rem;background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);padding:2rem;display:flex;flex-direction:column;gap:1.25rem"><h1 style=font-family:var(--app-affiliate-font-display);margin:0;font-size:1.5rem>Choose a new password`);
27398
- var _tmpl$495 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27505
+ var _tmpl$496 = /* @__PURE__ */ template(`<div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem">`);
27399
27506
  function queryParam(name) {
27400
27507
  if (typeof window === "undefined") return "";
27401
27508
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -27442,13 +27549,13 @@ function ResetPasswordPage(props) {
27442
27549
  },
27443
27550
  get fallback() {
27444
27551
  return (() => {
27445
- var _el$11 = _tmpl$495();
27552
+ var _el$11 = _tmpl$496();
27446
27553
  insert(_el$11, message);
27447
27554
  return _el$11;
27448
27555
  })();
27449
27556
  },
27450
27557
  get children() {
27451
- var _el$4 = _tmpl$2139(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
27558
+ var _el$4 = _tmpl$2140(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
27452
27559
  _el$4.addEventListener("submit", handleSubmit);
27453
27560
  _el$7.$$input = (e) => setPassword(e.currentTarget.value);
27454
27561
  _el$0.$$input = (e) => setConfirm(e.currentTarget.value);
@@ -27457,7 +27564,7 @@ function ResetPasswordPage(props) {
27457
27564
  return error();
27458
27565
  },
27459
27566
  get children() {
27460
- var _el$1 = _tmpl$494();
27567
+ var _el$1 = _tmpl$495();
27461
27568
  insert(_el$1, error);
27462
27569
  return _el$1;
27463
27570
  }
@@ -27512,10 +27619,10 @@ function inputStyle5() {
27512
27619
  };
27513
27620
  }
27514
27621
  delegateEvents(["input"]);
27515
- var _tmpl$496 = /* @__PURE__ */ template(`<div>`);
27516
- var _tmpl$2140 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
27622
+ var _tmpl$497 = /* @__PURE__ */ template(`<div>`);
27623
+ var _tmpl$2141 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Email</span><input type=email required autocomplete=email></label><button type=submit>`);
27517
27624
  var _tmpl$3119 = /* @__PURE__ */ template(`<button type=button>Back to login`);
27518
- var _tmpl$497 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
27625
+ var _tmpl$498 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
27519
27626
  var _tmpl$568 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
27520
27627
  function AffiliateForgotPassword(props) {
27521
27628
  const [email, setEmail] = createSignal("");
@@ -27539,7 +27646,7 @@ function AffiliateForgotPassword(props) {
27539
27646
  }
27540
27647
  }
27541
27648
  return (() => {
27542
- var _el$ = _tmpl$497(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
27649
+ var _el$ = _tmpl$498(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
27543
27650
  insert(_el$2, createComponent(Show, {
27544
27651
  get when() {
27545
27652
  return !message();
@@ -27552,7 +27659,7 @@ function AffiliateForgotPassword(props) {
27552
27659
  })();
27553
27660
  },
27554
27661
  get children() {
27555
- var _el$4 = _tmpl$2140(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
27662
+ var _el$4 = _tmpl$2141(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
27556
27663
  _el$4.addEventListener("submit", handleSubmit);
27557
27664
  _el$7.$$input = (e) => setEmail(e.currentTarget.value);
27558
27665
  insert(_el$4, createComponent(Show, {
@@ -27560,7 +27667,7 @@ function AffiliateForgotPassword(props) {
27560
27667
  return error();
27561
27668
  },
27562
27669
  get children() {
27563
- var _el$8 = _tmpl$496();
27670
+ var _el$8 = _tmpl$497();
27564
27671
  insert(_el$8, error);
27565
27672
  effect((_$p) => style(_el$8, errorStyle(), _$p));
27566
27673
  return _el$8;
@@ -27695,10 +27802,10 @@ function linkStyle2() {
27695
27802
  };
27696
27803
  }
27697
27804
  delegateEvents(["input", "click"]);
27698
- var _tmpl$498 = /* @__PURE__ */ template(`<div>`);
27699
- var _tmpl$2141 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
27805
+ var _tmpl$499 = /* @__PURE__ */ template(`<div>`);
27806
+ var _tmpl$2142 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>New password</span></label><label style=display:flex;flex-direction:column;gap:0.35rem><span>Confirm new password</span></label><button type=submit>`);
27700
27807
  var _tmpl$3120 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
27701
- var _tmpl$499 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
27808
+ var _tmpl$4100 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
27702
27809
  function queryParam2(name) {
27703
27810
  if (typeof window === "undefined") return "";
27704
27811
  return new URLSearchParams(window.location.search).get(name) ?? "";
@@ -27748,10 +27855,10 @@ function AffiliateResetPassword(props) {
27748
27855
  return !done();
27749
27856
  },
27750
27857
  get fallback() {
27751
- return _tmpl$499();
27858
+ return _tmpl$4100();
27752
27859
  },
27753
27860
  get children() {
27754
- var _el$4 = _tmpl$2141(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
27861
+ var _el$4 = _tmpl$2142(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
27755
27862
  _el$4.addEventListener("submit", handleSubmit);
27756
27863
  insert(_el$5, createComponent(AffiliatePasswordInput, {
27757
27864
  required: true,
@@ -27776,7 +27883,7 @@ function AffiliateResetPassword(props) {
27776
27883
  return error();
27777
27884
  },
27778
27885
  get children() {
27779
- var _el$9 = _tmpl$498();
27886
+ var _el$9 = _tmpl$499();
27780
27887
  insert(_el$9, error);
27781
27888
  effect((_$p) => style(_el$9, errorStyle2(), _$p));
27782
27889
  return _el$9;
@@ -27875,5 +27982,5 @@ function primaryButtonStyle2(submitting) {
27875
27982
  }
27876
27983
 
27877
27984
  export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
27878
- //# sourceMappingURL=G7ATLWOZ.js.map
27879
- //# sourceMappingURL=G7ATLWOZ.js.map
27985
+ //# sourceMappingURL=YTKBUMDA.js.map
27986
+ //# sourceMappingURL=YTKBUMDA.js.map