@apextelemed/partner-core 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15651,38 +15651,46 @@ function daysAgo(iso) {
15651
15651
  }
15652
15652
 
15653
15653
  // src/pages/admin/Sequences.tsx
15654
- var _tmpl$287 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
15654
+ var _tmpl$287 = /* @__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.`);
15655
15655
  var _tmpl$288 = /* @__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>`);
15656
- var _tmpl$355 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><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>Waiting to send</h2><p style="font-size:0.75rem;margin:0.25rem 0 0">`);
15656
+ var _tmpl$355 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">Send all due`);
15657
15657
  var _tmpl$442 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn style=font-size:inherit>`);
15658
- var _tmpl$537 = /* @__PURE__ */ template(`<tr><td data-label=Person></td><td data-label="Came from"></td><td data-label=Waiting></td><td data-label=Step>Step <!> of </td><td><div style=display:flex;gap:0.375rem;flex-wrap:wrap><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-sm"title="Move past this step without emailing. They stay in the sequence for the next one.">Skip`);
15658
+ var _tmpl$537 = /* @__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`);
15659
15659
  var _tmpl$635 = /* @__PURE__ */ template(`<span class=app-admin-text-muted style=font-size:0.75rem>No sequences yet \u2014 create one in the Sequences tab.`);
15660
15660
  var _tmpl$733 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap><select class=app-admin-input aria-label=Sequence style=width:auto><option value>Add to sequence\u2026</option></select><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
15661
15661
  var _tmpl$828 = /* @__PURE__ */ template(`<option>`);
