@apextelemed/partner-core 0.17.0-dev.53 → 0.17.0-dev.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +3 -3
- package/dist/api/index.jsx +5 -3
- package/dist/chunk/{Z745N7NE.jsx → 2LZ4RMMO.jsx} +1066 -627
- package/dist/chunk/{NQLBWDE3.js → 54ICTHZX.js} +34 -3
- package/dist/chunk/54ICTHZX.js.map +1 -0
- package/dist/chunk/{COIUOQOE.js → 5DNJWMSW.js} +3 -3
- package/dist/chunk/{COIUOQOE.js.map → 5DNJWMSW.js.map} +1 -1
- package/dist/chunk/{FDCDDUB6.js → ERW2WNI6.js} +933 -515
- package/dist/chunk/ERW2WNI6.js.map +1 -0
- package/dist/chunk/{PDK3JMIW.jsx → FAKJL3AD.jsx} +33 -1
- package/dist/chunk/{XGCOWLXF.jsx → KI3RUQTI.jsx} +2 -2
- package/dist/chunk/{XZJASVNG.jsx → KSWWT576.jsx} +5 -5
- package/dist/chunk/{3VUCQNOR.js → L6ZE7Q7C.js} +3 -3
- package/dist/chunk/{3VUCQNOR.js.map → L6ZE7Q7C.js.map} +1 -1
- package/dist/chunk/{OOCYQ4I6.jsx → LON6ZV4S.jsx} +2 -2
- package/dist/chunk/{DETBZTGQ.js → Q7VYJUQC.js} +5 -5
- package/dist/chunk/{DETBZTGQ.js.map → Q7VYJUQC.js.map} +1 -1
- package/dist/chunk/{3VBKKYOR.js → QJAMR6MG.js} +3 -3
- package/dist/chunk/{3VBKKYOR.js.map → QJAMR6MG.js.map} +1 -1
- package/dist/chunk/{PW7F2JMV.jsx → TFELHUFX.jsx} +2 -2
- package/dist/chunk/{JDCV4T6O.js → TKN2GOKS.js} +6 -6
- package/dist/chunk/{JDCV4T6O.js.map → TKN2GOKS.js.map} +1 -1
- package/dist/chunk/{2PME7R6L.jsx → YGKENMTV.jsx} +4 -4
- package/dist/{client-JZfa9Gbp.d.ts → client-CEt_6guF.d.ts} +68 -1
- package/dist/flows/index.d.ts +1 -1
- package/dist/flows/index.js +6 -6
- package/dist/flows/index.jsx +6 -6
- package/dist/index/index.d.ts +2 -2
- package/dist/index/index.js +7 -7
- package/dist/index/index.jsx +11 -7
- package/dist/pages/index.d.ts +31 -3
- package/dist/pages/index.js +5 -5
- package/dist/pages/index.jsx +7 -5
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/index.js +2 -2
- package/dist/stores/index.jsx +2 -2
- package/package.json +1 -1
- package/dist/chunk/FDCDDUB6.js.map +0 -1
- package/dist/chunk/NQLBWDE3.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { disqualificationReasonText, qualifiedDrugIds } from './LZWA44KD.js';
|
|
2
|
-
import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './
|
|
3
|
-
import { fetchFunnelConfig } from './
|
|
2
|
+
import { SUPPORT_CATEGORIES, useSurveyFlow, reconcileCartAgainstCatalog, resolveSurveyV2DrugIntent, emailGateAnswered, redeemResumeLink, useSurveyV2Flow, US_STATE_OPTIONS, availableStateOptions, useCheckoutFlow, catalogUnavailableMessage, useCartCheckoutFlow, useSignupFlow, useRegisterFlow, useSubscribeFlow, useDashboardData, useUpdatePaymentMethodFlow, useMemberPortalData, useMessagesThread, captureFunnelEmail, markEmailGateAnswered, isCatalogItemId, subscribeToSupportTopic, useAffiliateStats, useAffiliateConversions, useAffiliateDownline, useAffiliateLinks, stateAvailabilityNote, hasStateRestrictions, uploadPrescriptionPhoto, deriveAttention, deriveJourney, buildTimeline, lifecycleReason, accountSource, intakeEvidence, LIFECYCLE_BUCKETS, LIFECYCLE_LABEL, classifyCatalogError, groupDrugsByPharmacy, useProductCatalogEditor, useStrengthMatches, skuBindingModeFor, isCssColorValue, categoryLabel, formatConversationTime, buildTrackerView, ACCOUNT_SOURCE_LABEL, fmtDay, createCatalogProduct, addCatalogItemAsProduct, applyPriceDrafts, resolveStrengthPrices, invalidDraftKeys, orphanKey, ORPHAN_REASON, useAddPharmacy, READINESS_LABEL, useCatalogConversion, formatCalendarDate, formatMessageTime, formatEventDate, formatStageDate, offerSummaryText, LIFECYCLE_TONE, buildTrackingUrl, buildStrengthRows, isLeftForReview, doseIdOf, pharmacyLabel, isImageAttachment, buildRefillView, toTrackerRequest, needsReview, visibleWarnings, compareStrengths, MATCH_DEPENDENT_WARNINGS, SOURCE_FIELD_NOTE, MATCH_HOW_LABEL, explainFinding, matchKey } from './Q7VYJUQC.js';
|
|
3
|
+
import { fetchFunnelConfig } from './5DNJWMSW.js';
|
|
4
4
|
import { usePrimitives } from './67KHO66G.js';
|
|
5
|
-
import { cart_default, auth_default, affiliateAuth_default } from './
|
|
6
|
-
import { usersApi, adminApi, membersApi, offersApi,
|
|
5
|
+
import { cart_default, auth_default, affiliateAuth_default } from './QJAMR6MG.js';
|
|
6
|
+
import { usersApi, adminApi, membersApi, offersApi, authApi, affiliatePortalApi, adminAffiliatesApi, apiFetch, apexApi, adminCatalogApi, SUPPORT_ATTACHMENT_MIME_TYPES, SUPPORT_ATTACHMENT_MAX_BYTES, ADMIN_ROLES, ApiError, subscriptionsApi } from './54ICTHZX.js';
|
|
7
7
|
import { delegateEvents, createComponent, insert, memo, effect, setStyleProperty, mergeProps, use, setAttribute, addEventListener, style, className, Dynamic, Portal, template } from 'solid-js/web';
|
|
8
8
|
import { createContext, createSignal, createEffect, on, Show, For, createResource, createMemo, untrack, ErrorBoundary, Switch, Match, onMount, onCleanup, useContext, Index } from 'solid-js';
|
|
9
9
|
import { isQuestionVisible } from '@apextelemed/survey-core';
|
|
@@ -12178,6 +12178,11 @@ function SupportSummary(props) {
|
|
|
12178
12178
|
});
|
|
12179
12179
|
}
|
|
12180
12180
|
delegateEvents(["click"]);
|
|
12181
|
+
var [adminMe, setAdminMe] = createSignal(void 0);
|
|
12182
|
+
function adminCan(permission) {
|
|
12183
|
+
const me = adminMe();
|
|
12184
|
+
return me ? me.permissions.includes(permission) : true;
|
|
12185
|
+
}
|
|
12181
12186
|
|
|
12182
12187
|
// src/pages/admin/customers/CustomerDetail.tsx
|
|
12183
12188
|
var _tmpl$191 = /* @__PURE__ */ template(`<div class=app-admin-detail>`);
|
|
@@ -12197,7 +12202,7 @@ var _tmpl$1212 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=m
|
|
|
12197
12202
|
var _tmpl$1310 = /* @__PURE__ */ template(`<div class=app-admin-table-wrap><table class=app-admin-table><thead><tr><th>Date</th><th>Items</th><th>Total</th><th>Status</th></tr></thead><tbody>`);
|
|
12198
12203
|
var _tmpl$1410 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>No subscriptions.`);
|
|
12199
12204
|
var _tmpl$1510 = /* @__PURE__ */ template(`<button type=button class="app-admin-btn app-admin-btn-ghost app-admin-btn-sm"title="Cancel any prescription request still awaiting prescriber review. Approved and completed prescriptions are untouched.">`);
|
|
12200
|
-
var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem
|
|
12205
|
+
var _tmpl$1610 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>`);
|
|
12201
12206
|
var _tmpl$1710 = /* @__PURE__ */ template(`<tr><td data-label=Date class=app-admin-text-muted></td><td data-label=Items></td><td data-label=Total></td><td data-label=Status>`);
|
|
12202
12207
|
var _tmpl$1810 = /* @__PURE__ */ template(`<button type=button class=app-admin-link-btn>`);
|
|
12203
12208
|
var _tmpl$199 = /* @__PURE__ */ template(`<p class=app-admin-text-muted style=margin:0;font-size:0.875rem>Nothing recorded yet.`);
|
|
@@ -12704,16 +12709,21 @@ function CustomerDetail(props) {
|
|
|
12704
12709
|
return ov().requests.items.length;
|
|
12705
12710
|
},
|
|
12706
12711
|
get action() {
|
|
12707
|
-
return (
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12712
|
+
return createComponent(Show, {
|
|
12713
|
+
get when() {
|
|
12714
|
+
return adminCan("patient.support");
|
|
12715
|
+
},
|
|
12716
|
+
get children() {
|
|
12717
|
+
var _el$31 = _tmpl$1510();
|
|
12718
|
+
_el$31.$$click = handleCancelUnapprovedRequests;
|
|
12719
|
+
insert(_el$31, (() => {
|
|
12720
|
+
var _c$ = memo(() => busy() === "cancel-requests");
|
|
12721
|
+
return () => _c$() ? "Canceling\u2026" : memo(() => pendingRequests().length > 0)() ? `Cancel unapproved requests (${pendingRequests().length})` : "Cancel unapproved requests";
|
|
12722
|
+
})());
|
|
12723
|
+
effect(() => _el$31.disabled = busy() === "cancel-requests");
|
|
12724
|
+
return _el$31;
|
|
12725
|
+
}
|
|
12726
|
+
});
|
|
12717
12727
|
},
|
|
12718
12728
|
get children() {
|
|
12719
12729
|
return createComponent(Show, {
|
|
@@ -12721,7 +12731,11 @@ function CustomerDetail(props) {
|
|
|
12721
12731
|
return ov().requests.items.length > 0;
|
|
12722
12732
|
},
|
|
12723
12733
|
get fallback() {
|
|
12724
|
-
return
|
|
12734
|
+
return (() => {
|
|
12735
|
+
var _el$32 = _tmpl$1610();
|
|
12736
|
+
insert(_el$32, () => ov().rxRedacted ? "Prescription details aren't shown for your admin role." : "No prescription requests.");
|
|
12737
|
+
return _el$32;
|
|
12738
|
+
})();
|
|
12725
12739
|
},
|
|
12726
12740
|
get children() {
|
|
12727
12741
|
var _el$24 = _tmpl$1115();
|
|
@@ -25766,14 +25780,234 @@ function Features() {
|
|
|
25766
25780
|
})();
|
|
25767
25781
|
}
|
|
25768
25782
|
delegateEvents(["click", "input"]);
|
|
25783
|
+
var _tmpl$401 = /* @__PURE__ */ template(`<option value disabled>Unknown role`);
|
|
25784
|
+
var _tmpl$2126 = /* @__PURE__ */ template(`<select class=app-admin-input>`);
|
|
25785
|
+
var _tmpl$3102 = /* @__PURE__ */ template(`<option>`);
|
|
25786
|
+
var _tmpl$470 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style="padding:0.625rem 0.875rem;margin-top:0.75rem;font-size:0.875rem">`);
|
|
25787
|
+
var _tmpl$560 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Admin</th><th>Role</th><th style=text-align:right></th></tr></thead><tbody>`);
|
|
25788
|
+
var _tmpl$656 = /* @__PURE__ */ template(`<div class=app-admin-heading style="font-size:1rem;margin:1.5rem 0 0.5rem">Pending invites`);
|
|
25789
|
+
var _tmpl$749 = /* @__PURE__ */ template(`<table class=app-admin-table><thead><tr><th>Email</th><th>Role when they join</th><th>Expires</th><th style=text-align:right></th></tr></thead><tbody>`);
|
|
25790
|
+
var _tmpl$842 = /* @__PURE__ */ template(`<div><form class=app-admin-card style=padding:1rem;margin-bottom:1.5rem><div class=app-admin-heading style=font-size:1rem;margin-bottom:0.75rem>Invite an admin</div><div style=display:flex;gap:0.75rem;flex-wrap:wrap;align-items:flex-end><label style="display:flex;flex-direction:column;gap:0.25rem;flex:1 1 16rem"><span class=app-admin-label>Email</span><input class=app-admin-input type=email required placeholder=name@example.com></label><label style=display:flex;flex-direction:column;gap:0.25rem><span class=app-admin-label>Role</span></label><button type=submit class="app-admin-btn app-admin-btn-primary"></button></div><div class=app-admin-text-muted style=font-size:0.8125rem;margin-top:0.5rem>: `);
|
|
25791
|
+
var _tmpl$939 = /* @__PURE__ */ template(`<span class=app-admin-text-muted> (you)`);
|
|
25792
|
+
var _tmpl$035 = /* @__PURE__ */ template(`<tr><td></td><td></td><td style=text-align:right><button type=button class="app-admin-btn app-admin-btn-ghost">Remove`);
|
|
25793
|
+
var _tmpl$1134 = /* @__PURE__ */ template(`<tr><td></td><td></td><td class=app-admin-text-muted></td><td style=text-align:right><button type=button class="app-admin-btn app-admin-btn-ghost">Withdraw`);
|
|
25794
|
+
var ADMIN_ROLE_SUMMARY = {
|
|
25795
|
+
owner: "Everything, including managing admins",
|
|
25796
|
+
support: "Customers, patient records, support, subscriptions and refunds",
|
|
25797
|
+
accounting: "Payments, refunds and subscriptions \u2014 no patient prescription data",
|
|
25798
|
+
marketing: "Funnel, promotions, catalog and email copy \u2014 no patient data"
|
|
25799
|
+
};
|
|
25800
|
+
var ROLE_LABEL = {
|
|
25801
|
+
owner: "Owner",
|
|
25802
|
+
support: "Support agent",
|
|
25803
|
+
accounting: "Accounting",
|
|
25804
|
+
marketing: "Marketing"
|
|
25805
|
+
};
|
|
25806
|
+
function RoleSelect(props) {
|
|
25807
|
+
return (() => {
|
|
25808
|
+
var _el$ = _tmpl$2126();
|
|
25809
|
+
_el$.addEventListener("change", (e) => props.onChange(e.currentTarget.value));
|
|
25810
|
+
insert(_el$, createComponent(Show, {
|
|
25811
|
+
get when() {
|
|
25812
|
+
return props.value === null;
|
|
25813
|
+
},
|
|
25814
|
+
get children() {
|
|
25815
|
+
return _tmpl$401();
|
|
25816
|
+
}
|
|
25817
|
+
}), null);
|
|
25818
|
+
insert(_el$, createComponent(For, {
|
|
25819
|
+
each: ADMIN_ROLES,
|
|
25820
|
+
children: (r) => (() => {
|
|
25821
|
+
var _el$3 = _tmpl$3102();
|
|
25822
|
+
_el$3.value = r;
|
|
25823
|
+
insert(_el$3, () => ROLE_LABEL[r]);
|
|
25824
|
+
return _el$3;
|
|
25825
|
+
})()
|
|
25826
|
+
}), null);
|
|
25827
|
+
effect(() => _el$.disabled = props.disabled);
|
|
25828
|
+
effect(() => _el$.value = props.value ?? "");
|
|
25829
|
+
return _el$;
|
|
25830
|
+
})();
|
|
25831
|
+
}
|
|
25832
|
+
function Admins(props) {
|
|
25833
|
+
const [team, {
|
|
25834
|
+
refetch
|
|
25835
|
+
}] = createResource(() => adminApi.listAdminTeam());
|
|
25836
|
+
const [email, setEmail] = createSignal("");
|
|
25837
|
+
const [role, setRole] = createSignal("marketing");
|
|
25838
|
+
const [inviting, setInviting] = createSignal(false);
|
|
25839
|
+
const [apexNote, setApexNote] = createSignal(null);
|
|
25840
|
+
async function run(action, success) {
|
|
25841
|
+
try {
|
|
25842
|
+
await action();
|
|
25843
|
+
toastSuccess(success);
|
|
25844
|
+
} catch (err) {
|
|
25845
|
+
toastError(err instanceof Error ? err.message : "Something went wrong");
|
|
25846
|
+
}
|
|
25847
|
+
await refetch();
|
|
25848
|
+
}
|
|
25849
|
+
async function invite(e) {
|
|
25850
|
+
e.preventDefault();
|
|
25851
|
+
const address = email().trim().toLowerCase();
|
|
25852
|
+
if (!address) return;
|
|
25853
|
+
setInviting(true);
|
|
25854
|
+
setApexNote(null);
|
|
25855
|
+
try {
|
|
25856
|
+
const result = await adminApi.inviteAdmin({
|
|
25857
|
+
email: address,
|
|
25858
|
+
adminRole: role(),
|
|
25859
|
+
acceptUrl: props.acceptInviteUrl
|
|
25860
|
+
});
|
|
25861
|
+
if (result.apexInviteRequired) {
|
|
25862
|
+
setApexNote(`${address} will be a ${ROLE_LABEL[role()]} once they sign in. This site's admins sign in with their Apex partner portal account, so also invite them as a user there.`);
|
|
25863
|
+
toastSuccess("Role saved for their first sign-in");
|
|
25864
|
+
} else {
|
|
25865
|
+
toastSuccess(`Invite sent to ${address}`);
|
|
25866
|
+
}
|
|
25867
|
+
setEmail("");
|
|
25868
|
+
setRole("marketing");
|
|
25869
|
+
} catch (err) {
|
|
25870
|
+
toastError(err instanceof Error ? err.message : "Failed to send invite");
|
|
25871
|
+
} finally {
|
|
25872
|
+
setInviting(false);
|
|
25873
|
+
await refetch();
|
|
25874
|
+
}
|
|
25875
|
+
}
|
|
25876
|
+
const changeRole = (a, next) => run(() => adminApi.setAdminRole(a.id, next), `${a.email} is now ${ROLE_LABEL[next]}`);
|
|
25877
|
+
const remove = (a) => {
|
|
25878
|
+
if (!window.confirm(`Remove admin access for ${a.email}? Their account stays; they just can't use the admin.`)) return;
|
|
25879
|
+
void run(() => adminApi.removeAdmin(a.id), `Removed ${a.email}`);
|
|
25880
|
+
};
|
|
25881
|
+
const changeInviteRole = (i, next) => run(() => adminApi.updateAdminInvite(i.id, next), `${i.email} will join as ${ROLE_LABEL[next]}`);
|
|
25882
|
+
const cancelInvite = (i) => {
|
|
25883
|
+
if (!window.confirm(`Withdraw the invite for ${i.email}?`)) return;
|
|
25884
|
+
void run(() => adminApi.cancelAdminInvite(i.id), `Invite for ${i.email} withdrawn`);
|
|
25885
|
+
};
|
|
25886
|
+
const isMe = (a) => adminMe()?.uid === a.id;
|
|
25887
|
+
return (() => {
|
|
25888
|
+
var _el$4 = _tmpl$842(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$1 = _el$8.nextSibling; _el$1.firstChild; var _el$11 = _el$1.nextSibling, _el$12 = _el$7.nextSibling, _el$13 = _el$12.firstChild;
|
|
25889
|
+
insert(_el$4, createComponent(PageTitle, {
|
|
25890
|
+
subtitle: "Who can use this admin, and what each person can see and do.",
|
|
25891
|
+
children: "Admins"
|
|
25892
|
+
}), _el$5);
|
|
25893
|
+
_el$5.addEventListener("submit", invite);
|
|
25894
|
+
_el$0.$$input = (e) => setEmail(e.currentTarget.value);
|
|
25895
|
+
insert(_el$1, createComponent(RoleSelect, {
|
|
25896
|
+
get value() {
|
|
25897
|
+
return role();
|
|
25898
|
+
},
|
|
25899
|
+
onChange: setRole
|
|
25900
|
+
}), null);
|
|
25901
|
+
insert(_el$11, () => inviting() ? "Sending\u2026" : "Send invite");
|
|
25902
|
+
insert(_el$12, () => ROLE_LABEL[role()], _el$13);
|
|
25903
|
+
insert(_el$12, () => ADMIN_ROLE_SUMMARY[role()], null);
|
|
25904
|
+
insert(_el$5, createComponent(Show, {
|
|
25905
|
+
get when() {
|
|
25906
|
+
return apexNote();
|
|
25907
|
+
},
|
|
25908
|
+
get children() {
|
|
25909
|
+
var _el$14 = _tmpl$470();
|
|
25910
|
+
insert(_el$14, apexNote);
|
|
25911
|
+
return _el$14;
|
|
25912
|
+
}
|
|
25913
|
+
}), null);
|
|
25914
|
+
insert(_el$4, createComponent(Show, {
|
|
25915
|
+
get when() {
|
|
25916
|
+
return !team.loading;
|
|
25917
|
+
},
|
|
25918
|
+
get fallback() {
|
|
25919
|
+
return createComponent(LoadingSpinner, {});
|
|
25920
|
+
},
|
|
25921
|
+
get children() {
|
|
25922
|
+
return createComponent(Show, {
|
|
25923
|
+
get when() {
|
|
25924
|
+
return !team.error;
|
|
25925
|
+
},
|
|
25926
|
+
get fallback() {
|
|
25927
|
+
return createComponent(EmptyState, {
|
|
25928
|
+
message: "Couldn't load the admin team."
|
|
25929
|
+
});
|
|
25930
|
+
},
|
|
25931
|
+
get children() {
|
|
25932
|
+
return [(() => {
|
|
25933
|
+
var _el$15 = _tmpl$560(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling; _el$19.nextSibling; var _el$21 = _el$16.nextSibling;
|
|
25934
|
+
insert(_el$21, createComponent(For, {
|
|
25935
|
+
get each() {
|
|
25936
|
+
return team()?.admins ?? [];
|
|
25937
|
+
},
|
|
25938
|
+
children: (a) => (() => {
|
|
25939
|
+
var _el$31 = _tmpl$035(), _el$32 = _el$31.firstChild, _el$34 = _el$32.nextSibling, _el$35 = _el$34.nextSibling, _el$36 = _el$35.firstChild;
|
|
25940
|
+
insert(_el$32, () => a.email, null);
|
|
25941
|
+
insert(_el$32, createComponent(Show, {
|
|
25942
|
+
get when() {
|
|
25943
|
+
return isMe(a);
|
|
25944
|
+
},
|
|
25945
|
+
get children() {
|
|
25946
|
+
return _tmpl$939();
|
|
25947
|
+
}
|
|
25948
|
+
}), null);
|
|
25949
|
+
insert(_el$34, createComponent(RoleSelect, {
|
|
25950
|
+
get value() {
|
|
25951
|
+
return a.adminRole;
|
|
25952
|
+
},
|
|
25953
|
+
onChange: (r) => void changeRole(a, r)
|
|
25954
|
+
}));
|
|
25955
|
+
_el$36.$$click = () => remove(a);
|
|
25956
|
+
return _el$31;
|
|
25957
|
+
})()
|
|
25958
|
+
}));
|
|
25959
|
+
return _el$15;
|
|
25960
|
+
})(), createComponent(Show, {
|
|
25961
|
+
get when() {
|
|
25962
|
+
return (team()?.invites ?? []).length > 0;
|
|
25963
|
+
},
|
|
25964
|
+
get children() {
|
|
25965
|
+
return [_tmpl$656(), (() => {
|
|
25966
|
+
var _el$23 = _tmpl$749(), _el$24 = _el$23.firstChild, _el$25 = _el$24.firstChild, _el$26 = _el$25.firstChild, _el$27 = _el$26.nextSibling, _el$28 = _el$27.nextSibling; _el$28.nextSibling; var _el$30 = _el$24.nextSibling;
|
|
25967
|
+
insert(_el$30, createComponent(For, {
|
|
25968
|
+
get each() {
|
|
25969
|
+
return team()?.invites ?? [];
|
|
25970
|
+
},
|
|
25971
|
+
children: (i) => (() => {
|
|
25972
|
+
var _el$37 = _tmpl$1134(), _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, _el$40 = _el$39.nextSibling, _el$41 = _el$40.nextSibling, _el$42 = _el$41.firstChild;
|
|
25973
|
+
insert(_el$38, () => i.email);
|
|
25974
|
+
insert(_el$39, createComponent(RoleSelect, {
|
|
25975
|
+
get value() {
|
|
25976
|
+
return i.adminRole;
|
|
25977
|
+
},
|
|
25978
|
+
onChange: (r) => void changeInviteRole(i, r)
|
|
25979
|
+
}));
|
|
25980
|
+
insert(_el$40, (() => {
|
|
25981
|
+
var _c$ = memo(() => !!i.expiresAt);
|
|
25982
|
+
return () => _c$() ? new Date(i.expiresAt).toLocaleDateString() : "At first sign-in";
|
|
25983
|
+
})());
|
|
25984
|
+
_el$42.$$click = () => cancelInvite(i);
|
|
25985
|
+
return _el$37;
|
|
25986
|
+
})()
|
|
25987
|
+
}));
|
|
25988
|
+
return _el$23;
|
|
25989
|
+
})()];
|
|
25990
|
+
}
|
|
25991
|
+
})];
|
|
25992
|
+
}
|
|
25993
|
+
});
|
|
25994
|
+
}
|
|
25995
|
+
}), null);
|
|
25996
|
+
effect(() => _el$11.disabled = inviting());
|
|
25997
|
+
effect(() => _el$0.value = email());
|
|
25998
|
+
return _el$4;
|
|
25999
|
+
})();
|
|
26000
|
+
}
|
|
26001
|
+
delegateEvents(["input", "click"]);
|
|
25769
26002
|
|
|
25770
26003
|
// src/pages/AdminDashboard.tsx
|
|
25771
|
-
var _tmpl$
|
|
25772
|
-
var _tmpl$
|
|
25773
|
-
var _tmpl$
|
|
25774
|
-
var _tmpl$
|
|
25775
|
-
var _tmpl$
|
|
25776
|
-
var _tmpl$
|
|
26004
|
+
var _tmpl$407 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
|
|
26005
|
+
var _tmpl$2127 = /* @__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">`);
|
|
26006
|
+
var _tmpl$3103 = /* @__PURE__ */ template(`<div class="app-admin-root app-admin-shell"data-scrollable 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>`);
|
|
26007
|
+
var _tmpl$471 = /* @__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">`);
|
|
26008
|
+
var _tmpl$561 = /* @__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>Not available for your role</div><div style=color:var(--app-admin-fg-muted);font-size:0.875rem>Ask an owner of this site if you need access to this section.`);
|
|
26009
|
+
var _tmpl$657 = /* @__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`);
|
|
26010
|
+
var _tmpl$750 = /* @__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); } }`);
|
|
25777
26011
|
var TAB_LABELS = {
|
|
25778
26012
|
dashboard: "Dashboard",
|
|
25779
26013
|
customers: "Customers",
|
|
@@ -25792,7 +26026,34 @@ var TAB_LABELS = {
|
|
|
25792
26026
|
funnel: "Funnel",
|
|
25793
26027
|
sequences: "Sequences",
|
|
25794
26028
|
"sequence-results": "Results",
|
|
25795
|
-
features: "Features"
|
|
26029
|
+
features: "Features",
|
|
26030
|
+
admins: "Admins"
|
|
26031
|
+
};
|
|
26032
|
+
var TAB_PERMISSION = {
|
|
26033
|
+
dashboard: null,
|
|
26034
|
+
customers: "customers.read",
|
|
26035
|
+
payments: "billing.read",
|
|
26036
|
+
subscriptions: "customers.read",
|
|
26037
|
+
products: "catalog.read",
|
|
26038
|
+
categories: "catalog.read",
|
|
26039
|
+
sales: "promotions.read",
|
|
26040
|
+
"promo-codes": "promotions.read",
|
|
26041
|
+
offers: "promotions.read",
|
|
26042
|
+
affiliates: "affiliates.read",
|
|
26043
|
+
support: "patient.support",
|
|
26044
|
+
webhooks: "patient.support",
|
|
26045
|
+
"email-templates": "emailTemplates.write",
|
|
26046
|
+
funnel: "funnel.read",
|
|
26047
|
+
sequences: "funnel.read",
|
|
26048
|
+
"sequence-results": "funnel.read",
|
|
26049
|
+
"email-notifications": "settings.write",
|
|
26050
|
+
features: "settings.write",
|
|
26051
|
+
admins: "admins.manage"
|
|
26052
|
+
};
|
|
26053
|
+
var roleAllows = (tab) => {
|
|
26054
|
+
const permission = TAB_PERMISSION[tab];
|
|
26055
|
+
if (permission === null) return true;
|
|
26056
|
+
return adminMe() !== void 0 && adminCan(permission);
|
|
25796
26057
|
};
|
|
25797
26058
|
var DEFAULT_TOP_TABS = ["dashboard"];
|
|
25798
26059
|
var DEFAULT_TAB_GROUPS = [
|
|
@@ -25823,12 +26084,12 @@ var DEFAULT_TAB_GROUPS = [
|
|
|
25823
26084
|
// What this site has switched on, and what it can ask for.
|
|
25824
26085
|
{
|
|
25825
26086
|
label: "Settings",
|
|
25826
|
-
tabs: ["features"]
|
|
26087
|
+
tabs: ["features", "admins"]
|
|
25827
26088
|
}
|
|
25828
26089
|
];
|
|
25829
26090
|
var filterEnabled = (tabs, enabled) => enabled ? tabs.filter((t) => enabled.includes(t)) : tabs;
|
|
25830
26091
|
function AdminDashboard(props) {
|
|
25831
|
-
const withoutHidden = (tabs) => supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs;
|
|
26092
|
+
const withoutHidden = (tabs) => (supportChannelMode() === "email" ? tabs.filter((t) => t !== "support") : tabs).filter(roleAllows);
|
|
25832
26093
|
const visibleTopTabs = () => withoutHidden(filterEnabled(props.topTabs ?? DEFAULT_TOP_TABS, props.enabledTabs));
|
|
25833
26094
|
const visibleGroups = () => (props.tabGroups ?? DEFAULT_TAB_GROUPS).map((g) => ({
|
|
25834
26095
|
label: g.label,
|
|
@@ -25860,6 +26121,10 @@ function AdminDashboard(props) {
|
|
|
25860
26121
|
if (!auth) return true;
|
|
25861
26122
|
return auth.isAuthenticated() && auth.isHydrated() && auth.isAdmin();
|
|
25862
26123
|
};
|
|
26124
|
+
createEffect(() => {
|
|
26125
|
+
if (!adminAllowed()) return;
|
|
26126
|
+
void Promise.resolve().then(() => adminApi.getMe()).then(setAdminMe).catch(() => setAdminMe(null));
|
|
26127
|
+
});
|
|
25863
26128
|
createEffect(() => {
|
|
25864
26129
|
if (!adminAllowed()) return;
|
|
25865
26130
|
void adminApi.getSupportChannel().then((s) => setSupportChannelMode(s.mode)).catch(() => {
|
|
@@ -25905,14 +26170,14 @@ function AdminDashboard(props) {
|
|
|
25905
26170
|
};
|
|
25906
26171
|
const topOffset = () => props.topOffset ?? "0px";
|
|
25907
26172
|
const TabButton = (btnProps) => (() => {
|
|
25908
|
-
var _el$ = _tmpl$
|
|
26173
|
+
var _el$ = _tmpl$2127();
|
|
25909
26174
|
_el$.$$click = () => handleTabClick(btnProps.tab);
|
|
25910
26175
|
insert(_el$, createComponent(Show, {
|
|
25911
26176
|
get when() {
|
|
25912
26177
|
return props.tabIcons?.[btnProps.tab];
|
|
25913
26178
|
},
|
|
25914
26179
|
get children() {
|
|
25915
|
-
var _el$2 = _tmpl$
|
|
26180
|
+
var _el$2 = _tmpl$407();
|
|
25916
26181
|
effect(() => className(_el$2, props.tabIcons[btnProps.tab]));
|
|
25917
26182
|
return _el$2;
|
|
25918
26183
|
}
|
|
@@ -25944,7 +26209,7 @@ function AdminDashboard(props) {
|
|
|
25944
26209
|
return createComponent(AdminNavContext.Provider, {
|
|
25945
26210
|
value: adminNav,
|
|
25946
26211
|
get children() {
|
|
25947
|
-
var _el$3 = _tmpl$
|
|
26212
|
+
var _el$3 = _tmpl$3103(), _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;
|
|
25948
26213
|
_el$5.$$click = () => setDrawerOpen(true);
|
|
25949
26214
|
insert(_el$6, () => TAB_LABELS[currentTab()]);
|
|
25950
26215
|
_el$7.$$click = () => setDrawerOpen(false);
|
|
@@ -25961,7 +26226,7 @@ function AdminDashboard(props) {
|
|
|
25961
26226
|
return visibleGroups();
|
|
25962
26227
|
},
|
|
25963
26228
|
children: (group) => [(() => {
|
|
25964
|
-
var _el$11 = _tmpl$
|
|
26229
|
+
var _el$11 = _tmpl$471();
|
|
25965
26230
|
insert(_el$11, () => group.label);
|
|
25966
26231
|
return _el$11;
|
|
25967
26232
|
})(), createComponent(For, {
|
|
@@ -25985,184 +26250,205 @@ function AdminDashboard(props) {
|
|
|
25985
26250
|
reset
|
|
25986
26251
|
}),
|
|
25987
26252
|
get children() {
|
|
25988
|
-
return createComponent(
|
|
26253
|
+
return createComponent(Show, {
|
|
26254
|
+
get when() {
|
|
26255
|
+
return adminMe() === void 0 || roleAllows(currentTab());
|
|
26256
|
+
},
|
|
25989
26257
|
get fallback() {
|
|
25990
|
-
return createComponent(
|
|
25991
|
-
onSelectTab: handleTabClick,
|
|
25992
|
-
isTabEnabled
|
|
25993
|
-
});
|
|
26258
|
+
return createComponent(RoleForbidden, {});
|
|
25994
26259
|
},
|
|
25995
26260
|
get children() {
|
|
25996
|
-
return
|
|
25997
|
-
get
|
|
25998
|
-
return currentTab() === "dashboard";
|
|
25999
|
-
},
|
|
26000
|
-
get children() {
|
|
26261
|
+
return createComponent(Switch, {
|
|
26262
|
+
get fallback() {
|
|
26001
26263
|
return createComponent(Dashboard, {
|
|
26002
26264
|
onSelectTab: handleTabClick,
|
|
26003
26265
|
isTabEnabled
|
|
26004
26266
|
});
|
|
26005
|
-
}
|
|
26006
|
-
}), createComponent(Match, {
|
|
26007
|
-
get when() {
|
|
26008
|
-
return currentTab() === "customers";
|
|
26009
26267
|
},
|
|
26010
26268
|
get children() {
|
|
26011
|
-
return createComponent(
|
|
26012
|
-
get
|
|
26013
|
-
return
|
|
26269
|
+
return [createComponent(Match, {
|
|
26270
|
+
get when() {
|
|
26271
|
+
return currentTab() === "dashboard";
|
|
26014
26272
|
},
|
|
26015
|
-
get
|
|
26016
|
-
return
|
|
26273
|
+
get children() {
|
|
26274
|
+
return createComponent(Dashboard, {
|
|
26275
|
+
onSelectTab: handleTabClick,
|
|
26276
|
+
isTabEnabled
|
|
26277
|
+
});
|
|
26278
|
+
}
|
|
26279
|
+
}), createComponent(Match, {
|
|
26280
|
+
get when() {
|
|
26281
|
+
return currentTab() === "customers";
|
|
26017
26282
|
},
|
|
26018
|
-
get
|
|
26019
|
-
return
|
|
26283
|
+
get children() {
|
|
26284
|
+
return createComponent(Customers, {
|
|
26285
|
+
get passwordResetRedirectUrl() {
|
|
26286
|
+
return props.passwordResetRedirectUrl;
|
|
26287
|
+
},
|
|
26288
|
+
get activeUid() {
|
|
26289
|
+
return props.customers?.activeUid;
|
|
26290
|
+
},
|
|
26291
|
+
get onSelectCustomer() {
|
|
26292
|
+
return props.customers?.onSelectCustomer;
|
|
26293
|
+
},
|
|
26294
|
+
get initialUid() {
|
|
26295
|
+
return pendingCustomerUid();
|
|
26296
|
+
}
|
|
26297
|
+
});
|
|
26298
|
+
}
|
|
26299
|
+
}), createComponent(Match, {
|
|
26300
|
+
get when() {
|
|
26301
|
+
return currentTab() === "payments";
|
|
26020
26302
|
},
|
|
26021
|
-
get
|
|
26022
|
-
return
|
|
26303
|
+
get children() {
|
|
26304
|
+
return createComponent(Payments, {});
|
|
26023
26305
|
}
|
|
26024
|
-
})
|
|
26025
|
-
|
|
26026
|
-
|
|
26027
|
-
get when() {
|
|
26028
|
-
return currentTab() === "payments";
|
|
26029
|
-
},
|
|
26030
|
-
get children() {
|
|
26031
|
-
return createComponent(Payments, {});
|
|
26032
|
-
}
|
|
26033
|
-
}), createComponent(Match, {
|
|
26034
|
-
get when() {
|
|
26035
|
-
return currentTab() === "subscriptions";
|
|
26036
|
-
},
|
|
26037
|
-
get children() {
|
|
26038
|
-
return createComponent(Customers, {
|
|
26039
|
-
get passwordResetRedirectUrl() {
|
|
26040
|
-
return props.passwordResetRedirectUrl;
|
|
26306
|
+
}), createComponent(Match, {
|
|
26307
|
+
get when() {
|
|
26308
|
+
return currentTab() === "subscriptions";
|
|
26041
26309
|
},
|
|
26042
|
-
|
|
26043
|
-
|
|
26044
|
-
|
|
26310
|
+
get children() {
|
|
26311
|
+
return createComponent(Customers, {
|
|
26312
|
+
get passwordResetRedirectUrl() {
|
|
26313
|
+
return props.passwordResetRedirectUrl;
|
|
26314
|
+
},
|
|
26315
|
+
initialFilter: "active",
|
|
26316
|
+
get activeUid() {
|
|
26317
|
+
return props.customers?.activeUid;
|
|
26318
|
+
},
|
|
26319
|
+
get onSelectCustomer() {
|
|
26320
|
+
return props.customers?.onSelectCustomer;
|
|
26321
|
+
}
|
|
26322
|
+
});
|
|
26323
|
+
}
|
|
26324
|
+
}), createComponent(Match, {
|
|
26325
|
+
get when() {
|
|
26326
|
+
return currentTab() === "products";
|
|
26045
26327
|
},
|
|
26046
|
-
get
|
|
26047
|
-
return
|
|
26328
|
+
get children() {
|
|
26329
|
+
return createComponent(Products, {
|
|
26330
|
+
get productDefaultsLookup() {
|
|
26331
|
+
return props.productDefaultsLookup;
|
|
26332
|
+
}
|
|
26333
|
+
});
|
|
26048
26334
|
}
|
|
26049
|
-
})
|
|
26050
|
-
|
|
26051
|
-
|
|
26052
|
-
|
|
26053
|
-
|
|
26054
|
-
|
|
26055
|
-
get children() {
|
|
26056
|
-
return createComponent(Products, {
|
|
26057
|
-
get productDefaultsLookup() {
|
|
26058
|
-
return props.productDefaultsLookup;
|
|
26335
|
+
}), createComponent(Match, {
|
|
26336
|
+
get when() {
|
|
26337
|
+
return currentTab() === "categories";
|
|
26338
|
+
},
|
|
26339
|
+
get children() {
|
|
26340
|
+
return createComponent(Categories, {});
|
|
26059
26341
|
}
|
|
26060
|
-
})
|
|
26061
|
-
|
|
26062
|
-
|
|
26063
|
-
|
|
26064
|
-
|
|
26065
|
-
|
|
26066
|
-
get children() {
|
|
26067
|
-
return createComponent(Categories, {});
|
|
26068
|
-
}
|
|
26069
|
-
}), createComponent(Match, {
|
|
26070
|
-
get when() {
|
|
26071
|
-
return currentTab() === "sales";
|
|
26072
|
-
},
|
|
26073
|
-
get children() {
|
|
26074
|
-
return createComponent(Sales, {});
|
|
26075
|
-
}
|
|
26076
|
-
}), createComponent(Match, {
|
|
26077
|
-
get when() {
|
|
26078
|
-
return currentTab() === "promo-codes";
|
|
26079
|
-
},
|
|
26080
|
-
get children() {
|
|
26081
|
-
return createComponent(PromoCodes, {
|
|
26082
|
-
get affiliatesEnabled() {
|
|
26083
|
-
return affiliatesEnabled();
|
|
26342
|
+
}), createComponent(Match, {
|
|
26343
|
+
get when() {
|
|
26344
|
+
return currentTab() === "sales";
|
|
26345
|
+
},
|
|
26346
|
+
get children() {
|
|
26347
|
+
return createComponent(Sales, {});
|
|
26084
26348
|
}
|
|
26085
|
-
})
|
|
26086
|
-
|
|
26087
|
-
|
|
26088
|
-
|
|
26089
|
-
|
|
26090
|
-
|
|
26091
|
-
|
|
26092
|
-
|
|
26093
|
-
|
|
26094
|
-
|
|
26095
|
-
get when() {
|
|
26096
|
-
return currentTab() === "affiliates";
|
|
26097
|
-
},
|
|
26098
|
-
get children() {
|
|
26099
|
-
return createComponent(Affiliates, mergeProps(() => props.affiliates ?? {}));
|
|
26100
|
-
}
|
|
26101
|
-
}), createComponent(Match, {
|
|
26102
|
-
get when() {
|
|
26103
|
-
return currentTab() === "support";
|
|
26104
|
-
},
|
|
26105
|
-
get children() {
|
|
26106
|
-
return createComponent(Support, {
|
|
26107
|
-
get initialThreadId() {
|
|
26108
|
-
return pendingThreadId();
|
|
26349
|
+
}), createComponent(Match, {
|
|
26350
|
+
get when() {
|
|
26351
|
+
return currentTab() === "promo-codes";
|
|
26352
|
+
},
|
|
26353
|
+
get children() {
|
|
26354
|
+
return createComponent(PromoCodes, {
|
|
26355
|
+
get affiliatesEnabled() {
|
|
26356
|
+
return affiliatesEnabled();
|
|
26357
|
+
}
|
|
26358
|
+
});
|
|
26109
26359
|
}
|
|
26110
|
-
})
|
|
26111
|
-
|
|
26112
|
-
|
|
26113
|
-
|
|
26114
|
-
|
|
26115
|
-
|
|
26116
|
-
get children() {
|
|
26117
|
-
return createComponent(Webhooks, {});
|
|
26118
|
-
}
|
|
26119
|
-
}), createComponent(Match, {
|
|
26120
|
-
get when() {
|
|
26121
|
-
return currentTab() === "email-templates";
|
|
26122
|
-
},
|
|
26123
|
-
get children() {
|
|
26124
|
-
return createComponent(EmailTemplates, {
|
|
26125
|
-
get initialCustomTemplateId() {
|
|
26126
|
-
return pendingTemplateId();
|
|
26360
|
+
}), createComponent(Match, {
|
|
26361
|
+
get when() {
|
|
26362
|
+
return currentTab() === "offers";
|
|
26363
|
+
},
|
|
26364
|
+
get children() {
|
|
26365
|
+
return createComponent(Offers, {});
|
|
26127
26366
|
}
|
|
26128
|
-
})
|
|
26129
|
-
|
|
26130
|
-
|
|
26131
|
-
|
|
26132
|
-
|
|
26133
|
-
|
|
26134
|
-
|
|
26135
|
-
|
|
26136
|
-
|
|
26137
|
-
|
|
26138
|
-
|
|
26139
|
-
|
|
26140
|
-
|
|
26141
|
-
|
|
26142
|
-
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26147
|
-
|
|
26148
|
-
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
|
|
26153
|
-
|
|
26154
|
-
|
|
26155
|
-
|
|
26156
|
-
|
|
26157
|
-
|
|
26158
|
-
|
|
26159
|
-
|
|
26160
|
-
|
|
26161
|
-
|
|
26162
|
-
|
|
26163
|
-
|
|
26367
|
+
}), createComponent(Match, {
|
|
26368
|
+
get when() {
|
|
26369
|
+
return currentTab() === "affiliates";
|
|
26370
|
+
},
|
|
26371
|
+
get children() {
|
|
26372
|
+
return createComponent(Affiliates, mergeProps(() => props.affiliates ?? {}));
|
|
26373
|
+
}
|
|
26374
|
+
}), createComponent(Match, {
|
|
26375
|
+
get when() {
|
|
26376
|
+
return currentTab() === "support";
|
|
26377
|
+
},
|
|
26378
|
+
get children() {
|
|
26379
|
+
return createComponent(Support, {
|
|
26380
|
+
get initialThreadId() {
|
|
26381
|
+
return pendingThreadId();
|
|
26382
|
+
}
|
|
26383
|
+
});
|
|
26384
|
+
}
|
|
26385
|
+
}), createComponent(Match, {
|
|
26386
|
+
get when() {
|
|
26387
|
+
return currentTab() === "webhooks";
|
|
26388
|
+
},
|
|
26389
|
+
get children() {
|
|
26390
|
+
return createComponent(Webhooks, {});
|
|
26391
|
+
}
|
|
26392
|
+
}), createComponent(Match, {
|
|
26393
|
+
get when() {
|
|
26394
|
+
return currentTab() === "email-templates";
|
|
26395
|
+
},
|
|
26396
|
+
get children() {
|
|
26397
|
+
return createComponent(EmailTemplates, {
|
|
26398
|
+
get initialCustomTemplateId() {
|
|
26399
|
+
return pendingTemplateId();
|
|
26400
|
+
}
|
|
26401
|
+
});
|
|
26402
|
+
}
|
|
26403
|
+
}), createComponent(Match, {
|
|
26404
|
+
get when() {
|
|
26405
|
+
return currentTab() === "funnel";
|
|
26406
|
+
},
|
|
26407
|
+
get children() {
|
|
26408
|
+
return createComponent(Funnel, {});
|
|
26409
|
+
}
|
|
26410
|
+
}), createComponent(Match, {
|
|
26411
|
+
get when() {
|
|
26412
|
+
return currentTab() === "sequences";
|
|
26413
|
+
},
|
|
26414
|
+
get children() {
|
|
26415
|
+
return createComponent(Sequences, {});
|
|
26416
|
+
}
|
|
26417
|
+
}), createComponent(Match, {
|
|
26418
|
+
get when() {
|
|
26419
|
+
return currentTab() === "sequence-results";
|
|
26420
|
+
},
|
|
26421
|
+
get children() {
|
|
26422
|
+
return createComponent(SequenceResults, {});
|
|
26423
|
+
}
|
|
26424
|
+
}), createComponent(Match, {
|
|
26425
|
+
get when() {
|
|
26426
|
+
return currentTab() === "email-notifications";
|
|
26427
|
+
},
|
|
26428
|
+
get children() {
|
|
26429
|
+
return createComponent(EmailNotifications, {});
|
|
26430
|
+
}
|
|
26431
|
+
}), createComponent(Match, {
|
|
26432
|
+
get when() {
|
|
26433
|
+
return currentTab() === "features";
|
|
26434
|
+
},
|
|
26435
|
+
get children() {
|
|
26436
|
+
return createComponent(Features, {});
|
|
26437
|
+
}
|
|
26438
|
+
}), createComponent(Match, {
|
|
26439
|
+
get when() {
|
|
26440
|
+
return currentTab() === "admins";
|
|
26441
|
+
},
|
|
26442
|
+
get children() {
|
|
26443
|
+
return createComponent(Admins, {
|
|
26444
|
+
get acceptInviteUrl() {
|
|
26445
|
+
return props.adminInviteAcceptUrl;
|
|
26446
|
+
}
|
|
26447
|
+
});
|
|
26448
|
+
}
|
|
26449
|
+
})];
|
|
26164
26450
|
}
|
|
26165
|
-
})
|
|
26451
|
+
});
|
|
26166
26452
|
}
|
|
26167
26453
|
});
|
|
26168
26454
|
}
|
|
@@ -26190,29 +26476,35 @@ function AdminDashboard(props) {
|
|
|
26190
26476
|
}
|
|
26191
26477
|
});
|
|
26192
26478
|
}
|
|
26479
|
+
function RoleForbidden() {
|
|
26480
|
+
return (() => {
|
|
26481
|
+
var _el$12 = _tmpl$561(), _el$13 = _el$12.firstChild; _el$13.nextSibling;
|
|
26482
|
+
return _el$12;
|
|
26483
|
+
})();
|
|
26484
|
+
}
|
|
26193
26485
|
function AdminTabError(props) {
|
|
26194
26486
|
console.error("[AdminDashboard] tab failed to render:", props.error);
|
|
26195
26487
|
const message = () => props.error instanceof Error ? props.error.message : String(props.error);
|
|
26196
26488
|
return (() => {
|
|
26197
|
-
var _el$
|
|
26198
|
-
insert(_el$
|
|
26199
|
-
_el$
|
|
26200
|
-
return _el$
|
|
26489
|
+
var _el$15 = _tmpl$657(), _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling;
|
|
26490
|
+
insert(_el$17, message);
|
|
26491
|
+
_el$18.$$click = () => props.reset();
|
|
26492
|
+
return _el$15;
|
|
26201
26493
|
})();
|
|
26202
26494
|
}
|
|
26203
26495
|
function AdminGateSpinner(props) {
|
|
26204
26496
|
return (() => {
|
|
26205
|
-
var _el$
|
|
26497
|
+
var _el$19 = _tmpl$750(); _el$19.firstChild;
|
|
26206
26498
|
effect((_p$) => {
|
|
26207
26499
|
var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
|
|
26208
|
-
_v$8 !== _p$.e && setStyleProperty(_el$
|
|
26209
|
-
_v$9 !== _p$.t && setStyleProperty(_el$
|
|
26500
|
+
_v$8 !== _p$.e && setStyleProperty(_el$19, "top", _p$.e = _v$8);
|
|
26501
|
+
_v$9 !== _p$.t && setStyleProperty(_el$19, "height", _p$.t = _v$9);
|
|
26210
26502
|
return _p$;
|
|
26211
26503
|
}, {
|
|
26212
26504
|
e: void 0,
|
|
26213
26505
|
t: void 0
|
|
26214
26506
|
});
|
|
26215
|
-
return _el$
|
|
26507
|
+
return _el$19;
|
|
26216
26508
|
})();
|
|
26217
26509
|
}
|
|
26218
26510
|
delegateEvents(["click"]);
|
|
@@ -26236,7 +26528,8 @@ var ADMIN_TAB_SEGMENTS = {
|
|
|
26236
26528
|
sequences: "sequences",
|
|
26237
26529
|
"sequence-results": "sequence-results",
|
|
26238
26530
|
"email-notifications": "email-notifications",
|
|
26239
|
-
features: "features"
|
|
26531
|
+
features: "features",
|
|
26532
|
+
admins: "admins"
|
|
26240
26533
|
};
|
|
26241
26534
|
var AFFILIATE_SUB_TAB_SEGMENTS = {
|
|
26242
26535
|
overview: "",
|
|
@@ -26282,19 +26575,19 @@ function affiliateSubTabFromPath(pathname, base = "/admin") {
|
|
|
26282
26575
|
}
|
|
26283
26576
|
return "overview";
|
|
26284
26577
|
}
|
|
26285
|
-
var _tmpl$
|
|
26286
|
-
var _tmpl$
|
|
26287
|
-
var _tmpl$
|
|
26288
|
-
var _tmpl$
|
|
26289
|
-
var _tmpl$
|
|
26290
|
-
var _tmpl$
|
|
26291
|
-
var _tmpl$
|
|
26292
|
-
var _tmpl$
|
|
26293
|
-
var _tmpl$
|
|
26294
|
-
var _tmpl$
|
|
26295
|
-
var _tmpl$
|
|
26578
|
+
var _tmpl$408 = /* @__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`);
|
|
26579
|
+
var _tmpl$2128 = /* @__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`);
|
|
26580
|
+
var _tmpl$3104 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>Could not load this customer's dashboard.`);
|
|
26581
|
+
var _tmpl$475 = /* @__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">`);
|
|
26582
|
+
var _tmpl$564 = /* @__PURE__ */ template(`<div><h3>Subscription`);
|
|
26583
|
+
var _tmpl$658 = /* @__PURE__ */ template(`<div style=display:flex;flex-direction:column;gap:0.5rem>`);
|
|
26584
|
+
var _tmpl$751 = /* @__PURE__ */ template(`<div><h3>Prescription requests`);
|
|
26585
|
+
var _tmpl$843 = /* @__PURE__ */ template(`<div><h3>Pending surveys`);
|
|
26586
|
+
var _tmpl$940 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No active subscription.`);
|
|
26587
|
+
var _tmpl$036 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">Next charge `);
|
|
26588
|
+
var _tmpl$1135 = /* @__PURE__ */ template(`<div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>`);
|
|
26296
26589
|
var _tmpl$1028 = /* @__PURE__ */ template(`<p style="font-size:0.75rem;color:var(--app-admin-fg-muted);margin:0.25rem 0 0">`);
|
|
26297
|
-
var _tmpl$
|
|
26590
|
+
var _tmpl$1136 = /* @__PURE__ */ template(`<div><h3>Prescription status</h3><div class=app-admin-card-soft style=padding:0.75rem><div style=display:flex;align-items:center;justify-content:space-between><span style=font-size:0.875rem;font-weight:500>Current request`);
|
|
26298
26591
|
var _tmpl$1224 = /* @__PURE__ */ template(`<p style=color:var(--app-admin-fg-muted);font-size:0.875rem>No prescription requests.`);
|
|
26299
26592
|
var _tmpl$1322 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-admin-fg-muted);margin-left:0.5rem>`);
|
|
26300
26593
|
var _tmpl$1422 = /* @__PURE__ */ template(`<span> \xB7 `);
|
|
@@ -26306,7 +26599,7 @@ function PatientDashboardPreview(props) {
|
|
|
26306
26599
|
authToken: () => props.token
|
|
26307
26600
|
});
|
|
26308
26601
|
return (() => {
|
|
26309
|
-
var _el$ = _tmpl$
|
|
26602
|
+
var _el$ = _tmpl$408(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$3.nextSibling, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$0 = _el$8.nextSibling; _el$0.nextSibling;
|
|
26310
26603
|
_el$.$$click = (e) => {
|
|
26311
26604
|
if (e.target === e.currentTarget) props.onClose();
|
|
26312
26605
|
};
|
|
@@ -26318,7 +26611,7 @@ function PatientDashboardPreview(props) {
|
|
|
26318
26611
|
},
|
|
26319
26612
|
keyed: true,
|
|
26320
26613
|
children: (msg) => (() => {
|
|
26321
|
-
var _el$1 = _tmpl$
|
|
26614
|
+
var _el$1 = _tmpl$2128(), _el$10 = _el$1.firstChild, _el$11 = _el$10.nextSibling;
|
|
26322
26615
|
insert(_el$10, msg);
|
|
26323
26616
|
_el$11.$$click = () => data.retry();
|
|
26324
26617
|
return _el$1;
|
|
@@ -26337,25 +26630,25 @@ function PatientDashboardPreview(props) {
|
|
|
26337
26630
|
return data.profile();
|
|
26338
26631
|
},
|
|
26339
26632
|
get fallback() {
|
|
26340
|
-
return _tmpl$
|
|
26633
|
+
return _tmpl$3104();
|
|
26341
26634
|
},
|
|
26342
26635
|
children: (profile) => [(() => {
|
|
26343
|
-
var _el$13 = _tmpl$
|
|
26636
|
+
var _el$13 = _tmpl$475(), _el$14 = _el$13.firstChild, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling;
|
|
26344
26637
|
insert(_el$16, () => [profile().firstName, profile().lastName].filter(Boolean).join(" ") || "Member");
|
|
26345
26638
|
insert(_el$17, () => profile().email);
|
|
26346
26639
|
effect((_$p) => style(_el$14, panelSectionHeader, _$p));
|
|
26347
26640
|
return _el$13;
|
|
26348
26641
|
})(), (() => {
|
|
26349
|
-
var _el$18 = _tmpl$
|
|
26642
|
+
var _el$18 = _tmpl$564(), _el$19 = _el$18.firstChild;
|
|
26350
26643
|
insert(_el$18, createComponent(Show, {
|
|
26351
26644
|
get when() {
|
|
26352
26645
|
return data.subscription();
|
|
26353
26646
|
},
|
|
26354
26647
|
get fallback() {
|
|
26355
|
-
return _tmpl$
|
|
26648
|
+
return _tmpl$940();
|
|
26356
26649
|
},
|
|
26357
26650
|
children: (sub) => (() => {
|
|
26358
|
-
var _el$27 = _tmpl$
|
|
26651
|
+
var _el$27 = _tmpl$1135(), _el$28 = _el$27.firstChild, _el$29 = _el$28.firstChild;
|
|
26359
26652
|
insert(_el$29, createComponent(Show, {
|
|
26360
26653
|
get when() {
|
|
26361
26654
|
return sub().amount != null;
|
|
@@ -26375,7 +26668,7 @@ function PatientDashboardPreview(props) {
|
|
|
26375
26668
|
return sub().nextBillingDate;
|
|
26376
26669
|
},
|
|
26377
26670
|
get children() {
|
|
26378
|
-
var _el$30 = _tmpl$
|
|
26671
|
+
var _el$30 = _tmpl$036(); _el$30.firstChild;
|
|
26379
26672
|
insert(_el$30, () => fmtDate(sub().nextBillingDate), null);
|
|
26380
26673
|
return _el$30;
|
|
26381
26674
|
}
|
|
@@ -26390,7 +26683,7 @@ function PatientDashboardPreview(props) {
|
|
|
26390
26683
|
return data.rxStatus();
|
|
26391
26684
|
},
|
|
26392
26685
|
children: (rx) => (() => {
|
|
26393
|
-
var _el$32 = _tmpl$
|
|
26686
|
+
var _el$32 = _tmpl$1136(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$35 = _el$34.firstChild; _el$35.firstChild;
|
|
26394
26687
|
insert(_el$35, createComponent(StatusBadge, {
|
|
26395
26688
|
get status() {
|
|
26396
26689
|
return rx().status;
|
|
@@ -26410,7 +26703,7 @@ function PatientDashboardPreview(props) {
|
|
|
26410
26703
|
return _el$32;
|
|
26411
26704
|
})()
|
|
26412
26705
|
}), (() => {
|
|
26413
|
-
var _el$20 = _tmpl$
|
|
26706
|
+
var _el$20 = _tmpl$751(), _el$21 = _el$20.firstChild;
|
|
26414
26707
|
insert(_el$20, createComponent(Show, {
|
|
26415
26708
|
get when() {
|
|
26416
26709
|
return (data.rxList() ?? []).length > 0;
|
|
@@ -26419,7 +26712,7 @@ function PatientDashboardPreview(props) {
|
|
|
26419
26712
|
return _tmpl$1224();
|
|
26420
26713
|
},
|
|
26421
26714
|
get children() {
|
|
26422
|
-
var _el$22 = _tmpl$
|
|
26715
|
+
var _el$22 = _tmpl$658();
|
|
26423
26716
|
insert(_el$22, createComponent(For, {
|
|
26424
26717
|
get each() {
|
|
26425
26718
|
return data.rxList();
|
|
@@ -26462,7 +26755,7 @@ function PatientDashboardPreview(props) {
|
|
|
26462
26755
|
effect((_$p) => style(_el$21, panelSectionHeader, _$p));
|
|
26463
26756
|
return _el$20;
|
|
26464
26757
|
})(), (() => {
|
|
26465
|
-
var _el$23 = _tmpl$
|
|
26758
|
+
var _el$23 = _tmpl$843(), _el$24 = _el$23.firstChild;
|
|
26466
26759
|
insert(_el$23, createComponent(Show, {
|
|
26467
26760
|
get when() {
|
|
26468
26761
|
return (data.pendingSurveys() ?? []).length > 0;
|
|
@@ -26471,7 +26764,7 @@ function PatientDashboardPreview(props) {
|
|
|
26471
26764
|
return _tmpl$1620();
|
|
26472
26765
|
},
|
|
26473
26766
|
get children() {
|
|
26474
|
-
var _el$25 = _tmpl$
|
|
26767
|
+
var _el$25 = _tmpl$658();
|
|
26475
26768
|
insert(_el$25, createComponent(For, {
|
|
26476
26769
|
get each() {
|
|
26477
26770
|
return data.pendingSurveys();
|
|
@@ -26496,9 +26789,9 @@ function PatientDashboardPreview(props) {
|
|
|
26496
26789
|
})();
|
|
26497
26790
|
}
|
|
26498
26791
|
delegateEvents(["click"]);
|
|
26499
|
-
var _tmpl$
|
|
26500
|
-
var _tmpl$
|
|
26501
|
-
var _tmpl$
|
|
26792
|
+
var _tmpl$409 = /* @__PURE__ */ template(`<div style=margin-bottom:1rem>`);
|
|
26793
|
+
var _tmpl$2129 = /* @__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>`);
|
|
26794
|
+
var _tmpl$3105 = /* @__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.`);
|
|
26502
26795
|
var LIVE = /* @__PURE__ */ new Set(["active", "paused", "past_due"]);
|
|
26503
26796
|
function UpdatePaymentMethod(props) {
|
|
26504
26797
|
const {
|
|
@@ -26528,7 +26821,7 @@ function UpdatePaymentMethod(props) {
|
|
|
26528
26821
|
if (ok) props.onDone();
|
|
26529
26822
|
}
|
|
26530
26823
|
return (() => {
|
|
26531
|
-
var _el$ = _tmpl$
|
|
26824
|
+
var _el$ = _tmpl$3105(), _el$2 = _el$.firstChild;
|
|
26532
26825
|
insert(_el$, createComponent(Heading, {
|
|
26533
26826
|
level: 1,
|
|
26534
26827
|
get children() {
|
|
@@ -26559,14 +26852,14 @@ function UpdatePaymentMethod(props) {
|
|
|
26559
26852
|
return memo(() => !!!resolving())() && !noSubscription();
|
|
26560
26853
|
},
|
|
26561
26854
|
get children() {
|
|
26562
|
-
var _el$3 = _tmpl$
|
|
26855
|
+
var _el$3 = _tmpl$2129(), _el$5 = _el$3.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.nextSibling;
|
|
26563
26856
|
_el$3.addEventListener("submit", handleSubmit);
|
|
26564
26857
|
insert(_el$3, createComponent(Show, {
|
|
26565
26858
|
get when() {
|
|
26566
26859
|
return flow.error();
|
|
26567
26860
|
},
|
|
26568
26861
|
get children() {
|
|
26569
|
-
var _el$4 = _tmpl$
|
|
26862
|
+
var _el$4 = _tmpl$409();
|
|
26570
26863
|
insert(_el$4, createComponent(Banner, {
|
|
26571
26864
|
variant: "error",
|
|
26572
26865
|
get children() {
|
|
@@ -26644,19 +26937,19 @@ function UpdatePaymentMethod(props) {
|
|
|
26644
26937
|
return _el$;
|
|
26645
26938
|
})();
|
|
26646
26939
|
}
|
|
26647
|
-
var _tmpl$
|
|
26648
|
-
var _tmpl$
|
|
26649
|
-
var _tmpl$
|
|
26650
|
-
var _tmpl$
|
|
26651
|
-
var _tmpl$
|
|
26652
|
-
var _tmpl$
|
|
26653
|
-
var _tmpl$
|
|
26654
|
-
var _tmpl$
|
|
26655
|
-
var _tmpl$
|
|
26656
|
-
var _tmpl$
|
|
26657
|
-
var _tmpl$
|
|
26940
|
+
var _tmpl$476 = /* @__PURE__ */ template(`<a class=ship__track target=_blank rel="noopener noreferrer">Track<!> \u2197`);
|
|
26941
|
+
var _tmpl$2130 = /* @__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>`);
|
|
26942
|
+
var _tmpl$3106 = /* @__PURE__ */ template(`<span class=refill__cycle>Day <!> of `);
|
|
26943
|
+
var _tmpl$477 = /* @__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>`);
|
|
26944
|
+
var _tmpl$565 = /* @__PURE__ */ template(`<span class=refill__cycle>Preparing your next fill`);
|
|
26945
|
+
var _tmpl$659 = /* @__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>`);
|
|
26946
|
+
var _tmpl$752 = /* @__PURE__ */ template(`<a class=refill__action>Complete check-in \u2192`);
|
|
26947
|
+
var _tmpl$844 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-savings-note><strong>Member pricing is active on your account.</strong> It applies automatically when you check out.`);
|
|
26948
|
+
var _tmpl$941 = /* @__PURE__ */ template(`<div class=tracker><span class=lab-label>Your order</span><div class=tracker__empty data-testid=tracker-empty><div class=tracker__empty-mark aria-hidden=true><span class=tracker__empty-bead></span></div><h2 class=tracker__empty-title>Your journey starts here</h2><p class=tracker__empty-text></p><a class="portal-btn portal-btn--primary">Start your intake`);
|
|
26949
|
+
var _tmpl$037 = /* @__PURE__ */ template(`<p class=tracker__empty-text data-testid=tracker-offer-note><strong>You have <!> waiting.</strong> It applies automatically at checkout \u2014 finish your intake by <!> to keep it.`);
|
|
26950
|
+
var _tmpl$1137 = /* @__PURE__ */ template(`<span class=thread__halo aria-hidden=true>`);
|
|
26658
26951
|
var _tmpl$1029 = /* @__PURE__ */ template(`<time class=thread__time>`);
|
|
26659
|
-
var _tmpl$
|
|
26952
|
+
var _tmpl$1138 = /* @__PURE__ */ template(`<h2 class=thread__hero>`);
|
|
26660
26953
|
var _tmpl$1225 = /* @__PURE__ */ template(`<p class=thread__caption>`);
|
|
26661
26954
|
var _tmpl$1323 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--ghost thread__action">Where's my order?`);
|
|
26662
26955
|
var _tmpl$1423 = /* @__PURE__ */ template(`<button type=button class="portal-btn portal-btn--primary thread__action">Message your care team`);
|
|
@@ -26682,7 +26975,7 @@ function TrackingChip(props) {
|
|
|
26682
26975
|
}
|
|
26683
26976
|
};
|
|
26684
26977
|
return (() => {
|
|
26685
|
-
var _el$ = _tmpl$
|
|
26978
|
+
var _el$ = _tmpl$2130(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$3.nextSibling;
|
|
26686
26979
|
insert(_el$2, () => props.eta);
|
|
26687
26980
|
_el$4.$$click = copy;
|
|
26688
26981
|
insert(_el$5, () => props.number);
|
|
@@ -26693,7 +26986,7 @@ function TrackingChip(props) {
|
|
|
26693
26986
|
return props.url;
|
|
26694
26987
|
},
|
|
26695
26988
|
get children() {
|
|
26696
|
-
var _el$8 = _tmpl$
|
|
26989
|
+
var _el$8 = _tmpl$476(), _el$9 = _el$8.firstChild, _el$1 = _el$9.nextSibling; _el$1.nextSibling;
|
|
26697
26990
|
insert(_el$8, (() => {
|
|
26698
26991
|
var _c$ = memo(() => !!props.carrier);
|
|
26699
26992
|
return () => _c$() ? ` with ${props.carrier}` : "";
|
|
@@ -26714,16 +27007,16 @@ function OrderTracker(props) {
|
|
|
26714
27007
|
return refill();
|
|
26715
27008
|
},
|
|
26716
27009
|
children: (r) => (() => {
|
|
26717
|
-
var _el$11 = _tmpl$
|
|
27010
|
+
var _el$11 = _tmpl$477(), _el$12 = _el$11.firstChild; _el$12.firstChild; var _el$18 = _el$12.nextSibling;
|
|
26718
27011
|
insert(_el$12, createComponent(Show, {
|
|
26719
27012
|
get when() {
|
|
26720
27013
|
return !r().pendingFill;
|
|
26721
27014
|
},
|
|
26722
27015
|
get fallback() {
|
|
26723
|
-
return _tmpl$
|
|
27016
|
+
return _tmpl$565();
|
|
26724
27017
|
},
|
|
26725
27018
|
get children() {
|
|
26726
|
-
var _el$14 = _tmpl$
|
|
27019
|
+
var _el$14 = _tmpl$3106(), _el$15 = _el$14.firstChild, _el$17 = _el$15.nextSibling; _el$17.nextSibling;
|
|
26727
27020
|
insert(_el$14, () => r().cycleDay, _el$17);
|
|
26728
27021
|
insert(_el$14, () => r().cycleLength, null);
|
|
26729
27022
|
return _el$14;
|
|
@@ -26734,7 +27027,7 @@ function OrderTracker(props) {
|
|
|
26734
27027
|
return r().events;
|
|
26735
27028
|
},
|
|
26736
27029
|
children: (e) => (() => {
|
|
26737
|
-
var _el$20 = _tmpl$
|
|
27030
|
+
var _el$20 = _tmpl$659(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling, _el$23 = _el$22.nextSibling, _el$24 = _el$23.nextSibling;
|
|
26738
27031
|
insert(_el$22, () => e.label);
|
|
26739
27032
|
insert(_el$23, () => formatEventDate(e.date));
|
|
26740
27033
|
insert(_el$24, (() => {
|
|
@@ -26747,7 +27040,7 @@ function OrderTracker(props) {
|
|
|
26747
27040
|
},
|
|
26748
27041
|
keyed: true,
|
|
26749
27042
|
children: (rid) => (() => {
|
|
26750
|
-
var _el$25 = _tmpl$
|
|
27043
|
+
var _el$25 = _tmpl$752();
|
|
26751
27044
|
effect(() => setAttribute(_el$25, "href", props.renewHref(rid)));
|
|
26752
27045
|
return _el$25;
|
|
26753
27046
|
})()
|
|
@@ -26761,14 +27054,14 @@ function OrderTracker(props) {
|
|
|
26761
27054
|
})()
|
|
26762
27055
|
});
|
|
26763
27056
|
const EmptyState2 = () => (() => {
|
|
26764
|
-
var _el$26 = _tmpl$
|
|
27057
|
+
var _el$26 = _tmpl$941(), _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, _el$29 = _el$28.firstChild, _el$30 = _el$29.nextSibling, _el$32 = _el$30.nextSibling, _el$33 = _el$32.nextSibling;
|
|
26765
27058
|
insert(_el$26, createComponent(RefillStrip, {}), _el$28);
|
|
26766
27059
|
insert(_el$28, createComponent(Show, {
|
|
26767
27060
|
get when() {
|
|
26768
27061
|
return props.savingsMember;
|
|
26769
27062
|
},
|
|
26770
27063
|
get children() {
|
|
26771
|
-
return _tmpl$
|
|
27064
|
+
return _tmpl$844();
|
|
26772
27065
|
}
|
|
26773
27066
|
}), _el$32);
|
|
26774
27067
|
insert(_el$28, createComponent(Show, {
|
|
@@ -26776,7 +27069,7 @@ function OrderTracker(props) {
|
|
|
26776
27069
|
return props.offers?.[0];
|
|
26777
27070
|
},
|
|
26778
27071
|
children: (offer) => (() => {
|
|
26779
|
-
var _el$34 = _tmpl$
|
|
27072
|
+
var _el$34 = _tmpl$037(), _el$35 = _el$34.firstChild, _el$36 = _el$35.firstChild, _el$38 = _el$36.nextSibling; _el$38.nextSibling; var _el$39 = _el$35.nextSibling, _el$41 = _el$39.nextSibling; _el$41.nextSibling;
|
|
26780
27073
|
insert(_el$35, () => offerSummaryText(offer()), _el$38);
|
|
26781
27074
|
insert(_el$34, () => offer().deadlineText, _el$41);
|
|
26782
27075
|
return _el$34;
|
|
@@ -26795,7 +27088,7 @@ function OrderTracker(props) {
|
|
|
26795
27088
|
insert(_el$44, createComponent(Show, {
|
|
26796
27089
|
when: isActive,
|
|
26797
27090
|
get children() {
|
|
26798
|
-
return _tmpl$
|
|
27091
|
+
return _tmpl$1137();
|
|
26799
27092
|
}
|
|
26800
27093
|
}));
|
|
26801
27094
|
className(_el$46, `thread__content${isActive ? " thread__content--active" : ""}`);
|
|
@@ -26815,7 +27108,7 @@ function OrderTracker(props) {
|
|
|
26815
27108
|
return s.heroWord;
|
|
26816
27109
|
},
|
|
26817
27110
|
get children() {
|
|
26818
|
-
var _el$50 = _tmpl$
|
|
27111
|
+
var _el$50 = _tmpl$1138();
|
|
26819
27112
|
insert(_el$50, () => s.heroWord);
|
|
26820
27113
|
return _el$50;
|
|
26821
27114
|
}
|
|
@@ -26973,9 +27266,9 @@ function OrderTracker(props) {
|
|
|
26973
27266
|
});
|
|
26974
27267
|
}
|
|
26975
27268
|
delegateEvents(["click"]);
|
|
26976
|
-
var _tmpl$
|
|
26977
|
-
var _tmpl$
|
|
26978
|
-
var _tmpl$
|
|
27269
|
+
var _tmpl$478 = /* @__PURE__ */ template(`<span class=rx-row__dose> \xB7 `);
|
|
27270
|
+
var _tmpl$2131 = /* @__PURE__ */ template(`<div class=rx-row__body>`);
|
|
27271
|
+
var _tmpl$3107 = /* @__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>`);
|
|
26979
27272
|
var STATUS_LABEL = {
|
|
26980
27273
|
pending: "Under review",
|
|
26981
27274
|
approved: "Approved",
|
|
@@ -26992,7 +27285,7 @@ function RxRow(props) {
|
|
|
26992
27285
|
return STATUS_LABEL[props.rx.status] ?? props.rx.status;
|
|
26993
27286
|
};
|
|
26994
27287
|
return (() => {
|
|
26995
|
-
var _el$ = _tmpl$
|
|
27288
|
+
var _el$ = _tmpl$3107(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$6 = _el$3.nextSibling, _el$7 = _el$6.nextSibling;
|
|
26996
27289
|
_el$2.$$click = () => setOpen((v) => !v);
|
|
26997
27290
|
insert(_el$3, () => props.rx.drugName ?? "Medication", null);
|
|
26998
27291
|
insert(_el$3, createComponent(Show, {
|
|
@@ -27000,7 +27293,7 @@ function RxRow(props) {
|
|
|
27000
27293
|
return props.rx.dosage;
|
|
27001
27294
|
},
|
|
27002
27295
|
get children() {
|
|
27003
|
-
var _el$4 = _tmpl$
|
|
27296
|
+
var _el$4 = _tmpl$478(); _el$4.firstChild;
|
|
27004
27297
|
insert(_el$4, () => props.rx.dosage, null);
|
|
27005
27298
|
return _el$4;
|
|
27006
27299
|
}
|
|
@@ -27011,7 +27304,7 @@ function RxRow(props) {
|
|
|
27011
27304
|
return open();
|
|
27012
27305
|
},
|
|
27013
27306
|
get children() {
|
|
27014
|
-
var _el$8 = _tmpl$
|
|
27307
|
+
var _el$8 = _tmpl$2131();
|
|
27015
27308
|
insert(_el$8, createComponent(OrderTracker, {
|
|
27016
27309
|
get request() {
|
|
27017
27310
|
return props.request;
|
|
@@ -27054,17 +27347,17 @@ function RxRow(props) {
|
|
|
27054
27347
|
})();
|
|
27055
27348
|
}
|
|
27056
27349
|
delegateEvents(["click"]);
|
|
27057
|
-
var _tmpl$
|
|
27058
|
-
var _tmpl$
|
|
27059
|
-
var _tmpl$
|
|
27060
|
-
var _tmpl$
|
|
27061
|
-
var _tmpl$
|
|
27062
|
-
var _tmpl$
|
|
27063
|
-
var _tmpl$
|
|
27064
|
-
var _tmpl$
|
|
27065
|
-
var _tmpl$
|
|
27066
|
-
var _tmpl$
|
|
27067
|
-
var _tmpl$
|
|
27350
|
+
var _tmpl$479 = /* @__PURE__ */ template(`<div class=plan data-testid=plan-billing><span class=lab-label>Plan & billing`);
|
|
27351
|
+
var _tmpl$2132 = /* @__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`);
|
|
27352
|
+
var _tmpl$3108 = /* @__PURE__ */ template(`<p class=membership__dose>`);
|
|
27353
|
+
var _tmpl$480 = /* @__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 `);
|
|
27354
|
+
var _tmpl$566 = /* @__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`);
|
|
27355
|
+
var _tmpl$660 = /* @__PURE__ */ template(`<p class=plan__note>Question about billing? <button type=button class=plan__note-link>Message support`);
|
|
27356
|
+
var _tmpl$753 = /* @__PURE__ */ template(`<p class=plan__error role=alert>`);
|
|
27357
|
+
var _tmpl$845 = /* @__PURE__ */ template(`<button type=button class=plan__link-btn>`);
|
|
27358
|
+
var _tmpl$942 = /* @__PURE__ */ template(`<button type=button class="plan__link-btn plan__link-btn--quiet">Cancel subscription`);
|
|
27359
|
+
var _tmpl$038 = /* @__PURE__ */ template(`<div class=plan__actions><a class=plan__link-btn>Update payment method`);
|
|
27360
|
+
var _tmpl$1139 = /* @__PURE__ */ template(`<div class=confirm data-testid=cancel-confirm><p class=confirm__text>Cancel your subscription? You\u2019ll keep access until the end of your current billing period on <!>.</p><div class=confirm__actions><button type=button class="portal-btn portal-btn--ghost">Keep my plan</button><button type=button class="portal-btn portal-btn--danger">`);
|
|
27068
27361
|
function formatCents(cents) {
|
|
27069
27362
|
if (cents == null || Number.isNaN(cents)) return "\u2014";
|
|
27070
27363
|
return `$${(cents / 100).toFixed(2)}`;
|
|
@@ -27109,20 +27402,20 @@ function PlanBilling(props) {
|
|
|
27109
27402
|
}
|
|
27110
27403
|
};
|
|
27111
27404
|
return (() => {
|
|
27112
|
-
var _el$ = _tmpl$
|
|
27405
|
+
var _el$ = _tmpl$479(); _el$.firstChild;
|
|
27113
27406
|
insert(_el$, createComponent(Show, {
|
|
27114
27407
|
get when() {
|
|
27115
27408
|
return primary();
|
|
27116
27409
|
},
|
|
27117
27410
|
get fallback() {
|
|
27118
27411
|
return (() => {
|
|
27119
|
-
var _el$3 = _tmpl$
|
|
27412
|
+
var _el$3 = _tmpl$2132(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.nextSibling;
|
|
27120
27413
|
effect(() => setAttribute(_el$6, "href", props.intakeHref));
|
|
27121
27414
|
return _el$3;
|
|
27122
27415
|
})();
|
|
27123
27416
|
},
|
|
27124
27417
|
children: (sub) => [(() => {
|
|
27125
|
-
var _el$7 = _tmpl$
|
|
27418
|
+
var _el$7 = _tmpl$480(), _el$8 = _el$7.firstChild, _el$9 = _el$8.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.nextSibling, _el$10 = _el$9.nextSibling, _el$12 = _el$10.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$13.nextSibling; _el$15.firstChild;
|
|
27126
27419
|
insert(_el$0, () => STATUS_COPY[sub().status] || sub().status);
|
|
27127
27420
|
insert(_el$1, () => props.brandName);
|
|
27128
27421
|
insert(_el$10, () => sub().medicationName ?? sub().medication);
|
|
@@ -27131,7 +27424,7 @@ function PlanBilling(props) {
|
|
|
27131
27424
|
return sub().dosage;
|
|
27132
27425
|
},
|
|
27133
27426
|
get children() {
|
|
27134
|
-
var _el$11 = _tmpl$
|
|
27427
|
+
var _el$11 = _tmpl$3108();
|
|
27135
27428
|
insert(_el$11, () => sub().dosage);
|
|
27136
27429
|
return _el$11;
|
|
27137
27430
|
}
|
|
@@ -27141,7 +27434,7 @@ function PlanBilling(props) {
|
|
|
27141
27434
|
effect(() => className(_el$7, `membership membership--${sub().status}`));
|
|
27142
27435
|
return _el$7;
|
|
27143
27436
|
})(), (() => {
|
|
27144
|
-
var _el$17 = _tmpl$
|
|
27437
|
+
var _el$17 = _tmpl$566(), _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$24 = _el$21.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
|
|
27145
27438
|
insert(_el$20, () => formatLongDate(sub().createdAt));
|
|
27146
27439
|
insert(_el$23, () => formatLongDate(sub().currentPeriodEnd));
|
|
27147
27440
|
insert(_el$26, () => formatCents(sub().amountCents), _el$27);
|
|
@@ -27151,7 +27444,7 @@ function PlanBilling(props) {
|
|
|
27151
27444
|
return props.messagingEnabled;
|
|
27152
27445
|
},
|
|
27153
27446
|
get children() {
|
|
27154
|
-
var _el$28 = _tmpl$
|
|
27447
|
+
var _el$28 = _tmpl$660(), _el$29 = _el$28.firstChild, _el$31 = _el$29.nextSibling;
|
|
27155
27448
|
_el$31.$$click = () => props.onOpenMessages({
|
|
27156
27449
|
channel: "support",
|
|
27157
27450
|
category: "billing"
|
|
@@ -27163,18 +27456,18 @@ function PlanBilling(props) {
|
|
|
27163
27456
|
return error();
|
|
27164
27457
|
},
|
|
27165
27458
|
get children() {
|
|
27166
|
-
var _el$32 = _tmpl$
|
|
27459
|
+
var _el$32 = _tmpl$753();
|
|
27167
27460
|
insert(_el$32, error);
|
|
27168
27461
|
return _el$32;
|
|
27169
27462
|
}
|
|
27170
27463
|
}), (() => {
|
|
27171
|
-
var _el$33 = _tmpl$
|
|
27464
|
+
var _el$33 = _tmpl$038(), _el$36 = _el$33.firstChild;
|
|
27172
27465
|
insert(_el$33, createComponent(Show, {
|
|
27173
27466
|
get when() {
|
|
27174
27467
|
return sub().status === "active";
|
|
27175
27468
|
},
|
|
27176
27469
|
get children() {
|
|
27177
|
-
var _el$34 = _tmpl$
|
|
27470
|
+
var _el$34 = _tmpl$845();
|
|
27178
27471
|
_el$34.$$click = () => run("pause", () => subscriptionsApi.pause(sub().id));
|
|
27179
27472
|
insert(_el$34, () => action() === "pause" ? "Pausing\u2026" : "Pause subscription");
|
|
27180
27473
|
effect(() => _el$34.disabled = !!action());
|
|
@@ -27186,7 +27479,7 @@ function PlanBilling(props) {
|
|
|
27186
27479
|
return sub().status === "paused";
|
|
27187
27480
|
},
|
|
27188
27481
|
get children() {
|
|
27189
|
-
var _el$35 = _tmpl$
|
|
27482
|
+
var _el$35 = _tmpl$845();
|
|
27190
27483
|
_el$35.$$click = () => run("resume", () => subscriptionsApi.resume(sub().id));
|
|
27191
27484
|
insert(_el$35, () => action() === "resume" ? "Resuming\u2026" : "Resume subscription");
|
|
27192
27485
|
effect(() => _el$35.disabled = !!action());
|
|
@@ -27198,7 +27491,7 @@ function PlanBilling(props) {
|
|
|
27198
27491
|
return memo(() => sub().status !== "cancelled")() && sub().status !== "expired";
|
|
27199
27492
|
},
|
|
27200
27493
|
get children() {
|
|
27201
|
-
var _el$37 = _tmpl$
|
|
27494
|
+
var _el$37 = _tmpl$942();
|
|
27202
27495
|
_el$37.$$click = () => setConfirmCancel(true);
|
|
27203
27496
|
effect(() => _el$37.disabled = !!action());
|
|
27204
27497
|
return _el$37;
|
|
@@ -27211,7 +27504,7 @@ function PlanBilling(props) {
|
|
|
27211
27504
|
return confirmCancel();
|
|
27212
27505
|
},
|
|
27213
27506
|
get children() {
|
|
27214
|
-
var _el$38 = _tmpl$
|
|
27507
|
+
var _el$38 = _tmpl$1139(), _el$39 = _el$38.firstChild, _el$40 = _el$39.firstChild, _el$42 = _el$40.nextSibling; _el$42.nextSibling; var _el$43 = _el$39.nextSibling, _el$44 = _el$43.firstChild, _el$45 = _el$44.nextSibling;
|
|
27215
27508
|
insert(_el$39, () => formatLongDate(sub().currentPeriodEnd), _el$42);
|
|
27216
27509
|
_el$44.$$click = () => setConfirmCancel(false);
|
|
27217
27510
|
_el$45.$$click = () => run("cancel", () => subscriptionsApi.cancel(sub().id)).then(() => setConfirmCancel(false));
|
|
@@ -27233,12 +27526,12 @@ function PlanBilling(props) {
|
|
|
27233
27526
|
})();
|
|
27234
27527
|
}
|
|
27235
27528
|
delegateEvents(["click"]);
|
|
27236
|
-
var _tmpl$
|
|
27237
|
-
var _tmpl$
|
|
27238
|
-
var _tmpl$
|
|
27239
|
-
var _tmpl$
|
|
27240
|
-
var _tmpl$
|
|
27241
|
-
var _tmpl$
|
|
27529
|
+
var _tmpl$481 = /* @__PURE__ */ template(`<p class=account__empty>We don\u2019t have your details on file yet.`);
|
|
27530
|
+
var _tmpl$2133 = /* @__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.`);
|
|
27531
|
+
var _tmpl$3109 = /* @__PURE__ */ template(`<button type=button class="account__support-link account__support-btn">Messages`);
|
|
27532
|
+
var _tmpl$485 = /* @__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`);
|
|
27533
|
+
var _tmpl$567 = /* @__PURE__ */ template(`<div class=account__field><dt class=lab-label></dt><dd>`);
|
|
27534
|
+
var _tmpl$661 = /* @__PURE__ */ template(`<a class=account__support-link>`);
|
|
27242
27535
|
function pick(member, ...keys) {
|
|
27243
27536
|
if (!member) return "";
|
|
27244
27537
|
for (const k of keys) {
|
|
@@ -27279,13 +27572,13 @@ function AccountPanel(props) {
|
|
|
27279
27572
|
value: address()
|
|
27280
27573
|
}].filter((f) => f.value);
|
|
27281
27574
|
return (() => {
|
|
27282
|
-
var _el$ = _tmpl$
|
|
27575
|
+
var _el$ = _tmpl$485(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.nextSibling, _el$0 = _el$4.nextSibling, _el$10 = _el$0.nextSibling;
|
|
27283
27576
|
insert(_el$4, createComponent(For, {
|
|
27284
27577
|
get each() {
|
|
27285
27578
|
return fields();
|
|
27286
27579
|
},
|
|
27287
27580
|
children: (f) => (() => {
|
|
27288
|
-
var _el$11 = _tmpl$
|
|
27581
|
+
var _el$11 = _tmpl$567(), _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling;
|
|
27289
27582
|
insert(_el$12, () => f.label);
|
|
27290
27583
|
insert(_el$13, () => f.value);
|
|
27291
27584
|
return _el$11;
|
|
@@ -27296,7 +27589,7 @@ function AccountPanel(props) {
|
|
|
27296
27589
|
return fields().length === 0;
|
|
27297
27590
|
},
|
|
27298
27591
|
get children() {
|
|
27299
|
-
return _tmpl$
|
|
27592
|
+
return _tmpl$481();
|
|
27300
27593
|
}
|
|
27301
27594
|
}), _el$0);
|
|
27302
27595
|
insert(_el$, createComponent(Show, {
|
|
@@ -27304,7 +27597,7 @@ function AccountPanel(props) {
|
|
|
27304
27597
|
return props.messagingEnabled;
|
|
27305
27598
|
},
|
|
27306
27599
|
get children() {
|
|
27307
|
-
var _el$6 = _tmpl$
|
|
27600
|
+
var _el$6 = _tmpl$2133(), _el$7 = _el$6.firstChild, _el$9 = _el$7.nextSibling;
|
|
27308
27601
|
_el$9.$$click = () => props.onOpenMessages({
|
|
27309
27602
|
channel: "support",
|
|
27310
27603
|
category: "account"
|
|
@@ -27317,7 +27610,7 @@ function AccountPanel(props) {
|
|
|
27317
27610
|
return props.messagingEnabled;
|
|
27318
27611
|
},
|
|
27319
27612
|
get children() {
|
|
27320
|
-
var _el$1 = _tmpl$
|
|
27613
|
+
var _el$1 = _tmpl$3109();
|
|
27321
27614
|
_el$1.$$click = () => props.onOpenMessages();
|
|
27322
27615
|
return _el$1;
|
|
27323
27616
|
}
|
|
@@ -27327,7 +27620,7 @@ function AccountPanel(props) {
|
|
|
27327
27620
|
return props.legalLinks ?? [];
|
|
27328
27621
|
},
|
|
27329
27622
|
children: (link) => (() => {
|
|
27330
|
-
var _el$14 = _tmpl$
|
|
27623
|
+
var _el$14 = _tmpl$661();
|
|
27331
27624
|
insert(_el$14, () => link.label);
|
|
27332
27625
|
effect(() => setAttribute(_el$14, "href", link.href));
|
|
27333
27626
|
return _el$14;
|
|
@@ -27338,12 +27631,12 @@ function AccountPanel(props) {
|
|
|
27338
27631
|
})();
|
|
27339
27632
|
}
|
|
27340
27633
|
delegateEvents(["click"]);
|
|
27341
|
-
var _tmpl$
|
|
27342
|
-
var _tmpl$
|
|
27343
|
-
var _tmpl$
|
|
27344
|
-
var _tmpl$
|
|
27345
|
-
var _tmpl$
|
|
27346
|
-
var _tmpl$
|
|
27634
|
+
var _tmpl$486 = /* @__PURE__ */ template(`<section class="leaflet__section leaflet__section--caution"><h2 class=leaflet__h2>Birth control</h2><p class=leaflet__body>`);
|
|
27635
|
+
var _tmpl$2134 = /* @__PURE__ */ template(`<ul class=leaflet__disclaimers id=leaflet-disclaimers>`);
|
|
27636
|
+
var _tmpl$3116 = /* @__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>`);
|
|
27637
|
+
var _tmpl$487 = /* @__PURE__ */ template(`<li>`);
|
|
27638
|
+
var _tmpl$568 = /* @__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>`);
|
|
27639
|
+
var _tmpl$664 = /* @__PURE__ */ template(`<li class=steps__item><span class=steps__num></span><div class=steps__body><h3 class=steps__title></h3><p class=steps__detail>`);
|
|
27347
27640
|
function firstNumber(s) {
|
|
27348
27641
|
const m = (s || "").match(/\d+(\.\d+)?/);
|
|
27349
27642
|
return m ? m[0] : null;
|
|
@@ -27364,7 +27657,7 @@ function MedicationGuide(props) {
|
|
|
27364
27657
|
return "upcoming";
|
|
27365
27658
|
};
|
|
27366
27659
|
return (() => {
|
|
27367
|
-
var _el$ = _tmpl$
|
|
27660
|
+
var _el$ = _tmpl$3116(), _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;
|
|
27368
27661
|
insert(_el$4, () => props.guide.title);
|
|
27369
27662
|
insert(_el$5, () => props.guide.summary);
|
|
27370
27663
|
insert(_el$8, () => props.guide.boxedWarning);
|
|
@@ -27373,7 +27666,7 @@ function MedicationGuide(props) {
|
|
|
27373
27666
|
return props.guide.doNotUseIf;
|
|
27374
27667
|
},
|
|
27375
27668
|
children: (item) => (() => {
|
|
27376
|
-
var _el$45 = _tmpl$
|
|
27669
|
+
var _el$45 = _tmpl$487();
|
|
27377
27670
|
insert(_el$45, item);
|
|
27378
27671
|
return _el$45;
|
|
27379
27672
|
})()
|
|
@@ -27383,7 +27676,7 @@ function MedicationGuide(props) {
|
|
|
27383
27676
|
return props.guide.titration;
|
|
27384
27677
|
},
|
|
27385
27678
|
children: (step, i) => (() => {
|
|
27386
|
-
var _el$46 = _tmpl$
|
|
27679
|
+
var _el$46 = _tmpl$568(), _el$47 = _el$46.firstChild, _el$48 = _el$47.nextSibling, _el$49 = _el$48.firstChild, _el$50 = _el$49.firstChild, _el$51 = _el$50.nextSibling, _el$52 = _el$49.nextSibling, _el$53 = _el$52.nextSibling;
|
|
27387
27680
|
insert(_el$50, () => step.dose);
|
|
27388
27681
|
insert(_el$51, () => step.phase);
|
|
27389
27682
|
insert(_el$52, () => step.timeframe);
|
|
@@ -27397,7 +27690,7 @@ function MedicationGuide(props) {
|
|
|
27397
27690
|
return props.guide.injectionSteps;
|
|
27398
27691
|
},
|
|
27399
27692
|
children: (step) => (() => {
|
|
27400
|
-
var _el$54 = _tmpl$
|
|
27693
|
+
var _el$54 = _tmpl$664(), _el$55 = _el$54.firstChild, _el$56 = _el$55.nextSibling, _el$57 = _el$56.firstChild, _el$58 = _el$57.nextSibling;
|
|
27401
27694
|
insert(_el$55, () => step.n);
|
|
27402
27695
|
insert(_el$57, () => step.title);
|
|
27403
27696
|
insert(_el$58, () => step.detail);
|
|
@@ -27409,7 +27702,7 @@ function MedicationGuide(props) {
|
|
|
27409
27702
|
return props.guide.storage;
|
|
27410
27703
|
},
|
|
27411
27704
|
children: (item) => (() => {
|
|
27412
|
-
var _el$59 = _tmpl$
|
|
27705
|
+
var _el$59 = _tmpl$487();
|
|
27413
27706
|
insert(_el$59, item);
|
|
27414
27707
|
return _el$59;
|
|
27415
27708
|
})()
|
|
@@ -27420,7 +27713,7 @@ function MedicationGuide(props) {
|
|
|
27420
27713
|
return props.guide.contraception;
|
|
27421
27714
|
},
|
|
27422
27715
|
get children() {
|
|
27423
|
-
var _el$24 = _tmpl$
|
|
27716
|
+
var _el$24 = _tmpl$486(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
|
|
27424
27717
|
insert(_el$26, () => props.guide.contraception);
|
|
27425
27718
|
return _el$24;
|
|
27426
27719
|
}
|
|
@@ -27430,7 +27723,7 @@ function MedicationGuide(props) {
|
|
|
27430
27723
|
return props.guide.sideEffectsCommon;
|
|
27431
27724
|
},
|
|
27432
27725
|
children: (item) => (() => {
|
|
27433
|
-
var _el$60 = _tmpl$
|
|
27726
|
+
var _el$60 = _tmpl$487();
|
|
27434
27727
|
insert(_el$60, item);
|
|
27435
27728
|
return _el$60;
|
|
27436
27729
|
})()
|
|
@@ -27440,7 +27733,7 @@ function MedicationGuide(props) {
|
|
|
27440
27733
|
return props.guide.sideEffectsSerious;
|
|
27441
27734
|
},
|
|
27442
27735
|
children: (item) => (() => {
|
|
27443
|
-
var _el$61 = _tmpl$
|
|
27736
|
+
var _el$61 = _tmpl$487();
|
|
27444
27737
|
insert(_el$61, item);
|
|
27445
27738
|
return _el$61;
|
|
27446
27739
|
})()
|
|
@@ -27450,7 +27743,7 @@ function MedicationGuide(props) {
|
|
|
27450
27743
|
return props.guide.whenToCall;
|
|
27451
27744
|
},
|
|
27452
27745
|
children: (item) => (() => {
|
|
27453
|
-
var _el$62 = _tmpl$
|
|
27746
|
+
var _el$62 = _tmpl$487();
|
|
27454
27747
|
insert(_el$62, item);
|
|
27455
27748
|
return _el$62;
|
|
27456
27749
|
})()
|
|
@@ -27460,7 +27753,7 @@ function MedicationGuide(props) {
|
|
|
27460
27753
|
return props.guide.tips;
|
|
27461
27754
|
},
|
|
27462
27755
|
children: (item) => (() => {
|
|
27463
|
-
var _el$63 = _tmpl$
|
|
27756
|
+
var _el$63 = _tmpl$487();
|
|
27464
27757
|
insert(_el$63, item);
|
|
27465
27758
|
return _el$63;
|
|
27466
27759
|
})()
|
|
@@ -27472,13 +27765,13 @@ function MedicationGuide(props) {
|
|
|
27472
27765
|
return showDisclaimers();
|
|
27473
27766
|
},
|
|
27474
27767
|
get children() {
|
|
27475
|
-
var _el$44 = _tmpl$
|
|
27768
|
+
var _el$44 = _tmpl$2134();
|
|
27476
27769
|
insert(_el$44, createComponent(For, {
|
|
27477
27770
|
get each() {
|
|
27478
27771
|
return props.guide.disclaimers;
|
|
27479
27772
|
},
|
|
27480
27773
|
children: (item) => (() => {
|
|
27481
|
-
var _el$64 = _tmpl$
|
|
27774
|
+
var _el$64 = _tmpl$487();
|
|
27482
27775
|
insert(_el$64, item);
|
|
27483
27776
|
return _el$64;
|
|
27484
27777
|
})()
|
|
@@ -27499,19 +27792,19 @@ function MedicationGuide(props) {
|
|
|
27499
27792
|
})();
|
|
27500
27793
|
}
|
|
27501
27794
|
delegateEvents(["click"]);
|
|
27502
|
-
var _tmpl$
|
|
27503
|
-
var _tmpl$
|
|
27504
|
-
var _tmpl$
|
|
27505
|
-
var _tmpl$
|
|
27506
|
-
var _tmpl$
|
|
27507
|
-
var _tmpl$
|
|
27508
|
-
var _tmpl$
|
|
27509
|
-
var _tmpl$
|
|
27510
|
-
var _tmpl$
|
|
27511
|
-
var _tmpl$
|
|
27512
|
-
var _tmpl$
|
|
27795
|
+
var _tmpl$488 = /* @__PURE__ */ template(`<span data-testid=channel-chip>`);
|
|
27796
|
+
var _tmpl$2135 = /* @__PURE__ */ template(`<span class=channel-chip__category>`);
|
|
27797
|
+
var _tmpl$3117 = /* @__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`);
|
|
27798
|
+
var _tmpl$489 = /* @__PURE__ */ template(`<div class=msg-list__state><div class=request-status__spinner>`);
|
|
27799
|
+
var _tmpl$569 = /* @__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>`);
|
|
27800
|
+
var _tmpl$665 = /* @__PURE__ */ template(`<div class=msg-list__scroll data-scrollable>`);
|
|
27801
|
+
var _tmpl$754 = /* @__PURE__ */ template(`<span class=msg-list__pip>`);
|
|
27802
|
+
var _tmpl$846 = /* @__PURE__ */ template(`<button type=button><div class=msg-list__row><span class=msg-list__name-group><span class=msg-list__name></span></span><span class=msg-list__time></span></div><div class=msg-list__row><span class=msg-list__preview>`);
|
|
27803
|
+
var _tmpl$943 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__image-link><img class=msg-attachment__image loading=lazy>`, true, false, false);
|
|
27804
|
+
var _tmpl$039 = /* @__PURE__ */ template(`<button type=button class=msg-attachment__file><span class=msg-attachment__file-icon aria-hidden=true><i class="ph-thin ph-paperclip"></i></span><span class=msg-attachment__file-info><span class=msg-attachment__file-name></span><span class=msg-attachment__file-size>`);
|
|
27805
|
+
var _tmpl$1140 = /* @__PURE__ */ template(`<span class=msg-attachment__fallback>`);
|
|
27513
27806
|
var _tmpl$1030 = /* @__PURE__ */ template(`<p class=msg-thread__sender>`);
|
|
27514
|
-
var _tmpl$
|
|
27807
|
+
var _tmpl$1141 = /* @__PURE__ */ template(`<div class=msg-thread__text>`);
|
|
27515
27808
|
var _tmpl$1226 = /* @__PURE__ */ template(`<div class=msg-attachment>`);
|
|
27516
27809
|
var _tmpl$1324 = /* @__PURE__ */ template(`<div><div><p class=msg-thread__meta>`);
|
|
27517
27810
|
var _tmpl$1424 = /* @__PURE__ */ template(`<p class=msg-thread__system data-testid=system-message>`);
|
|
@@ -27521,7 +27814,7 @@ var _tmpl$1722 = /* @__PURE__ */ template(`<p class=msg-compose__error role=aler
|
|
|
27521
27814
|
var _tmpl$1820 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=support-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=support-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message support</h3><p class=msg-thread__role data-testid=support-compose-reply-note></p></div></div><div class=msg-compose__new><label class=msg-compose__label id=support-category-label>What's this about? <span class=msg-compose__label-optional>(optional)</span></label><div class=msg-compose__categories role=group aria-labelledby=support-category-label></div><label class=msg-compose__label for=support-subject>Subject</label><input id=support-subject class=msg-compose__subject type=text maxlength=500 required placeholder="e.g. Question about my order"><label class=msg-compose__label for=support-body>How can we help?</label><textarea id=support-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell us what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=support-compose-attach></label><button type=submit class=msg-compose__send data-testid=support-compose-send>`);
|
|
27522
27815
|
var _tmpl$1918 = /* @__PURE__ */ template(`<button type=button>`);
|
|
27523
27816
|
var _tmpl$2018 = /* @__PURE__ */ template(`<form class="msg-thread msg-thread--compose"data-testid=care-compose><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back data-testid=care-compose-back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message your care team</h3><p class=msg-thread__role>Your prescriber or their team will reply</p></div></div><div class=msg-compose__new><label class=msg-compose__label for=care-body>Message</label><textarea id=care-body class=msg-compose__body rows=6 maxlength=5000 required placeholder="Tell your care team what's going on\u2026"></textarea><label class="msg-compose__attach msg-compose__attach--block"title="Attach a file"><i class="ph-thin ph-paperclip"aria-hidden=true></i><span class=msg-compose__attach-label></span><input class=msg-compose__file-input type=file data-testid=care-compose-attach></label><button type=submit class=msg-compose__send data-testid=care-compose-send>`);
|
|
27524
|
-
var _tmpl$
|
|
27817
|
+
var _tmpl$2136 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-care-badge>`);
|
|
27525
27818
|
var _tmpl$2217 = /* @__PURE__ */ template(`<span class=msg-choice__option-badge data-testid=gate-support-badge>`);
|
|
27526
27819
|
var _tmpl$2315 = /* @__PURE__ */ template(`<p class=msg-choice__notice-text data-testid=messages-gate-note>That conversation isn't available.`);
|
|
27527
27820
|
var _tmpl$2415 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=messages-gate><div class=msg-thread__header><div><h3 class=msg-thread__name>Messages</h3><p class=msg-thread__role>Who do you want to talk to?</p></div></div><div class=msg-choice__options><button type=button class=msg-choice__option data-testid=gate-care-team><i class="ph-thin ph-heartbeat msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>My care team</span><span class=msg-choice__option-sub>Treatment, medication or side effects</span></button><button type=button class=msg-choice__option data-testid=gate-support><i class="ph-thin ph-lifebuoy msg-choice__option-icon"aria-hidden=true></i><span class=msg-choice__option-title>Support</span><span class=msg-choice__option-sub>Account, orders, billing or the website`);
|
|
@@ -27531,7 +27824,7 @@ var _tmpl$2714 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"dat
|
|
|
27531
27824
|
var _tmpl$2813 = /* @__PURE__ */ template(`<div class="msg-thread msg-choice"data-testid=support-email-sent><div class=msg-thread__header><button type=button class=msg-thread__back-btn aria-label=Back><i class="ph-thin ph-arrow-left"aria-hidden=true></i></button><div><h3 class=msg-thread__name>Message sent</h3><p class=msg-thread__role>Support</p></div></div><div class=msg-choice__notice><p class=msg-choice__notice-text>Thanks, your message is on its way to our support team. We'll reply by email, usually within one business day.</p><button type=button class="portal-btn portal-btn--primary"data-testid=support-email-another>Send another message`);
|
|
27532
27825
|
var _tmpl$2911 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-closed>Resolved`);
|
|
27533
27826
|
var _tmpl$3011 = /* @__PURE__ */ template(`<span class=msg-thread__status data-testid=thread-status-transferred>Moved to care team`);
|
|
27534
|
-
var _tmpl$
|
|
27827
|
+
var _tmpl$3118 = /* @__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>`);
|
|
27535
27828
|
var _tmpl$3215 = /* @__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`);
|
|
27536
27829
|
var _tmpl$3315 = /* @__PURE__ */ template(`<div class=msg-thread__messages data-scrollable><div>`);
|
|
27537
27830
|
var _tmpl$3415 = /* @__PURE__ */ template(`<span class=msg-compose__error role=alert>`);
|
|
@@ -27744,14 +28037,14 @@ function MessagesPanel(props) {
|
|
|
27744
28037
|
}
|
|
27745
28038
|
}
|
|
27746
28039
|
const ChannelChip = (p) => (() => {
|
|
27747
|
-
var _el$ = _tmpl$
|
|
28040
|
+
var _el$ = _tmpl$488();
|
|
27748
28041
|
insert(_el$, () => p.source === "clinical" ? "Care team" : "Support", null);
|
|
27749
28042
|
insert(_el$, createComponent(Show, {
|
|
27750
28043
|
get when() {
|
|
27751
28044
|
return memo(() => p.source === "support")() && categoryLabel(p.category);
|
|
27752
28045
|
},
|
|
27753
28046
|
children: (label3) => (() => {
|
|
27754
|
-
var _el$2 = _tmpl$
|
|
28047
|
+
var _el$2 = _tmpl$2135();
|
|
27755
28048
|
insert(_el$2, label3);
|
|
27756
28049
|
return _el$2;
|
|
27757
28050
|
})()
|
|
@@ -27769,19 +28062,19 @@ function MessagesPanel(props) {
|
|
|
27769
28062
|
})();
|
|
27770
28063
|
const channelConversations = () => thread().conversations().filter((c) => c.source === (channel() === "care" ? "clinical" : "support"));
|
|
27771
28064
|
const ConversationList = () => [(() => {
|
|
27772
|
-
var _el$3 = _tmpl$
|
|
28065
|
+
var _el$3 = _tmpl$3117(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling;
|
|
27773
28066
|
_el$5.$$click = goToGate;
|
|
27774
28067
|
insert(_el$6, () => channel() === "care" ? "My care team" : "Support");
|
|
27775
28068
|
_el$7.$$click = openCompose;
|
|
27776
28069
|
return _el$3;
|
|
27777
28070
|
})(), (() => {
|
|
27778
|
-
var _el$8 = _tmpl$
|
|
28071
|
+
var _el$8 = _tmpl$665();
|
|
27779
28072
|
insert(_el$8, createComponent(Show, {
|
|
27780
28073
|
get when() {
|
|
27781
28074
|
return thread().loadingConversations();
|
|
27782
28075
|
},
|
|
27783
28076
|
get children() {
|
|
27784
|
-
return _tmpl$
|
|
28077
|
+
return _tmpl$489();
|
|
27785
28078
|
}
|
|
27786
28079
|
}), null);
|
|
27787
28080
|
insert(_el$8, createComponent(Show, {
|
|
@@ -27789,7 +28082,7 @@ function MessagesPanel(props) {
|
|
|
27789
28082
|
return memo(() => !!!thread().loadingConversations())() && channelConversations().length === 0;
|
|
27790
28083
|
},
|
|
27791
28084
|
get children() {
|
|
27792
|
-
var _el$0 = _tmpl$
|
|
28085
|
+
var _el$0 = _tmpl$569(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling, _el$11 = _el$10.nextSibling;
|
|
27793
28086
|
insert(_el$11, createComponent(Show, {
|
|
27794
28087
|
get when() {
|
|
27795
28088
|
return channel() === "care";
|
|
@@ -27805,7 +28098,7 @@ function MessagesPanel(props) {
|
|
|
27805
28098
|
return channelConversations();
|
|
27806
28099
|
},
|
|
27807
28100
|
children: (convo) => (() => {
|
|
27808
|
-
var _el$12 = _tmpl$
|
|
28101
|
+
var _el$12 = _tmpl$846(), _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$14.nextSibling, _el$17 = _el$13.nextSibling, _el$18 = _el$17.firstChild;
|
|
27809
28102
|
_el$12.$$click = () => thread().selectConversation(convo.id);
|
|
27810
28103
|
insert(_el$15, () => convo.participantName ?? "Provider");
|
|
27811
28104
|
insert(_el$14, createComponent(ChannelChip, {
|
|
@@ -27823,7 +28116,7 @@ function MessagesPanel(props) {
|
|
|
27823
28116
|
return (convo.unreadCount ?? 0) > 0;
|
|
27824
28117
|
},
|
|
27825
28118
|
get children() {
|
|
27826
|
-
var _el$19 = _tmpl$
|
|
28119
|
+
var _el$19 = _tmpl$754();
|
|
27827
28120
|
insert(_el$19, () => convo.unreadCount);
|
|
27828
28121
|
return _el$19;
|
|
27829
28122
|
}
|
|
@@ -27865,7 +28158,7 @@ function MessagesPanel(props) {
|
|
|
27865
28158
|
},
|
|
27866
28159
|
get fallback() {
|
|
27867
28160
|
return (() => {
|
|
27868
|
-
var _el$22 = _tmpl$
|
|
28161
|
+
var _el$22 = _tmpl$039(), _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling;
|
|
27869
28162
|
_el$22.$$click = openDocument;
|
|
27870
28163
|
insert(_el$25, () => p.attachment.filename);
|
|
27871
28164
|
insert(_el$26, () => formatFileSize(p.attachment.sizeBytes));
|
|
@@ -27880,13 +28173,13 @@ function MessagesPanel(props) {
|
|
|
27880
28173
|
},
|
|
27881
28174
|
get fallback() {
|
|
27882
28175
|
return (() => {
|
|
27883
|
-
var _el$27 = _tmpl$
|
|
28176
|
+
var _el$27 = _tmpl$1140();
|
|
27884
28177
|
insert(_el$27, () => failed() ? "Attachment unavailable" : "Loading\u2026");
|
|
27885
28178
|
return _el$27;
|
|
27886
28179
|
})();
|
|
27887
28180
|
},
|
|
27888
28181
|
get children() {
|
|
27889
|
-
var _el$20 = _tmpl$
|
|
28182
|
+
var _el$20 = _tmpl$943(), _el$21 = _el$20.firstChild;
|
|
27890
28183
|
_el$20.$$click = openDocument;
|
|
27891
28184
|
_el$21.addEventListener("error", () => {
|
|
27892
28185
|
if (retried) {
|
|
@@ -27954,7 +28247,7 @@ function MessagesPanel(props) {
|
|
|
27954
28247
|
})();
|
|
27955
28248
|
},
|
|
27956
28249
|
get children() {
|
|
27957
|
-
var _el$31 = _tmpl$
|
|
28250
|
+
var _el$31 = _tmpl$1141();
|
|
27958
28251
|
effect(() => _el$31.innerHTML = sanitizeMessageHtml(body()));
|
|
27959
28252
|
return _el$31;
|
|
27960
28253
|
}
|
|
@@ -28113,7 +28406,7 @@ function MessagesPanel(props) {
|
|
|
28113
28406
|
return careUnreadCount() > 0;
|
|
28114
28407
|
},
|
|
28115
28408
|
get children() {
|
|
28116
|
-
var _el$77 = _tmpl$
|
|
28409
|
+
var _el$77 = _tmpl$2136();
|
|
28117
28410
|
insert(_el$77, careUnreadCount);
|
|
28118
28411
|
return _el$77;
|
|
28119
28412
|
}
|
|
@@ -28167,7 +28460,7 @@ function MessagesPanel(props) {
|
|
|
28167
28460
|
return _el$92;
|
|
28168
28461
|
})();
|
|
28169
28462
|
const Thread = () => [(() => {
|
|
28170
|
-
var _el$98 = _tmpl$
|
|
28463
|
+
var _el$98 = _tmpl$3118(), _el$99 = _el$98.firstChild, _el$100 = _el$99.nextSibling, _el$101 = _el$100.firstChild, _el$102 = _el$101.firstChild, _el$103 = _el$101.nextSibling;
|
|
28171
28464
|
_el$99.$$click = () => thread().clearSelection();
|
|
28172
28465
|
insert(_el$102, () => selectedConvo()?.participantName ?? "Provider");
|
|
28173
28466
|
insert(_el$101, createComponent(Show, {
|
|
@@ -28217,7 +28510,7 @@ function MessagesPanel(props) {
|
|
|
28217
28510
|
return thread().loadingMessages();
|
|
28218
28511
|
},
|
|
28219
28512
|
get children() {
|
|
28220
|
-
return _tmpl$
|
|
28513
|
+
return _tmpl$489();
|
|
28221
28514
|
}
|
|
28222
28515
|
}), _el$110);
|
|
28223
28516
|
insert(_el$108, createComponent(For, {
|
|
@@ -28401,17 +28694,17 @@ function MessagesPanel(props) {
|
|
|
28401
28694
|
})();
|
|
28402
28695
|
}
|
|
28403
28696
|
delegateEvents(["click", "input", "keydown"]);
|
|
28404
|
-
var _tmpl$
|
|
28405
|
-
var _tmpl$
|
|
28406
|
-
var _tmpl$
|
|
28407
|
-
var _tmpl$
|
|
28408
|
-
var _tmpl$
|
|
28409
|
-
var _tmpl$
|
|
28410
|
-
var _tmpl$
|
|
28411
|
-
var _tmpl$
|
|
28412
|
-
var _tmpl$
|
|
28413
|
-
var _tmpl$
|
|
28414
|
-
var _tmpl$
|
|
28697
|
+
var _tmpl$490 = /* @__PURE__ */ template(`<ul class=history-list data-testid=history-list>`);
|
|
28698
|
+
var _tmpl$2137 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-error><p>We couldn't load your submitted surveys. Please try again in a moment.`);
|
|
28699
|
+
var _tmpl$3119 = /* @__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.`);
|
|
28700
|
+
var _tmpl$491 = /* @__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>`);
|
|
28701
|
+
var _tmpl$570 = /* @__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`);
|
|
28702
|
+
var _tmpl$666 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your answers\u2026`);
|
|
28703
|
+
var _tmpl$755 = /* @__PURE__ */ template(`<div class=portal-state data-testid=history-detail-error><p>We couldn't load this questionnaire. Please try again in a moment.`);
|
|
28704
|
+
var _tmpl$847 = /* @__PURE__ */ template(`<article class=history-transcript><header class=history-transcript__head><h2></h2><p class=history-transcript__meta>Submitted <!>. Your answers are shown exactly as they were at the time \u2014 they aren't updated afterwards.`);
|
|
28705
|
+
var _tmpl$944 = /* @__PURE__ */ template(`<section class=history-section><h3 class=lab-label>`);
|
|
28706
|
+
var _tmpl$040 = /* @__PURE__ */ template(`<div class=history-qa><p class=history-qa__q></p><p class=history-qa__a>`);
|
|
28707
|
+
var _tmpl$1142 = /* @__PURE__ */ template(`<div class=survey-history data-testid=survey-history>`);
|
|
28415
28708
|
var _tmpl$1031 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your submitted surveys\u2026`);
|
|
28416
28709
|
var MODE_LABELS = {
|
|
28417
28710
|
initial: "Intake questionnaire",
|
|
@@ -28440,7 +28733,7 @@ function SurveyHistory() {
|
|
|
28440
28733
|
return !list.error;
|
|
28441
28734
|
},
|
|
28442
28735
|
get fallback() {
|
|
28443
|
-
return _tmpl$
|
|
28736
|
+
return _tmpl$2137();
|
|
28444
28737
|
},
|
|
28445
28738
|
get children() {
|
|
28446
28739
|
return createComponent(Show, {
|
|
@@ -28448,16 +28741,16 @@ function SurveyHistory() {
|
|
|
28448
28741
|
return (list() ?? []).length > 0;
|
|
28449
28742
|
},
|
|
28450
28743
|
get fallback() {
|
|
28451
|
-
return _tmpl$
|
|
28744
|
+
return _tmpl$3119();
|
|
28452
28745
|
},
|
|
28453
28746
|
get children() {
|
|
28454
|
-
var _el$ = _tmpl$
|
|
28747
|
+
var _el$ = _tmpl$490();
|
|
28455
28748
|
insert(_el$, createComponent(For, {
|
|
28456
28749
|
get each() {
|
|
28457
28750
|
return list();
|
|
28458
28751
|
},
|
|
28459
28752
|
children: (item) => (() => {
|
|
28460
|
-
var _el$4 = _tmpl$
|
|
28753
|
+
var _el$4 = _tmpl$491(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling;
|
|
28461
28754
|
_el$5.$$click = () => setSelectedId(item.id);
|
|
28462
28755
|
insert(_el$6, () => MODE_LABELS[item.mode] ?? "Questionnaire");
|
|
28463
28756
|
insert(_el$7, () => formatDate3(item.submittedAt) ?? "Date unavailable");
|
|
@@ -28470,14 +28763,14 @@ function SurveyHistory() {
|
|
|
28470
28763
|
}
|
|
28471
28764
|
});
|
|
28472
28765
|
const DetailView = () => (() => {
|
|
28473
|
-
var _el$8 = _tmpl$
|
|
28766
|
+
var _el$8 = _tmpl$570(), _el$9 = _el$8.firstChild;
|
|
28474
28767
|
_el$9.$$click = () => setSelectedId(null);
|
|
28475
28768
|
insert(_el$8, createComponent(Show, {
|
|
28476
28769
|
get when() {
|
|
28477
28770
|
return !detail.loading;
|
|
28478
28771
|
},
|
|
28479
28772
|
get fallback() {
|
|
28480
|
-
return _tmpl$
|
|
28773
|
+
return _tmpl$666();
|
|
28481
28774
|
},
|
|
28482
28775
|
get children() {
|
|
28483
28776
|
return createComponent(Show, {
|
|
@@ -28485,10 +28778,10 @@ function SurveyHistory() {
|
|
|
28485
28778
|
return memo(() => !!!detail.error)() && detail();
|
|
28486
28779
|
},
|
|
28487
28780
|
get fallback() {
|
|
28488
|
-
return _tmpl$
|
|
28781
|
+
return _tmpl$755();
|
|
28489
28782
|
},
|
|
28490
28783
|
children: (t) => (() => {
|
|
28491
|
-
var _el$10 = _tmpl$
|
|
28784
|
+
var _el$10 = _tmpl$847(), _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$12.nextSibling, _el$14 = _el$13.firstChild, _el$16 = _el$14.nextSibling; _el$16.nextSibling;
|
|
28492
28785
|
insert(_el$12, () => MODE_LABELS[t().mode] ?? "Questionnaire");
|
|
28493
28786
|
insert(_el$13, () => formatDate3(t().completedAt ?? t().createdAt) ?? "\u2014", _el$16);
|
|
28494
28787
|
insert(_el$10, createComponent(For, {
|
|
@@ -28496,14 +28789,14 @@ function SurveyHistory() {
|
|
|
28496
28789
|
return t().sections;
|
|
28497
28790
|
},
|
|
28498
28791
|
children: (section) => (() => {
|
|
28499
|
-
var _el$17 = _tmpl$
|
|
28792
|
+
var _el$17 = _tmpl$944(), _el$18 = _el$17.firstChild;
|
|
28500
28793
|
insert(_el$18, () => section.title);
|
|
28501
28794
|
insert(_el$17, createComponent(For, {
|
|
28502
28795
|
get each() {
|
|
28503
28796
|
return section.items;
|
|
28504
28797
|
},
|
|
28505
28798
|
children: (item) => (() => {
|
|
28506
|
-
var _el$19 = _tmpl$
|
|
28799
|
+
var _el$19 = _tmpl$040(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
|
|
28507
28800
|
insert(_el$20, () => item.question);
|
|
28508
28801
|
insert(_el$21, () => item.answer);
|
|
28509
28802
|
return _el$19;
|
|
@@ -28520,7 +28813,7 @@ function SurveyHistory() {
|
|
|
28520
28813
|
return _el$8;
|
|
28521
28814
|
})();
|
|
28522
28815
|
return (() => {
|
|
28523
|
-
var _el$22 = _tmpl$
|
|
28816
|
+
var _el$22 = _tmpl$1142();
|
|
28524
28817
|
insert(_el$22, createComponent(Show, {
|
|
28525
28818
|
get when() {
|
|
28526
28819
|
return !list.loading || selectedId();
|
|
@@ -28548,19 +28841,19 @@ function SurveyHistory() {
|
|
|
28548
28841
|
delegateEvents(["click"]);
|
|
28549
28842
|
|
|
28550
28843
|
// src/pages/MemberPortal.tsx
|
|
28551
|
-
var _tmpl$
|
|
28552
|
-
var _tmpl$
|
|
28553
|
-
var _tmpl$
|
|
28554
|
-
var _tmpl$
|
|
28555
|
-
var _tmpl$
|
|
28556
|
-
var _tmpl$
|
|
28557
|
-
var _tmpl$
|
|
28558
|
-
var _tmpl$
|
|
28559
|
-
var _tmpl$
|
|
28560
|
-
var _tmpl$
|
|
28561
|
-
var _tmpl$
|
|
28844
|
+
var _tmpl$495 = /* @__PURE__ */ template(`<span class=portal-item__live aria-label="In progress">`);
|
|
28845
|
+
var _tmpl$2138 = /* @__PURE__ */ template(`<span>`);
|
|
28846
|
+
var _tmpl$3120 = /* @__PURE__ */ template(`<button type=button><i aria-hidden=true></i><span class=portal-item__label>`);
|
|
28847
|
+
var _tmpl$496 = /* @__PURE__ */ template(`<div class=rx-others data-testid=rx-others><span class=lab-label>Other orders`);
|
|
28848
|
+
var _tmpl$571 = /* @__PURE__ */ template(`<div class=rx-stack>`);
|
|
28849
|
+
var _tmpl$667 = /* @__PURE__ */ template(`<div class=portal-state><div class=request-status__spinner></div><p>Loading your portal\u2026`);
|
|
28850
|
+
var _tmpl$756 = /* @__PURE__ */ template(`<div class="request-status__error portal-state"><p class=request-status__error-text></p><button type=button class="portal-btn portal-btn--ghost">Try again`);
|
|
28851
|
+
var _tmpl$848 = /* @__PURE__ */ template(`<p class=portal-rail__hi>Hi, `);
|
|
28852
|
+
var _tmpl$945 = /* @__PURE__ */ template(`<a class=portal-rail__back data-testid=rail-back>\u2190 Back to shop`);
|
|
28853
|
+
var _tmpl$041 = /* @__PURE__ */ template(`<a class=portal-topbar-back data-testid=mobile-back><span aria-hidden=true>\u2190</span> Back to shop`);
|
|
28854
|
+
var _tmpl$1143 = /* @__PURE__ */ template(`<main class=portal data-testid=member-portal><aside class=portal-rail><div class=portal-rail__brand><a class=portal-rail__logo></a><span class=portal-rail__dot aria-hidden=true></span></div><nav class=portal-rail__nav aria-label="Portal sections"></nav><div class=portal-rail__foot><button type=button class=portal-rail__signout>\u2014 Sign out</button></div></aside><section class=portal-content><div></div></section><nav class=portal-tabs aria-label="Portal sections">`);
|
|
28562
28855
|
var _tmpl$1032 = /* @__PURE__ */ template(`<span class=portal-rail__wordmark>`);
|
|
28563
|
-
var _tmpl$
|
|
28856
|
+
var _tmpl$1144 = /* @__PURE__ */ template(`<img>`);
|
|
28564
28857
|
var ICONS = {
|
|
28565
28858
|
tracker: "ph-thin ph-path",
|
|
28566
28859
|
instructions: "ph-thin ph-first-aid-kit",
|
|
@@ -28687,7 +28980,7 @@ function MemberPortal(props) {
|
|
|
28687
28980
|
return tabs();
|
|
28688
28981
|
},
|
|
28689
28982
|
children: (item) => (() => {
|
|
28690
|
-
var _el$ = _tmpl$
|
|
28983
|
+
var _el$ = _tmpl$3120(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
28691
28984
|
_el$.$$click = () => selectTab(item.key);
|
|
28692
28985
|
insert(_el$3, () => item.label);
|
|
28693
28986
|
insert(_el$, createComponent(Show, {
|
|
@@ -28695,7 +28988,7 @@ function MemberPortal(props) {
|
|
|
28695
28988
|
return memo(() => item.key === "tracker")() && inMotion();
|
|
28696
28989
|
},
|
|
28697
28990
|
get children() {
|
|
28698
|
-
return _tmpl$
|
|
28991
|
+
return _tmpl$495();
|
|
28699
28992
|
}
|
|
28700
28993
|
}), null);
|
|
28701
28994
|
insert(_el$, createComponent(Show, {
|
|
@@ -28703,7 +28996,7 @@ function MemberPortal(props) {
|
|
|
28703
28996
|
return memo(() => item.key === "messages")() && unreadTotal() > 0;
|
|
28704
28997
|
},
|
|
28705
28998
|
get children() {
|
|
28706
|
-
var _el$5 = _tmpl$
|
|
28999
|
+
var _el$5 = _tmpl$2138();
|
|
28707
29000
|
insert(_el$5, (() => {
|
|
28708
29001
|
var _c$ = memo(() => unreadTotal() > 99);
|
|
28709
29002
|
return () => _c$() ? "99+" : unreadTotal();
|
|
@@ -28761,7 +29054,7 @@ function MemberPortal(props) {
|
|
|
28761
29054
|
});
|
|
28762
29055
|
},
|
|
28763
29056
|
children: (primary) => (() => {
|
|
28764
|
-
var _el$6 = _tmpl$
|
|
29057
|
+
var _el$6 = _tmpl$571();
|
|
28765
29058
|
insert(_el$6, createComponent(OrderTracker, {
|
|
28766
29059
|
get request() {
|
|
28767
29060
|
return data.toTrackerRequest(primary());
|
|
@@ -28791,7 +29084,7 @@ function MemberPortal(props) {
|
|
|
28791
29084
|
return data.otherRx().length > 0;
|
|
28792
29085
|
},
|
|
28793
29086
|
get children() {
|
|
28794
|
-
var _el$7 = _tmpl$
|
|
29087
|
+
var _el$7 = _tmpl$496(); _el$7.firstChild;
|
|
28795
29088
|
insert(_el$7, createComponent(For, {
|
|
28796
29089
|
get each() {
|
|
28797
29090
|
return data.otherRx();
|
|
@@ -28827,7 +29120,7 @@ function MemberPortal(props) {
|
|
|
28827
29120
|
return !data.loading();
|
|
28828
29121
|
},
|
|
28829
29122
|
get fallback() {
|
|
28830
|
-
return _tmpl$
|
|
29123
|
+
return _tmpl$667();
|
|
28831
29124
|
},
|
|
28832
29125
|
get children() {
|
|
28833
29126
|
return createComponent(Show, {
|
|
@@ -28836,7 +29129,7 @@ function MemberPortal(props) {
|
|
|
28836
29129
|
},
|
|
28837
29130
|
get fallback() {
|
|
28838
29131
|
return (() => {
|
|
28839
|
-
var _el$0 = _tmpl$
|
|
29132
|
+
var _el$0 = _tmpl$756(), _el$1 = _el$0.firstChild, _el$10 = _el$1.nextSibling;
|
|
28840
29133
|
insert(_el$1, () => data.error());
|
|
28841
29134
|
_el$10.$$click = () => data.refetch();
|
|
28842
29135
|
return _el$0;
|
|
@@ -28933,7 +29226,7 @@ function MemberPortal(props) {
|
|
|
28933
29226
|
}
|
|
28934
29227
|
});
|
|
28935
29228
|
return (() => {
|
|
28936
|
-
var _el$11 = _tmpl$
|
|
29229
|
+
var _el$11 = _tmpl$1143(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$17 = _el$13.nextSibling, _el$18 = _el$17.nextSibling, _el$20 = _el$18.firstChild, _el$22 = _el$12.nextSibling, _el$23 = _el$22.firstChild, _el$24 = _el$22.nextSibling;
|
|
28937
29230
|
insert(_el$14, createComponent(Show, {
|
|
28938
29231
|
get when() {
|
|
28939
29232
|
return props.brand.logoSrc;
|
|
@@ -28946,7 +29239,7 @@ function MemberPortal(props) {
|
|
|
28946
29239
|
})();
|
|
28947
29240
|
},
|
|
28948
29241
|
children: (src) => (() => {
|
|
28949
|
-
var _el$26 = _tmpl$
|
|
29242
|
+
var _el$26 = _tmpl$1144();
|
|
28950
29243
|
effect((_p$) => {
|
|
28951
29244
|
var _v$8 = src(), _v$9 = props.brand.name;
|
|
28952
29245
|
_v$8 !== _p$.e && setAttribute(_el$26, "src", _p$.e = _v$8);
|
|
@@ -28964,7 +29257,7 @@ function MemberPortal(props) {
|
|
|
28964
29257
|
return data.firstName() !== "Member";
|
|
28965
29258
|
},
|
|
28966
29259
|
get children() {
|
|
28967
|
-
var _el$15 = _tmpl$
|
|
29260
|
+
var _el$15 = _tmpl$848(); _el$15.firstChild;
|
|
28968
29261
|
insert(_el$15, () => data.firstName(), null);
|
|
28969
29262
|
return _el$15;
|
|
28970
29263
|
}
|
|
@@ -28977,7 +29270,7 @@ function MemberPortal(props) {
|
|
|
28977
29270
|
return showBackLink();
|
|
28978
29271
|
},
|
|
28979
29272
|
get children() {
|
|
28980
|
-
var _el$19 = _tmpl$
|
|
29273
|
+
var _el$19 = _tmpl$945();
|
|
28981
29274
|
effect(() => setAttribute(_el$19, "href", catalogHref()));
|
|
28982
29275
|
return _el$19;
|
|
28983
29276
|
}
|
|
@@ -28988,7 +29281,7 @@ function MemberPortal(props) {
|
|
|
28988
29281
|
return showBackLink();
|
|
28989
29282
|
},
|
|
28990
29283
|
get children() {
|
|
28991
|
-
var _el$21 = _tmpl$
|
|
29284
|
+
var _el$21 = _tmpl$041();
|
|
28992
29285
|
effect(() => setAttribute(_el$21, "href", catalogHref()));
|
|
28993
29286
|
return _el$21;
|
|
28994
29287
|
}
|
|
@@ -29014,11 +29307,11 @@ function MemberPortal(props) {
|
|
|
29014
29307
|
})();
|
|
29015
29308
|
}
|
|
29016
29309
|
delegateEvents(["click"]);
|
|
29017
|
-
var _tmpl$
|
|
29018
|
-
var _tmpl$
|
|
29019
|
-
var _tmpl$
|
|
29020
|
-
var _tmpl$
|
|
29021
|
-
var _tmpl$
|
|
29310
|
+
var _tmpl$497 = /* @__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.`);
|
|
29311
|
+
var _tmpl$2139 = /* @__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`);
|
|
29312
|
+
var _tmpl$3121 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading stats\u2026`);
|
|
29313
|
+
var _tmpl$498 = /* @__PURE__ */ template(`<div style="display:grid;grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));gap:1rem">`);
|
|
29314
|
+
var _tmpl$574 = /* @__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)>`);
|
|
29022
29315
|
function formatMoney(cents) {
|
|
29023
29316
|
return `$${(cents / 100).toFixed(2)}`;
|
|
29024
29317
|
}
|
|
@@ -29051,13 +29344,13 @@ function AffiliateOverview() {
|
|
|
29051
29344
|
value: `${(s.conversionRate * 100).toFixed(1)}%`
|
|
29052
29345
|
}];
|
|
29053
29346
|
return (() => {
|
|
29054
|
-
var _el$ = _tmpl$
|
|
29347
|
+
var _el$ = _tmpl$2139(); _el$.firstChild;
|
|
29055
29348
|
insert(_el$, createComponent(Show, {
|
|
29056
29349
|
get when() {
|
|
29057
29350
|
return isPending();
|
|
29058
29351
|
},
|
|
29059
29352
|
get children() {
|
|
29060
|
-
return _tmpl$
|
|
29353
|
+
return _tmpl$497();
|
|
29061
29354
|
}
|
|
29062
29355
|
}), null);
|
|
29063
29356
|
insert(_el$, createComponent(Show, {
|
|
@@ -29065,16 +29358,16 @@ function AffiliateOverview() {
|
|
|
29065
29358
|
return stats();
|
|
29066
29359
|
},
|
|
29067
29360
|
get fallback() {
|
|
29068
|
-
return _tmpl$
|
|
29361
|
+
return _tmpl$3121();
|
|
29069
29362
|
},
|
|
29070
29363
|
children: (s) => (() => {
|
|
29071
|
-
var _el$5 = _tmpl$
|
|
29364
|
+
var _el$5 = _tmpl$498();
|
|
29072
29365
|
insert(_el$5, createComponent(For, {
|
|
29073
29366
|
get each() {
|
|
29074
29367
|
return cards(s());
|
|
29075
29368
|
},
|
|
29076
29369
|
children: (card) => (() => {
|
|
29077
|
-
var _el$6 = _tmpl$
|
|
29370
|
+
var _el$6 = _tmpl$574(), _el$7 = _el$6.firstChild, _el$8 = _el$7.nextSibling;
|
|
29078
29371
|
insert(_el$7, () => card.label);
|
|
29079
29372
|
insert(_el$8, () => card.value);
|
|
29080
29373
|
return _el$6;
|
|
@@ -29086,11 +29379,11 @@ function AffiliateOverview() {
|
|
|
29086
29379
|
return _el$;
|
|
29087
29380
|
})();
|
|
29088
29381
|
}
|
|
29089
|
-
var _tmpl$
|
|
29090
|
-
var _tmpl$
|
|
29091
|
-
var _tmpl$
|
|
29092
|
-
var _tmpl$
|
|
29093
|
-
var _tmpl$
|
|
29382
|
+
var _tmpl$499 = /* @__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>`);
|
|
29383
|
+
var _tmpl$2140 = /* @__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`);
|
|
29384
|
+
var _tmpl$3122 = /* @__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.`);
|
|
29385
|
+
var _tmpl$4100 = /* @__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`);
|
|
29386
|
+
var _tmpl$575 = /* @__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">`);
|
|
29094
29387
|
function formatMoney2(cents) {
|
|
29095
29388
|
return `$${(cents / 100).toFixed(2)}`;
|
|
29096
29389
|
}
|
|
@@ -29128,22 +29421,22 @@ function AffiliateConversions() {
|
|
|
29128
29421
|
limit: 100
|
|
29129
29422
|
});
|
|
29130
29423
|
return (() => {
|
|
29131
|
-
var _el$ = _tmpl$
|
|
29424
|
+
var _el$ = _tmpl$2140(); _el$.firstChild;
|
|
29132
29425
|
insert(_el$, createComponent(Show, {
|
|
29133
29426
|
get when() {
|
|
29134
29427
|
return (conversions() ?? []).length > 0;
|
|
29135
29428
|
},
|
|
29136
29429
|
get fallback() {
|
|
29137
|
-
return _tmpl$
|
|
29430
|
+
return _tmpl$3122();
|
|
29138
29431
|
},
|
|
29139
29432
|
get children() {
|
|
29140
|
-
var _el$3 = _tmpl$
|
|
29433
|
+
var _el$3 = _tmpl$499(), _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;
|
|
29141
29434
|
insert(_el$10, createComponent(For, {
|
|
29142
29435
|
get each() {
|
|
29143
29436
|
return conversions();
|
|
29144
29437
|
},
|
|
29145
29438
|
children: (c) => (() => {
|
|
29146
|
-
var _el$12 = _tmpl$
|
|
29439
|
+
var _el$12 = _tmpl$575(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$16 = _el$14.nextSibling, _el$17 = _el$16.nextSibling, _el$18 = _el$17.nextSibling, _el$19 = _el$18.firstChild;
|
|
29147
29440
|
insert(_el$13, () => formatDate4(c.createdAt));
|
|
29148
29441
|
insert(_el$14, () => c.paymentType, null);
|
|
29149
29442
|
insert(_el$14, createComponent(Show, {
|
|
@@ -29151,7 +29444,7 @@ function AffiliateConversions() {
|
|
|
29151
29444
|
return c.tier === 2;
|
|
29152
29445
|
},
|
|
29153
29446
|
get children() {
|
|
29154
|
-
return _tmpl$
|
|
29447
|
+
return _tmpl$4100();
|
|
29155
29448
|
}
|
|
29156
29449
|
}), null);
|
|
29157
29450
|
insert(_el$16, () => formatMoney2(c.orderTotalCents));
|
|
@@ -29222,10 +29515,10 @@ function td() {
|
|
|
29222
29515
|
color: "var(--app-affiliate-fg)"
|
|
29223
29516
|
};
|
|
29224
29517
|
}
|
|
29225
|
-
var _tmpl$
|
|
29226
|
-
var _tmpl$
|
|
29227
|
-
var _tmpl$
|
|
29228
|
-
var _tmpl$
|
|
29518
|
+
var _tmpl$500 = /* @__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>`);
|
|
29519
|
+
var _tmpl$2141 = /* @__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.`);
|
|
29520
|
+
var _tmpl$3123 = /* @__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.`);
|
|
29521
|
+
var _tmpl$4101 = /* @__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>`);
|
|
29229
29522
|
function formatDate5(iso) {
|
|
29230
29523
|
const d = new Date(iso);
|
|
29231
29524
|
if (Number.isNaN(d.getTime())) return iso;
|
|
@@ -29258,22 +29551,22 @@ function AffiliateDownline() {
|
|
|
29258
29551
|
downline
|
|
29259
29552
|
} = useAffiliateDownline();
|
|
29260
29553
|
return (() => {
|
|
29261
|
-
var _el$ = _tmpl$
|
|
29554
|
+
var _el$ = _tmpl$2141(), _el$2 = _el$.firstChild; _el$2.nextSibling;
|
|
29262
29555
|
insert(_el$, createComponent(Show, {
|
|
29263
29556
|
get when() {
|
|
29264
29557
|
return (downline() ?? []).length > 0;
|
|
29265
29558
|
},
|
|
29266
29559
|
get fallback() {
|
|
29267
|
-
return _tmpl$
|
|
29560
|
+
return _tmpl$3123();
|
|
29268
29561
|
},
|
|
29269
29562
|
get children() {
|
|
29270
|
-
var _el$4 = _tmpl$
|
|
29563
|
+
var _el$4 = _tmpl$500(), _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;
|
|
29271
29564
|
insert(_el$10, createComponent(For, {
|
|
29272
29565
|
get each() {
|
|
29273
29566
|
return downline();
|
|
29274
29567
|
},
|
|
29275
29568
|
children: (d) => (() => {
|
|
29276
|
-
var _el$12 = _tmpl$
|
|
29569
|
+
var _el$12 = _tmpl$4101(), _el$13 = _el$12.firstChild, _el$14 = _el$13.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$15.nextSibling;
|
|
29277
29570
|
insert(_el$13, () => d.affiliateCode);
|
|
29278
29571
|
insert(_el$14, () => [d.firstName, d.lastName].filter(Boolean).join(" ") || "\u2014");
|
|
29279
29572
|
insert(_el$16, () => d.status);
|
|
@@ -29336,9 +29629,9 @@ function td2() {
|
|
|
29336
29629
|
color: "var(--app-affiliate-fg)"
|
|
29337
29630
|
};
|
|
29338
29631
|
}
|
|
29339
|
-
var _tmpl$
|
|
29340
|
-
var _tmpl$
|
|
29341
|
-
var _tmpl$
|
|
29632
|
+
var _tmpl$501 = /* @__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.`);
|
|
29633
|
+
var _tmpl$2142 = /* @__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`);
|
|
29634
|
+
var _tmpl$3124 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Your referral link will appear here once your account is approved.`);
|
|
29342
29635
|
function AffiliateReferralLink() {
|
|
29343
29636
|
const {
|
|
29344
29637
|
links
|
|
@@ -29363,16 +29656,16 @@ function AffiliateReferralLink() {
|
|
|
29363
29656
|
}
|
|
29364
29657
|
}
|
|
29365
29658
|
return (() => {
|
|
29366
|
-
var _el$ = _tmpl$
|
|
29659
|
+
var _el$ = _tmpl$2142(); _el$.firstChild;
|
|
29367
29660
|
insert(_el$, createComponent(Show, {
|
|
29368
29661
|
get when() {
|
|
29369
29662
|
return homepageLink();
|
|
29370
29663
|
},
|
|
29371
29664
|
get fallback() {
|
|
29372
|
-
return _tmpl$
|
|
29665
|
+
return _tmpl$3124();
|
|
29373
29666
|
},
|
|
29374
29667
|
get children() {
|
|
29375
|
-
var _el$3 = _tmpl$
|
|
29668
|
+
var _el$3 = _tmpl$501(), _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling; _el$5.nextSibling;
|
|
29376
29669
|
insert(_el$6, homepageLink);
|
|
29377
29670
|
_el$7.$$click = copy;
|
|
29378
29671
|
insert(_el$7, () => copied() ? "Copied" : "Copy");
|
|
@@ -29383,10 +29676,10 @@ function AffiliateReferralLink() {
|
|
|
29383
29676
|
})();
|
|
29384
29677
|
}
|
|
29385
29678
|
delegateEvents(["click"]);
|
|
29386
|
-
var _tmpl$
|
|
29387
|
-
var _tmpl$
|
|
29388
|
-
var _tmpl$
|
|
29389
|
-
var _tmpl$
|
|
29679
|
+
var _tmpl$505 = /* @__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.`);
|
|
29680
|
+
var _tmpl$2143 = /* @__PURE__ */ template(`<div style=color:var(--app-affiliate-fg-muted)>Loading\u2026`);
|
|
29681
|
+
var _tmpl$3125 = /* @__PURE__ */ template(`<div style="background:var(--app-affiliate-surface);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius);overflow:hidden">`);
|
|
29682
|
+
var _tmpl$4102 = /* @__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)>`);
|
|
29390
29683
|
var STATUS_LABEL2 = {
|
|
29391
29684
|
pending: "Pending approval",
|
|
29392
29685
|
active: "Active",
|
|
@@ -29421,22 +29714,22 @@ function AffiliateSettings() {
|
|
|
29421
29714
|
value: a.paymentEmail ?? "\u2014"
|
|
29422
29715
|
}];
|
|
29423
29716
|
return (() => {
|
|
29424
|
-
var _el$ = _tmpl$
|
|
29717
|
+
var _el$ = _tmpl$505(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild; _el$3.nextSibling;
|
|
29425
29718
|
insert(_el$, createComponent(Show, {
|
|
29426
29719
|
get when() {
|
|
29427
29720
|
return affiliate();
|
|
29428
29721
|
},
|
|
29429
29722
|
get fallback() {
|
|
29430
|
-
return _tmpl$
|
|
29723
|
+
return _tmpl$2143();
|
|
29431
29724
|
},
|
|
29432
29725
|
children: (a) => (() => {
|
|
29433
|
-
var _el$7 = _tmpl$
|
|
29726
|
+
var _el$7 = _tmpl$3125();
|
|
29434
29727
|
insert(_el$7, createComponent(For, {
|
|
29435
29728
|
get each() {
|
|
29436
29729
|
return rows(a());
|
|
29437
29730
|
},
|
|
29438
29731
|
children: (row) => (() => {
|
|
29439
|
-
var _el$8 = _tmpl$
|
|
29732
|
+
var _el$8 = _tmpl$4102(), _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling;
|
|
29440
29733
|
insert(_el$9, () => row.label);
|
|
29441
29734
|
insert(_el$0, () => row.value);
|
|
29442
29735
|
return _el$8;
|
|
@@ -29452,10 +29745,10 @@ function AffiliateSettings() {
|
|
|
29452
29745
|
delegateEvents(["click"]);
|
|
29453
29746
|
|
|
29454
29747
|
// src/pages/AffiliatePortal.tsx
|
|
29455
|
-
var _tmpl$
|
|
29456
|
-
var _tmpl$
|
|
29457
|
-
var _tmpl$
|
|
29458
|
-
var _tmpl$
|
|
29748
|
+
var _tmpl$506 = /* @__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>`);
|
|
29749
|
+
var _tmpl$2144 = /* @__PURE__ */ template(`<span style=font-size:1rem;opacity:0.7;flex-shrink:0>`);
|
|
29750
|
+
var _tmpl$3126 = /* @__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">`);
|
|
29751
|
+
var _tmpl$4103 = /* @__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); } }`);
|
|
29459
29752
|
var TAB_LABELS2 = {
|
|
29460
29753
|
overview: "Overview",
|
|
29461
29754
|
conversions: "Conversions",
|
|
@@ -29500,7 +29793,7 @@ function AffiliatePortal(props) {
|
|
|
29500
29793
|
});
|
|
29501
29794
|
},
|
|
29502
29795
|
get children() {
|
|
29503
|
-
var _el$ = _tmpl$
|
|
29796
|
+
var _el$ = _tmpl$506(), _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;
|
|
29504
29797
|
_el$3.$$click = () => setDrawerOpen(true);
|
|
29505
29798
|
insert(_el$4, () => TAB_LABELS2[currentTab()]);
|
|
29506
29799
|
_el$5.$$click = () => setDrawerOpen(false);
|
|
@@ -29509,14 +29802,14 @@ function AffiliatePortal(props) {
|
|
|
29509
29802
|
return orderedTabs();
|
|
29510
29803
|
},
|
|
29511
29804
|
children: (tab) => (() => {
|
|
29512
|
-
var _el$1 = _tmpl$
|
|
29805
|
+
var _el$1 = _tmpl$3126();
|
|
29513
29806
|
_el$1.$$click = () => handleTabClick(tab);
|
|
29514
29807
|
insert(_el$1, createComponent(Show, {
|
|
29515
29808
|
get when() {
|
|
29516
29809
|
return props.tabIcons?.[tab];
|
|
29517
29810
|
},
|
|
29518
29811
|
get children() {
|
|
29519
|
-
var _el$10 = _tmpl$
|
|
29812
|
+
var _el$10 = _tmpl$2144();
|
|
29520
29813
|
effect(() => className(_el$10, props.tabIcons[tab]));
|
|
29521
29814
|
return _el$10;
|
|
29522
29815
|
}
|
|
@@ -29598,7 +29891,7 @@ function AffiliatePortal(props) {
|
|
|
29598
29891
|
}
|
|
29599
29892
|
function AffiliateGateSpinner(props) {
|
|
29600
29893
|
return (() => {
|
|
29601
|
-
var _el$11 = _tmpl$
|
|
29894
|
+
var _el$11 = _tmpl$4103(); _el$11.firstChild;
|
|
29602
29895
|
effect((_p$) => {
|
|
29603
29896
|
var _v$8 = props.topOffset, _v$9 = `calc(100vh - ${props.topOffset})`;
|
|
29604
29897
|
_v$8 !== _p$.e && setStyleProperty(_el$11, "top", _p$.e = _v$8);
|
|
@@ -29612,11 +29905,11 @@ function AffiliateGateSpinner(props) {
|
|
|
29612
29905
|
})();
|
|
29613
29906
|
}
|
|
29614
29907
|
delegateEvents(["click"]);
|
|
29615
|
-
var _tmpl$
|
|
29908
|
+
var _tmpl$507 = /* @__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">`);
|
|
29616
29909
|
function AffiliatePasswordInput(props) {
|
|
29617
29910
|
const [visible, setVisible] = createSignal(false);
|
|
29618
29911
|
return (() => {
|
|
29619
|
-
var _el$ = _tmpl$
|
|
29912
|
+
var _el$ = _tmpl$507(), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling;
|
|
29620
29913
|
_el$2.$$input = (e) => props.onInput(e.currentTarget.value);
|
|
29621
29914
|
_el$3.$$click = () => setVisible((v) => !v);
|
|
29622
29915
|
insert(_el$3, () => visible() ? "Hide" : "Show");
|
|
@@ -29657,17 +29950,17 @@ function inputStyle() {
|
|
|
29657
29950
|
delegateEvents(["input", "click"]);
|
|
29658
29951
|
|
|
29659
29952
|
// src/pages/AffiliateRegister.tsx
|
|
29660
|
-
var _tmpl$
|
|
29661
|
-
var _tmpl$
|
|
29662
|
-
var _tmpl$
|
|
29663
|
-
var _tmpl$
|
|
29664
|
-
var _tmpl$
|
|
29665
|
-
var _tmpl$
|
|
29666
|
-
var _tmpl$
|
|
29667
|
-
var _tmpl$
|
|
29668
|
-
var _tmpl$
|
|
29669
|
-
var _tmpl$
|
|
29670
|
-
var _tmpl$
|
|
29953
|
+
var _tmpl$508 = /* @__PURE__ */ template(`<input type=text required autocomplete=given-name>`);
|
|
29954
|
+
var _tmpl$2145 = /* @__PURE__ */ template(`<input type=text required autocomplete=family-name>`);
|
|
29955
|
+
var _tmpl$3127 = /* @__PURE__ */ template(`<input type=email required autocomplete=email>`);
|
|
29956
|
+
var _tmpl$4104 = /* @__PURE__ */ template(`<input type=text required minlength=4>`);
|
|
29957
|
+
var _tmpl$576 = /* @__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">`);
|
|
29958
|
+
var _tmpl$668 = /* @__PURE__ */ template(`<button type=button>Already have an account? Log in`);
|
|
29959
|
+
var _tmpl$757 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><div style="padding:0.625rem 0.875rem;background:var(--app-affiliate-surface-light);border:1px solid var(--app-affiliate-border);border-radius:var(--app-affiliate-radius-sm);font-size:0.8125rem;line-height:1.5;color:var(--app-affiliate-fg-muted)">A customer's purchase earns you commission only if they reached the site through your referral link \u2014 the site address with <code>?ref=</code> appended:<div style=font-weight:600;word-break:break-all;margin-top:0.25rem;color:var(--app-affiliate-fg)>/?ref=</div>Make sure any marketing materials use that full link for tracking, not just the website address itself.</div><button type=submit style="padding:0.75rem 1rem;background:var(--app-affiliate-primary);color:var(--app-affiliate-primary-fg);border:none;border-radius:var(--app-affiliate-radius-sm);font-weight:600">`);
|
|
29960
|
+
var _tmpl$849 = /* @__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:28rem;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"><div><h1 style="font-family:var(--app-affiliate-font-display);margin:0 0 0.5rem;font-size:1.5rem">Become an affiliate</h1><p style=margin:0;color:var(--app-affiliate-fg-muted);font-size:0.875rem>New applications are reviewed by an admin before activation.`);
|
|
29961
|
+
var _tmpl$946 = /* @__PURE__ */ template(`<div style=padding:1rem;background:var(--app-affiliate-success-bg);color:var(--app-affiliate-success-fg);border-radius:var(--app-affiliate-radius-sm);font-size:0.875rem>Thanks \u2014 we received your application. You'll be able to log in once it's approved.`);
|
|
29962
|
+
var _tmpl$042 = /* @__PURE__ */ template(`<span style=font-size:0.75rem;color:var(--app-affiliate-fg-subtle)>`);
|
|
29963
|
+
var _tmpl$1145 = /* @__PURE__ */ template(`<label style=display:flex;flex-direction:column;gap:0.35rem><span style=font-size:0.75rem;text-transform:uppercase;letter-spacing:0.05em;color:var(--app-affiliate-fg-muted)>`);
|
|
29671
29964
|
function AffiliateRegister(props) {
|
|
29672
29965
|
const [firstName, setFirstName] = createSignal("");
|
|
29673
29966
|
const [lastName, setLastName] = createSignal("");
|
|
@@ -29698,21 +29991,21 @@ function AffiliateRegister(props) {
|
|
|
29698
29991
|
}
|
|
29699
29992
|
}
|
|
29700
29993
|
return (() => {
|
|
29701
|
-
var _el$ = _tmpl$
|
|
29994
|
+
var _el$ = _tmpl$849(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild; _el$4.nextSibling;
|
|
29702
29995
|
insert(_el$2, createComponent(Show, {
|
|
29703
29996
|
get when() {
|
|
29704
29997
|
return !submitted();
|
|
29705
29998
|
},
|
|
29706
29999
|
get fallback() {
|
|
29707
|
-
return _tmpl$
|
|
30000
|
+
return _tmpl$946();
|
|
29708
30001
|
},
|
|
29709
30002
|
get children() {
|
|
29710
|
-
var _el$6 = _tmpl$
|
|
30003
|
+
var _el$6 = _tmpl$757(), _el$1 = _el$6.firstChild, _el$10 = _el$1.firstChild, _el$12 = _el$10.nextSibling; _el$12.firstChild; var _el$14 = _el$12.nextSibling, _el$15 = _el$14.nextSibling, _el$16 = _el$15.firstChild, _el$18 = _el$1.nextSibling;
|
|
29711
30004
|
_el$6.addEventListener("submit", handleSubmit);
|
|
29712
30005
|
insert(_el$6, createComponent(Row2, {
|
|
29713
30006
|
label: "First name",
|
|
29714
30007
|
get children() {
|
|
29715
|
-
var _el$7 = _tmpl$
|
|
30008
|
+
var _el$7 = _tmpl$508();
|
|
29716
30009
|
_el$7.$$input = (e) => setFirstName(e.currentTarget.value);
|
|
29717
30010
|
effect((_$p) => style(_el$7, inputStyle2(), _$p));
|
|
29718
30011
|
effect(() => _el$7.value = firstName());
|
|
@@ -29722,7 +30015,7 @@ function AffiliateRegister(props) {
|
|
|
29722
30015
|
insert(_el$6, createComponent(Row2, {
|
|
29723
30016
|
label: "Last name",
|
|
29724
30017
|
get children() {
|
|
29725
|
-
var _el$8 = _tmpl$
|
|
30018
|
+
var _el$8 = _tmpl$2145();
|
|
29726
30019
|
_el$8.$$input = (e) => setLastName(e.currentTarget.value);
|
|
29727
30020
|
effect((_$p) => style(_el$8, inputStyle2(), _$p));
|
|
29728
30021
|
effect(() => _el$8.value = lastName());
|
|
@@ -29732,7 +30025,7 @@ function AffiliateRegister(props) {
|
|
|
29732
30025
|
insert(_el$6, createComponent(Row2, {
|
|
29733
30026
|
label: "Email",
|
|
29734
30027
|
get children() {
|
|
29735
|
-
var _el$9 = _tmpl$
|
|
30028
|
+
var _el$9 = _tmpl$3127();
|
|
29736
30029
|
_el$9.$$input = (e) => setEmail(e.currentTarget.value);
|
|
29737
30030
|
effect((_$p) => style(_el$9, inputStyle2(), _$p));
|
|
29738
30031
|
effect(() => _el$9.value = email());
|
|
@@ -29758,7 +30051,7 @@ function AffiliateRegister(props) {
|
|
|
29758
30051
|
label: "Affiliate code",
|
|
29759
30052
|
hint: "The handle in your referral URL (4+ characters)",
|
|
29760
30053
|
get children() {
|
|
29761
|
-
var _el$0 = _tmpl$
|
|
30054
|
+
var _el$0 = _tmpl$4104();
|
|
29762
30055
|
_el$0.$$input = (e) => setAffiliateCode(e.currentTarget.value);
|
|
29763
30056
|
effect((_$p) => style(_el$0, inputStyle2(), _$p));
|
|
29764
30057
|
effect(() => _el$0.value = affiliateCode());
|
|
@@ -29773,7 +30066,7 @@ function AffiliateRegister(props) {
|
|
|
29773
30066
|
return error();
|
|
29774
30067
|
},
|
|
29775
30068
|
get children() {
|
|
29776
|
-
var _el$17 = _tmpl$
|
|
30069
|
+
var _el$17 = _tmpl$576();
|
|
29777
30070
|
insert(_el$17, error);
|
|
29778
30071
|
return _el$17;
|
|
29779
30072
|
}
|
|
@@ -29784,7 +30077,7 @@ function AffiliateRegister(props) {
|
|
|
29784
30077
|
return props.onNavigateLogin;
|
|
29785
30078
|
},
|
|
29786
30079
|
get children() {
|
|
29787
|
-
var _el$19 = _tmpl$
|
|
30080
|
+
var _el$19 = _tmpl$668();
|
|
29788
30081
|
_el$19.$$click = () => props.onNavigateLogin?.();
|
|
29789
30082
|
effect((_$p) => style(_el$19, linkStyle(), _$p));
|
|
29790
30083
|
return _el$19;
|
|
@@ -29809,7 +30102,7 @@ function AffiliateRegister(props) {
|
|
|
29809
30102
|
}
|
|
29810
30103
|
function Row2(props) {
|
|
29811
30104
|
return (() => {
|
|
29812
|
-
var _el$21 = _tmpl$
|
|
30105
|
+
var _el$21 = _tmpl$1145(), _el$22 = _el$21.firstChild;
|
|
29813
30106
|
insert(_el$22, () => props.label);
|
|
29814
30107
|
insert(_el$21, () => props.children, null);
|
|
29815
30108
|
insert(_el$21, createComponent(Show, {
|
|
@@ -29817,7 +30110,7 @@ function Row2(props) {
|
|
|
29817
30110
|
return props.hint;
|
|
29818
30111
|
},
|
|
29819
30112
|
get children() {
|
|
29820
|
-
var _el$23 = _tmpl$
|
|
30113
|
+
var _el$23 = _tmpl$042();
|
|
29821
30114
|
insert(_el$23, () => props.hint);
|
|
29822
30115
|
return _el$23;
|
|
29823
30116
|
}
|
|
@@ -29851,10 +30144,10 @@ function linkStyle() {
|
|
|
29851
30144
|
};
|
|
29852
30145
|
}
|
|
29853
30146
|
delegateEvents(["input", "click"]);
|
|
29854
|
-
var _tmpl$
|
|
29855
|
-
var _tmpl$
|
|
29856
|
-
var _tmpl$
|
|
29857
|
-
var _tmpl$
|
|
30147
|
+
var _tmpl$509 = /* @__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">`);
|
|
30148
|
+
var _tmpl$2146 = /* @__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?`);
|
|
30149
|
+
var _tmpl$3128 = /* @__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`);
|
|
30150
|
+
var _tmpl$4105 = /* @__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">`);
|
|
29858
30151
|
function AffiliateLogin(props) {
|
|
29859
30152
|
const [email, setEmail] = createSignal("");
|
|
29860
30153
|
const [password, setPassword] = createSignal("");
|
|
@@ -29874,7 +30167,7 @@ function AffiliateLogin(props) {
|
|
|
29874
30167
|
}
|
|
29875
30168
|
}
|
|
29876
30169
|
return (() => {
|
|
29877
|
-
var _el$ = _tmpl$
|
|
30170
|
+
var _el$ = _tmpl$4105(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$1 = _el$8.nextSibling;
|
|
29878
30171
|
_el$4.addEventListener("submit", handleSubmit);
|
|
29879
30172
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
29880
30173
|
insert(_el$8, createComponent(AffiliatePasswordInput, {
|
|
@@ -29890,7 +30183,7 @@ function AffiliateLogin(props) {
|
|
|
29890
30183
|
return error();
|
|
29891
30184
|
},
|
|
29892
30185
|
get children() {
|
|
29893
|
-
var _el$0 = _tmpl$
|
|
30186
|
+
var _el$0 = _tmpl$509();
|
|
29894
30187
|
insert(_el$0, error);
|
|
29895
30188
|
return _el$0;
|
|
29896
30189
|
}
|
|
@@ -29901,7 +30194,7 @@ function AffiliateLogin(props) {
|
|
|
29901
30194
|
return props.onNavigateForgotPassword;
|
|
29902
30195
|
},
|
|
29903
30196
|
get children() {
|
|
29904
|
-
var _el$10 = _tmpl$
|
|
30197
|
+
var _el$10 = _tmpl$2146();
|
|
29905
30198
|
_el$10.$$click = () => props.onNavigateForgotPassword?.();
|
|
29906
30199
|
return _el$10;
|
|
29907
30200
|
}
|
|
@@ -29911,7 +30204,7 @@ function AffiliateLogin(props) {
|
|
|
29911
30204
|
return props.onNavigateRegister;
|
|
29912
30205
|
},
|
|
29913
30206
|
get children() {
|
|
29914
|
-
var _el$11 = _tmpl$
|
|
30207
|
+
var _el$11 = _tmpl$3128();
|
|
29915
30208
|
_el$11.$$click = () => props.onNavigateRegister?.();
|
|
29916
30209
|
return _el$11;
|
|
29917
30210
|
}
|
|
@@ -29959,12 +30252,12 @@ function inputStyle3() {
|
|
|
29959
30252
|
};
|
|
29960
30253
|
}
|
|
29961
30254
|
delegateEvents(["input", "click"]);
|
|
29962
|
-
var _tmpl$
|
|
29963
|
-
var _tmpl$
|
|
29964
|
-
var _tmpl$
|
|
29965
|
-
var _tmpl$
|
|
29966
|
-
var _tmpl$
|
|
29967
|
-
var _tmpl$
|
|
30255
|
+
var _tmpl$577 = /* @__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">`);
|
|
30256
|
+
var _tmpl$2147 = /* @__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">`);
|
|
30257
|
+
var _tmpl$3129 = /* @__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`);
|
|
30258
|
+
var _tmpl$4106 = /* @__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">`);
|
|
30259
|
+
var _tmpl$578 = /* @__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.`);
|
|
30260
|
+
var _tmpl$669 = /* @__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`);
|
|
29968
30261
|
function ForgotPasswordPage(props) {
|
|
29969
30262
|
const [email, setEmail] = createSignal("");
|
|
29970
30263
|
const [submitting, setSubmitting] = createSignal(false);
|
|
@@ -29987,29 +30280,29 @@ function ForgotPasswordPage(props) {
|
|
|
29987
30280
|
}
|
|
29988
30281
|
}
|
|
29989
30282
|
return (() => {
|
|
29990
|
-
var _el$ = _tmpl$
|
|
30283
|
+
var _el$ = _tmpl$3129(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
29991
30284
|
insert(_el$2, createComponent(Show, {
|
|
29992
30285
|
get when() {
|
|
29993
30286
|
return !message();
|
|
29994
30287
|
},
|
|
29995
30288
|
get fallback() {
|
|
29996
30289
|
return [(() => {
|
|
29997
|
-
var _el$0 = _tmpl$
|
|
30290
|
+
var _el$0 = _tmpl$4106();
|
|
29998
30291
|
insert(_el$0, message);
|
|
29999
30292
|
return _el$0;
|
|
30000
|
-
})(), _tmpl$
|
|
30293
|
+
})(), _tmpl$578(), createComponent(Show, {
|
|
30001
30294
|
get when() {
|
|
30002
30295
|
return props.onDone;
|
|
30003
30296
|
},
|
|
30004
30297
|
get children() {
|
|
30005
|
-
var _el$10 = _tmpl$
|
|
30298
|
+
var _el$10 = _tmpl$669();
|
|
30006
30299
|
_el$10.$$click = () => props.onDone?.();
|
|
30007
30300
|
return _el$10;
|
|
30008
30301
|
}
|
|
30009
30302
|
})];
|
|
30010
30303
|
},
|
|
30011
30304
|
get children() {
|
|
30012
|
-
var _el$4 = _tmpl$
|
|
30305
|
+
var _el$4 = _tmpl$2147(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
|
|
30013
30306
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30014
30307
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
30015
30308
|
insert(_el$4, createComponent(Show, {
|
|
@@ -30017,7 +30310,7 @@ function ForgotPasswordPage(props) {
|
|
|
30017
30310
|
return error();
|
|
30018
30311
|
},
|
|
30019
30312
|
get children() {
|
|
30020
|
-
var _el$8 = _tmpl$
|
|
30313
|
+
var _el$8 = _tmpl$577();
|
|
30021
30314
|
insert(_el$8, error);
|
|
30022
30315
|
return _el$8;
|
|
30023
30316
|
}
|
|
@@ -30067,10 +30360,10 @@ function inputStyle4() {
|
|
|
30067
30360
|
};
|
|
30068
30361
|
}
|
|
30069
30362
|
delegateEvents(["input", "click"]);
|
|
30070
|
-
var _tmpl$
|
|
30071
|
-
var _tmpl$
|
|
30072
|
-
var _tmpl$
|
|
30073
|
-
var _tmpl$
|
|
30363
|
+
var _tmpl$579 = /* @__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">`);
|
|
30364
|
+
var _tmpl$2148 = /* @__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">`);
|
|
30365
|
+
var _tmpl$3130 = /* @__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`);
|
|
30366
|
+
var _tmpl$4107 = /* @__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">`);
|
|
30074
30367
|
function queryParam(name) {
|
|
30075
30368
|
if (typeof window === "undefined") return "";
|
|
30076
30369
|
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
@@ -30110,20 +30403,20 @@ function ResetPasswordPage(props) {
|
|
|
30110
30403
|
}
|
|
30111
30404
|
}
|
|
30112
30405
|
return (() => {
|
|
30113
|
-
var _el$ = _tmpl$
|
|
30406
|
+
var _el$ = _tmpl$3130(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
30114
30407
|
insert(_el$2, createComponent(Show, {
|
|
30115
30408
|
get when() {
|
|
30116
30409
|
return !message();
|
|
30117
30410
|
},
|
|
30118
30411
|
get fallback() {
|
|
30119
30412
|
return (() => {
|
|
30120
|
-
var _el$11 = _tmpl$
|
|
30413
|
+
var _el$11 = _tmpl$4107();
|
|
30121
30414
|
insert(_el$11, message);
|
|
30122
30415
|
return _el$11;
|
|
30123
30416
|
})();
|
|
30124
30417
|
},
|
|
30125
30418
|
get children() {
|
|
30126
|
-
var _el$4 = _tmpl$
|
|
30419
|
+
var _el$4 = _tmpl$2148(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
|
|
30127
30420
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30128
30421
|
_el$7.$$input = (e) => setPassword(e.currentTarget.value);
|
|
30129
30422
|
_el$0.$$input = (e) => setConfirm(e.currentTarget.value);
|
|
@@ -30132,7 +30425,7 @@ function ResetPasswordPage(props) {
|
|
|
30132
30425
|
return error();
|
|
30133
30426
|
},
|
|
30134
30427
|
get children() {
|
|
30135
|
-
var _el$1 = _tmpl$
|
|
30428
|
+
var _el$1 = _tmpl$579();
|
|
30136
30429
|
insert(_el$1, error);
|
|
30137
30430
|
return _el$1;
|
|
30138
30431
|
}
|
|
@@ -30187,11 +30480,136 @@ function inputStyle5() {
|
|
|
30187
30480
|
};
|
|
30188
30481
|
}
|
|
30189
30482
|
delegateEvents(["input"]);
|
|
30190
|
-
var _tmpl$
|
|
30191
|
-
var _tmpl$
|
|
30192
|
-
var _tmpl$
|
|
30193
|
-
var _tmpl$
|
|
30194
|
-
|
|
30483
|
+
var _tmpl$580 = /* @__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">`);
|
|
30484
|
+
var _tmpl$2149 = /* @__PURE__ */ template(`<form style=display:flex;flex-direction:column;gap:0.875rem><label style=display:flex;flex-direction:column;gap:0.35rem><span>Choose a 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">`);
|
|
30485
|
+
var _tmpl$3131 = /* @__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>Accept your admin invite`);
|
|
30486
|
+
var _tmpl$4108 = /* @__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">`);
|
|
30487
|
+
function queryParam2(name) {
|
|
30488
|
+
if (typeof window === "undefined") return "";
|
|
30489
|
+
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
30490
|
+
}
|
|
30491
|
+
var MIN_PASSWORD_LENGTH = 8;
|
|
30492
|
+
function AcceptAdminInvitePage(props) {
|
|
30493
|
+
const token = () => props.token ?? queryParam2("token");
|
|
30494
|
+
const email = () => props.email ?? queryParam2("email");
|
|
30495
|
+
const [password, setPassword] = createSignal("");
|
|
30496
|
+
const [confirm2, setConfirm] = createSignal("");
|
|
30497
|
+
const [submitting, setSubmitting] = createSignal(false);
|
|
30498
|
+
const [error, setError] = createSignal(null);
|
|
30499
|
+
const [message, setMessage] = createSignal(null);
|
|
30500
|
+
async function handleSubmit(e) {
|
|
30501
|
+
e.preventDefault();
|
|
30502
|
+
setError(null);
|
|
30503
|
+
if (!token() || !email()) {
|
|
30504
|
+
setError("This invite link is incomplete. Ask the person who invited you to send a new one.");
|
|
30505
|
+
return;
|
|
30506
|
+
}
|
|
30507
|
+
if (password().length < MIN_PASSWORD_LENGTH) {
|
|
30508
|
+
setError(`Use at least ${MIN_PASSWORD_LENGTH} characters.`);
|
|
30509
|
+
return;
|
|
30510
|
+
}
|
|
30511
|
+
if (password() !== confirm2()) {
|
|
30512
|
+
setError("Passwords do not match.");
|
|
30513
|
+
return;
|
|
30514
|
+
}
|
|
30515
|
+
setSubmitting(true);
|
|
30516
|
+
try {
|
|
30517
|
+
await authApi.acceptAdminInvite({
|
|
30518
|
+
email: email().trim().toLowerCase(),
|
|
30519
|
+
token: token(),
|
|
30520
|
+
password: password()
|
|
30521
|
+
});
|
|
30522
|
+
setMessage("You\u2019re all set. Sign in with this email and your new password.");
|
|
30523
|
+
props.onSuccess?.();
|
|
30524
|
+
} catch (err) {
|
|
30525
|
+
setError(err instanceof Error ? err.message : "Something went wrong");
|
|
30526
|
+
} finally {
|
|
30527
|
+
setSubmitting(false);
|
|
30528
|
+
}
|
|
30529
|
+
}
|
|
30530
|
+
return (() => {
|
|
30531
|
+
var _el$ = _tmpl$3131(), _el$2 = _el$.firstChild; _el$2.firstChild;
|
|
30532
|
+
insert(_el$2, createComponent(Show, {
|
|
30533
|
+
get when() {
|
|
30534
|
+
return !message();
|
|
30535
|
+
},
|
|
30536
|
+
get fallback() {
|
|
30537
|
+
return (() => {
|
|
30538
|
+
var _el$11 = _tmpl$4108();
|
|
30539
|
+
insert(_el$11, message);
|
|
30540
|
+
return _el$11;
|
|
30541
|
+
})();
|
|
30542
|
+
},
|
|
30543
|
+
get children() {
|
|
30544
|
+
var _el$4 = _tmpl$2149(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.nextSibling, _el$10 = _el$8.nextSibling;
|
|
30545
|
+
_el$4.addEventListener("submit", handleSubmit);
|
|
30546
|
+
_el$7.$$input = (e) => setPassword(e.currentTarget.value);
|
|
30547
|
+
_el$0.$$input = (e) => setConfirm(e.currentTarget.value);
|
|
30548
|
+
insert(_el$4, createComponent(Show, {
|
|
30549
|
+
get when() {
|
|
30550
|
+
return error();
|
|
30551
|
+
},
|
|
30552
|
+
get children() {
|
|
30553
|
+
var _el$1 = _tmpl$580();
|
|
30554
|
+
insert(_el$1, error);
|
|
30555
|
+
return _el$1;
|
|
30556
|
+
}
|
|
30557
|
+
}), _el$10);
|
|
30558
|
+
insert(_el$10, () => submitting() ? "Saving\u2026" : "Accept invite");
|
|
30559
|
+
effect((_p$) => {
|
|
30560
|
+
var _v$ = labelStyle4(), _v$2 = inputStyle6(), _v$3 = labelStyle4(), _v$4 = inputStyle6(), _v$5 = submitting(), _v$6 = submitting() ? "not-allowed" : "pointer", _v$7 = submitting() ? 0.7 : 1;
|
|
30561
|
+
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30562
|
+
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30563
|
+
_p$.a = style(_el$9, _v$3, _p$.a);
|
|
30564
|
+
_p$.o = style(_el$0, _v$4, _p$.o);
|
|
30565
|
+
_v$5 !== _p$.i && (_el$10.disabled = _p$.i = _v$5);
|
|
30566
|
+
_v$6 !== _p$.n && setStyleProperty(_el$10, "cursor", _p$.n = _v$6);
|
|
30567
|
+
_v$7 !== _p$.s && setStyleProperty(_el$10, "opacity", _p$.s = _v$7);
|
|
30568
|
+
return _p$;
|
|
30569
|
+
}, {
|
|
30570
|
+
e: void 0,
|
|
30571
|
+
t: void 0,
|
|
30572
|
+
a: void 0,
|
|
30573
|
+
o: void 0,
|
|
30574
|
+
i: void 0,
|
|
30575
|
+
n: void 0,
|
|
30576
|
+
s: void 0
|
|
30577
|
+
});
|
|
30578
|
+
effect(() => _el$7.value = password());
|
|
30579
|
+
effect(() => _el$0.value = confirm2());
|
|
30580
|
+
return _el$4;
|
|
30581
|
+
}
|
|
30582
|
+
}), null);
|
|
30583
|
+
return _el$;
|
|
30584
|
+
})();
|
|
30585
|
+
}
|
|
30586
|
+
function labelStyle4() {
|
|
30587
|
+
return {
|
|
30588
|
+
"font-size": "0.75rem",
|
|
30589
|
+
"text-transform": "uppercase",
|
|
30590
|
+
"letter-spacing": "0.05em",
|
|
30591
|
+
color: "var(--app-affiliate-fg-muted)"
|
|
30592
|
+
};
|
|
30593
|
+
}
|
|
30594
|
+
function inputStyle6() {
|
|
30595
|
+
return {
|
|
30596
|
+
width: "100%",
|
|
30597
|
+
padding: "0.625rem 0.75rem",
|
|
30598
|
+
background: "var(--app-affiliate-surface-light)",
|
|
30599
|
+
color: "var(--app-affiliate-fg)",
|
|
30600
|
+
border: "1px solid var(--app-affiliate-border)",
|
|
30601
|
+
"border-radius": "var(--app-affiliate-radius-sm)",
|
|
30602
|
+
"font-size": "0.9rem",
|
|
30603
|
+
"font-family": "inherit",
|
|
30604
|
+
"box-sizing": "border-box"
|
|
30605
|
+
};
|
|
30606
|
+
}
|
|
30607
|
+
delegateEvents(["input"]);
|
|
30608
|
+
var _tmpl$581 = /* @__PURE__ */ template(`<div>`);
|
|
30609
|
+
var _tmpl$2150 = /* @__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>`);
|
|
30610
|
+
var _tmpl$3132 = /* @__PURE__ */ template(`<button type=button>Back to login`);
|
|
30611
|
+
var _tmpl$4109 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Reset your password`);
|
|
30612
|
+
var _tmpl$584 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>`);
|
|
30195
30613
|
function AffiliateForgotPassword(props) {
|
|
30196
30614
|
const [email, setEmail] = createSignal("");
|
|
30197
30615
|
const [submitting, setSubmitting] = createSignal(false);
|
|
@@ -30214,20 +30632,20 @@ function AffiliateForgotPassword(props) {
|
|
|
30214
30632
|
}
|
|
30215
30633
|
}
|
|
30216
30634
|
return (() => {
|
|
30217
|
-
var _el$ = _tmpl$
|
|
30635
|
+
var _el$ = _tmpl$4109(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
30218
30636
|
insert(_el$2, createComponent(Show, {
|
|
30219
30637
|
get when() {
|
|
30220
30638
|
return !message();
|
|
30221
30639
|
},
|
|
30222
30640
|
get fallback() {
|
|
30223
30641
|
return (() => {
|
|
30224
|
-
var _el$1 = _tmpl$
|
|
30642
|
+
var _el$1 = _tmpl$584();
|
|
30225
30643
|
insert(_el$1, message);
|
|
30226
30644
|
return _el$1;
|
|
30227
30645
|
})();
|
|
30228
30646
|
},
|
|
30229
30647
|
get children() {
|
|
30230
|
-
var _el$4 = _tmpl$
|
|
30648
|
+
var _el$4 = _tmpl$2150(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.nextSibling, _el$9 = _el$5.nextSibling;
|
|
30231
30649
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30232
30650
|
_el$7.$$input = (e) => setEmail(e.currentTarget.value);
|
|
30233
30651
|
insert(_el$4, createComponent(Show, {
|
|
@@ -30235,7 +30653,7 @@ function AffiliateForgotPassword(props) {
|
|
|
30235
30653
|
return error();
|
|
30236
30654
|
},
|
|
30237
30655
|
get children() {
|
|
30238
|
-
var _el$8 = _tmpl$
|
|
30656
|
+
var _el$8 = _tmpl$581();
|
|
30239
30657
|
insert(_el$8, error);
|
|
30240
30658
|
effect((_$p) => style(_el$8, errorStyle(), _$p));
|
|
30241
30659
|
return _el$8;
|
|
@@ -30243,7 +30661,7 @@ function AffiliateForgotPassword(props) {
|
|
|
30243
30661
|
}), _el$9);
|
|
30244
30662
|
insert(_el$9, () => submitting() ? "Sending\u2026" : "Send reset link");
|
|
30245
30663
|
effect((_p$) => {
|
|
30246
|
-
var _v$ =
|
|
30664
|
+
var _v$ = labelStyle5(), _v$2 = inputStyle7(), _v$3 = submitting(), _v$4 = primaryButtonStyle(submitting());
|
|
30247
30665
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30248
30666
|
_p$.t = style(_el$7, _v$2, _p$.t);
|
|
30249
30667
|
_v$3 !== _p$.a && (_el$9.disabled = _p$.a = _v$3);
|
|
@@ -30264,7 +30682,7 @@ function AffiliateForgotPassword(props) {
|
|
|
30264
30682
|
return props.onNavigateLogin;
|
|
30265
30683
|
},
|
|
30266
30684
|
get children() {
|
|
30267
|
-
var _el$0 = _tmpl$
|
|
30685
|
+
var _el$0 = _tmpl$3132();
|
|
30268
30686
|
_el$0.$$click = () => props.onNavigateLogin?.();
|
|
30269
30687
|
effect((_$p) => style(_el$0, linkStyle2(), _$p));
|
|
30270
30688
|
return _el$0;
|
|
@@ -30315,7 +30733,7 @@ function headingStyle() {
|
|
|
30315
30733
|
"font-size": "1.5rem"
|
|
30316
30734
|
};
|
|
30317
30735
|
}
|
|
30318
|
-
function
|
|
30736
|
+
function labelStyle5() {
|
|
30319
30737
|
return {
|
|
30320
30738
|
"font-size": "0.75rem",
|
|
30321
30739
|
"text-transform": "uppercase",
|
|
@@ -30323,7 +30741,7 @@ function labelStyle4() {
|
|
|
30323
30741
|
color: "var(--app-affiliate-fg-muted)"
|
|
30324
30742
|
};
|
|
30325
30743
|
}
|
|
30326
|
-
function
|
|
30744
|
+
function inputStyle7() {
|
|
30327
30745
|
return {
|
|
30328
30746
|
width: "100%",
|
|
30329
30747
|
padding: "0.625rem 0.75rem",
|
|
@@ -30370,17 +30788,17 @@ function linkStyle2() {
|
|
|
30370
30788
|
};
|
|
30371
30789
|
}
|
|
30372
30790
|
delegateEvents(["input", "click"]);
|
|
30373
|
-
var _tmpl$
|
|
30374
|
-
var _tmpl$
|
|
30375
|
-
var _tmpl$
|
|
30376
|
-
var _tmpl$
|
|
30377
|
-
function
|
|
30791
|
+
var _tmpl$585 = /* @__PURE__ */ template(`<div>`);
|
|
30792
|
+
var _tmpl$2151 = /* @__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>`);
|
|
30793
|
+
var _tmpl$3133 = /* @__PURE__ */ template(`<div class=app-affiliate-root><div><h1>Choose a new password`);
|
|
30794
|
+
var _tmpl$4115 = /* @__PURE__ */ template(`<p style=margin:0;font-size:0.9rem>Your password has been reset. You can now log in with your new password.`);
|
|
30795
|
+
function queryParam3(name) {
|
|
30378
30796
|
if (typeof window === "undefined") return "";
|
|
30379
30797
|
return new URLSearchParams(window.location.search).get(name) ?? "";
|
|
30380
30798
|
}
|
|
30381
30799
|
function AffiliateResetPassword(props) {
|
|
30382
|
-
const token = () => props.token ??
|
|
30383
|
-
const email = () => props.email ??
|
|
30800
|
+
const token = () => props.token ?? queryParam3("token");
|
|
30801
|
+
const email = () => props.email ?? queryParam3("email");
|
|
30384
30802
|
const [password, setPassword] = createSignal("");
|
|
30385
30803
|
const [confirm2, setConfirm] = createSignal("");
|
|
30386
30804
|
const [submitting, setSubmitting] = createSignal(false);
|
|
@@ -30417,16 +30835,16 @@ function AffiliateResetPassword(props) {
|
|
|
30417
30835
|
}
|
|
30418
30836
|
}
|
|
30419
30837
|
return (() => {
|
|
30420
|
-
var _el$ = _tmpl$
|
|
30838
|
+
var _el$ = _tmpl$3133(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
30421
30839
|
insert(_el$2, createComponent(Show, {
|
|
30422
30840
|
get when() {
|
|
30423
30841
|
return !done();
|
|
30424
30842
|
},
|
|
30425
30843
|
get fallback() {
|
|
30426
|
-
return _tmpl$
|
|
30844
|
+
return _tmpl$4115();
|
|
30427
30845
|
},
|
|
30428
30846
|
get children() {
|
|
30429
|
-
var _el$4 = _tmpl$
|
|
30847
|
+
var _el$4 = _tmpl$2151(), _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$5.nextSibling, _el$8 = _el$7.firstChild, _el$0 = _el$7.nextSibling;
|
|
30430
30848
|
_el$4.addEventListener("submit", handleSubmit);
|
|
30431
30849
|
insert(_el$5, createComponent(AffiliatePasswordInput, {
|
|
30432
30850
|
required: true,
|
|
@@ -30451,7 +30869,7 @@ function AffiliateResetPassword(props) {
|
|
|
30451
30869
|
return error();
|
|
30452
30870
|
},
|
|
30453
30871
|
get children() {
|
|
30454
|
-
var _el$9 = _tmpl$
|
|
30872
|
+
var _el$9 = _tmpl$585();
|
|
30455
30873
|
insert(_el$9, error);
|
|
30456
30874
|
effect((_$p) => style(_el$9, errorStyle2(), _$p));
|
|
30457
30875
|
return _el$9;
|
|
@@ -30459,7 +30877,7 @@ function AffiliateResetPassword(props) {
|
|
|
30459
30877
|
}), _el$0);
|
|
30460
30878
|
insert(_el$0, () => submitting() ? "Saving\u2026" : "Set new password");
|
|
30461
30879
|
effect((_p$) => {
|
|
30462
|
-
var _v$ =
|
|
30880
|
+
var _v$ = labelStyle6(), _v$2 = labelStyle6(), _v$3 = submitting(), _v$4 = primaryButtonStyle2(submitting());
|
|
30463
30881
|
_p$.e = style(_el$6, _v$, _p$.e);
|
|
30464
30882
|
_p$.t = style(_el$8, _v$2, _p$.t);
|
|
30465
30883
|
_v$3 !== _p$.a && (_el$0.disabled = _p$.a = _v$3);
|
|
@@ -30519,7 +30937,7 @@ function headingStyle2() {
|
|
|
30519
30937
|
"font-size": "1.5rem"
|
|
30520
30938
|
};
|
|
30521
30939
|
}
|
|
30522
|
-
function
|
|
30940
|
+
function labelStyle6() {
|
|
30523
30941
|
return {
|
|
30524
30942
|
"font-size": "0.75rem",
|
|
30525
30943
|
"text-transform": "uppercase",
|
|
@@ -30549,6 +30967,6 @@ function primaryButtonStyle2(submitting) {
|
|
|
30549
30967
|
};
|
|
30550
30968
|
}
|
|
30551
30969
|
|
|
30552
|
-
export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
|
|
30553
|
-
//# sourceMappingURL=
|
|
30554
|
-
//# sourceMappingURL=
|
|
30970
|
+
export { ADMIN_TAB_SEGMENTS, AFFILIATE_SUB_TAB_SEGMENTS, AcceptAdminInvitePage, AddressFields, AdminDashboard, AffiliateForgotPassword, AffiliateLogin, AffiliatePortal, AffiliateRegister, AffiliateResetPassword, CartCheckoutPage, CheckoutPage, EmailTemplates, ForgotPasswordPage, MemberPortal, PatientDashboardPreview, RegisterPage, ResetPasswordPage, SignupPage, SubscribePage, SurveyPage, SurveyV2Page, UpdatePaymentMethod, adminTabFromPath, adminTabPath, affiliateSubTabFromPath, affiliateSubTabPath };
|
|
30971
|
+
//# sourceMappingURL=ERW2WNI6.js.map
|
|
30972
|
+
//# sourceMappingURL=ERW2WNI6.js.map
|