15662
- var _tmpl$925 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Remove step`);
15663
- var _tmpl$021 = /* @__PURE__ */ template(`<option>(deleted template)`);
15664
- var _tmpl$1101 = /* @__PURE__ */ template(`<select class=app-admin-input><option value>Choose a template\u2026`);
15665
- var _tmpl$1014 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:1rem;display:grid;gap:1rem><div style=display:flex;justify-content:space-between;align-items:center><strong style=font-size:0.875rem>Step </strong><div style=display:flex;gap:0.375rem><button type=button class="app-admin-btn app-admin-btn-sm">Send me a test</button></div></div><div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr));gap:0.75rem"><label><span></span><input class=app-admin-input type=number min=1 max=720></label><label><span>Template</span></label><label><span>Link ({{link}})</span><select class=app-admin-input>`);
15666
- var _tmpl$1116 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Email \u203A Templates`);
15667
- var _tmpl$1213 = /* @__PURE__ */ template(`<div style=display:flex;gap:0.5rem;align-items:center;flex-wrap:wrap><span class=app-admin-text-muted style=font-size:0.8125rem>Create one under Email \u203A Templates first.`);
15668
- var _tmpl$1313 = /* @__PURE__ */ template(`<div style="padding:0 1.25rem">`);
15669
- var _tmpl$1413 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(14rem, 1fr));gap:0.75rem"><label><span>Only enroll people who entered in the last (days)</span><input class=app-admin-input type=number min=1 max=365><span class=app-admin-text-muted style=font-size:0.75rem>So switching a feed on never mails months-old accounts. Add those by hand from the Funnel tab if you want them.</span></label><label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>Skip people whose questionnaire did not qualify`);
15670
- var _tmpl$1513 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-danger-fg);font-size:0.8125rem;margin:0>`);
15671
- var _tmpl$1613 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-danger app-admin-btn-sm">Archive`);
15672
- var _tmpl$1713 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Step</th><th>Next due</th><th></th></tr></thead><tbody>`);
15673
- var _tmpl$1812 = /* @__PURE__ */ template(`<div style="border-top:1px solid var(--app-admin-border-soft)"><div style="padding:0.75rem 1.25rem"><strong style=font-size:0.875rem>In this sequence \u2014 `);
15674
- var _tmpl$1912 = /* @__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"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0></h2><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Back to list</button></div><div style="padding:1rem 1.25rem;display:grid;gap:1rem"><div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(14rem, 1fr));gap:0.75rem"><label><span>Name</span><input class=app-admin-input maxlength=120 placeholder="Finish your visit"></label><label><span>Description (internal)</span><input class=app-admin-input maxlength=500></label></div><div><button type=button class="app-admin-btn app-admin-btn-sm">Add a step</button></div><div class=app-admin-card-soft style=padding:1rem;display:grid;gap:0.75rem><strong style=font-size:0.875rem>Who gets enrolled</strong><p class=app-admin-text-muted style=font-size:0.75rem;margin:0>People you add from the Funnel tab are always enrolled. Tick segments below and the hourly check also enrolls anyone who enters them \u2014 and removes them when they leave. Their clock starts from their own entry.</p></div><div class=app-admin-card-soft style=padding:1rem;display:grid;gap:0.5rem><strong style=font-size:0.875rem>How emails go out</strong><label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>Send automatically when a step is due</label><p class=app-admin-text-muted style=font-size:0.75rem;margin:0></p></div><div style=display:flex;gap:0.5rem;align-items:center><button type=button class="app-admin-btn app-admin-btn-primary">`);
15675
- var _tmpl$2010 = /* @__PURE__ */ template(`<div><div style=margin-bottom:0.25rem></div><div style="display:flex;flex-wrap:wrap;gap:0.5rem 1rem">`);
15676
- var _tmpl$2115 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>`);
15677
- var _tmpl$2212 = /* @__PURE__ */ template(`<tr><td data-label=Person><div class=app-admin-text-muted style=font-size:0.75rem> \xB7 </div></td><td data-label="Came from"></td><td data-label=Step> of </td><td data-label="Next due"class=app-admin-text-muted></td><td><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Remove`);
15678
- var _tmpl$2311 = /* @__PURE__ */ template(`<div>`);
15679
- var _tmpl$2411 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Name</th><th>Steps</th><th>Fed by</th><th>Sending</th><th>In it</th><th>Due now</th><th>Sent</th><th>Bought</th><th>Unsubscribed</th></tr></thead><tbody>`);
15680
- var _tmpl$2511 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>Sequences</h2><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">New sequence`);
15681
- var _tmpl$2610 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
15682
- var _tmpl$2710 = /* @__PURE__ */ template(`<tr><td data-label=Name><button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:600></button></td><td data-label=Steps></td><td data-label="Fed by"></td><td data-label=Sending></td><td data-label="In it"></td><td data-label="Due now"></td><td data-label=Sent></td><td data-label=Bought></td><td data-label=Unsubscribed>`);
15683
- var _tmpl$289 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>by hand`);
15684
- var _tmpl$295 = /* @__PURE__ */ template(`<strong>`);
15685
- var _tmpl$305 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>0`);
15662
+ var _tmpl$925 = /* @__PURE__ */ template(`<option>(deleted template)`);
15663
+ var _tmpl$021 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:2rem minmax(7rem, 9rem) minmax(12rem, 2fr) minmax(10rem, 1fr) auto;gap:0.5rem;align-items:center;padding:0.625rem 1.25rem"><span class=app-admin-text-muted style=font-size:0.8125rem;font-weight:600></span><label style=display:flex;gap:0.375rem;align-items:center;font-size:0.8125rem><span class=app-admin-text-muted></span><input class=app-admin-input type=number min=1 max=720 style=width:4.5rem><span class=app-admin-text-muted>h</span></label><select class=app-admin-input><option value>Choose a template\u2026</option></select><select class=app-admin-input></select><div style=display:flex;gap:0.25rem><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Test</button><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Remove step">\xD7`);
15664
+ var _tmpl$1101 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style="font-size:0.75rem;margin:0;padding:0.625rem 1.25rem 0">Each step waits the given hours after the previous one (the first, after enrollment), then sends its template with the chosen link.`);
15665
+ var _tmpl$1014 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Person</th><th>Came from</th><th>Step</th><th>Next due</th><th></th></tr></thead><tbody>`);
15666
+ var _tmpl$1116 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><label><span>Name</span><input class=app-admin-input maxlength=120 placeholder="Finish your visit"></label><label><span>Notes (internal)</span><input class=app-admin-input maxlength=500 placeholder="Who this is for and why">`);
15667
+ var _tmpl$1213 = /* @__PURE__ */ template(`<label><input type=checkbox aria-label="Send automatically when a step is due"><span>Send automatically when a step is due<span class=app-admin-text-muted style=display:block;font-size:0.75rem;margin-top:0.125rem>`);
15668
+ var _tmpl$1313 = /* @__PURE__ */ template(`<label><span>Only enroll people who entered in the last (days)</span><input class=app-admin-input type=number min=1 max=365><span class=app-admin-text-muted style=font-size:0.75rem>So a feed never mails months-old accounts. Add those by hand if you want them.`);
15669
+ var _tmpl$1413 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>Skip people whose questionnaire did not qualify`);
15670
+ var _tmpl$1513 = /* @__PURE__ */ template(`<div style=display:grid;gap:0.75rem><p class=app-admin-text-muted style=font-size:0.75rem;margin:0>Anyone you add from the Funnel tab. Tick segments to also enroll whoever enters them (the hourly check adds and removes them; their clock starts at their own entry).`);
15671
+ var _tmpl$1613 = /* @__PURE__ */ template(`<div style=max-width:40rem>`);
15672
+ var _tmpl$1713 = /* @__PURE__ */ template(`<div><nav role=tablist aria-label="Sequence sections"style="display:flex;gap:0.25rem;border-bottom:1px solid var(--app-admin-border);margin:1rem 0 1.25rem">`);
15673
+ var _tmpl$1812 = /* @__PURE__ */ template(`<span style=text-transform:none>`);
15674
+ var _tmpl$1912 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none>`);
15675
+ var _tmpl$2010 = /* @__PURE__ */ template(`<span class="app-admin-badge app-admin-badge--neutral"style=text-transform:none> in it`);
15676
+ var _tmpl$2115 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Archive`);
15677
+ var _tmpl$2212 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary">`);
15678
+ var _tmpl$2311 = /* @__PURE__ */ template(`<span style=margin-left:0.375rem;opacity:0.7>`);
15679
+ var _tmpl$2411 = /* @__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">`);
15680
+ var _tmpl$2511 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Add step`);
15681
+ var _tmpl$2610 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-sm">Open Email \u203A Templates`);
15682
+ var _tmpl$2710 = /* @__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.`);
15683
+ var _tmpl$289 = /* @__PURE__ */ template(`<tr><td data-label=Person><div class=app-admin-text-muted style=font-size:0.75rem> \xB7 </div></td><td data-label="Came from"></td><td data-label=Step> of </td><td data-label="Next due"class=app-admin-text-muted></td><td class=app-admin-table-cell--end><button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm">Remove`);
15684
+ var _tmpl$295 = /* @__PURE__ */ template(`<div><div style=font-size:0.75rem;margin-bottom:0.25rem></div><div style=display:grid;gap:0.25rem>`);
15685
+ var _tmpl$305 = /* @__PURE__ */ template(`<label style=font-size:0.8125rem;display:flex;gap:0.375rem;align-items:center><input type=checkbox>`);
15686
+ var _tmpl$3112 = /* @__PURE__ */ template(`<div>`);
15687
+ var _tmpl$3210 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Name</th><th>Steps</th><th>Fed by</th><th>Sending</th><th>In it</th><th>Due now</th><th>Sent</th><th>Bought</th><th>Unsubscribed</th></tr></thead><tbody>`);
15688
+ var _tmpl$3310 = /* @__PURE__ */ template(`<div class=app-admin-card style=margin-top:1.25rem;overflow:hidden><div style="padding:1rem 1.25rem;border-bottom:1px solid var(--app-admin-border-soft);display:flex;justify-content:space-between;align-items:center"><h2 class=app-admin-heading style=font-size:0.9375rem;font-weight:600;margin:0>Sequences</h2><button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">New sequence`);
15689
+ var _tmpl$3410 = /* @__PURE__ */ template(`<div class=app-admin-text-muted style=font-size:0.75rem>`);
15690
+ var _tmpl$356 = /* @__PURE__ */ template(`<tr><td data-label=Name><button type=button class=app-admin-link-btn style=font-size:inherit;font-weight:600></button></td><td data-label=Steps></td><td data-label="Fed by"></td><td data-label=Sending></td><td data-label="In it"></td><td data-label="Due now"></td><td data-label=Sent></td><td data-label=Bought></td><td data-label=Unsubscribed>`);
15691
+ var _tmpl$363 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>by hand`);
15692
+ var _tmpl$372 = /* @__PURE__ */ template(`<strong>`);
15693
+ var _tmpl$382 = /* @__PURE__ */ template(`<span class=app-admin-text-muted>0`);
15686
15694
  var LINKS = ["members", "resume_survey", "cart", "home", "none"];
15687
15695
  var EMPTY_STEP = {
15688
15696
  waitHours: 24,
@@ -15715,12 +15723,9 @@ var field = {
15715
15723
  };
15716
15724
  function SequenceQueue(props) {
15717
15725
  const nav = useAdminNav();
15718
- const [reload, setReload] = createSignal(0);
15719
15726
  const [busy, setBusy] = createSignal(null);
15720
- const [queue, {
15721
- refetch
15722
- }] = createResource(reload, () => apiFetch("/admin/funnel/queue"));
15723
- const rows = () => (queue()?.due ?? []).filter((r) => r.sequenceId === props.sequence.id);
15727
+ const rows = () => props.rows ?? [];
15728
+ const refetch = () => props.refetch();
15724
15729
  const act = async (row, action) => {
15725
15730
  setBusy(row.enrollmentId);
15726
15731
  try {
@@ -15749,7 +15754,7 @@ function SequenceQueue(props) {
15749
15754
  method: "POST"
15750
15755
  });
15751
15756
  toastSuccess(Object.entries(r.outcomes).map(([k, n]) => `${n} ${OUTCOME_LABEL[k] ?? k}`).join(", ") || "Nothing was due");
15752
- setReload(reload() + 1);
15757
+ refetch();
15753
15758
  props.onChanged();
15754
15759
  } catch (e) {
15755
15760
  toastError(e.message);
@@ -15757,92 +15762,100 @@ function SequenceQueue(props) {
15757
15762
  setBusy(null);
15758
15763
  }
15759
15764
  };
15760
- return (() => {
15761
- var _el$ = _tmpl$355(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.firstChild; var _el$6 = _el$4.nextSibling;
15762
- insert(_el$4, (() => {
15763
- var _c$ = memo(() => !!queue());
15764
- return () => _c$() ? ` \u2014 ${rows().length} due` : "";
15765
- })(), null);
15766
- insert(_el$6, () => props.sequence.autoSend ? "Sending is automatic: the hourly check mails these itself. Anything listed here is due before its next run." : "Due by this sequence's schedule. Nothing here has been emailed, and nothing will be until you send it or turn automatic sending on.");
15767
- insert(_el$2, createComponent(Show, {
15768
- get when() {
15769
- return rows().length > 0;
15770
- },
15771
- get children() {
15772
- var _el$7 = _tmpl$287();
15773
- _el$7.$$click = () => void sendAll();
15774
- effect(() => _el$7.disabled = busy() === "all");
15775
- return _el$7;
15776
- }
15777
- }), null);
15778
- insert(_el$, createComponent(Show, {
15779
- get when() {
15780
- return queue();
15781
- },
15782
- get fallback() {
15783
- return createComponent(LoadingSpinner, {});
15784
- },
15785
- get children() {
15786
- return createComponent(Show, {
15787
- get when() {
15788
- return rows().length > 0;
15789
- },
15790
- get fallback() {
15791
- return createComponent(EmptyState, {
15792
- message: "Nobody in this sequence is due right now."
15793
- });
15794
- },
15795
- get children() {
15796
- var _el$8 = _tmpl$288(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
15797
- insert(_el$0, createComponent(For, {
15798
- get each() {
15799
- return rows();
15800
- },
15801
- children: (row) => (() => {
15802
- var _el$1 = _tmpl$537(), _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$13.nextSibling, _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling; var _el$18 = _el$14.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
15803
- insert(_el$10, createComponent(Show, {
15804
- get when() {
15805
- return row.userId && nav;
15806
- },
15807
- get fallback() {
15808
- return row.email;
15809
- },
15810
- get children() {
15811
- var _el$11 = _tmpl$442();
15812
- _el$11.$$click = () => nav.openCustomer(row.userId);
15813
- insert(_el$11, () => row.email);
15814
- return _el$11;
15815
- }
15816
- }));
15817
- insert(_el$12, () => segmentLongLabel(row.segmentAtAdd));
15818
- insert(_el$13, () => daysAgo(row.anchoredAt));
15819
- insert(_el$14, () => row.stepIndex + 1, _el$17);
15820
- insert(_el$14, () => row.stepCount, null);
15821
- _el$20.$$click = () => void act(row, "send");
15822
- insert(_el$20, () => busy() === row.enrollmentId ? "Sending\u2026" : "Send");
15823
- _el$21.$$click = () => void act(row, "skip");
15824
- effect((_p$) => {
15825
- var _v$ = busy() === row.enrollmentId, _v$2 = busy() === row.enrollmentId;
15826
- _v$ !== _p$.e && (_el$20.disabled = _p$.e = _v$);
15827
- _v$2 !== _p$.t && (_el$21.disabled = _p$.t = _v$2);
15828
- return _p$;
15829
- }, {
15830
- e: void 0,
15831
- t: void 0
15832
- });
15833
- return _el$1;
15834
- })()
15835
- }));
15836
- return _el$8;
15837
- }
15838
- });
15839
- }
15840
- }), null);
15841
- effect((_$p) => style(_el$6, {
15842
- ...label
15843
- }, _$p));
15844
- return _el$;
15845
- })();
15765
+ return createComponent(Section, {
15766
+ title: "Waiting to send",
15767
+ get count() {
15768
+ return rows().length;
15769
+ },
15770
+ flush: true,
15771
+ get action() {
15772
+ return createComponent(Show, {
15773
+ get when() {
15774
+ return rows().length > 0;
15775
+ },
15776
+ get children() {
15777
+ var _el$5 = _tmpl$355();
15778
+ _el$5.$$click = () => void sendAll();
15779
+ effect(() => _el$5.disabled = busy() === "all");
15780
+ return _el$5;
15781
+ }
15782
+ });
15783
+ },
15784
+ get children() {
15785
+ return [createComponent(Show, {
15786
+ get when() {
15787
+ return !props.sequence.autoSend;
15788
+ },
15789
+ get children() {
15790
+ return _tmpl$287();
15791
+ }
15792
+ }), createComponent(Show, {
15793
+ get when() {
15794
+ return props.rows;
15795
+ },
15796
+ get fallback() {
15797
+ return createComponent(LoadingSpinner, {});
15798
+ },
15799
+ get children() {
15800
+ return createComponent(Show, {
15801
+ get when() {
15802
+ return rows().length > 0;
15803
+ },
15804
+ get fallback() {
15805
+ return createComponent(EmptyState, {
15806
+ get message() {
15807
+ return props.sequence.autoSend ? "Nothing due \u2014 the hourly check sends these itself." : "Nobody is due right now.";
15808
+ }
15809
+ });
15810
+ },
15811
+ get children() {
15812
+ var _el$2 = _tmpl$288(), _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling;
15813
+ insert(_el$4, createComponent(For, {
15814
+ get each() {
15815
+ return rows();
15816
+ },
15817
+ children: (row) => (() => {
15818
+ var _el$6 = _tmpl$537(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling, _el$0 = _el$9.nextSibling, _el$1 = _el$0.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$1.nextSibling, _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling;
15819
+ insert(_el$7, createComponent(Show, {
15820
+ get when() {
15821
+ return row.userId && nav;
15822
+ },
15823
+ get fallback() {
15824
+ return row.email;
15825
+ },
15826
+ get children() {
15827
+ var _el$8 = _tmpl$442();
15828
+ _el$8.$$click = () => nav.openCustomer(row.userId);
15829
+ insert(_el$8, () => row.email);
15830
+ return _el$8;
15831
+ }
15832
+ }));
15833
+ insert(_el$9, () => segmentLongLabel(row.segmentAtAdd));
15834
+ insert(_el$0, () => daysAgo(row.anchoredAt));
15835
+ insert(_el$1, () => row.stepIndex + 1, _el$10);
15836
+ insert(_el$1, () => row.stepCount, null);
15837
+ _el$13.$$click = () => void act(row, "send");
15838
+ insert(_el$13, () => busy() === row.enrollmentId ? "Sending\u2026" : "Send");
15839
+ _el$14.$$click = () => void act(row, "skip");
15840
+ effect((_p$) => {
15841
+ var _v$ = busy() === row.enrollmentId, _v$2 = busy() === row.enrollmentId;
15842
+ _v$ !== _p$.e && (_el$13.disabled = _p$.e = _v$);
15843
+ _v$2 !== _p$.t && (_el$14.disabled = _p$.t = _v$2);
15844
+ return _p$;
15845
+ }, {
15846
+ e: void 0,
15847
+ t: void 0
15848
+ });
15849
+ return _el$6;
15850
+ })()
15851
+ }));
15852
+ return _el$2;
15853
+ }
15854
+ });
15855
+ }
15856
+ })];
15857
+ }
15858
+ });
15846
15859
  }
15847
15860
  var OUTCOME_LABEL = {
15848
15861
  sent: "sent",
@@ -15879,25 +15892,25 @@ function AddToSequence(props) {
15879
15892
  }
15880
15893
  };
15881
15894
  return (() => {
15882
- var _el$22 = _tmpl$733(), _el$23 = _el$22.firstChild; _el$23.firstChild; var _el$25 = _el$23.nextSibling;
15883
- _el$23.addEventListener("change", (e) => setTarget(e.currentTarget.value));
15884
- insert(_el$23, createComponent(For, {
15895
+ var _el$15 = _tmpl$733(), _el$16 = _el$15.firstChild; _el$16.firstChild; var _el$18 = _el$16.nextSibling;
15896
+ _el$16.addEventListener("change", (e) => setTarget(e.currentTarget.value));
15897
+ insert(_el$16, createComponent(For, {
15885
15898
  get each() {
15886
15899
  return sequences()?.sequences ?? [];
15887
15900
  },
15888
15901
  children: (s) => (() => {
15889
- var _el$27 = _tmpl$828();
15890
- insert(_el$27, () => s.name);
15891
- effect(() => _el$27.value = s.id);
15892
- return _el$27;
15902
+ var _el$20 = _tmpl$828();
15903
+ insert(_el$20, () => s.name);
15904
+ effect(() => _el$20.value = s.id);
15905
+ return _el$20;
15893
15906
  })()
15894
15907
  }), null);
15895
- _el$25.$$click = () => void add();
15896
- insert(_el$25, (() => {
15897
- var _c$2 = memo(() => !!busy());
15898
- return () => _c$2() ? "Adding\u2026" : `Add ${props.people.length}`;
15908
+ _el$18.$$click = () => void add();
15909
+ insert(_el$18, (() => {
15910
+ var _c$ = memo(() => !!busy());
15911
+ return () => _c$() ? "Adding\u2026" : `Add ${props.people.length}`;
15899
15912
  })());
15900
- insert(_el$22, createComponent(Show, {
15913
+ insert(_el$15, createComponent(Show, {
15901
15914
  get when() {
15902
15915
  return memo(() => !!sequences())() && sequences().sequences.length === 0;
15903
15916
  },
@@ -15905,98 +15918,66 @@ function AddToSequence(props) {
15905
15918
  return _tmpl$635();
15906
15919
  }
15907
15920
  }), null);
15908
- effect(() => _el$25.disabled = busy() || !target() || props.people.length === 0);
15909
- effect(() => _el$23.value = target());
15910
- return _el$22;
15921
+ effect(() => _el$18.disabled = busy() || !target() || props.people.length === 0);
15922
+ effect(() => _el$16.value = target());
15923
+ return _el$15;
15911
15924
  })();
15912
15925
  }
15913
- function StepEditor(props) {
15914
- const nav = useAdminNav();
15926
+ function StepRow(props) {
15915
15927
  const set = (k, v) => props.onChange({
15916
15928
  ...props.step,
15917
15929
  [k]: v
15918
15930
  });
15919
15931
  const missingTemplate = () => props.step.templateId && !props.templates.some((t) => t.id === props.step.templateId);
15920
15932
  return (() => {
15921
- var _el$28 = _tmpl$1014(), _el$29 = _el$28.firstChild, _el$30 = _el$29.firstChild; _el$30.firstChild; var _el$32 = _el$30.nextSibling, _el$33 = _el$32.firstChild, _el$35 = _el$29.nextSibling, _el$36 = _el$35.firstChild, _el$37 = _el$36.firstChild, _el$38 = _el$37.nextSibling, _el$39 = _el$36.nextSibling, _el$40 = _el$39.firstChild, _el$44 = _el$39.nextSibling, _el$45 = _el$44.firstChild, _el$46 = _el$45.nextSibling;
15922
- insert(_el$30, () => props.index + 1, null);
15923
- _el$33.$$click = () => props.onTest();
15924
- insert(_el$32, createComponent(Show, {
15933
+ var _el$21 = _tmpl$021(), _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$24 = _el$23.firstChild, _el$25 = _el$24.nextSibling, _el$26 = _el$23.nextSibling; _el$26.firstChild; var _el$29 = _el$26.nextSibling, _el$30 = _el$29.nextSibling, _el$31 = _el$30.firstChild, _el$32 = _el$31.nextSibling;
15934
+ insert(_el$22, () => props.index + 1);
15935
+ insert(_el$24, () => props.index === 0 ? "after" : "+");
15936
+ _el$25.$$input = (e) => set("waitHours", Number(e.currentTarget.value));
15937
+ _el$26.addEventListener("change", (e) => set("templateId", e.currentTarget.value));
15938
+ insert(_el$26, createComponent(Show, {
15925
15939
  get when() {
15926
- return props.count > 1;
15940
+ return missingTemplate();
15927
15941
  },
15928
15942
  get children() {
15929
- var _el$34 = _tmpl$925();
15930
- _el$34.$$click = () => props.onRemove();
15931
- return _el$34;
15943
+ var _el$28 = _tmpl$925();
15944
+ effect(() => _el$28.value = props.step.templateId);
15945
+ return _el$28;
15932
15946
  }
15933
15947
  }), null);
15934
- insert(_el$37, () => props.index === 0 ? "Hours after they are added" : "Hours after the previous step");
15935
- _el$38.$$input = (e) => set("waitHours", Number(e.currentTarget.value));
15936
- insert(_el$39, createComponent(Show, {
15937
- get when() {
15938
- return props.templates.length > 0;
15939
- },
15940
- get fallback() {
15941
- return (() => {
15942
- var _el$47 = _tmpl$1213(); _el$47.firstChild;
15943
- insert(_el$47, createComponent(Show, {
15944
- when: nav,
15945
- get children() {
15946
- var _el$49 = _tmpl$1116();
15947
- _el$49.$$click = () => nav.selectTab("email-templates");
15948
- return _el$49;
15949
- }
15950
- }), null);
15951
- return _el$47;
15952
- })();
15948
+ insert(_el$26, createComponent(For, {
15949
+ get each() {
15950
+ return props.templates;
15953
15951
  },
15954
- get children() {
15955
- var _el$41 = _tmpl$1101(); _el$41.firstChild;
15956
- _el$41.addEventListener("change", (e) => set("templateId", e.currentTarget.value));
15957
- insert(_el$41, createComponent(Show, {
15958
- get when() {
15959
- return missingTemplate();
15960
- },
15961
- get children() {
15962
- var _el$43 = _tmpl$021();
15963
- effect(() => _el$43.value = props.step.templateId);
15964
- return _el$43;
15965
- }
15966
- }), null);
15967
- insert(_el$41, createComponent(For, {
15968
- get each() {
15969
- return props.templates;
15970
- },
15971
- children: (t) => (() => {
15972
- var _el$50 = _tmpl$828();
15973
- insert(_el$50, () => t.name);
15974
- effect(() => _el$50.value = t.id);
15975
- return _el$50;
15976
- })()
15977
- }), null);
15978
- effect(() => _el$41.value = props.step.templateId);
15979
- return _el$41;
15980
- }
15952
+ children: (t) => (() => {
15953
+ var _el$33 = _tmpl$828();
15954
+ insert(_el$33, () => t.name);
15955
+ effect(() => _el$33.value = t.id);
15956
+ return _el$33;
15957
+ })()
15981
15958
  }), null);
15982
- _el$46.addEventListener("change", (e) => set("link", e.currentTarget.value));
15983
- insert(_el$46, createComponent(For, {
15959
+ _el$29.addEventListener("change", (e) => set("link", e.currentTarget.value));
15960
+ insert(_el$29, createComponent(For, {
15984
15961
  each: LINKS,
15985
15962
  children: (l) => (() => {
15986
- var _el$51 = _tmpl$828();
15987
- _el$51.value = l;
15988
- insert(_el$51, () => LINK_LABEL[l]);
15989
- return _el$51;
15963
+ var _el$34 = _tmpl$828();
15964
+ _el$34.value = l;
15965
+ insert(_el$34, () => LINK_LABEL[l]);
15966
+ return _el$34;
15990
15967
  })()
15991
15968
  }));
15969
+ _el$31.$$click = () => props.onTest();
15970
+ _el$32.$$click = () => props.onRemove();
15992
15971
  effect((_p$) => {
15993
- var _v$3 = field, _v$4 = label, _v$5 = field, _v$6 = label, _v$7 = field, _v$8 = label;
15994
- _p$.e = style(_el$36, _v$3, _p$.e);
15995
- _p$.t = style(_el$37, _v$4, _p$.t);
15996
- _p$.a = style(_el$39, _v$5, _p$.a);
15997
- _p$.o = style(_el$40, _v$6, _p$.o);
15998
- _p$.i = style(_el$44, _v$7, _p$.i);
15999
- _p$.n = style(_el$45, _v$8, _p$.n);
15972
+ var _v$3 = props.index === 0 ? "none" : "1px solid var(--app-admin-border-soft)", _v$4 = `Step ${props.index + 1} wait hours`, _v$5 = `Step ${props.index + 1} template`, _v$6 = `Step ${props.index + 1} link`, _v$7 = !props.canTest, _v$8 = props.canTest ? "Email this step to me" : "Save first", _v$9 = props.count <= 1, _v$0 = `Remove step ${props.index + 1}`;
15973
+ _v$3 !== _p$.e && setStyleProperty(_el$21, "border-top", _p$.e = _v$3);
15974
+ _v$4 !== _p$.t && setAttribute(_el$25, "aria-label", _p$.t = _v$4);
15975
+ _v$5 !== _p$.a && setAttribute(_el$26, "aria-label", _p$.a = _v$5);
15976
+ _v$6 !== _p$.o && setAttribute(_el$29, "aria-label", _p$.o = _v$6);
15977
+ _v$7 !== _p$.i && (_el$31.disabled = _p$.i = _v$7);
15978
+ _v$8 !== _p$.n && setAttribute(_el$31, "title", _p$.n = _v$8);
15979
+ _v$9 !== _p$.s && (_el$32.disabled = _p$.s = _v$9);
15980
+ _v$0 !== _p$.h && setAttribute(_el$32, "aria-label", _p$.h = _v$0);
16000
15981
  return _p$;
16001
15982
  }, {
16002
15983
  e: void 0,
@@ -16004,22 +15985,45 @@ function StepEditor(props) {
16004
15985
  a: void 0,
16005
15986
  o: void 0,
16006
15987
  i: void 0,
16007
- n: void 0
15988
+ n: void 0,
15989
+ s: void 0,
15990
+ h: void 0
16008
15991
  });
16009
- effect(() => _el$38.value = props.step.waitHours);
16010
- effect(() => _el$46.value = props.step.link);
16011
- return _el$28;
15992
+ effect(() => _el$25.value = props.step.waitHours);
15993
+ effect(() => _el$26.value = props.step.templateId);
15994
+ effect(() => _el$29.value = props.step.link);
15995
+ return _el$21;
16012
15996
  })();
16013
15997
  }
15998
+ var checkboxRow = {
15999
+ "font-size": "0.8125rem",
16000
+ display: "flex",
16001
+ gap: "0.5rem",
16002
+ "align-items": "flex-start"
16003
+ };
16014
16004
  function SequenceEditor(props) {
16015
16005
  const nav = useAdminNav();
16016
16006
  const [draft, setDraft] = createSignal(JSON.parse(JSON.stringify(props.initial)));
16017
16007
  const [saving, setSaving] = createSignal(false);
16018
16008
  const [error, setError] = createSignal(null);
16019
16009
  const isNew = () => !draft().id;
16010
+ const dirty = () => JSON.stringify(draft()) !== JSON.stringify(props.initial);
16020
16011
  const [enrollments, {
16021
16012
  refetch: refetchEnrollments
16022
16013
  }] = createResource(() => props.initial.id || null, (id) => apiFetch(`/admin/funnel/sequences/${id}/enrollments`));
16014
+ const [queue, {
16015
+ refetch: refetchQueue
16016
+ }] = createResource(() => props.initial.id || null, () => apiFetch("/admin/funnel/queue"));
16017
+ const dueRows = () => queue() ? queue().due.filter((r) => r.sequenceId === props.initial.id) : void 0;
16018
+ const [tab, setTab] = createSignal(isNew() ? "settings" : "queue");
16019
+ const tabKeys = () => isNew() ? ["steps", "settings"] : ["queue", "steps", "people", "settings"];
16020
+ const TAB_LABEL = {
16021
+ queue: "Queue",
16022
+ steps: "Steps",
16023
+ people: "People",
16024
+ settings: "Settings"
16025
+ };
16026
+ const tabCount = (key) => key === "queue" ? dueRows()?.length : key === "steps" ? draft().steps.length : key === "people" ? enrollments()?.enrollments.length : void 0;
16023
16027
  const update = (patch) => setDraft({
16024
16028
  ...draft(),
16025
16029
  ...patch
@@ -16076,10 +16080,6 @@ function SequenceEditor(props) {
16076
16080
  }
16077
16081
  };
16078
16082
  const test = async (stepIndex) => {
16079
- if (isNew()) {
16080
- toastError("Save the sequence first, then send a test.");
16081
- return;
16082
- }
16083
16083
  try {
16084
16084
  const r = await apiFetch(`/admin/funnel/sequences/${draft().id}/test`, {
16085
16085
  method: "POST",
@@ -16109,230 +16109,387 @@ function SequenceEditor(props) {
16109
16109
  feedSegments: cur.includes(key) ? cur.filter((k) => k !== key) : [...cur, key]
16110
16110
  });
16111
16111
  };
16112
+ const feedSummary = () => draft().feedSegments.length > 0 ? `Fed by ${draft().feedSegments.length} segment${draft().feedSegments.length === 1 ? "" : "s"}, last ${draft().feedMaxAgeDays ?? 30} days` : "Enrolled by hand only";
16112
16113
  return (() => {
16113
- var _el$52 = _tmpl$1912(), _el$53 = _el$52.firstChild, _el$54 = _el$53.firstChild, _el$55 = _el$54.nextSibling, _el$57 = _el$53.nextSibling, _el$58 = _el$57.firstChild, _el$59 = _el$58.firstChild, _el$60 = _el$59.firstChild, _el$61 = _el$60.nextSibling, _el$62 = _el$59.nextSibling, _el$63 = _el$62.firstChild, _el$64 = _el$63.nextSibling, _el$65 = _el$58.nextSibling, _el$66 = _el$65.firstChild, _el$67 = _el$65.nextSibling, _el$68 = _el$67.firstChild; _el$68.nextSibling; var _el$77 = _el$67.nextSibling, _el$78 = _el$77.firstChild, _el$79 = _el$78.nextSibling, _el$80 = _el$79.firstChild, _el$81 = _el$79.nextSibling, _el$83 = _el$77.nextSibling, _el$84 = _el$83.firstChild;
16114
- insert(_el$54, (() => {
16115
- var _c$3 = memo(() => !!isNew());
16116
- return () => _c$3() ? "New sequence" : draft().name;
16117
- })());
16118
- _el$55.$$click = () => props.onClose();
16119
- insert(_el$52, createComponent(Show, {
16120
- get when() {
16121
- return !isNew();
16114
+ var _el$35 = _tmpl$1713(), _el$36 = _el$35.firstChild;
16115
+ insert(_el$35, createComponent(DetailHeader, {
16116
+ backLabel: "Sequences",
16117
+ onBack: () => props.onClose(),
16118
+ get title() {
16119
+ return memo(() => !!isNew())() ? "New sequence" : draft().name || "Untitled sequence";
16122
16120
  },
16123
- get children() {
16124
- var _el$56 = _tmpl$1313();
16125
- insert(_el$56, createComponent(SequenceQueue, {
16126
- get sequence() {
16127
- return props.initial;
16121
+ get subtitle() {
16122
+ return draft().description || (isNew() ? "Timed emails for people who stopped short of a subscription." : void 0);
16123
+ },
16124
+ get badges() {
16125
+ return [(() => {
16126
+ var _el$62 = _tmpl$1812();
16127
+ insert(_el$62, () => draft().autoSend ? "Sends automatically" : "Sends on review");
16128
+ effect(() => className(_el$62, `app-admin-badge app-admin-badge--${draft().autoSend ? "success" : "info"}`));
16129
+ return _el$62;
16130
+ })(), (() => {
16131
+ var _el$63 = _tmpl$1912();
16132
+ insert(_el$63, feedSummary);
16133
+ return _el$63;
16134
+ })(), createComponent(Show, {
16135
+ get when() {
16136
+ return memo(() => !!!isNew())() && enrollments();
16128
16137
  },
16129
- get onChanged() {
16130
- return props.onChanged;
16138
+ get children() {
16139
+ var _el$64 = _tmpl$2010(), _el$65 = _el$64.firstChild;
16140
+ insert(_el$64, () => enrollments().enrollments.length, _el$65);
16141
+ return _el$64;
16131
16142
  }
16132
- }));
16133
- return _el$56;
16134
- }
16135
- }), _el$57);
16136
- _el$61.$$input = (e) => update({
16137
- name: e.currentTarget.value
16138
- });
16139
- _el$64.$$input = (e) => update({
16140
- description: e.currentTarget.value || null
16141
- });
16142
- insert(_el$57, createComponent(Index, {
16143
- get each() {
16144
- return draft().steps;
16143
+ })];
16145
16144
  },
16146
- children: (step, i) => createComponent(StepEditor, {
16147
- index: i,
16148
- get step() {
16149
- return step();
16150
- },
16151
- get count() {
16152
- return draft().steps.length;
16153
- },
16154
- get templates() {
16155
- return props.templates;
16156
- },
16157
- onChange: (s) => setStep(i, s),
16158
- onRemove: () => update({
16159
- steps: draft().steps.filter((_, j) => j !== i)
16160
- }),
16161
- onTest: () => void test(i)
16162
- })
16163
- }), _el$65);
16164
- _el$66.$$click = () => update({
16165
- steps: [...draft().steps, {
16166
- ...EMPTY_STEP,
16167
- waitHours: 72
16168
- }]
16169
- });
16170
- insert(_el$67, createComponent(For, {
16171
- each: ["a", "b"],
16172
- children: (g) => (() => {
16173
- var _el$93 = _tmpl$2010(), _el$94 = _el$93.firstChild, _el$95 = _el$94.nextSibling;
16174
- insert(_el$94, () => GROUP_LABEL[g]);
16175
- insert(_el$95, createComponent(For, {
16176
- get each() {
16177
- return SEGMENT_KEYS[g];
16145
+ get actions() {
16146
+ return [createComponent(Show, {
16147
+ get when() {
16148
+ return !isNew();
16178
16149
  },
16179
- children: (key) => (() => {
16180
- var _el$96 = _tmpl$2115(), _el$97 = _el$96.firstChild;
16181
- _el$97.addEventListener("change", () => toggleSegment(key));
16182
- insert(_el$96, () => SEGMENT_LABEL[key], null);
16183
- effect(() => _el$97.checked = draft().feedSegments.includes(key));
16184
- return _el$96;
16185
- })()
16186
- }));
16187
- effect((_$p) => style(_el$94, {
16188
- ...label
16189
- }, _$p));
16190
- return _el$93;
16191
- })()
16192
- }), null);
16193
- insert(_el$67, createComponent(Show, {
16150
+ get children() {
16151
+ var _el$66 = _tmpl$2115();
16152
+ _el$66.$$click = () => void archive();
16153
+ return _el$66;
16154
+ }
16155
+ }), (() => {
16156
+ var _el$67 = _tmpl$2212();
16157
+ _el$67.$$click = () => void save();
16158
+ insert(_el$67, (() => {
16159
+ var _c$2 = memo(() => !!saving());
16160
+ return () => _c$2() ? "Saving\u2026" : isNew() ? "Create sequence" : "Save changes";
16161
+ })());
16162
+ effect(() => _el$67.disabled = saving() || !isNew() && !dirty());
16163
+ return _el$67;
16164
+ })()];
16165
+ }
16166
+ }), _el$36);
16167
+ insert(_el$35, createComponent(Show, {
16194
16168
  get when() {
16195
- return draft().feedSegments.length > 0;
16169
+ return error();
16196
16170
  },
16197
16171
  get children() {
16198
- var _el$70 = _tmpl$1413(), _el$71 = _el$70.firstChild, _el$72 = _el$71.firstChild, _el$73 = _el$72.nextSibling; _el$73.nextSibling; var _el$75 = _el$71.nextSibling, _el$76 = _el$75.firstChild;
16199
- _el$73.$$input = (e) => update({
16200
- feedMaxAgeDays: Number(e.currentTarget.value)
16172
+ return createComponent(AlertItem, {
16173
+ severity: "danger",
16174
+ title: "Could not save",
16175
+ get detail() {
16176
+ return error();
16177
+ }
16201
16178
  });
16202
- _el$76.addEventListener("change", (e) => update({
16203
- feedQualifiedOnly: e.currentTarget.checked
16204
- }));
16179
+ }
16180
+ }), _el$36);
16181
+ insert(_el$36, createComponent(For, {
16182
+ get each() {
16183
+ return tabKeys();
16184
+ },
16185
+ children: (key) => (() => {
16186
+ var _el$68 = _tmpl$2411();
16187
+ _el$68.$$click = () => setTab(key);
16188
+ insert(_el$68, () => TAB_LABEL[key], null);
16189
+ insert(_el$68, createComponent(Show, {
16190
+ get when() {
16191
+ return tabCount(key) !== void 0;
16192
+ },
16193
+ get children() {
16194
+ var _el$69 = _tmpl$2311();
16195
+ insert(_el$69, () => tabCount(key));
16196
+ return _el$69;
16197
+ }
16198
+ }), null);
16205
16199
  effect((_p$) => {
16206
- var _v$9 = field, _v$0 = label;
16207
- _p$.e = style(_el$71, _v$9, _p$.e);
16208
- _p$.t = style(_el$72, _v$0, _p$.t);
16200
+ var _v$15 = tab() === key, _v$16 = tab() === key ? "var(--app-admin-primary)" : "transparent", _v$17 = tab() === key ? "var(--app-admin-primary)" : "var(--app-admin-fg-muted)";
16201
+ _v$15 !== _p$.e && setAttribute(_el$68, "aria-selected", _p$.e = _v$15);
16202
+ _v$16 !== _p$.t && setStyleProperty(_el$68, "border-color", _p$.t = _v$16);
16203
+ _v$17 !== _p$.a && setStyleProperty(_el$68, "color", _p$.a = _v$17);
16209
16204
  return _p$;
16210
16205
  }, {
16211
16206
  e: void 0,
16212
- t: void 0
16207
+ t: void 0,
16208
+ a: void 0
16213
16209
  });
16214
- effect(() => _el$73.value = draft().feedMaxAgeDays ?? 30);
16215
- effect(() => _el$76.checked = draft().feedQualifiedOnly);
16216
- return _el$70;
16217
- }
16218
- }), null);
16219
- _el$80.addEventListener("change", (e) => update({
16220
- autoSend: e.currentTarget.checked
16210
+ return _el$68;
16211
+ })()
16221
16212
  }));
16222
- insert(_el$81, () => draft().autoSend ? "Due steps are emailed by the hourly check with no further review. Anyone who buys or unsubscribes drops out first; nobody gets more than one sequence email a day." : "Due steps wait under \u201CWaiting to send\u201D for you to send or skip them.");
16223
- insert(_el$57, createComponent(Show, {
16224
- get when() {
16225
- return error();
16226
- },
16213
+ insert(_el$35, createComponent(Switch, {
16227
16214
  get children() {
16228
- var _el$82 = _tmpl$1513();
16229
- insert(_el$82, error);
16230
- return _el$82;
16231
- }
16232
- }), _el$83);
16233
- _el$84.$$click = () => void save();
16234
- insert(_el$84, (() => {
16235
- var _c$4 = memo(() => !!saving());
16236
- return () => _c$4() ? "Saving\u2026" : isNew() ? "Create sequence" : "Save changes";
16237
- })());
16238
- insert(_el$83, createComponent(Show, {
16239
- get when() {
16240
- return !isNew();
16241
- },
16242
- get children() {
16243
- var _el$85 = _tmpl$1613();
16244
- _el$85.$$click = () => void archive();
16245
- return _el$85;
16246
- }
16247
- }), null);
16248
- insert(_el$52, createComponent(Show, {
16249
- get when() {
16250
- return !isNew();
16251
- },
16252
- get children() {
16253
- var _el$86 = _tmpl$1812(), _el$87 = _el$86.firstChild, _el$88 = _el$87.firstChild; _el$88.firstChild;
16254
- insert(_el$88, () => enrollments()?.enrollments.length ?? "\u2026", null);
16255
- insert(_el$86, createComponent(Show, {
16215
+ return [createComponent(Match, {
16256
16216
  get when() {
16257
- return enrollments();
16217
+ return tab() === "queue";
16258
16218
  },
16259
- get fallback() {
16260
- return createComponent(LoadingSpinner, {});
16219
+ get children() {
16220
+ return createComponent(SequenceQueue, {
16221
+ get sequence() {
16222
+ return props.initial;
16223
+ },
16224
+ get rows() {
16225
+ return dueRows();
16226
+ },
16227
+ refetch: () => void refetchQueue(),
16228
+ get onChanged() {
16229
+ return props.onChanged;
16230
+ }
16231
+ });
16232
+ }
16233
+ }), createComponent(Match, {
16234
+ get when() {
16235
+ return tab() === "steps";
16261
16236
  },
16262
16237
  get children() {
16263
- return createComponent(Show, {
16264
- get when() {
16265
- return enrollments().enrollments.length > 0;
16238
+ return createComponent(Section, {
16239
+ title: "Steps",
16240
+ get count() {
16241
+ return draft().steps.length;
16266
16242
  },
16267
- get fallback() {
16268
- return createComponent(EmptyState, {
16269
- message: "Nobody yet. Add people from the Funnel tab, or tick a segment above."
16243
+ flush: true,
16244
+ get action() {
16245
+ return (() => {
16246
+ var _el$70 = _tmpl$2511();
16247
+ _el$70.$$click = () => update({
16248
+ steps: [...draft().steps, {
16249
+ ...EMPTY_STEP,
16250
+ waitHours: 72
16251
+ }]
16252
+ });
16253
+ effect(() => _el$70.disabled = draft().steps.length >= 8);
16254
+ return _el$70;
16255
+ })();
16256
+ },
16257
+ get children() {
16258
+ return createComponent(Show, {
16259
+ get when() {
16260
+ return props.templates.length > 0;
16261
+ },
16262
+ get fallback() {
16263
+ return (() => {
16264
+ var _el$71 = _tmpl$2710(); _el$71.firstChild;
16265
+ insert(_el$71, createComponent(Show, {
16266
+ when: nav,
16267
+ get children() {
16268
+ var _el$73 = _tmpl$2610();
16269
+ _el$73.$$click = () => nav.selectTab("email-templates");
16270
+ return _el$73;
16271
+ }
16272
+ }), null);
16273
+ return _el$71;
16274
+ })();
16275
+ },
16276
+ get children() {
16277
+ return [_tmpl$1101(), createComponent(Index, {
16278
+ get each() {
16279
+ return draft().steps;
16280
+ },
16281
+ children: (step, i) => createComponent(StepRow, {
16282
+ index: i,
16283
+ get step() {
16284
+ return step();
16285
+ },
16286
+ get count() {
16287
+ return draft().steps.length;
16288
+ },
16289
+ get templates() {
16290
+ return props.templates;
16291
+ },
16292
+ get canTest() {
16293
+ return !isNew();
16294
+ },
16295
+ onChange: (s) => setStep(i, s),
16296
+ onRemove: () => update({
16297
+ steps: draft().steps.filter((_, j) => j !== i)
16298
+ }),
16299
+ onTest: () => void test(i)
16300
+ })
16301
+ })];
16302
+ }
16270
16303
  });
16304
+ }
16305
+ });
16306
+ }
16307
+ }), createComponent(Match, {
16308
+ get when() {
16309
+ return tab() === "people";
16310
+ },
16311
+ get children() {
16312
+ return createComponent(Section, {
16313
+ title: "People in this sequence",
16314
+ get count() {
16315
+ return enrollments()?.enrollments.length;
16271
16316
  },
16317
+ flush: true,
16272
16318
  get children() {
16273
- var _el$90 = _tmpl$1713(), _el$91 = _el$90.firstChild, _el$92 = _el$91.nextSibling;
16274
- insert(_el$92, createComponent(For, {
16275
- get each() {
16276
- return enrollments().enrollments;
16319
+ return createComponent(Show, {
16320
+ get when() {
16321
+ return enrollments();
16277
16322
  },
16278
- children: (e) => (() => {
16279
- var _el$98 = _tmpl$2212(), _el$99 = _el$98.firstChild, _el$101 = _el$99.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$99.nextSibling, _el$104 = _el$103.nextSibling, _el$105 = _el$104.firstChild, _el$106 = _el$104.nextSibling, _el$107 = _el$106.nextSibling, _el$108 = _el$107.firstChild;
16280
- insert(_el$99, createComponent(Show, {
16323
+ get fallback() {
16324
+ return createComponent(LoadingSpinner, {});
16325
+ },
16326
+ get children() {
16327
+ return createComponent(Show, {
16281
16328
  get when() {
16282
- return e.userId && nav;
16329
+ return enrollments().enrollments.length > 0;
16283
16330
  },
16284
16331
  get fallback() {
16285
- return e.email;
16332
+ return createComponent(EmptyState, {
16333
+ message: "Nobody yet. Add people from the Funnel tab, or feed the sequence from a segment."
16334
+ });
16286
16335
  },
16287
16336
  get children() {
16288
- var _el$100 = _tmpl$442();
16289
- _el$100.$$click = () => nav.openCustomer(e.userId);
16290
- insert(_el$100, () => e.email);
16291
- return _el$100;
16337
+ var _el$38 = _tmpl$1014(), _el$39 = _el$38.firstChild, _el$40 = _el$39.nextSibling;
16338
+ insert(_el$40, createComponent(For, {
16339
+ get each() {
16340
+ return enrollments().enrollments;
16341
+ },
16342
+ children: (e) => (() => {
16343
+ var _el$74 = _tmpl$289(), _el$75 = _el$74.firstChild, _el$77 = _el$75.firstChild, _el$78 = _el$77.firstChild, _el$79 = _el$75.nextSibling, _el$80 = _el$79.nextSibling, _el$81 = _el$80.firstChild, _el$82 = _el$80.nextSibling, _el$83 = _el$82.nextSibling, _el$84 = _el$83.firstChild;
16344
+ insert(_el$75, createComponent(Show, {
16345
+ get when() {
16346
+ return e.userId && nav;
16347
+ },
16348
+ get fallback() {
16349
+ return e.email;
16350
+ },
16351
+ get children() {
16352
+ var _el$76 = _tmpl$442();
16353
+ _el$76.$$click = () => nav.openCustomer(e.userId);
16354
+ insert(_el$76, () => e.email);
16355
+ return _el$76;
16356
+ }
16357
+ }), _el$77);
16358
+ insert(_el$77, () => e.source === "feed" ? "enrolled by the feed" : "added by hand", _el$78);
16359
+ insert(_el$77, () => formatDate(e.addedAt), null);
16360
+ insert(_el$79, () => segmentLongLabel(e.segmentAtAdd));
16361
+ insert(_el$80, () => Math.min(e.stepIndex + 1, draft().steps.length), _el$81);
16362
+ insert(_el$80, () => draft().steps.length, null);
16363
+ insert(_el$82, (() => {
16364
+ var _c$3 = memo(() => !!e.nextDueAt);
16365
+ return () => _c$3() ? formatDate(e.nextDueAt) : "\u2014";
16366
+ })());
16367
+ _el$84.$$click = () => void remove(e);
16368
+ return _el$74;
16369
+ })()
16370
+ }));
16371
+ return _el$38;
16292
16372
  }
16293
- }), _el$101);
16294
- insert(_el$101, () => e.source === "feed" ? "enrolled by the feed" : "added by hand", _el$102);
16295
- insert(_el$101, () => formatDate(e.addedAt), null);
16296
- insert(_el$103, () => segmentLongLabel(e.segmentAtAdd));
16297
- insert(_el$104, () => Math.min(e.stepIndex + 1, draft().steps.length), _el$105);
16298
- insert(_el$104, () => draft().steps.length, null);
16299
- insert(_el$106, (() => {
16300
- var _c$5 = memo(() => !!e.nextDueAt);
16301
- return () => _c$5() ? formatDate(e.nextDueAt) : "\u2014";
16302
- })());
16303
- _el$108.$$click = () => void remove(e);
16304
- return _el$98;
16305
- })()
16306
- }));
16307
- return _el$90;
16373
+ });
16374
+ }
16375
+ });
16308
16376
  }
16309
16377
  });
16310
16378
  }
16311
- }), null);
16312
- return _el$86;
16379
+ }), createComponent(Match, {
16380
+ get when() {
16381
+ return tab() === "settings";
16382
+ },
16383
+ get children() {
16384
+ var _el$41 = _tmpl$1613();
16385
+ insert(_el$41, createComponent(Section, {
16386
+ title: "About",
16387
+ get children() {
16388
+ var _el$42 = _tmpl$1116(), _el$43 = _el$42.firstChild, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling, _el$46 = _el$43.nextSibling, _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling;
16389
+ _el$45.$$input = (e) => update({
16390
+ name: e.currentTarget.value
16391
+ });
16392
+ _el$48.$$input = (e) => update({
16393
+ description: e.currentTarget.value || null
16394
+ });
16395
+ effect((_p$) => {
16396
+ var _v$1 = field, _v$10 = label, _v$11 = field, _v$12 = label;
16397
+ _p$.e = style(_el$43, _v$1, _p$.e);
16398
+ _p$.t = style(_el$44, _v$10, _p$.t);
16399
+ _p$.a = style(_el$46, _v$11, _p$.a);
16400
+ _p$.o = style(_el$47, _v$12, _p$.o);
16401
+ return _p$;
16402
+ }, {
16403
+ e: void 0,
16404
+ t: void 0,
16405
+ a: void 0,
16406
+ o: void 0
16407
+ });
16408
+ effect(() => _el$45.value = draft().name);
16409
+ effect(() => _el$48.value = draft().description ?? "");
16410
+ return _el$42;
16411
+ }
16412
+ }), null);
16413
+ insert(_el$41, createComponent(Section, {
16414
+ title: "Sending",
16415
+ get children() {
16416
+ var _el$49 = _tmpl$1213(), _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$51.firstChild, _el$53 = _el$52.nextSibling;
16417
+ style(_el$49, checkboxRow);
16418
+ _el$50.addEventListener("change", (e) => update({
16419
+ autoSend: e.currentTarget.checked
16420
+ }));
16421
+ insert(_el$53, () => draft().autoSend ? "The hourly check emails due steps itself. Buyers and unsubscribes drop out first; one sequence email per person per day." : "Off: due steps wait under \u201CWaiting to send\u201D for you.");
16422
+ effect(() => _el$50.checked = draft().autoSend);
16423
+ return _el$49;
16424
+ }
16425
+ }), null);
16426
+ insert(_el$41, createComponent(Section, {
16427
+ title: "Who gets enrolled",
16428
+ get children() {
16429
+ var _el$54 = _tmpl$1513(); _el$54.firstChild;
16430
+ insert(_el$54, createComponent(For, {
16431
+ each: ["a", "b"],
16432
+ children: (g) => (() => {
16433
+ var _el$85 = _tmpl$295(), _el$86 = _el$85.firstChild, _el$87 = _el$86.nextSibling;
16434
+ insert(_el$86, () => GROUP_LABEL[g]);
16435
+ insert(_el$87, createComponent(For, {
16436
+ get each() {
16437
+ return SEGMENT_KEYS[g];
16438
+ },
16439
+ children: (key) => (() => {
16440
+ var _el$88 = _tmpl$305(), _el$89 = _el$88.firstChild;
16441
+ _el$89.addEventListener("change", () => toggleSegment(key));
16442
+ insert(_el$88, () => SEGMENT_LABEL[key], null);
16443
+ effect(() => _el$89.checked = draft().feedSegments.includes(key));
16444
+ return _el$88;
16445
+ })()
16446
+ }));
16447
+ effect((_$p) => style(_el$86, {
16448
+ ...label
16449
+ }, _$p));
16450
+ return _el$85;
16451
+ })()
16452
+ }), null);
16453
+ insert(_el$54, createComponent(Show, {
16454
+ get when() {
16455
+ return draft().feedSegments.length > 0;
16456
+ },
16457
+ get children() {
16458
+ return [(() => {
16459
+ var _el$56 = _tmpl$1313(), _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling; _el$58.nextSibling;
16460
+ _el$58.$$input = (e) => update({
16461
+ feedMaxAgeDays: Number(e.currentTarget.value)
16462
+ });
16463
+ effect((_p$) => {
16464
+ var _v$13 = field, _v$14 = label;
16465
+ _p$.e = style(_el$56, _v$13, _p$.e);
16466
+ _p$.t = style(_el$57, _v$14, _p$.t);
16467
+ return _p$;
16468
+ }, {
16469
+ e: void 0,
16470
+ t: void 0
16471
+ });
16472
+ effect(() => _el$58.value = draft().feedMaxAgeDays ?? 30);
16473
+ return _el$56;
16474
+ })(), (() => {
16475
+ var _el$60 = _tmpl$1413(), _el$61 = _el$60.firstChild;
16476
+ _el$61.addEventListener("change", (e) => update({
16477
+ feedQualifiedOnly: e.currentTarget.checked
16478
+ }));
16479
+ effect(() => _el$61.checked = draft().feedQualifiedOnly);
16480
+ return _el$60;
16481
+ })()];
16482
+ }
16483
+ }), null);
16484
+ return _el$54;
16485
+ }
16486
+ }), null);
16487
+ return _el$41;
16488
+ }
16489
+ })];
16313
16490
  }
16314
16491
  }), null);
16315
- effect((_p$) => {
16316
- var _v$1 = field, _v$10 = label, _v$11 = field, _v$12 = label, _v$13 = draft().steps.length >= 8, _v$14 = saving();
16317
- _p$.e = style(_el$59, _v$1, _p$.e);
16318
- _p$.t = style(_el$60, _v$10, _p$.t);
16319
- _p$.a = style(_el$62, _v$11, _p$.a);
16320
- _p$.o = style(_el$63, _v$12, _p$.o);
16321
- _v$13 !== _p$.i && (_el$66.disabled = _p$.i = _v$13);
16322
- _v$14 !== _p$.n && (_el$84.disabled = _p$.n = _v$14);
16323
- return _p$;
16324
- }, {
16325
- e: void 0,
16326
- t: void 0,
16327
- a: void 0,
16328
- o: void 0,
16329
- i: void 0,
16330
- n: void 0
16331
- });
16332
- effect(() => _el$61.value = draft().name);
16333
- effect(() => _el$64.value = draft().description ?? "");
16334
- effect(() => _el$80.checked = draft().autoSend);
16335
- return _el$52;
16492
+ return _el$35;
16336
16493
  })();
16337
16494
  }
16338
16495
  function Sequences() {
@@ -16354,20 +16511,27 @@ function Sequences() {
16354
16511
  void refetchQueue();
16355
16512
  };
16356
16513
  return (() => {
16357
- var _el$109 = _tmpl$2311();
16358
- insert(_el$109, createComponent(PageTitle, {
16359
- subtitle: "Timed emails for people who stopped short of a subscription",
16360
- children: "Sequences"
16514
+ var _el$90 = _tmpl$3112();
16515
+ insert(_el$90, createComponent(Show, {
16516
+ get when() {
16517
+ return !editing();
16518
+ },
16519
+ get children() {
16520
+ return createComponent(PageTitle, {
16521
+ subtitle: "Timed emails for people who stopped short of a subscription",
16522
+ children: "Sequences"
16523
+ });
16524
+ }
16361
16525
  }), null);
16362
- insert(_el$109, createComponent(Show, {
16526
+ insert(_el$90, createComponent(Show, {
16363
16527
  get when() {
16364
16528
  return editing();
16365
16529
  },
16366
16530
  get fallback() {
16367
16531
  return (() => {
16368
- var _el$110 = _tmpl$2511(), _el$111 = _el$110.firstChild, _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling;
16369
- _el$113.$$click = () => setEditing(blankSequence());
16370
- insert(_el$110, createComponent(Show, {
16532
+ var _el$91 = _tmpl$3310(), _el$92 = _el$91.firstChild, _el$93 = _el$92.firstChild, _el$94 = _el$93.nextSibling;
16533
+ _el$94.$$click = () => setEditing(blankSequence());
16534
+ insert(_el$91, createComponent(Show, {
16371
16535
  get when() {
16372
16536
  return list();
16373
16537
  },
@@ -16385,52 +16549,52 @@ function Sequences() {
16385
16549
  });
16386
16550
  },
16387
16551
  get children() {
16388
- var _el$114 = _tmpl$2411(), _el$115 = _el$114.firstChild, _el$116 = _el$115.nextSibling;
16389
- insert(_el$116, createComponent(For, {
16552
+ var _el$95 = _tmpl$3210(), _el$96 = _el$95.firstChild, _el$97 = _el$96.nextSibling;
16553
+ insert(_el$97, createComponent(For, {
16390
16554
  get each() {
16391
16555
  return list().sequences;
16392
16556
  },
16393
16557
  children: (s) => (() => {
16394
- var _el$117 = _tmpl$2710(), _el$118 = _el$117.firstChild, _el$119 = _el$118.firstChild, _el$121 = _el$118.nextSibling, _el$122 = _el$121.nextSibling, _el$123 = _el$122.nextSibling, _el$124 = _el$123.nextSibling, _el$125 = _el$124.nextSibling, _el$126 = _el$125.nextSibling, _el$127 = _el$126.nextSibling, _el$128 = _el$127.nextSibling;
16395
- _el$119.$$click = () => setEditing(s);
16396
- insert(_el$119, () => s.name);
16397
- insert(_el$118, createComponent(Show, {
16558
+ var _el$98 = _tmpl$356(), _el$99 = _el$98.firstChild, _el$100 = _el$99.firstChild, _el$102 = _el$99.nextSibling, _el$103 = _el$102.nextSibling, _el$104 = _el$103.nextSibling, _el$105 = _el$104.nextSibling, _el$106 = _el$105.nextSibling, _el$107 = _el$106.nextSibling, _el$108 = _el$107.nextSibling, _el$109 = _el$108.nextSibling;
16559
+ _el$100.$$click = () => setEditing(s);
16560
+ insert(_el$100, () => s.name);
16561
+ insert(_el$99, createComponent(Show, {
16398
16562
  get when() {
16399
16563
  return s.description;
16400
16564
  },
16401
16565
  get children() {
16402
- var _el$120 = _tmpl$2610();
16403
- insert(_el$120, () => s.description);
16404
- return _el$120;
16566
+ var _el$101 = _tmpl$3410();
16567
+ insert(_el$101, () => s.description);
16568
+ return _el$101;
16405
16569
  }
16406
16570
  }), null);
16407
- insert(_el$121, () => s.steps.length);
16408
- insert(_el$122, (() => {
16409
- var _c$6 = memo(() => s.feedSegments.length > 0);
16410
- return () => _c$6() ? `${s.feedSegments.length} segment${s.feedSegments.length === 1 ? "" : "s"}, \u2264${s.feedMaxAgeDays}d` : _tmpl$289();
16571
+ insert(_el$102, () => s.steps.length);
16572
+ insert(_el$103, (() => {
16573
+ var _c$4 = memo(() => s.feedSegments.length > 0);
16574
+ return () => _c$4() ? `${s.feedSegments.length} segment${s.feedSegments.length === 1 ? "" : "s"}, \u2264${s.feedMaxAgeDays}d` : _tmpl$363();
16411
16575
  })());
16412
- insert(_el$123, () => s.autoSend ? "Automatic" : "Review");
16413
- insert(_el$124, () => s.stats.active);
16414
- insert(_el$125, (() => {
16415
- var _c$7 = memo(() => dueFor(s.id) > 0);
16416
- return () => _c$7() ? (() => {
16417
- var _el$130 = _tmpl$295();
16418
- insert(_el$130, () => dueFor(s.id));
16419
- return _el$130;
16420
- })() : _tmpl$305();
16576
+ insert(_el$104, () => s.autoSend ? "Automatic" : "Review");
16577
+ insert(_el$105, () => s.stats.active);
16578
+ insert(_el$106, (() => {
16579
+ var _c$5 = memo(() => dueFor(s.id) > 0);
16580
+ return () => _c$5() ? (() => {
16581
+ var _el$111 = _tmpl$372();
16582
+ insert(_el$111, () => dueFor(s.id));
16583
+ return _el$111;
16584
+ })() : _tmpl$382();
16421
16585
  })());
16422
- insert(_el$126, () => s.stats.sent);
16423
- insert(_el$127, () => s.stats.boughtAfterEnroll);
16424
- insert(_el$128, () => s.stats.unsubscribed);
16425
- return _el$117;
16586
+ insert(_el$107, () => s.stats.sent);
16587
+ insert(_el$108, () => s.stats.boughtAfterEnroll);
16588
+ insert(_el$109, () => s.stats.unsubscribed);
16589
+ return _el$98;
16426
16590
  })()
16427
16591
  }));
16428
- return _el$114;
16592
+ return _el$95;
16429
16593
  }
16430
16594
  });
16431
16595
  }
16432
16596
  }), null);
16433
- return _el$110;
16597
+ return _el$91;
16434
16598
  })();
16435
16599
  },
16436
16600
  children: (seq) => createComponent(SequenceEditor, {
@@ -16448,7 +16612,7 @@ function Sequences() {
16448
16612
  onChanged: changed
16449
16613
  })
16450
16614
  }), null);
16451
- return _el$109;
16615
+ return _el$90;
16452
16616
  })();
16453
16617
  }
16454
16618
  delegateEvents(["click", "input"]);
@@ -16456,7 +16620,7 @@ delegateEvents(["click", "input"]);
16456
16620
  // src/pages/admin/Funnel.tsx
16457
16621
  var _tmpl$290 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
16458
16622
  var _tmpl$291 = /* @__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>`);
16459
- var _tmpl$356 = /* @__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 (<!>)`);
16623
+ var _tmpl$357 = /* @__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 (<!>)`);
16460
16624
  var _tmpl$443 = /* @__PURE__ */ template(`<th>Account`);
16461
16625
  var _tmpl$538 = /* @__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 <!>.`);
16462
16626
  var _tmpl$636 = /* @__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>`);
@@ -16568,7 +16732,7 @@ function SegmentSection(props) {
16568
16732
  return hasSavings();
16569
16733
  },
16570
16734
  get children() {
16571
- var _el$6 = _tmpl$356(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
16735
+ var _el$6 = _tmpl$357(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
16572
16736
  _el$7.addEventListener("change", (e) => setSavingsOnly(e.currentTarget.checked));
16573
16737
  insert(_el$6, () => props.summary.savingsMembers, _el$0);
16574
16738
  effect(() => _el$7.checked = savingsOnly());
@@ -16814,7 +16978,7 @@ function Funnel() {
16814
16978
  delegateEvents(["click"]);
16815
16979
  var _tmpl$296 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;margin:0.25rem 0 0">`);
16816
16980
  var _tmpl$297 = /* @__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">`);
16817
- var _tmpl$357 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
16981
+ var _tmpl$358 = /* @__PURE__ */ template(`<label style=display:flex;align-items:center;gap:0.5rem;font-size:0.875rem;cursor:pointer><input type=checkbox>`);
16818
16982
  var _tmpl$444 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-primary app-admin-btn-sm">`);
16819
16983
  var _tmpl$539 = /* @__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`);
16820
16984
  var _tmpl$637 = /* @__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">`);
@@ -16855,7 +17019,7 @@ function Card(props) {
16855
17019
  }
16856
17020
  function Toggle(props) {
16857
17021
  return (() => {
16858
- var _el$7 = _tmpl$357(), _el$8 = _el$7.firstChild;
17022
+ var _el$7 = _tmpl$358(), _el$8 = _el$7.firstChild;
16859
17023
  _el$8.addEventListener("change", (e) => props.onChange(e.currentTarget.checked));
16860
17024
  insert(_el$7, () => props.label, null);
16861
17025
  effect(() => _el$8.checked = props.checked);
@@ -17165,7 +17329,7 @@ delegateEvents(["click", "input", "keydown"]);
17165
17329
  // src/pages/AdminDashboard.tsx
17166
17330
  var _tmpl$298 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
17167
17331
  var _tmpl$299 = /* @__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">`);
17168
- var _tmpl$358 = /* @__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>`);
17332
+ var _tmpl$359 = /* @__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>`);
17169
17333
  var _tmpl$445 = /* @__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">`);
17170
17334
  var _tmpl$540 = /* @__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`);
17171
17335
  var _tmpl$638 = /* @__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); } }`);
@@ -17317,7 +17481,7 @@ function AdminDashboard(props) {
17317
17481
  return createComponent(AdminNavContext.Provider, {
17318
17482
  value: adminNav,
17319
17483
  get children() {
17320
- var _el$3 = _tmpl$358(), _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;
17484
+ var _el$3 = _tmpl$359(), _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;
17321
17485
  _el$5.$$click = () => setDrawerOpen(true);
17322
17486
  insert(_el$6, () => TAB_LABELS[currentTab()]);
17323
17487
  _el$7.$$click = () => setDrawerOpen(false);
@@ -17566,7 +17730,7 @@ function AdminGateSpinner(props) {
17566
17730
  delegateEvents(["click"]);
17567
17731
  var _tmpl$300 = /* @__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`);
17568
17732
  var _tmpl$2100 = /* @__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`);
17569
- var _tmpl$359 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
17733
+ var _tmpl$360 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
17570
17734
  var _tmpl$446 = /* @__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">`);
17571
17735
  var _tmpl$541 = /* @__PURE__ */ template(`<div><h3>Subscription`);
17572
17736
  var _tmpl$639 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
@@ -17619,7 +17783,7 @@ function PatientDashboardPreview(props) {
17619
17783
  return data.profile();
17620
17784
  },
17621
17785
  get fallback() {
17622
- return _tmpl$359();
17786
+ return _tmpl$360();
17623
17787
  },
17624
17788
  children: (profile) => [(() => {
17625
17789
  var _el$13 = _tmpl$446(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
@@ -17780,7 +17944,7 @@ function PatientDashboardPreview(props) {
17780
17944
  delegateEvents(["click"]);
17781
17945
  var _tmpl$301 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
17782
17946
  var _tmpl$2101 = /* @__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>`);
17783
- var _tmpl$360 = /* @__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.`);
17947
+ var _tmpl$361 = /* @__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.`);
17784
17948
  var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
17785
17949
  function UpdatePaymentMethod(props) {
17786
17950
  const {
@@ -17810,7 +17974,7 @@ function UpdatePaymentMethod(props) {
17810
17974
  if (ok) props.onDone();
17811
17975
  }
17812
17976
  return (() => {
17813
- var _el$ = _tmpl$360(), _el$2 = _el$.firstChild;
17977
+ var _el$ = _tmpl$361(), _el$2 = _el$.firstChild;
17814
17978
  insert(_el$, createComponent(Heading, {
17815
17979
  level: 1,
17816
17980
  get children() {
@@ -17928,7 +18092,7 @@ function UpdatePaymentMethod(props) {
17928
18092
  }
17929
18093
  var _tmpl$306 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
17930
18094
  var _tmpl$2102 = /* @__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>`);
17931
- var _tmpl$361 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
18095
+ var _tmpl$364 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
17932
18096
  var _tmpl$447 = /* @__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>`);
17933
18097
  var _tmpl$542 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
17934
18098
  var _tmpl$640 = /* @__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>`);
@@ -18004,7 +18168,7 @@ function OrderTracker(props) {
18004
18168
  return _tmpl$542();
18005
18169
  },
18006
18170
  get children() {
18007
- var _el$14 = _tmpl$361(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
18171
+ var _el$14 = _tmpl$364(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
18008
18172
  insert(_el$14, () => r().cycleDay, _el$17);
18009
18173
  insert(_el$14, () => r().cycleLength, null);
18010
18174
  return _el$14;
@@ -18245,7 +18409,7 @@ function OrderTracker(props) {
18245
18409
  delegateEvents(["click"]);
18246
18410
  var _tmpl$307 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
18247
18411
  var _tmpl$2103 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
18248
- var _tmpl$363 = /* @__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>`);
18412
+ var _tmpl$365 = /* @__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>`);
18249
18413
  var STATUS_LABEL = {
18250
18414
  pending: "Under review",
18251
18415
  approved: "Approved",
@@ -18262,7 +18426,7 @@ function RxRow(props) {
18262
18426
  return STATUS_LABEL[props.rx.status] ?? props.rx.status;
18263
18427
  };
18264
18428
  return (() => {
18265
- var _el$ = _tmpl$363(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
18429
+ var _el$ = _tmpl$365(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
18266
18430
  _el$2.$$click = () => setOpen((v) => !v);
18267
18431
  insert(_el$3, () => props.rx.drugName ?? "Medication", null);
18268
18432
  insert(_el$3, createComponent(Show, {
@@ -18326,7 +18490,7 @@ function RxRow(props) {
18326
18490
  delegateEvents(["click"]);
18327
18491
  var _tmpl$308 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan &amp; billing`);
18328
18492
  var _tmpl$2104 = /* @__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`);
18329
- var _tmpl$364 = /* @__PURE__ */ template(`<p class=membership__dose>`);
18493
+ var _tmpl$366 = /* @__PURE__ */ template(`<p class=membership__dose>`);
18330
18494
  var _tmpl$448 = /* @__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 `);
18331
18495
  var _tmpl$543 = /* @__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`);
18332
18496
  var _tmpl$641 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
@@ -18401,7 +18565,7 @@ function PlanBilling(props) {
18401
18565
  return sub().dosage;
18402
18566
  },
18403
18567
  get children() {
18404
- var _el$11 = _tmpl$364();
18568
+ var _el$11 = _tmpl$366();
18405
18569
  insert(_el$11, () => sub().dosage);
18406
18570
  return _el$11;
18407
18571
  }
@@ -18505,7 +18669,7 @@ function PlanBilling(props) {
18505
18669
  delegateEvents(["click"]);
18506
18670
  var _tmpl$309 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
18507
18671
  var _tmpl$2105 = /* @__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.`);
18508
- var _tmpl$365 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
18672
+ var _tmpl$367 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
18509
18673
  var _tmpl$449 = /* @__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`);
18510
18674
  var _tmpl$544 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
18511
18675
  var _tmpl$642 = /* @__PURE__ */ template(`<a class=account__support-link>`);
@@ -18587,7 +18751,7 @@ function AccountPanel(props) {
18587
18751
  return props.messagingEnabled;
18588
18752
  },
18589
18753
  get children() {
18590
- var _el$1 = _tmpl$365();
18754
+ var _el$1 = _tmpl$367();
18591
18755
  _el$1.$$click = () => props.onOpenMessages();
18592
18756
  return _el$1;
18593
18757
  }
@@ -18608,9 +18772,9 @@ function AccountPanel(props) {
18608
18772
  })();
18609
18773
  }
18610
18774
  delegateEvents(["click"]);
18611
- var _tmpl$366 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
18775
+ var _tmpl$368 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
18612
18776
  var _tmpl$2106 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
18613
- var _tmpl$367 = /* @__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>`);
18777
+ var _tmpl$369 = /* @__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>`);
18614
18778
  var _tmpl$450 = /* @__PURE__ */ template(`<li>`);
18615
18779
  var _tmpl$545 = /* @__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>`);
18616
18780
  var _tmpl$643 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
@@ -18634,7 +18798,7 @@ function MedicationGuide(props) {
18634
18798
  return "upcoming";
18635
18799
  };
18636
18800
  return (() => {
18637
- var _el$ = _tmpl$367(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
18801
+ var _el$ = _tmpl$369(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.nextSibling, _el$6 = _el$2.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling, _el$13 = _el$12.nextSibling, _el$14 = _el$10.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$14.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling, _el$21 = _el$18.nextSibling, _el$22 = _el$21.firstChild, _el$23 = _el$22.nextSibling, _el$27 = _el$17.nextSibling, _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$31 = _el$28.nextSibling, _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling, _el$34 = _el$27.nextSibling, _el$35 = _el$34.firstChild, _el$36 = _el$35.nextSibling, _el$37 = _el$34.nextSibling, _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$37.nextSibling, _el$41 = _el$40.firstChild, _el$42 = _el$41.firstChild, _el$43 = _el$42.nextSibling;
18638
18802
  insert(_el$4, () => props.guide.title);
18639
18803
  insert(_el$5, () => props.guide.summary);
18640
18804
  insert(_el$8, () => props.guide.boxedWarning);
@@ -18690,7 +18854,7 @@ function MedicationGuide(props) {
18690
18854
  return props.guide.contraception;
18691
18855
  },
18692
18856
  get children() {
18693
- var _el$24 = _tmpl$366(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
18857
+ var _el$24 = _tmpl$368(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
18694
18858
  insert(_el$26, () => props.guide.contraception);
18695
18859
  return _el$24;
18696
18860
  }
@@ -18769,9 +18933,9 @@ function MedicationGuide(props) {
18769
18933
  })();
18770
18934
  }
18771
18935
  delegateEvents(["click"]);
18772
- var _tmpl$368 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
18936
+ var _tmpl$370 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
18773
18937
  var _tmpl$2107 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
18774
- var _tmpl$369 = /* @__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`);
18938
+ var _tmpl$371 = /* @__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`);
18775
18939
  var _tmpl$451 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
18776
18940
  var _tmpl$546 = /* @__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>`);
18777
18941
  var _tmpl$644 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
@@ -18801,14 +18965,14 @@ var _tmpl$2711 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"dat
18801
18965
  var _tmpl$2810 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
18802
18966
  var _tmpl$2910 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
18803
18967
  var _tmpl$3010 = /* @__PURE__ */ template(`<div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label="Back to conversations"data-testid=messages-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><div class=msg-thread__title-row><h3 class=msg-thread__name></h3></div><p class=msg-thread__role>`);
18804
- var _tmpl$3112 = /* @__PURE__ */ template(`<div class=msg-thread__banner><button type=button class=msg-thread__banner-link data-testid=continue-with-care-team>Continue with your care team`);
18805
- var _tmpl$3210 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
18806
- var _tmpl$3310 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
18807
- var _tmpl$3410 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
18968
+ var _tmpl$3113 = /* @__PURE__ */ template(`<div class=msg-thread__banner><button type=button class=msg-thread__banner-link data-testid=continue-with-care-team>Continue with your care team`);
18969
+ var _tmpl$3211 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
18970
+ var _tmpl$3311 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
18971
+ var _tmpl$3411 = /* @__PURE__ */ template(`<div class=msg-compose__staged>`);
18808
18972
  var _tmpl$3510 = /* @__PURE__ */ template(`<label class=msg-compose__attach title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label>Attach a file</span><input class=msg-compose__file-input type=file data-testid=messages-attach>`);
18809
18973
  var _tmpl$3610 = /* @__PURE__ */ template(`<div class=msg-compose><textarea class=msg-compose__input rows=1 placeholder="Type a message\u2026"aria-label=Message></textarea><button type=button class=msg-compose__send data-testid=messages-send>`);
18810
- var _tmpl$372 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
18811
- var _tmpl$382 = /* @__PURE__ */ template(`<div class=msg-panel__layout><div></div><div>`);
18974
+ var _tmpl$373 = /* @__PURE__ */ template(`<span class=msg-compose__staged-file data-testid=staged-file><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-attachment__file-size></span><button type=button class=msg-compose__staged-remove aria-label="Remove attachment">\xD7`);
18975
+ var _tmpl$383 = /* @__PURE__ */ template(`<div class=msg-panel__layout><div></div><div>`);
18812
18976
  var _tmpl$392 = /* @__PURE__ */ template(`<div class=msg-panel data-testid=messages-panel>`);
18813
18977
  var _tmpl$402 = /* @__PURE__ */ template(`<div class="msg-panel__layout msg-panel__layout--gate">`);
18814
18978
  var _tmpl$4110 = /* @__PURE__ */ template(`<div class=msg-panel__placeholder data-testid=messages-placeholder><p>Select a conversation to read and reply.`);
@@ -18997,7 +19161,7 @@ function MessagesPanel(props) {
18997
19161
  }
18998
19162
  }
18999
19163
  const ChannelChip = (p) => (() => {
19000
- var _el$ = _tmpl$368();
19164
+ var _el$ = _tmpl$370();
19001
19165
  insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
19002
19166
  insert(_el$, createComponent(Show, {
19003
19167
  get when() {
@@ -19022,7 +19186,7 @@ function MessagesPanel(props) {
19022
19186
  })();
19023
19187
  const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
19024
19188
  const ConversationList = () => [(() => {
19025
- var _el$3 = _tmpl$369(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
19189
+ var _el$3 = _tmpl$371(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
19026
19190
  _el$5.$$click = goToGate;
19027
19191
  insert(_el$6, () => channel() === "care" ? "My care team" : "Support");
19028
19192
  _el$7.$$click = openCompose;
@@ -19452,12 +19616,12 @@ function MessagesPanel(props) {
19452
19616
  return memo(() => selectedConvo()?.source === "support")() && (selectedConvo()?.status === "closed" || selectedConvo()?.status === "transferred");
19453
19617
  },
19454
19618
  get children() {
19455
- var _el$97 = _tmpl$3112(), _el$98 = _el$97.firstChild;
19619
+ var _el$97 = _tmpl$3113(), _el$98 = _el$97.firstChild;
19456
19620
  _el$98.$$click = continueWithCareTeam;
19457
19621
  return _el$97;
19458
19622
  }
19459
19623
  }), (() => {
19460
- var _el$99 = _tmpl$3210(), _el$101 = _el$99.firstChild;
19624
+ var _el$99 = _tmpl$3211(), _el$101 = _el$99.firstChild;
19461
19625
  insert(_el$99, createComponent(Show, {
19462
19626
  get when() {
19463
19627
  return thread().loadingMessages();
@@ -19482,13 +19646,13 @@ function MessagesPanel(props) {
19482
19646
  return pendingFile() || attachError();
19483
19647
  },
19484
19648
  get children() {
19485
- var _el$102 = _tmpl$3410();
19649
+ var _el$102 = _tmpl$3411();
19486
19650
  insert(_el$102, createComponent(Show, {
19487
19651
  get when() {
19488
19652
  return pendingFile();
19489
19653
  },
19490
19654
  children: (file) => (() => {
19491
- var _el$111 = _tmpl$372(), _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling, _el$114 = _el$113.nextSibling;
19655
+ var _el$111 = _tmpl$373(), _el$112 = _el$111.firstChild, _el$113 = _el$112.nextSibling, _el$114 = _el$113.nextSibling;
19492
19656
  insert(_el$111, () => file().name, _el$113);
19493
19657
  insert(_el$113, () => formatFileSize(file().size));
19494
19658
  _el$114.$$click = () => setPendingFile(null);
@@ -19500,7 +19664,7 @@ function MessagesPanel(props) {
19500
19664
  return attachError();
19501
19665
  },
19502
19666
  get children() {
19503
- var _el$103 = _tmpl$3310();
19667
+ var _el$103 = _tmpl$3311();
19504
19668
  insert(_el$103, attachError);
19505
19669
  return _el$103;
19506
19670
  }
@@ -19549,7 +19713,7 @@ function MessagesPanel(props) {
19549
19713
  })();
19550
19714
  },
19551
19715
  get children() {
19552
- var _el$116 = _tmpl$382(), _el$117 = _el$116.firstChild, _el$118 = _el$117.nextSibling;
19716
+ var _el$116 = _tmpl$383(), _el$117 = _el$116.firstChild, _el$118 = _el$117.nextSibling;
19553
19717
  insert(_el$117, createComponent(ConversationList, {}));
19554
19718
  insert(_el$118, createComponent(Show, {
19555
19719
  get when() {
@@ -19618,9 +19782,9 @@ function MessagesPanel(props) {
19618
19782
  })();
19619
19783
  }
19620
19784
  delegateEvents(["click", "input", "keydown"]);
19621
- var _tmpl$370 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
19785
+ var _tmpl$374 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
19622
19786
  var _tmpl$2108 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
19623
- var _tmpl$371 = /* @__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.`);
19787
+ var _tmpl$375 = /* @__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.`);
19624
19788
  var _tmpl$452 = /* @__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>`);
19625
19789
  var _tmpl$547 = /* @__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`);
19626
19790
  var _tmpl$645 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
@@ -19665,10 +19829,10 @@ function SurveyHistory() {
19665
19829
  return (list() ?? []).length > 0;
19666
19830
  },
19667
19831
  get fallback() {
19668
- return _tmpl$371();
19832
+ return _tmpl$375();
19669
19833
  },
19670
19834
  get children() {
19671
- var _el$ = _tmpl$370();
19835
+ var _el$ = _tmpl$374();
19672
19836
  insert(_el$, createComponent(For, {
19673
19837
  get each() {
19674
19838
  return list();
@@ -19765,9 +19929,9 @@ function SurveyHistory() {
19765
19929
  delegateEvents(["click"]);
19766
19930
 
19767
19931
  // src/pages/MemberPortal.tsx
19768
- var _tmpl$373 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
19932
+ var _tmpl$376 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
19769
19933
  var _tmpl$2109 = /* @__PURE__ */ template(`<span>`);
19770
- var _tmpl$374 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
19934
+ var _tmpl$377 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
19771
19935
  var _tmpl$453 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
19772
19936
  var _tmpl$548 = /* @__PURE__ */ template(`<div class=rx-stack>`);
19773
19937
  var _tmpl$646 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
@@ -19899,7 +20063,7 @@ function MemberPortal(props) {
19899
20063
  return tabs();
19900
20064
  },
19901
20065
  children: (item) => (() => {
19902
- var _el$ = _tmpl$374(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
20066
+ var _el$ = _tmpl$377(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
19903
20067
  _el$.$$click = () => selectTab(item.key);
19904
20068
  insert(_el$3, () => item.label);
19905
20069
  insert(_el$, createComponent(Show, {
@@ -19907,7 +20071,7 @@ function MemberPortal(props) {
19907
20071
  return memo(() => item.key === "tracker")() && inMotion();
19908
20072
  },
19909
20073
  get children() {
19910
- return _tmpl$373();
20074
+ return _tmpl$376();
19911
20075
  }
19912
20076
  }), null);
19913
20077
  insert(_el$, createComponent(Show, {
@@ -20223,9 +20387,9 @@ function MemberPortal(props) {
20223
20387
  })();
20224
20388
  }
20225
20389
  delegateEvents(["click"]);
20226
- var _tmpl$375 = /* @__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.`);
20390
+ var _tmpl$378 = /* @__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.`);
20227
20391
  var _tmpl$2117 = /* @__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`);
20228
- var _tmpl$376 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
20392
+ var _tmpl$379 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
20229
20393
  var _tmpl$454 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
20230
20394
  var _tmpl$549 = /* @__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)>`);
20231
20395
  function formatMoney(cents) {
@@ -20266,7 +20430,7 @@ function AffiliateOverview() {
20266
20430
  return isPending();
20267
20431
  },
20268
20432
  get children() {
20269
- return _tmpl$375();
20433
+ return _tmpl$378();
20270
20434
  }
20271
20435
  }), null);
20272
20436
  insert(_el$, createComponent(Show, {
@@ -20274,7 +20438,7 @@ function AffiliateOverview() {
20274
20438
  return stats();
20275
20439
  },
20276
20440
  get fallback() {
20277
- return _tmpl$376();
20441
+ return _tmpl$379();
20278
20442
  },
20279
20443
  children: (s) => (() => {
20280
20444
  var _el$5 = _tmpl$454();
@@ -20295,9 +20459,9 @@ function AffiliateOverview() {
20295
20459
  return _el$;
20296
20460
  })();
20297
20461
  }
20298
- var _tmpl$377 = /* @__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>`);
20462
+ var _tmpl$380 = /* @__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>`);
20299
20463
  var _tmpl$2118 = /* @__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`);
20300
- var _tmpl$378 = /* @__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.`);
20464
+ var _tmpl$381 = /* @__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.`);
20301
20465
  var _tmpl$455 = /* @__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`);
20302
20466
  var _tmpl$550 = /* @__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">`);
20303
20467
  function formatMoney2(cents) {
@@ -20343,10 +20507,10 @@ function AffiliateConversions() {
20343
20507
  return (conversions() ?? []).length > 0;
20344
20508
  },
20345
20509
  get fallback() {
20346
- return _tmpl$378();
20510
+ return _tmpl$381();
20347
20511
  },
20348
20512
  get children() {
20349
- var _el$3 = _tmpl$377(), _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;
20513
+ var _el$3 = _tmpl$380(), _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;
20350
20514
  insert(_el$10, createComponent(For, {
20351
20515
  get each() {
20352
20516
  return conversions();
@@ -20428,9 +20592,9 @@ function td() {
20428
20592
  color: "var(--app-affiliate-fg)"
20429
20593
  };
20430
20594
  }
20431
- var _tmpl$379 = /* @__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>`);
20595
+ var _tmpl$384 = /* @__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>`);
20432
20596
  var _tmpl$2119 = /* @__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.`);
20433
- var _tmpl$380 = /* @__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.`);
20597
+ var _tmpl$385 = /* @__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.`);
20434
20598
  var _tmpl$456 = /* @__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>`);
20435
20599
  function formatDate4(iso) {
20436
20600
  const d = new Date(iso);
@@ -20470,10 +20634,10 @@ function AffiliateDownline() {
20470
20634
  return (downline() ?? []).length > 0;
20471
20635
  },
20472
20636
  get fallback() {
20473
- return _tmpl$380();
20637
+ return _tmpl$385();
20474
20638
  },
20475
20639
  get children() {
20476
- var _el$4 = _tmpl$379(), _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;
20640
+ var _el$4 = _tmpl$384(), _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;
20477
20641
  insert(_el$10, createComponent(For, {
20478
20642
  get each() {
20479
20643
  return downline();
@@ -20542,9 +20706,9 @@ function td2() {
20542
20706
  color: "var(--app-affiliate-fg)"
20543
20707
  };
20544
20708
  }
20545
- var _tmpl$381 = /* @__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.`);
20709
+ var _tmpl$386 = /* @__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.`);
20546
20710
  var _tmpl$2120 = /* @__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`);
20547
- var _tmpl$383 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
20711
+ var _tmpl$387 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
20548
20712
  function AffiliateReferralLink() {
20549
20713
  const {
20550
20714
  links
@@ -20575,10 +20739,10 @@ function AffiliateReferralLink() {
20575
20739
  return homepageLink();
20576
20740
  },
20577
20741
  get fallback() {
20578
- return _tmpl$383();
20742
+ return _tmpl$387();
20579
20743
  },
20580
20744
  get children() {
20581
- var _el$3 = _tmpl$381(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
20745
+ var _el$3 = _tmpl$386(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
20582
20746
  insert(_el$6, homepageLink);
20583
20747
  _el$7.$$click = copy;
20584
20748
  insert(_el$7, () => copied() ? "Copied" : "Copy");
@@ -20589,9 +20753,9 @@ function AffiliateReferralLink() {
20589
20753
  })();
20590
20754
  }
20591
20755
  delegateEvents(["click"]);
20592
- var _tmpl$384 = /* @__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.`);
20756
+ var _tmpl$388 = /* @__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.`);
20593
20757
  var _tmpl$2121 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
20594
- var _tmpl$385 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
20758
+ var _tmpl$389 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
20595
20759
  var _tmpl$457 = /* @__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)>`);
20596
20760
  var STATUS_LABEL2 = {
20597
20761
  pending: "Pending approval",
@@ -20627,7 +20791,7 @@ function AffiliateSettings() {
20627
20791
  value: a.paymentEmail ?? "\u2014"
20628
20792
  }];
20629
20793
  return (() => {
20630
- var _el$ = _tmpl$384(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
20794
+ var _el$ = _tmpl$388(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
20631
20795
  insert(_el$, createComponent(Show, {
20632
20796
  get when() {
20633
20797
  return affiliate();
@@ -20636,7 +20800,7 @@ function AffiliateSettings() {
20636
20800
  return _tmpl$2121();
20637
20801
  },
20638
20802
  children: (a) => (() => {
20639
- var _el$7 = _tmpl$385();
20803
+ var _el$7 = _tmpl$389();
20640
20804
  insert(_el$7, createComponent(For, {
20641
20805
  get each() {
20642
20806
  return rows(a());
@@ -20658,9 +20822,9 @@ function AffiliateSettings() {
20658
20822
  delegateEvents(["click"]);
20659
20823
 
20660
20824
  // src/pages/AffiliatePortal.tsx
20661
- var _tmpl$386 = /* @__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>`);
20825
+ var _tmpl$390 = /* @__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>`);
20662
20826
  var _tmpl$2122 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
20663
- var _tmpl$387 = /* @__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">`);
20827
+ var _tmpl$391 = /* @__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">`);
20664
20828
  var _tmpl$458 = /* @__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); } }`);
20665
20829
  var TAB_LABELS2 = {
20666
20830
  overview: "Overview",
@@ -20706,7 +20870,7 @@ function AffiliatePortal(props) {
20706
20870
  });
20707
20871
  },
20708
20872
  get children() {
20709
- var _el$ = _tmpl$386(), _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;
20873
+ var _el$ = _tmpl$390(), _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;
20710
20874
  _el$3.$$click = () => setDrawerOpen(true);
20711
20875
  insert(_el$4, () => TAB_LABELS2[currentTab()]);
20712
20876
  _el$5.$$click = () => setDrawerOpen(false);
@@ -20715,7 +20879,7 @@ function AffiliatePortal(props) {
20715
20879
  return orderedTabs();
20716
20880
  },
20717
20881
  children: (tab) => (() => {
20718
- var _el$1 = _tmpl$387();
20882
+ var _el$1 = _tmpl$391();
20719
20883
  _el$1.$$click = () => handleTabClick(tab);
20720
20884
  insert(_el$1, createComponent(Show, {
20721
20885
  get when() {
@@ -20818,11 +20982,11 @@ function AffiliateGateSpinner(props) {
20818
20982
  })();
20819
20983
  }
20820
20984
  delegateEvents(["click"]);
20821
- var _tmpl$388 = /* @__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">`);
20985
+ var _tmpl$393 = /* @__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">`);
20822
20986
  function AffiliatePasswordInput(props) {
20823
20987
  const [visible, setVisible] = createSignal(false);
20824
20988
  return (() => {
20825
- var _el$ = _tmpl$388(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
20989
+ var _el$ = _tmpl$393(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
20826
20990
  _el$2.$$input = (e) => props.onInput(e.currentTarget.value);
20827
20991
  _el$3.$$click = () => setVisible((v) => !v);
20828
20992
  insert(_el$3, () => visible() ? "Hide" : "Show");
@@ -20863,9 +21027,9 @@ function inputStyle() {
20863
21027
  delegateEvents(["input", "click"]);
20864
21028
 
20865
21029
  // src/pages/AffiliateRegister.tsx
20866
- var _tmpl$389 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
21030
+ var _tmpl$394 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
20867
21031
  var _tmpl$2123 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
20868
- var _tmpl$390 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
21032
+ var _tmpl$395 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
20869
21033
  var _tmpl$459 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
20870
21034
  var _tmpl$551 = /* @__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">`);
20871
21035
  var _tmpl$647 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
@@ -20918,7 +21082,7 @@ function AffiliateRegister(props) {
20918
21082
  insert(_el$6, createComponent(Row, {
20919
21083
  label: "First name",
20920
21084
  get children() {
20921
- var _el$7 = _tmpl$389();
21085
+ var _el$7 = _tmpl$394();
20922
21086
  _el$7.$$input = (e) => setFirstName(e.currentTarget.value);
20923
21087
  effect((_$p) => style(_el$7, inputStyle2(), _$p));
20924
21088
  effect(() => _el$7.value = firstName());
@@ -20938,7 +21102,7 @@ function AffiliateRegister(props) {
20938
21102
  insert(_el$6, createComponent(Row, {
20939
21103
  label: "Email",
20940
21104
  get children() {
20941
- var _el$9 = _tmpl$390();
21105
+ var _el$9 = _tmpl$395();
20942
21106
  _el$9.$$input = (e) => setEmail(e.currentTarget.value);
20943
21107
  effect((_$p) => style(_el$9, inputStyle2(), _$p));
20944
21108
  effect(() => _el$9.value = email());
@@ -21057,9 +21221,9 @@ function linkStyle() {
21057
21221
  };
21058
21222
  }
21059
21223
  delegateEvents(["input", "click"]);
21060
- var _tmpl$391 = /* @__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">`);
21224
+ var _tmpl$396 = /* @__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">`);
21061
21225
  var _tmpl$2124 = /* @__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?`);
21062
- var _tmpl$393 = /* @__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`);
21226
+ var _tmpl$397 = /* @__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`);
21063
21227
  var _tmpl$460 = /* @__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">`);
21064
21228
  function AffiliateLogin(props) {
21065
21229
  const [email, setEmail] = createSignal("");
@@ -21096,7 +21260,7 @@ function AffiliateLogin(props) {
21096
21260
  return error();
21097
21261
  },
21098
21262
  get children() {
21099
- var _el$0 = _tmpl$391();
21263
+ var _el$0 = _tmpl$396();
21100
21264
  insert(_el$0, error);
21101
21265
  return _el$0;
21102
21266
  }
@@ -21117,7 +21281,7 @@ function AffiliateLogin(props) {
21117
21281
  return props.onNavigateRegister;
21118
21282
  },
21119
21283
  get children() {
21120
- var _el$11 = _tmpl$393();
21284
+ var _el$11 = _tmpl$397();
21121
21285
  _el$11.$$click = () => props.onNavigateRegister?.();
21122
21286
  return _el$11;
21123
21287
  }
@@ -21165,9 +21329,9 @@ function inputStyle3() {
21165
21329
  };
21166
21330
  }
21167
21331
  delegateEvents(["input", "click"]);
21168
- var _tmpl$394 = /* @__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">`);
21332
+ var _tmpl$398 = /* @__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">`);
21169
21333
  var _tmpl$2125 = /* @__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">`);
21170
- var _tmpl$395 = /* @__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`);
21334
+ var _tmpl$399 = /* @__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`);
21171
21335
  var _tmpl$461 = /* @__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">`);
21172
21336
  var _tmpl$552 = /* @__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.`);
21173
21337
  var _tmpl$648 = /* @__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`);
@@ -21193,7 +21357,7 @@ function ForgotPasswordPage(props) {
21193
21357
  }
21194
21358
  }
21195
21359
  return (() => {
21196
- var _el$ = _tmpl$395(), _el$2 = _el$.firstChild; _el$2.firstChild;
21360
+ var _el$ = _tmpl$399(), _el$2 = _el$.firstChild; _el$2.firstChild;
21197
21361
  insert(_el$2, createComponent(Show, {
21198
21362
  get when() {
21199
21363
  return !message();
@@ -21223,7 +21387,7 @@ function ForgotPasswordPage(props) {
21223
21387
  return error();
21224
21388
  },
21225
21389
  get children() {
21226
- var _el$8 = _tmpl$394();
21390
+ var _el$8 = _tmpl$398();
21227
21391
  insert(_el$8, error);
21228
21392
  return _el$8;
21229
21393
  }
@@ -21273,9 +21437,9 @@ function inputStyle4() {
21273
21437
  };
21274
21438
  }
21275
21439
  delegateEvents(["input", "click"]);
21276
- var _tmpl$396 = /* @__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">`);
21440
+ var _tmpl$400 = /* @__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">`);
21277
21441
  var _tmpl$2126 = /* @__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">`);
21278
- var _tmpl$397 = /* @__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`);
21442
+ var _tmpl$3100 = /* @__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`);
21279
21443
  var _tmpl$462 = /* @__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">`);
21280
21444
  function queryParam(name) {
21281
21445
  if (typeof window === "undefined") return "";
@@ -21316,7 +21480,7 @@ function ResetPasswordPage(props) {
21316
21480
  }
21317
21481
  }
21318
21482
  return (() => {
21319
- var _el$ = _tmpl$397(), _el$2 = _el$.firstChild; _el$2.firstChild;
21483
+ var _el$ = _tmpl$3100(), _el$2 = _el$.firstChild; _el$2.firstChild;
21320
21484
  insert(_el$2, createComponent(Show, {
21321
21485
  get when() {
21322
21486
  return !message();
@@ -21338,7 +21502,7 @@ function ResetPasswordPage(props) {
21338
21502
  return error();
21339
21503
  },
21340
21504
  get children() {
21341
- var _el$1 = _tmpl$396();
21505
+ var _el$1 = _tmpl$400();
21342
21506
  insert(_el$1, error);
21343
21507
  return _el$1;
21344
21508
  }
@@ -21393,9 +21557,9 @@ function inputStyle5() {
21393
21557
  };
21394
21558
  }
21395
21559
  delegateEvents(["input"]);
21396
- var _tmpl$398 = /* @__PURE__ */ template(`<div>`);
21560
+ var _tmpl$401 = /* @__PURE__ */ template(`<div>`);
21397
21561
  var _tmpl$2127 = /* @__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>`);
21398
- var _tmpl$399 = /* @__PURE__ */ template(`<button type=button>Back to login`);
21562
+ var _tmpl$3101 = /* @__PURE__ */ template(`<button type=button>Back to login`);
21399
21563
  var _tmpl$463 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
21400
21564
  var _tmpl$553 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
21401
21565
  function AffiliateForgotPassword(props) {
@@ -21441,7 +21605,7 @@ function AffiliateForgotPassword(props) {
21441
21605
  return error();
21442
21606
  },
21443
21607
  get children() {
21444
- var _el$8 = _tmpl$398();
21608
+ var _el$8 = _tmpl$401();
21445
21609
  insert(_el$8, error);
21446
21610
  effect((_$p) => style(_el$8, errorStyle(), _$p));
21447
21611
  return _el$8;
@@ -21470,7 +21634,7 @@ function AffiliateForgotPassword(props) {
21470
21634
  return props.onNavigateLogin;
21471
21635
  },
21472
21636
  get children() {
21473
- var _el$0 = _tmpl$399();
21637
+ var _el$0 = _tmpl$3101();
21474
21638
  _el$0.$$click = () => props.onNavigateLogin?.();
21475
21639
  effect((_$p) => style(_el$0, linkStyle2(), _$p));
21476
21640
  return _el$0;
@@ -21576,9 +21740,9 @@ function linkStyle2() {
21576
21740
  };
21577
21741
  }
21578
21742
  delegateEvents(["input", "click"]);
21579
- var _tmpl$400 = /* @__PURE__ */ template(`<div>`);
21743
+ var _tmpl$403 = /* @__PURE__ */ template(`<div>`);
21580
21744
  var _tmpl$2128 = /* @__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>`);
21581
- var _tmpl$3100 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
21745
+ var _tmpl$3102 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
21582
21746
  var _tmpl$464 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
21583
21747
  function queryParam2(name) {
21584
21748
  if (typeof window === "undefined") return "";
@@ -21623,7 +21787,7 @@ function AffiliateResetPassword(props) {
21623
21787
  }
21624
21788
  }
21625
21789
  return (() => {
21626
- var _el$ = _tmpl$3100(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
21790
+ var _el$ = _tmpl$3102(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
21627
21791
  insert(_el$2, createComponent(Show, {
21628
21792
  get when() {
21629
21793
  return !done();
@@ -21657,7 +21821,7 @@ function AffiliateResetPassword(props) {
21657
21821
  return error();
21658
21822
  },
21659
21823
  get children() {
21660
- var _el$9 = _tmpl$400();
21824
+ var _el$9 = _tmpl$403();
21661
21825
  insert(_el$9, error);
21662
21826
  effect((_$p) => style(_el$9, errorStyle2(), _$p));
21663
21827
  return _el$9;
@@ -21756,5 +21920,5 @@ function primaryButtonStyle2(submitting) {
21756
21920
  }
21757
21921
 
21758
21922
  export { AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod };
21759
- //# sourceMappingURL=WCYQ2AYW.js.map
21760
- //# sourceMappingURL=WCYQ2AYW.js.map
21923
+ //# sourceMappingURL=P2G32S2W.js.map
21924
+ //# sourceMappingURL=P2G32S2W.js.map