@mindbill/react 0.46.0 → 0.47.0

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/dist/index.js CHANGED
@@ -8,7 +8,7 @@ function organizationProfileOptions(profile) {
8
8
  label: provider.name,
9
9
  value: {
10
10
  name: provider.name,
11
- taxId: provider.taxId,
11
+ ...provider.taxIdType === "SSN" ? { savedProviderId: provider.id, taxIdType: "SSN", taxIdLast4: provider.taxIdLast4 ?? "" } : { taxId: provider.taxId ?? "", taxIdType: "EIN" },
12
12
  npi: provider.npi,
13
13
  ...provider.phone !== void 0 ? { phone: provider.phone } : {},
14
14
  address: { line1: provider.billingStreet ?? "", city: provider.billingCity ?? "", state: provider.billingState ?? "", postalCode: provider.billingZip ?? "" }
@@ -591,7 +591,7 @@ function BillReviewForm({
591
591
  if (!adjFormatValid) result.push("Valid WCAB / ADJ number");
592
592
  if (data.bill.billingMode === "med_legal" && !draft.dos) result.push("Date of service");
593
593
  if (!draft.billingProvider.name.trim()) result.push("Practice name");
594
- if (!draft.billingProvider.taxId.trim()) result.push("Tax ID");
594
+ if (!draft.billingProvider.taxId.trim() && !(draft.billingProvider.taxIdType === "SSN" && draft.billingProvider.taxIdConfigured)) result.push("Tax ID");
595
595
  if (!draft.billingProvider.npi.trim()) result.push("Billing NPI");
596
596
  if (!draft.clinician.name.trim() || !draft.clinician.npi.trim()) result.push("Clinician and NPI");
597
597
  if (![draft.location.name, draft.location.street, draft.location.city, draft.location.state, draft.location.zip].every((value) => value.trim())) result.push("Service location");
@@ -812,7 +812,14 @@ function BillReviewForm({
812
812
  ] }) }),
813
813
  /* @__PURE__ */ jsxs("div", { className: "mb-native-grid three", children: [
814
814
  /* @__PURE__ */ jsx(Field, { label: "Practice name", required: true, disabled: !editable, value: draft.billingProvider.name, onChange: (value) => updateBillingProvider("name", value) }),
815
- /* @__PURE__ */ jsx(Field, { label: "Tax ID", required: true, disabled: !editable, value: draft.billingProvider.taxId, onChange: (value) => updateBillingProvider("taxId", value) }),
815
+ /* @__PURE__ */ jsxs("label", { className: "mb-native-field", children: [
816
+ /* @__PURE__ */ jsx("span", { children: "Tax ID type" }),
817
+ /* @__PURE__ */ jsxs("select", { disabled: !editable, value: draft.billingProvider.taxIdType ?? "EIN", onChange: (event) => setDraft((current) => ({ ...current, billingProvider: { ...current.billingProvider, taxIdType: event.target.value, taxId: "", taxIdConfigured: false, taxIdLast4: "" } })), children: [
818
+ /* @__PURE__ */ jsx("option", { value: "EIN", children: "EIN (business)" }),
819
+ /* @__PURE__ */ jsx("option", { value: "SSN", children: "SSN (individual)" })
820
+ ] })
821
+ ] }),
822
+ /* @__PURE__ */ jsx(Field, { label: "Tax ID", type: draft.billingProvider.taxIdType === "SSN" ? "password" : "text", required: !(draft.billingProvider.taxIdType === "SSN" && draft.billingProvider.taxIdConfigured), disabled: !editable, value: draft.billingProvider.taxId, ...draft.billingProvider.taxIdType === "SSN" && draft.billingProvider.taxIdConfigured ? { hint: `Saved SSN ending in ${draft.billingProvider.taxIdLast4 ?? "\u2022\u2022\u2022\u2022"}. Leave blank to keep this bill's saved number.` } : {}, onChange: (value) => updateBillingProvider("taxId", value) }),
816
823
  /* @__PURE__ */ jsx(Field, { label: "Billing NPI", required: true, disabled: !editable, value: draft.billingProvider.npi, onChange: (value) => updateBillingProvider("npi", value) }),
817
824
  /* @__PURE__ */ jsx(Field, { label: "Phone", optional: true, disabled: !editable, value: draft.billingProvider.phone || "", onChange: (value) => updateBillingProvider("phone", value) }),
818
825
  /* @__PURE__ */ jsx(Field, { label: "Billing street", required: true, disabled: !editable, value: draft.billingProvider.billingStreet || "", onChange: (value) => updateBillingProvider("billingStreet", value) }),
@@ -2382,14 +2389,16 @@ function validateBillSubmission(bill) {
2382
2389
  required("claim.dateOfInjury", bill.claim.dateOfInjury, "Enter the date of injury.");
2383
2390
  required("claim.claimsAdministrator", bill.claim.claimsAdministrator?.name, "Select a claims administrator so MindBill can route this bill.");
2384
2391
  required("service.date", bill.service.date, "Enter the date of service.");
2385
- required("billingProvider.name", bill.billingProvider?.name, "Enter the billing provider name.");
2386
- required("billingProvider.taxId", bill.billingProvider?.taxId, "Enter the billing provider Tax ID (EIN or SSN).");
2387
- required("billingProvider.npi", bill.billingProvider?.npi, "Enter the billing provider NPI.");
2388
- required("billingProvider.phone", bill.billingProvider?.phone, "Enter the billing provider phone number.");
2389
- required("billingProvider.address.line1", bill.billingProvider?.address?.line1, "Enter the billing provider street address.");
2390
- required("billingProvider.address.city", bill.billingProvider?.address?.city, "Enter the billing provider city.");
2391
- required("billingProvider.address.state", bill.billingProvider?.address?.state, "Enter the billing provider 2-letter state code.");
2392
- required("billingProvider.address.postalCode", bill.billingProvider?.address?.postalCode, "Enter the billing provider ZIP code.");
2392
+ if (!bill.billingProvider?.savedProviderId?.trim() && !bill.billingProvider?.sourceBillId?.trim()) {
2393
+ required("billingProvider.name", bill.billingProvider?.name, "Enter the billing provider name.");
2394
+ required("billingProvider.taxId", bill.billingProvider?.taxId, "Enter the billing provider Tax ID (EIN or SSN).");
2395
+ required("billingProvider.npi", bill.billingProvider?.npi, "Enter the billing provider NPI.");
2396
+ required("billingProvider.phone", bill.billingProvider?.phone, "Enter the billing provider phone number.");
2397
+ required("billingProvider.address.line1", bill.billingProvider?.address?.line1, "Enter the billing provider street address.");
2398
+ required("billingProvider.address.city", bill.billingProvider?.address?.city, "Enter the billing provider city.");
2399
+ required("billingProvider.address.state", bill.billingProvider?.address?.state, "Enter the billing provider 2-letter state code.");
2400
+ required("billingProvider.address.postalCode", bill.billingProvider?.address?.postalCode, "Enter the billing provider ZIP code.");
2401
+ }
2393
2402
  required("renderingProvider.name", bill.renderingProvider?.name, "Enter the rendering provider name.");
2394
2403
  required("renderingProvider.npi", bill.renderingProvider?.npi, "Enter the rendering provider NPI.");
2395
2404
  required("renderingProvider.taxonomy", bill.renderingProvider?.taxonomy, "Enter the rendering provider taxonomy code.");
@@ -2410,11 +2419,11 @@ function validateBillSubmission(bill) {
2410
2419
  if (bill.patient.dateOfBirth && !parseBillSubmissionDate(bill.patient.dateOfBirth)) errors["patient.dateOfBirth"] = "Use MM/DD/YYYY";
2411
2420
  if (bill.claim.dateOfInjury && !parseBillSubmissionDate(bill.claim.dateOfInjury)) errors["claim.dateOfInjury"] = "Use MM/DD/YYYY";
2412
2421
  if (bill.patient.address.state.trim().length !== 2) errors["patient.address.state"] = "Use a 2-letter state code";
2413
- if (bill.billingProvider?.address?.state && bill.billingProvider.address.state.trim().length !== 2) errors["billingProvider.address.state"] = "Use a 2-letter state code.";
2422
+ if (!bill.billingProvider?.savedProviderId && !bill.billingProvider?.sourceBillId && bill.billingProvider?.address?.state && bill.billingProvider.address.state.trim().length !== 2) errors["billingProvider.address.state"] = "Use a 2-letter state code.";
2414
2423
  if (bill.serviceLocation?.address?.state && bill.serviceLocation.address.state.trim().length !== 2) errors["serviceLocation.address.state"] = "Use a 2-letter state code.";
2415
2424
  const digits = (value) => value?.replace(/\D/g, "") ?? "";
2416
- if (bill.billingProvider?.taxId && digits(bill.billingProvider.taxId).length !== 9) errors["billingProvider.taxId"] = "Enter a valid 9-digit EIN or SSN.";
2417
- if (bill.billingProvider?.npi && !/^\d{10}$/.test(digits(bill.billingProvider.npi))) errors["billingProvider.npi"] = "Enter a valid 10-digit NPI.";
2425
+ if (!bill.billingProvider?.savedProviderId && !bill.billingProvider?.sourceBillId && bill.billingProvider?.taxId && digits(bill.billingProvider.taxId).length !== 9) errors["billingProvider.taxId"] = "Enter a valid 9-digit EIN or SSN.";
2426
+ if (!bill.billingProvider?.savedProviderId && !bill.billingProvider?.sourceBillId && bill.billingProvider?.npi && !/^\d{10}$/.test(digits(bill.billingProvider.npi))) errors["billingProvider.npi"] = "Enter a valid 10-digit NPI.";
2418
2427
  if (bill.renderingProvider?.npi && !/^\d{10}$/.test(digits(bill.renderingProvider.npi))) errors["renderingProvider.npi"] = "Enter a valid 10-digit NPI.";
2419
2428
  if (bill.renderingProvider?.taxonomy && !/^[A-Za-z0-9]{10}$/.test(bill.renderingProvider.taxonomy.trim())) errors["renderingProvider.taxonomy"] = "Enter a valid 10-character taxonomy code.";
2420
2429
  if (bill.serviceLocation?.placeOfServiceCode && !/^\d{2}$/.test(bill.serviceLocation.placeOfServiceCode.trim())) errors["serviceLocation.placeOfServiceCode"] = "Enter a valid 2-digit place of service code.";
@@ -2930,6 +2939,8 @@ function BillSubmissionForm({
2930
2939
  const administrator2 = clean.claim.claimsAdministrator;
2931
2940
  const complete = {
2932
2941
  ...clean,
2942
+ ...clean.billingProvider?.savedProviderId ? { billingProvider: { savedProviderId: clean.billingProvider.savedProviderId } } : {},
2943
+ ...clean.billingProvider?.sourceBillId ? { billingProvider: { sourceBillId: clean.billingProvider.sourceBillId } } : {},
2933
2944
  claim: {
2934
2945
  ...clean.claim,
2935
2946
  ...administrator2 ? { claimsAdministrator: submittedClaimsAdministrator(administrator2) } : {}
@@ -3169,15 +3180,39 @@ function BillSubmissionForm({
3169
3180
  }, style: { cursor: "pointer", marginBottom: 12 }, children: "Review or edit provider details" }),
3170
3181
  /* @__PURE__ */ jsxs5("div", { className: "mbsf-grid", children: [
3171
3182
  /* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Billing provider" }),
3172
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.name", label: "Billing provider name", required: true, error: errors["billingProvider.name"], children: text(bill.billingProvider?.name, (name) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, name } }))) }),
3173
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.taxId", label: "Tax ID (EIN / SSN)", required: true, error: errors["billingProvider.taxId"], children: text(bill.billingProvider?.taxId, (taxId) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, taxId } })), { inputMode: "numeric" }) }),
3174
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.npi", label: "Billing provider NPI", required: true, error: errors["billingProvider.npi"], children: text(bill.billingProvider?.npi, (npi) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
3175
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.phone", label: "Billing provider phone", required: true, error: errors["billingProvider.phone"], children: text(bill.billingProvider?.phone, (phone) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, phone } })), { type: "tel" }) }),
3176
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.line1", label: "Billing address line 1", required: true, span: true, error: errors["billingProvider.address.line1"], children: text(bill.billingProvider?.address?.line1, (line1) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1, line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
3177
- /* @__PURE__ */ jsx5(Field2, { label: "Billing address line 2 (optional)", span: true, children: text(bill.billingProvider?.address?.line2, (line2) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2, city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
3178
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.city", label: "Billing city", required: true, error: errors["billingProvider.address.city"], children: text(bill.billingProvider?.address?.city, (city) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city, state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
3179
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.state", label: "Billing state", required: true, error: errors["billingProvider.address.state"], children: text(bill.billingProvider?.address?.state, (state) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: state.toUpperCase(), postalCode: c.billingProvider?.address?.postalCode ?? "" } } })), { maxLength: 2 }) }),
3180
- /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.postalCode", label: "Billing ZIP", required: true, error: errors["billingProvider.address.postalCode"], children: text(bill.billingProvider?.address?.postalCode, (postalCode) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode } } }))) }),
3183
+ bill.billingProvider?.savedProviderId || bill.billingProvider?.sourceBillId ? /* @__PURE__ */ jsxs5("div", { className: "mbsf-span", children: [
3184
+ /* @__PURE__ */ jsxs5("p", { children: [
3185
+ "Using ",
3186
+ bill.billingProvider.sourceBillId ? "this bill\u2019s original" : "saved",
3187
+ " billing provider: ",
3188
+ bill.billingProvider.name,
3189
+ ". SSN ending in ",
3190
+ bill.billingProvider.taxIdLast4 || "\u2022\u2022\u2022\u2022",
3191
+ " stays on MindBill\u2019s server."
3192
+ ] }),
3193
+ /* @__PURE__ */ jsx5("button", { type: "button", className: "mbsf-secondary", disabled: locked, onClick: () => setBill((c) => {
3194
+ const billingProvider = { ...c.billingProvider, taxIdType: "EIN", taxId: "" };
3195
+ delete billingProvider.savedProviderId;
3196
+ delete billingProvider.sourceBillId;
3197
+ delete billingProvider.taxIdLast4;
3198
+ return { ...c, billingProvider };
3199
+ }), children: "Enter different billing provider details" })
3200
+ ] }) : null,
3201
+ /* @__PURE__ */ jsxs5("fieldset", { disabled: locked || Boolean(bill.billingProvider?.savedProviderId || bill.billingProvider?.sourceBillId), style: { display: "contents" }, children: [
3202
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.name", label: "Billing provider name", required: true, error: errors["billingProvider.name"], children: text(bill.billingProvider?.name, (name) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, name } }))) }),
3203
+ /* @__PURE__ */ jsx5(Field2, { label: "Tax ID type", children: /* @__PURE__ */ jsxs5("select", { className: "mbsf-select", value: bill.billingProvider?.taxIdType ?? "EIN", onChange: (event) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, taxIdType: event.target.value, taxId: "" } })), children: [
3204
+ /* @__PURE__ */ jsx5("option", { value: "EIN", children: "EIN (business)" }),
3205
+ /* @__PURE__ */ jsx5("option", { value: "SSN", children: "SSN (individual)" })
3206
+ ] }) }),
3207
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.taxId", label: bill.billingProvider?.taxIdType === "SSN" ? "SSN" : "EIN", required: true, error: errors["billingProvider.taxId"], children: /* @__PURE__ */ jsx5("input", { className: "mbsf-input", autoComplete: "off", type: bill.billingProvider?.taxIdType === "SSN" ? "password" : "text", inputMode: "numeric", value: bill.billingProvider?.taxId ?? "", onChange: (event) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, taxId: event.target.value } })) }) }),
3208
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.npi", label: "Billing provider NPI", required: true, error: errors["billingProvider.npi"], children: text(bill.billingProvider?.npi, (npi) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
3209
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.phone", label: "Billing provider phone", required: true, error: errors["billingProvider.phone"], children: text(bill.billingProvider?.phone, (phone) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, phone } })), { type: "tel" }) }),
3210
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.line1", label: "Billing address line 1", required: true, span: true, error: errors["billingProvider.address.line1"], children: text(bill.billingProvider?.address?.line1, (line1) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1, line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
3211
+ /* @__PURE__ */ jsx5(Field2, { label: "Billing address line 2 (optional)", span: true, children: text(bill.billingProvider?.address?.line2, (line2) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2, city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
3212
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.city", label: "Billing city", required: true, error: errors["billingProvider.address.city"], children: text(bill.billingProvider?.address?.city, (city) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city, state: c.billingProvider?.address?.state ?? "", postalCode: c.billingProvider?.address?.postalCode ?? "" } } }))) }),
3213
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.state", label: "Billing state", required: true, error: errors["billingProvider.address.state"], children: text(bill.billingProvider?.address?.state, (state) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: state.toUpperCase(), postalCode: c.billingProvider?.address?.postalCode ?? "" } } })), { maxLength: 2 }) }),
3214
+ /* @__PURE__ */ jsx5(Field2, { path: "billingProvider.address.postalCode", label: "Billing ZIP", required: true, error: errors["billingProvider.address.postalCode"], children: text(bill.billingProvider?.address?.postalCode, (postalCode) => setBill((c) => ({ ...c, billingProvider: { ...c.billingProvider, address: { line1: c.billingProvider?.address?.line1 ?? "", line2: c.billingProvider?.address?.line2 ?? "", city: c.billingProvider?.address?.city ?? "", state: c.billingProvider?.address?.state ?? "", postalCode } } }))) })
3215
+ ] }),
3181
3216
  /* @__PURE__ */ jsx5("h4", { className: "mbsf-subhead", children: "Rendering provider" }),
3182
3217
  /* @__PURE__ */ jsx5(Field2, { path: "renderingProvider.name", label: "Rendering provider name", required: true, error: errors["renderingProvider.name"], children: text(bill.renderingProvider?.name, (name) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, name } }))) }),
3183
3218
  /* @__PURE__ */ jsx5(Field2, { path: "renderingProvider.npi", label: "Rendering provider NPI", required: true, error: errors["renderingProvider.npi"], children: text(bill.renderingProvider?.npi, (npi) => setBill((c) => ({ ...c, renderingProvider: { ...c.renderingProvider, npi } })), { inputMode: "numeric", maxLength: 10 }) }),
@@ -4496,7 +4531,38 @@ import { useCallback as useCallback2, useEffect as useEffect7, useId as useId2,
4496
4531
  import {
4497
4532
  createOrganizationClient
4498
4533
  } from "@mindbill/browser";
4534
+
4535
+ // src/tax-id-input.tsx
4536
+ import { organizationTaxIdWrite } from "@mindbill/browser";
4499
4537
  import { Fragment as Fragment9, jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
4538
+ function TaxIdInput({ label, value, onChange, disabled }) {
4539
+ const saved = value.taxIdType === "SSN" && value.taxIdConfigured;
4540
+ return /* @__PURE__ */ jsxs11("div", { className: "mbob-field mbob-tax-id", children: [
4541
+ /* @__PURE__ */ jsxs11("label", { children: [
4542
+ label,
4543
+ " type",
4544
+ /* @__PURE__ */ jsxs11("select", { disabled, value: value.taxIdType ?? "EIN", onChange: (event) => onChange({ taxIdType: event.target.value, taxId: "", taxIdConfigured: false, taxIdLast4: "" }), children: [
4545
+ /* @__PURE__ */ jsx11("option", { value: "EIN", children: "EIN (business)" }),
4546
+ /* @__PURE__ */ jsx11("option", { value: "SSN", children: "SSN (individual)" })
4547
+ ] })
4548
+ ] }),
4549
+ /* @__PURE__ */ jsxs11("label", { children: [
4550
+ label,
4551
+ /* @__PURE__ */ jsx11("input", { disabled, autoComplete: "off", inputMode: "numeric", type: value.taxIdType === "SSN" ? "password" : "text", value: value.taxId ?? "", placeholder: saved ? "Leave blank to keep saved SSN" : "", onChange: (event) => onChange({ taxId: event.target.value }) })
4552
+ ] }),
4553
+ saved ? /* @__PURE__ */ jsxs11(Fragment9, { children: [
4554
+ /* @__PURE__ */ jsxs11("small", { children: [
4555
+ "Saved SSN ending in ",
4556
+ value.taxIdLast4 ?? "\u2022\u2022\u2022\u2022",
4557
+ ". The full number is not returned to your browser."
4558
+ ] }),
4559
+ /* @__PURE__ */ jsx11("button", { type: "button", disabled, onClick: () => onChange({ taxId: "", taxIdConfigured: false, taxIdLast4: "" }), children: "Clear saved SSN on save" })
4560
+ ] }) : null
4561
+ ] });
4562
+ }
4563
+
4564
+ // src/organization-onboarding.tsx
4565
+ import { Fragment as Fragment10, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
4500
4566
  var STEPS = [
4501
4567
  { id: "practice", label: "Practice & billing" },
4502
4568
  { id: "rendering", label: "Rendering providers" },
@@ -4512,7 +4578,8 @@ var css9 = `
4512
4578
  .mbob-step{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--mb-border);border-radius:999px;background:var(--mb-surface);padding:7px 13px;color:var(--mb-muted);font:inherit;font-size:13px;font-weight:700;cursor:pointer}
4513
4579
  .mbob-step[data-active=true]{border-color:var(--mb-accent);color:var(--mb-accent);background:color-mix(in srgb,var(--mb-accent) 8%,var(--mb-surface))}
4514
4580
  .mbob-step[data-done=true] i{color:var(--mb-success);font-style:normal}
4515
- .mbob-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 22px}.mbob-span{grid-column:1/-1}
4581
+ .mbob-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px 22px;align-items:start}.mbob-span{grid-column:1/-1}
4582
+ .mbob-tax-id label{display:grid;gap:7px}.mbob-tax-id small{color:var(--mb-muted);font-weight:450;line-height:1.5}.mbob-tax-id button{justify-self:start;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-surface);color:var(--mb-text);padding:8px 10px;font:inherit;cursor:pointer}
4516
4583
  .mbob-field{display:grid;gap:7px;font-size:13px;font-weight:720}
4517
4584
  .mbob-field input,.mbob-field select{width:100%;min-height:44px;border:1px solid var(--mb-border);border-radius:var(--mb-control-radius);background:var(--mb-input);padding:10px 12px;color:var(--mb-text);font:inherit;font-weight:450}
4518
4585
  .mbob-field input:focus{outline:3px solid color-mix(in srgb,var(--mb-accent) 22%,transparent);border-color:var(--mb-accent)}
@@ -4587,7 +4654,10 @@ function OrganizationOnboarding({
4587
4654
  setIdentity((current) => ({
4588
4655
  name: next.practiceIdentity.name ?? current.name,
4589
4656
  legalName: next.practiceIdentity.legalName ?? current.legalName,
4590
- taxId: next.practiceIdentity.taxId ?? current.taxId,
4657
+ taxId: next.practiceIdentity.taxId ?? "",
4658
+ taxIdType: next.practiceIdentity.taxIdType ?? "EIN",
4659
+ taxIdLast4: next.practiceIdentity.taxIdLast4 ?? "",
4660
+ taxIdConfigured: next.practiceIdentity.taxIdConfigured ?? false,
4591
4661
  npi: next.practiceIdentity.npi ?? current.npi,
4592
4662
  phone: next.practiceIdentity.phone ?? current.phone,
4593
4663
  email: next.practiceIdentity.email ?? current.email
@@ -4639,12 +4709,9 @@ function OrganizationOnboarding({
4639
4709
  }
4640
4710
  };
4641
4711
  const savePractice = () => run(() => {
4642
- if ([identity.taxId, provider.taxId].some((value) => /^\d{3}-\d{2}-\d{4}$/.test(value.trim()))) {
4643
- throw new Error("Saved organization profiles support EINs only. Do not enter an SSN.");
4644
- }
4645
4712
  return client.saveBillingProfile({
4646
- practiceIdentity: identity,
4647
- ...provider.name.trim() || provider.taxId.trim() || provider.npi.trim() ? { billingProviders: [provider] } : {}
4713
+ practiceIdentity: organizationTaxIdWrite(identity),
4714
+ ...provider.name.trim() || provider.taxId?.trim() || provider.npi.trim() ? { billingProviders: [organizationTaxIdWrite(provider)] } : {}
4648
4715
  });
4649
4716
  }, "practice");
4650
4717
  const saveLocations = () => run(() => client.saveLocations(locations.filter((item) => item.name.trim() || item.street.trim())), "locations");
@@ -4652,35 +4719,35 @@ function OrganizationOnboarding({
4652
4719
  if (!w9File) throw new Error("Choose the practice W-9 PDF first.");
4653
4720
  return client.saveW9({ filename: w9File.name, contentBase64: await fileToBase64(w9File) });
4654
4721
  }, "w9");
4655
- const field = (label, value, onChange, span = false, placeholder = "") => /* @__PURE__ */ jsxs11("label", { className: `mbob-field${span ? " mbob-span" : ""}`, children: [
4722
+ const field = (label, value, onChange, span = false, placeholder = "") => /* @__PURE__ */ jsxs12("label", { className: `mbob-field${span ? " mbob-span" : ""}`, children: [
4656
4723
  label,
4657
- /* @__PURE__ */ jsx11("input", { value, placeholder, onChange: (event) => onChange(event.target.value), disabled: saving })
4724
+ /* @__PURE__ */ jsx12("input", { value, placeholder, onChange: (event) => onChange(event.target.value), disabled: saving })
4658
4725
  ] });
4659
4726
  const setLocation = (index, patch) => setLocations((current) => current.map((item, itemIndex) => {
4660
4727
  if (itemIndex !== index) return patch.isPrimary ? { ...item, isPrimary: false } : item;
4661
4728
  return { ...item, ...patch };
4662
4729
  }));
4663
- const practiceSection = /* @__PURE__ */ jsxs11("div", { children: [
4664
- /* @__PURE__ */ jsx11("p", { className: "mbob-status", children: "Save business EINs only. Do not enter an SSN; saved personal tax IDs are not supported by this settings flow." }),
4665
- /* @__PURE__ */ jsxs11("div", { className: "mbob-grid", children: [
4730
+ const practiceSection = /* @__PURE__ */ jsxs12("div", { children: [
4731
+ /* @__PURE__ */ jsx12("p", { className: "mbob-status", children: "Choose EIN for a business or SSN for an individual. Saved SSNs are encrypted and shown only by their last four digits." }),
4732
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-grid", children: [
4666
4733
  field("Practice name", identity.name, (name) => setIdentity((c) => ({ ...c, name }))),
4667
4734
  field("Legal name", identity.legalName, (legalName) => setIdentity((c) => ({ ...c, legalName }))),
4668
- field("Tax ID (EIN)", identity.taxId, (taxId) => setIdentity((c) => ({ ...c, taxId })), false, "94-1234567"),
4735
+ /* @__PURE__ */ jsx12(TaxIdInput, { label: "Practice tax ID", value: identity, disabled: saving, onChange: (patch) => setIdentity((c) => ({ ...c, ...patch })) }),
4669
4736
  field("Group NPI", identity.npi, (npi) => setIdentity((c) => ({ ...c, npi }))),
4670
4737
  field("Phone", identity.phone, (phone) => setIdentity((c) => ({ ...c, phone }))),
4671
4738
  field("Email", identity.email, (email) => setIdentity((c) => ({ ...c, email })))
4672
4739
  ] }),
4673
- /* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Billing provider (pay-to)" }),
4674
- /* @__PURE__ */ jsxs11("label", { className: "mbob-field", children: [
4740
+ /* @__PURE__ */ jsx12("h3", { className: "mbob-subhead", children: "Billing provider (pay-to)" }),
4741
+ /* @__PURE__ */ jsxs12("label", { className: "mbob-field", children: [
4675
4742
  "Saved billing provider",
4676
- /* @__PURE__ */ jsxs11("select", { disabled: saving, value: provider.id ?? "", onChange: (event) => setProvider({ ...profile?.billingProviders.find((item) => item.id === event.target.value) ?? { name: "", taxId: "", npi: "" } }), children: [
4677
- /* @__PURE__ */ jsx11("option", { value: "", children: "Add a billing provider" }),
4678
- profile?.billingProviders.map((item) => /* @__PURE__ */ jsx11("option", { value: item.id, children: item.name }, item.id))
4743
+ /* @__PURE__ */ jsxs12("select", { disabled: saving, value: provider.id ?? "", onChange: (event) => setProvider({ ...profile?.billingProviders.find((item) => item.id === event.target.value) ?? { name: "", taxId: "", npi: "" } }), children: [
4744
+ /* @__PURE__ */ jsx12("option", { value: "", children: "Add a billing provider" }),
4745
+ profile?.billingProviders.map((item) => /* @__PURE__ */ jsx12("option", { value: item.id, children: item.name }, item.id))
4679
4746
  ] })
4680
4747
  ] }),
4681
- /* @__PURE__ */ jsxs11("div", { className: "mbob-grid", children: [
4748
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-grid", children: [
4682
4749
  field("Billing provider name", provider.name, (name) => setProvider((c) => ({ ...c, name }))),
4683
- field("Billing tax ID (EIN only)", provider.taxId, (taxId) => setProvider((c) => ({ ...c, taxId }))),
4750
+ /* @__PURE__ */ jsx12(TaxIdInput, { label: "Billing tax ID", value: provider, disabled: saving, onChange: (patch) => setProvider((c) => ({ ...c, ...patch })) }),
4684
4751
  field("Billing NPI", provider.npi, (npi) => setProvider((c) => ({ ...c, npi }))),
4685
4752
  field("Billing phone", provider.phone ?? "", (phone) => setProvider((c) => ({ ...c, phone }))),
4686
4753
  field("Street", provider.billingStreet ?? "", (billingStreet) => setProvider((c) => ({ ...c, billingStreet })), true),
@@ -4688,119 +4755,119 @@ function OrganizationOnboarding({
4688
4755
  field("State", provider.billingState ?? "", (billingState) => setProvider((c) => ({ ...c, billingState: billingState.toUpperCase().slice(0, 2) }))),
4689
4756
  field("ZIP", provider.billingZip ?? "", (billingZip) => setProvider((c) => ({ ...c, billingZip })))
4690
4757
  ] }),
4691
- /* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
4692
- /* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["practice"] ? "Saved to MindBill." : "Saved once, used on every bill." }),
4693
- /* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving, onClick: savePractice, children: saving ? "Saving\u2026" : "Save practice" })
4758
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-actions", children: [
4759
+ /* @__PURE__ */ jsx12("span", { className: "mbob-status", children: savedStep["practice"] ? "Saved to MindBill." : "Saved once, used on every bill." }),
4760
+ /* @__PURE__ */ jsx12("button", { className: "mbob-save", type: "button", disabled: saving, onClick: savePractice, children: saving ? "Saving\u2026" : "Save practice" })
4694
4761
  ] })
4695
4762
  ] });
4696
- const renderingSection = /* @__PURE__ */ jsxs11("div", { children: [
4697
- /* @__PURE__ */ jsxs11("label", { className: "mbob-field", children: [
4763
+ const renderingSection = /* @__PURE__ */ jsxs12("div", { children: [
4764
+ /* @__PURE__ */ jsxs12("label", { className: "mbob-field", children: [
4698
4765
  "Saved rendering provider",
4699
- /* @__PURE__ */ jsxs11("select", { disabled: saving, value: rendering.id ?? "", onChange: (event) => setRendering({ ...profile?.renderingProviders?.find((item) => item.id === event.target.value) ?? blankRendering() }), children: [
4700
- /* @__PURE__ */ jsx11("option", { value: "", children: "Add a rendering provider" }),
4701
- profile?.renderingProviders?.map((item) => /* @__PURE__ */ jsxs11("option", { value: item.id, children: [
4766
+ /* @__PURE__ */ jsxs12("select", { disabled: saving, value: rendering.id ?? "", onChange: (event) => setRendering({ ...profile?.renderingProviders?.find((item) => item.id === event.target.value) ?? blankRendering() }), children: [
4767
+ /* @__PURE__ */ jsx12("option", { value: "", children: "Add a rendering provider" }),
4768
+ profile?.renderingProviders?.map((item) => /* @__PURE__ */ jsxs12("option", { value: item.id, children: [
4702
4769
  item.name,
4703
4770
  item.active === false ? " (inactive)" : ""
4704
4771
  ] }, item.id))
4705
4772
  ] })
4706
4773
  ] }),
4707
- /* @__PURE__ */ jsxs11("div", { className: "mbob-grid", style: { marginTop: 16 }, children: [
4774
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-grid", style: { marginTop: 16 }, children: [
4708
4775
  field("Rendering provider name", rendering.name, (name) => setRendering((c) => ({ ...c, name }))),
4709
4776
  field("Rendering NPI", rendering.npi, (npi) => setRendering((c) => ({ ...c, npi }))),
4710
4777
  field("Taxonomy", rendering.taxonomy ?? "", (taxonomy) => setRendering((c) => ({ ...c, taxonomy }))),
4711
4778
  field("Specialty", rendering.specialty ?? "", (specialty) => setRendering((c) => ({ ...c, specialty }))),
4712
4779
  field("License number", rendering.licenseNumber ?? "", (licenseNumber) => setRendering((c) => ({ ...c, licenseNumber }))),
4713
4780
  field("License state", rendering.licenseState ?? "", (licenseState) => setRendering((c) => ({ ...c, licenseState: licenseState.toUpperCase().slice(0, 2) }))),
4714
- /* @__PURE__ */ jsxs11("label", { children: [
4715
- /* @__PURE__ */ jsx11("input", { disabled: saving, type: "checkbox", checked: rendering.active !== false, onChange: (event) => setRendering((c) => ({ ...c, active: event.target.checked })) }),
4781
+ /* @__PURE__ */ jsxs12("label", { children: [
4782
+ /* @__PURE__ */ jsx12("input", { disabled: saving, type: "checkbox", checked: rendering.active !== false, onChange: (event) => setRendering((c) => ({ ...c, active: event.target.checked })) }),
4716
4783
  " Available for new bills"
4717
4784
  ] })
4718
4785
  ] }),
4719
- /* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
4720
- /* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["rendering"] ? "Saved to MindBill." : "Saved profiles do not change previously submitted bills." }),
4721
- /* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving || !rendering.name.trim(), onClick: () => run(() => client.saveBillingProfile({ renderingProviders: [rendering] }), "rendering"), children: saving ? "Saving\u2026" : "Save rendering provider" })
4786
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-actions", children: [
4787
+ /* @__PURE__ */ jsx12("span", { className: "mbob-status", children: savedStep["rendering"] ? "Saved to MindBill." : "Saved profiles do not change previously submitted bills." }),
4788
+ /* @__PURE__ */ jsx12("button", { className: "mbob-save", type: "button", disabled: saving || !rendering.name.trim(), onClick: () => run(() => client.saveBillingProfile({ renderingProviders: [rendering] }), "rendering"), children: saving ? "Saving\u2026" : "Save rendering provider" })
4722
4789
  ] })
4723
4790
  ] });
4724
- const locationsSection = /* @__PURE__ */ jsxs11("div", { children: [
4725
- locations.map((location, index) => /* @__PURE__ */ jsxs11("div", { className: "mbob-loc", children: [
4791
+ const locationsSection = /* @__PURE__ */ jsxs12("div", { children: [
4792
+ locations.map((location, index) => /* @__PURE__ */ jsxs12("div", { className: "mbob-loc", children: [
4726
4793
  field("Name", location.name ?? "", (name) => setLocation(index, { name })),
4727
4794
  field("Street", location.street, (street) => setLocation(index, { street })),
4728
4795
  field("City", location.city, (city) => setLocation(index, { city })),
4729
4796
  field("State", location.state, (state) => setLocation(index, { state: state.toUpperCase().slice(0, 2) })),
4730
4797
  field("ZIP", location.zip, (zip) => setLocation(index, { zip })),
4731
4798
  field("Place of service code", location.posCode ?? "", (posCode) => setLocation(index, { posCode }), false, "11"),
4732
- /* @__PURE__ */ jsxs11("label", { className: "mbob-primary", children: [
4733
- /* @__PURE__ */ jsx11("input", { disabled: saving || location.active === false, type: "radio", name: primaryGroup, checked: location.isPrimary === true, onChange: () => setLocation(index, { isPrimary: true }) }),
4799
+ /* @__PURE__ */ jsxs12("label", { className: "mbob-primary", children: [
4800
+ /* @__PURE__ */ jsx12("input", { disabled: saving || location.active === false, type: "radio", name: primaryGroup, checked: location.isPrimary === true, onChange: () => setLocation(index, { isPrimary: true }) }),
4734
4801
  " Primary"
4735
4802
  ] }),
4736
- location.id ? /* @__PURE__ */ jsx11("button", { className: "mbob-secondary", disabled: saving, type: "button", onClick: () => setLocation(index, { active: location.active === false, ...location.active !== false ? { isPrimary: false } : {} }), children: location.active === false ? "Restore" : "Archive" }) : /* @__PURE__ */ jsx11("button", { className: "mbob-remove", disabled: saving, type: "button", "aria-label": "Remove location", onClick: () => setLocations((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "\xD7" })
4803
+ location.id ? /* @__PURE__ */ jsx12("button", { className: "mbob-secondary", disabled: saving, type: "button", onClick: () => setLocation(index, { active: location.active === false, ...location.active !== false ? { isPrimary: false } : {} }), children: location.active === false ? "Restore" : "Archive" }) : /* @__PURE__ */ jsx12("button", { className: "mbob-remove", disabled: saving, type: "button", "aria-label": "Remove location", onClick: () => setLocations((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "\xD7" })
4737
4804
  ] }, location.id ?? index)),
4738
- /* @__PURE__ */ jsx11("button", { className: "mbob-add", type: "button", onClick: () => setLocations((current) => [...current, blankLocation()]), children: "+ Add location" }),
4739
- /* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
4740
- /* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["locations"] ? "Saved to MindBill." : "Where evaluations happen." }),
4741
- /* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving, onClick: saveLocations, children: saving ? "Saving\u2026" : "Save locations" })
4805
+ /* @__PURE__ */ jsx12("button", { className: "mbob-add", type: "button", onClick: () => setLocations((current) => [...current, blankLocation()]), children: "+ Add location" }),
4806
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-actions", children: [
4807
+ /* @__PURE__ */ jsx12("span", { className: "mbob-status", children: savedStep["locations"] ? "Saved to MindBill." : "Where evaluations happen." }),
4808
+ /* @__PURE__ */ jsx12("button", { className: "mbob-save", type: "button", disabled: saving, onClick: saveLocations, children: saving ? "Saving\u2026" : "Save locations" })
4742
4809
  ] })
4743
4810
  ] });
4744
- const w9Section = /* @__PURE__ */ jsxs11("div", { children: [
4745
- profile?.w9 ? /* @__PURE__ */ jsxs11("div", { className: "mbob-w9-current", children: [
4746
- /* @__PURE__ */ jsxs11("div", { children: [
4747
- /* @__PURE__ */ jsx11("strong", { children: profile.w9.filename }),
4748
- /* @__PURE__ */ jsxs11("span", { children: [
4811
+ const w9Section = /* @__PURE__ */ jsxs12("div", { children: [
4812
+ profile?.w9 ? /* @__PURE__ */ jsxs12("div", { className: "mbob-w9-current", children: [
4813
+ /* @__PURE__ */ jsxs12("div", { children: [
4814
+ /* @__PURE__ */ jsx12("strong", { children: profile.w9.filename }),
4815
+ /* @__PURE__ */ jsxs12("span", { children: [
4749
4816
  " \xB7 added ",
4750
4817
  profile.w9.addDate
4751
4818
  ] })
4752
4819
  ] }),
4753
- /* @__PURE__ */ jsx11("span", { children: "Rides on every bill automatically" })
4820
+ /* @__PURE__ */ jsx12("span", { children: "Rides on every bill automatically" })
4754
4821
  ] }) : null,
4755
- /* @__PURE__ */ jsxs11("label", { className: "mbob-drop", children: [
4756
- /* @__PURE__ */ jsx11("input", { type: "file", accept: "application/pdf,.pdf", onChange: (event) => setW9File(event.target.files?.[0] ?? null) }),
4757
- /* @__PURE__ */ jsx11("strong", { children: w9File ? w9File.name : profile?.w9 ? "Replace the W-9 PDF" : "Drop the practice W-9 PDF here, or click to choose" }),
4758
- /* @__PURE__ */ jsx11("span", { children: "The W-9 is auto-attached to every submission." })
4822
+ /* @__PURE__ */ jsxs12("label", { className: "mbob-drop", children: [
4823
+ /* @__PURE__ */ jsx12("input", { type: "file", accept: "application/pdf,.pdf", onChange: (event) => setW9File(event.target.files?.[0] ?? null) }),
4824
+ /* @__PURE__ */ jsx12("strong", { children: w9File ? w9File.name : profile?.w9 ? "Replace the W-9 PDF" : "Drop the practice W-9 PDF here, or click to choose" }),
4825
+ /* @__PURE__ */ jsx12("span", { children: "The W-9 is auto-attached to every submission." })
4759
4826
  ] }),
4760
- /* @__PURE__ */ jsxs11("div", { className: "mbob-actions", children: [
4761
- /* @__PURE__ */ jsx11("span", { className: "mbob-status", children: savedStep["w9"] ? "Saved to MindBill." : "" }),
4762
- /* @__PURE__ */ jsx11("button", { className: "mbob-save", type: "button", disabled: saving || !w9File, onClick: saveW9, children: saving ? "Uploading\u2026" : "Save W-9" })
4827
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-actions", children: [
4828
+ /* @__PURE__ */ jsx12("span", { className: "mbob-status", children: savedStep["w9"] ? "Saved to MindBill." : "" }),
4829
+ /* @__PURE__ */ jsx12("button", { className: "mbob-save", type: "button", disabled: saving || !w9File, onClick: saveW9, children: saving ? "Uploading\u2026" : "Save W-9" })
4763
4830
  ] })
4764
4831
  ] });
4765
- const reviewSection = /* @__PURE__ */ jsxs11("div", { className: "mbob-check", children: [
4766
- (profile?.onboarding.checklist ?? []).map((item) => /* @__PURE__ */ jsxs11("div", { className: "mbob-check-item", "data-complete": item.complete, children: [
4767
- /* @__PURE__ */ jsx11("i", { children: item.complete ? "\u2713" : "\u2022" }),
4768
- /* @__PURE__ */ jsx11("span", { children: item.label })
4832
+ const reviewSection = /* @__PURE__ */ jsxs12("div", { className: "mbob-check", children: [
4833
+ (profile?.onboarding.checklist ?? []).map((item) => /* @__PURE__ */ jsxs12("div", { className: "mbob-check-item", "data-complete": item.complete, children: [
4834
+ /* @__PURE__ */ jsx12("i", { children: item.complete ? "\u2713" : "\u2022" }),
4835
+ /* @__PURE__ */ jsx12("span", { children: item.label })
4769
4836
  ] }, item.id)),
4770
- profile?.onboarding.complete ? /* @__PURE__ */ jsx11("p", { className: "mbob-done", children: "Billing setup is complete \u2014 bills submitted from your product carry this profile automatically." }) : /* @__PURE__ */ jsx11("p", { className: "mbob-status", children: "Items above complete themselves as each section is saved." })
4837
+ profile?.onboarding.complete ? /* @__PURE__ */ jsx12("p", { className: "mbob-done", children: "Billing setup is complete \u2014 bills submitted from your product carry this profile automatically." }) : /* @__PURE__ */ jsx12("p", { className: "mbob-status", children: "Items above complete themselves as each section is saved." })
4771
4838
  ] });
4772
4839
  const sections = { practice: practiceSection, rendering: renderingSection, locations: locationsSection, w9: w9Section, review: reviewSection };
4773
- return /* @__PURE__ */ jsxs11("div", { className: `mbob ${className}`.trim(), style: { ...mindBillAppearanceStyle(appearance), ...style }, children: [
4774
- /* @__PURE__ */ jsx11("style", { children: css9 }),
4775
- /* @__PURE__ */ jsxs11("div", { className: "mbob-card", children: [
4776
- /* @__PURE__ */ jsx11("div", { className: "mbob-head", children: /* @__PURE__ */ jsxs11("div", { children: [
4777
- /* @__PURE__ */ jsx11("h2", { children: heading }),
4778
- /* @__PURE__ */ jsx11("p", { className: "mbob-copy", children: description })
4840
+ return /* @__PURE__ */ jsxs12("div", { className: `mbob ${className}`.trim(), style: { ...mindBillAppearanceStyle(appearance), ...style }, children: [
4841
+ /* @__PURE__ */ jsx12("style", { children: css9 }),
4842
+ /* @__PURE__ */ jsxs12("div", { className: "mbob-card", children: [
4843
+ /* @__PURE__ */ jsx12("div", { className: "mbob-head", children: /* @__PURE__ */ jsxs12("div", { children: [
4844
+ /* @__PURE__ */ jsx12("h2", { children: heading }),
4845
+ /* @__PURE__ */ jsx12("p", { className: "mbob-copy", children: description })
4779
4846
  ] }) }),
4780
- loadError ? /* @__PURE__ */ jsx11("div", { className: "mbob-error", role: "alert", children: loadError }) : null,
4781
- variant === "onboarding" ? /* @__PURE__ */ jsxs11(Fragment9, { children: [
4782
- /* @__PURE__ */ jsx11("div", { className: "mbob-steps", children: STEPS.map((item) => /* @__PURE__ */ jsxs11("button", { className: "mbob-step", type: "button", "data-active": step === item.id, "data-done": Boolean(savedStep[item.id]), onClick: () => setStep(item.id), children: [
4783
- /* @__PURE__ */ jsx11("i", { children: savedStep[item.id] ? "\u2713" : "" }),
4847
+ loadError ? /* @__PURE__ */ jsx12("div", { className: "mbob-error", role: "alert", children: loadError }) : null,
4848
+ variant === "onboarding" ? /* @__PURE__ */ jsxs12(Fragment10, { children: [
4849
+ /* @__PURE__ */ jsx12("div", { className: "mbob-steps", children: STEPS.map((item) => /* @__PURE__ */ jsxs12("button", { className: "mbob-step", type: "button", "data-active": step === item.id, "data-done": Boolean(savedStep[item.id]), onClick: () => setStep(item.id), children: [
4850
+ /* @__PURE__ */ jsx12("i", { children: savedStep[item.id] ? "\u2713" : "" }),
4784
4851
  item.label
4785
4852
  ] }, item.id)) }),
4786
4853
  sections[step]
4787
- ] }) : /* @__PURE__ */ jsxs11(Fragment9, { children: [
4854
+ ] }) : /* @__PURE__ */ jsxs12(Fragment10, { children: [
4788
4855
  practiceSection,
4789
- /* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Rendering providers" }),
4856
+ /* @__PURE__ */ jsx12("h3", { className: "mbob-subhead", children: "Rendering providers" }),
4790
4857
  renderingSection,
4791
- /* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Locations" }),
4858
+ /* @__PURE__ */ jsx12("h3", { className: "mbob-subhead", children: "Locations" }),
4792
4859
  locationsSection,
4793
- /* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Practice W-9" }),
4860
+ /* @__PURE__ */ jsx12("h3", { className: "mbob-subhead", children: "Practice W-9" }),
4794
4861
  w9Section,
4795
- /* @__PURE__ */ jsx11("h3", { className: "mbob-subhead", children: "Checklist" }),
4862
+ /* @__PURE__ */ jsx12("h3", { className: "mbob-subhead", children: "Checklist" }),
4796
4863
  reviewSection
4797
4864
  ] }),
4798
- error ? /* @__PURE__ */ jsx11("div", { className: "mbob-error", role: "alert", children: error }) : null
4865
+ error ? /* @__PURE__ */ jsx12("div", { className: "mbob-error", role: "alert", children: error }) : null
4799
4866
  ] })
4800
4867
  ] });
4801
4868
  }
4802
4869
  function BillingSettings(props) {
4803
- return /* @__PURE__ */ jsx11(
4870
+ return /* @__PURE__ */ jsx12(
4804
4871
  OrganizationOnboarding,
4805
4872
  {
4806
4873
  heading: "Billing settings",
@@ -4823,7 +4890,7 @@ import {
4823
4890
  DEFAULT_API_BASE_URL,
4824
4891
  DEFAULT_SESSION_ENDPOINT
4825
4892
  } from "@mindbill/browser";
4826
- import { Fragment as Fragment10, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
4893
+ import { Fragment as Fragment11, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
4827
4894
  var DEFAULT_REFRESH_INTERVAL = 6e4;
4828
4895
  async function responseError(response, fallback) {
4829
4896
  const body = await response.json().catch(() => null);
@@ -5044,17 +5111,17 @@ function ConnectedBillStatus({
5044
5111
  }) {
5045
5112
  const status = useBillStatus(options);
5046
5113
  if (status.isLoading && !status.data) {
5047
- return /* @__PURE__ */ jsx12(Fragment10, { children: loadingFallback ?? /* @__PURE__ */ jsx12("div", { role: "status", children: "Loading bill status\u2026" }) });
5114
+ return /* @__PURE__ */ jsx13(Fragment11, { children: loadingFallback ?? /* @__PURE__ */ jsx13("div", { role: "status", children: "Loading bill status\u2026" }) });
5048
5115
  }
5049
5116
  if (status.error && !status.data) {
5050
- return /* @__PURE__ */ jsx12(Fragment10, { children: errorFallback?.(status.error, status.refresh) ?? /* @__PURE__ */ jsxs12("div", { role: "alert", children: [
5117
+ return /* @__PURE__ */ jsx13(Fragment11, { children: errorFallback?.(status.error, status.refresh) ?? /* @__PURE__ */ jsxs13("div", { role: "alert", children: [
5051
5118
  status.error.message,
5052
5119
  " ",
5053
- /* @__PURE__ */ jsx12("button", { type: "button", onClick: () => void status.refresh(), children: "Retry" })
5120
+ /* @__PURE__ */ jsx13("button", { type: "button", onClick: () => void status.refresh(), children: "Retry" })
5054
5121
  ] }) });
5055
5122
  }
5056
5123
  if (!status.data) return null;
5057
- return /* @__PURE__ */ jsx12(
5124
+ return /* @__PURE__ */ jsx13(
5058
5125
  BillStatusSummary,
5059
5126
  {
5060
5127
  status: status.data.state,
@@ -5074,7 +5141,7 @@ function ConnectedBillStatus({
5074
5141
 
5075
5142
  // src/bill-lifecycle-surfaces.tsx
5076
5143
  import { useEffect as useEffect9, useRef as useRef5, useState as useState10 } from "react";
5077
- import { Fragment as Fragment11, jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
5144
+ import { Fragment as Fragment12, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
5078
5145
  function visibleBillLifecycleActions(actions, showUnavailable = false) {
5079
5146
  return actions.filter((action) => action.enabled || showUnavailable);
5080
5147
  }
@@ -5089,11 +5156,11 @@ function BillLifecycleActions({
5089
5156
  }) {
5090
5157
  const visible = visibleBillLifecycleActions(actions, showUnavailable);
5091
5158
  if (!visible.length) return null;
5092
- return /* @__PURE__ */ jsxs13("div", { className: classes("mb-lifecycle-actions", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill actions", children: [
5093
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5094
- visible.map((action) => /* @__PURE__ */ jsxs13("div", { className: "mb-lifecycle-action", children: [
5095
- /* @__PURE__ */ jsx13("button", { type: "button", className: action.primary ? "mb-action-button is-primary" : "mb-action-button", disabled: disabled || !action.enabled, onClick: () => onAction(action), children: action.label }),
5096
- !action.enabled && action.reason ? /* @__PURE__ */ jsx13("span", { className: "mb-action-reason", children: action.reason }) : null
5159
+ return /* @__PURE__ */ jsxs14("div", { className: classes("mb-lifecycle-actions", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill actions", children: [
5160
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5161
+ visible.map((action) => /* @__PURE__ */ jsxs14("div", { className: "mb-lifecycle-action", children: [
5162
+ /* @__PURE__ */ jsx14("button", { type: "button", className: action.primary ? "mb-action-button is-primary" : "mb-action-button", disabled: disabled || !action.enabled, onClick: () => onAction(action), children: action.label }),
5163
+ !action.enabled && action.reason ? /* @__PURE__ */ jsx14("span", { className: "mb-action-reason", children: action.reason }) : null
5097
5164
  ] }, action.id))
5098
5165
  ] });
5099
5166
  }
@@ -5123,18 +5190,18 @@ function defaultFormatDate(createdAt) {
5123
5190
  return new Intl.DateTimeFormat(void 0, { dateStyle: "medium", timeStyle: "short" }).format(parsed);
5124
5191
  }
5125
5192
  function BillActivityTimeline({ events, emptyLabel = "No bill activity yet.", appearance, className, style, formatDate = defaultFormatDate }) {
5126
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-activity", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill activity", children: [
5127
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5128
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5129
- /* @__PURE__ */ jsx13("strong", { children: "Bill history" }),
5130
- /* @__PURE__ */ jsx13("span", { children: "Submission, payer responses, follow-up, and payments." })
5193
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-activity", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill activity", children: [
5194
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5195
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5196
+ /* @__PURE__ */ jsx14("strong", { children: "Bill history" }),
5197
+ /* @__PURE__ */ jsx14("span", { children: "Submission, payer responses, follow-up, and payments." })
5131
5198
  ] }) }),
5132
- !events.length ? /* @__PURE__ */ jsx13("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsx13("ol", { className: "mb-activity-list", children: events.map((event) => /* @__PURE__ */ jsxs13("li", { className: "mb-activity-item", children: [
5133
- /* @__PURE__ */ jsx13("span", { className: "mb-activity-marker", "aria-hidden": "true" }),
5134
- /* @__PURE__ */ jsxs13("div", { className: "mb-activity-content", children: [
5135
- /* @__PURE__ */ jsx13("strong", { children: event.title ?? billActivityEventLabel(event.type) }),
5136
- event.description ? /* @__PURE__ */ jsx13("p", { children: event.description }) : null,
5137
- /* @__PURE__ */ jsxs13("span", { children: [
5199
+ !events.length ? /* @__PURE__ */ jsx14("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsx14("ol", { className: "mb-activity-list", children: events.map((event) => /* @__PURE__ */ jsxs14("li", { className: "mb-activity-item", children: [
5200
+ /* @__PURE__ */ jsx14("span", { className: "mb-activity-marker", "aria-hidden": "true" }),
5201
+ /* @__PURE__ */ jsxs14("div", { className: "mb-activity-content", children: [
5202
+ /* @__PURE__ */ jsx14("strong", { children: event.title ?? billActivityEventLabel(event.type) }),
5203
+ event.description ? /* @__PURE__ */ jsx14("p", { children: event.description }) : null,
5204
+ /* @__PURE__ */ jsxs14("span", { children: [
5138
5205
  formatDate(event.createdAt),
5139
5206
  event.actor ? ` \xB7 ${event.actor}` : ""
5140
5207
  ] })
@@ -5156,41 +5223,41 @@ function BillHistoryTable({ entries, selectedEntryId, emptyLabel = "No bill hist
5156
5223
  if (selected?.details) setExpanded((current) => current[selectedEntryId] ? current : { ...current, [selectedEntryId]: true });
5157
5224
  selectedRowRef.current?.scrollIntoView({ behavior: "smooth", block: "center" });
5158
5225
  }, [entries, selectedEntryId]);
5159
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-history", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill history", children: [
5160
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5161
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5162
- /* @__PURE__ */ jsx13("strong", { children: "Bill history" }),
5163
- /* @__PURE__ */ jsx13("span", { children: "Submissions, payer responses, follow-up, and payments." })
5226
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-history", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill history", children: [
5227
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5228
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5229
+ /* @__PURE__ */ jsx14("strong", { children: "Bill history" }),
5230
+ /* @__PURE__ */ jsx14("span", { children: "Submissions, payer responses, follow-up, and payments." })
5164
5231
  ] }) }),
5165
- !entries.length ? /* @__PURE__ */ jsx13("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs13("div", { className: "mb-history-table", children: [
5166
- /* @__PURE__ */ jsxs13("div", { className: "mb-history-head", "aria-hidden": "true", children: [
5167
- /* @__PURE__ */ jsx13("span", { children: "Date" }),
5168
- /* @__PURE__ */ jsx13("span", { children: "Action" }),
5169
- /* @__PURE__ */ jsx13("span", { children: "User" }),
5170
- /* @__PURE__ */ jsx13("span", { children: "Details" })
5232
+ !entries.length ? /* @__PURE__ */ jsx14("p", { className: "mb-activity-empty", children: emptyLabel }) : /* @__PURE__ */ jsxs14("div", { className: "mb-history-table", children: [
5233
+ /* @__PURE__ */ jsxs14("div", { className: "mb-history-head", "aria-hidden": "true", children: [
5234
+ /* @__PURE__ */ jsx14("span", { children: "Date" }),
5235
+ /* @__PURE__ */ jsx14("span", { children: "Action" }),
5236
+ /* @__PURE__ */ jsx14("span", { children: "User" }),
5237
+ /* @__PURE__ */ jsx14("span", { children: "Details" })
5171
5238
  ] }),
5172
- /* @__PURE__ */ jsx13("ul", { className: "mb-history-rows", children: entries.map((entry) => {
5239
+ /* @__PURE__ */ jsx14("ul", { className: "mb-history-rows", children: entries.map((entry) => {
5173
5240
  const isSelected = entry.id === selectedEntryId;
5174
5241
  const expandable = Boolean(entry.details);
5175
5242
  const isOpen = expandable && Boolean(expanded[entry.id]);
5176
5243
  const details = entry.details;
5177
- const lineContents = /* @__PURE__ */ jsxs13(Fragment11, { children: [
5178
- /* @__PURE__ */ jsx13("span", { className: "mb-history-date", children: formatDate(entry.date) }),
5179
- /* @__PURE__ */ jsx13("span", { className: "mb-history-action", children: entry.action }),
5180
- /* @__PURE__ */ jsx13("span", { className: "mb-history-actor", children: entry.actor ?? "\u2014" }),
5181
- /* @__PURE__ */ jsxs13("span", { className: "mb-history-summary", children: [
5182
- expandable ? /* @__PURE__ */ jsx13("i", { className: `mb-history-caret${isOpen ? " is-open" : ""}`, "aria-hidden": "true" }) : null,
5244
+ const lineContents = /* @__PURE__ */ jsxs14(Fragment12, { children: [
5245
+ /* @__PURE__ */ jsx14("span", { className: "mb-history-date", children: formatDate(entry.date) }),
5246
+ /* @__PURE__ */ jsx14("span", { className: "mb-history-action", children: entry.action }),
5247
+ /* @__PURE__ */ jsx14("span", { className: "mb-history-actor", children: entry.actor ?? "\u2014" }),
5248
+ /* @__PURE__ */ jsxs14("span", { className: "mb-history-summary", children: [
5249
+ expandable ? /* @__PURE__ */ jsx14("i", { className: `mb-history-caret${isOpen ? " is-open" : ""}`, "aria-hidden": "true" }) : null,
5183
5250
  entry.summary
5184
5251
  ] })
5185
5252
  ] });
5186
- return /* @__PURE__ */ jsxs13(
5253
+ return /* @__PURE__ */ jsxs14(
5187
5254
  "li",
5188
5255
  {
5189
5256
  ref: isSelected ? selectedRowRef : void 0,
5190
5257
  className: `mb-history-row is-${entry.tone}${isSelected ? " is-selected" : ""}`,
5191
5258
  "aria-current": isSelected ? "true" : void 0,
5192
5259
  children: [
5193
- expandable ? /* @__PURE__ */ jsx13(
5260
+ expandable ? /* @__PURE__ */ jsx14(
5194
5261
  "button",
5195
5262
  {
5196
5263
  type: "button",
@@ -5199,31 +5266,31 @@ function BillHistoryTable({ entries, selectedEntryId, emptyLabel = "No bill hist
5199
5266
  onClick: () => setExpanded((current) => ({ ...current, [entry.id]: !current[entry.id] })),
5200
5267
  children: lineContents
5201
5268
  }
5202
- ) : /* @__PURE__ */ jsx13("div", { className: "mb-history-line", children: lineContents }),
5203
- isOpen && details ? /* @__PURE__ */ jsxs13("div", { className: "mb-history-details", children: [
5204
- details.rows?.length ? /* @__PURE__ */ jsx13("dl", { className: "mb-history-kv", children: details.rows.map((row) => /* @__PURE__ */ jsxs13("div", { children: [
5205
- /* @__PURE__ */ jsx13("dt", { children: row.label }),
5206
- /* @__PURE__ */ jsx13("dd", { children: row.value })
5269
+ ) : /* @__PURE__ */ jsx14("div", { className: "mb-history-line", children: lineContents }),
5270
+ isOpen && details ? /* @__PURE__ */ jsxs14("div", { className: "mb-history-details", children: [
5271
+ details.rows?.length ? /* @__PURE__ */ jsx14("dl", { className: "mb-history-kv", children: details.rows.map((row) => /* @__PURE__ */ jsxs14("div", { children: [
5272
+ /* @__PURE__ */ jsx14("dt", { children: row.label }),
5273
+ /* @__PURE__ */ jsx14("dd", { children: row.value })
5207
5274
  ] }, `${row.label}-${row.value}`)) }) : null,
5208
- details.documents?.length ? /* @__PURE__ */ jsx13("div", { className: "mb-history-kv", children: /* @__PURE__ */ jsxs13("div", { children: [
5209
- /* @__PURE__ */ jsx13("dt", { children: "Documents" }),
5210
- /* @__PURE__ */ jsx13("dd", { children: details.documents.map((doc) => {
5275
+ details.documents?.length ? /* @__PURE__ */ jsx14("div", { className: "mb-history-kv", children: /* @__PURE__ */ jsxs14("div", { children: [
5276
+ /* @__PURE__ */ jsx14("dt", { children: "Documents" }),
5277
+ /* @__PURE__ */ jsx14("dd", { children: details.documents.map((doc) => {
5211
5278
  const href = documentHref?.(doc) ?? null;
5212
- return href ? /* @__PURE__ */ jsx13("a", { className: "mb-history-doc", href, target: "_blank", rel: "noreferrer", children: doc.filename }, doc.id) : onOpenDocument ? /* @__PURE__ */ jsx13("button", { type: "button", className: "mb-history-doc", onClick: () => void onOpenDocument(doc), children: doc.filename }, doc.id) : /* @__PURE__ */ jsx13("span", { className: "mb-history-doc", children: doc.filename }, doc.id);
5279
+ return href ? /* @__PURE__ */ jsx14("a", { className: "mb-history-doc", href, target: "_blank", rel: "noreferrer", children: doc.filename }, doc.id) : onOpenDocument ? /* @__PURE__ */ jsx14("button", { type: "button", className: "mb-history-doc", onClick: () => void onOpenDocument(doc), children: doc.filename }, doc.id) : /* @__PURE__ */ jsx14("span", { className: "mb-history-doc", children: doc.filename }, doc.id);
5213
5280
  }) })
5214
5281
  ] }) }) : null,
5215
- details.codes?.length ? /* @__PURE__ */ jsx13("dl", { className: "mb-history-codes", children: details.codes.map((code) => /* @__PURE__ */ jsxs13("div", { children: [
5216
- /* @__PURE__ */ jsx13("dt", { children: code.code }),
5217
- /* @__PURE__ */ jsx13("dd", { children: code.text })
5282
+ details.codes?.length ? /* @__PURE__ */ jsx14("dl", { className: "mb-history-codes", children: details.codes.map((code) => /* @__PURE__ */ jsxs14("div", { children: [
5283
+ /* @__PURE__ */ jsx14("dt", { children: code.code }),
5284
+ /* @__PURE__ */ jsx14("dd", { children: code.text })
5218
5285
  ] }, code.code)) }) : null,
5219
- details.complianceDueDates?.length ? /* @__PURE__ */ jsxs13("div", { className: "mb-history-due", children: [
5220
- /* @__PURE__ */ jsx13("em", { children: "Compliance Due Dates" }),
5221
- /* @__PURE__ */ jsx13("dl", { children: details.complianceDueDates.map((due) => /* @__PURE__ */ jsxs13("div", { children: [
5222
- /* @__PURE__ */ jsx13("dt", { children: formatDate(due.date) }),
5223
- /* @__PURE__ */ jsx13("dd", { children: due.text })
5286
+ details.complianceDueDates?.length ? /* @__PURE__ */ jsxs14("div", { className: "mb-history-due", children: [
5287
+ /* @__PURE__ */ jsx14("em", { children: "Compliance Due Dates" }),
5288
+ /* @__PURE__ */ jsx14("dl", { children: details.complianceDueDates.map((due) => /* @__PURE__ */ jsxs14("div", { children: [
5289
+ /* @__PURE__ */ jsx14("dt", { children: formatDate(due.date) }),
5290
+ /* @__PURE__ */ jsx14("dd", { children: due.text })
5224
5291
  ] }, `${due.date}-${due.text}`)) })
5225
5292
  ] }) : null,
5226
- details.text ? /* @__PURE__ */ jsx13("p", { className: "mb-history-text", children: details.text }) : null
5293
+ details.text ? /* @__PURE__ */ jsx14("p", { className: "mb-history-text", children: details.text }) : null
5227
5294
  ] }) : null
5228
5295
  ]
5229
5296
  },
@@ -5284,15 +5351,15 @@ function BillLifecycleProgress({ state, nativeStatus, submittedAt, agingDays, dr
5284
5351
  const rejected = state.toLowerCase() === "rejected";
5285
5352
  const draft = Boolean(draftStage) && isBillLifecycleDraft(state);
5286
5353
  const steps = billLifecycleProgressSteps(state, { draftStage: Boolean(draftStage) });
5287
- return /* @__PURE__ */ jsxs13("section", { className: classes(`mb-surface mb-progress${rejected ? " is-rejected" : ""}`, className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill lifecycle", children: [
5288
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5289
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5290
- /* @__PURE__ */ jsx13("strong", { children: billLifecycleDisplayLabel(state, nativeStatus) }),
5291
- /* @__PURE__ */ jsx13("span", { children: rejected ? "The payer rejected this submission." : draft ? "Not yet sent" : `${submittedAt ? `Submitted ${defaultFormatDate(submittedAt)}` : "Submitted"}${typeof agingDays === "number" ? ` \xB7 ${agingDays} days old` : ""}` })
5354
+ return /* @__PURE__ */ jsxs14("section", { className: classes(`mb-surface mb-progress${rejected ? " is-rejected" : ""}`, className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill lifecycle", children: [
5355
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5356
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5357
+ /* @__PURE__ */ jsx14("strong", { children: billLifecycleDisplayLabel(state, nativeStatus) }),
5358
+ /* @__PURE__ */ jsx14("span", { children: rejected ? "The payer rejected this submission." : draft ? "Not yet sent" : `${submittedAt ? `Submitted ${defaultFormatDate(submittedAt)}` : "Submitted"}${typeof agingDays === "number" ? ` \xB7 ${agingDays} days old` : ""}` })
5292
5359
  ] }) }),
5293
- /* @__PURE__ */ jsx13("ol", { className: "mb-progress-list", style: { gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))` }, children: steps.map((step, index) => /* @__PURE__ */ jsxs13("li", { className: `is-${step.status}`, "aria-current": step.status === "current" ? "step" : void 0, children: [
5294
- /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: step.status === "complete" ? "\u2713" : rejected && step.status === "current" ? "!" : index + 1 }),
5295
- /* @__PURE__ */ jsx13("b", { children: step.label })
5360
+ /* @__PURE__ */ jsx14("ol", { className: "mb-progress-list", style: { gridTemplateColumns: `repeat(${steps.length}, minmax(0, 1fr))` }, children: steps.map((step, index) => /* @__PURE__ */ jsxs14("li", { className: `is-${step.status}`, "aria-current": step.status === "current" ? "step" : void 0, children: [
5361
+ /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: step.status === "complete" ? "\u2713" : rejected && step.status === "current" ? "!" : index + 1 }),
5362
+ /* @__PURE__ */ jsx14("b", { children: step.label })
5296
5363
  ] }, step.id)) })
5297
5364
  ] });
5298
5365
  }
@@ -5306,48 +5373,48 @@ function billRejectionIssueSummary(rejection, count) {
5306
5373
  function BillRejectionNotice({ rejection, title = "Rejected \u2014 action required", submittedAt, appearance, className, style, formatDate = defaultFormatDate }) {
5307
5374
  const issues = rejection.issues?.length ? rejection.issues : [{ code: rejection.code, description: rejection.reason }];
5308
5375
  const hasCodes = issues.some((issue) => Boolean(issue.code));
5309
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-rejection-notice", className), style: mindBillAppearanceStyle(appearance, style), role: "alert", "aria-label": "Bill rejection reasons", children: [
5310
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5311
- /* @__PURE__ */ jsxs13("div", { className: "mb-rejection-overview", children: [
5312
- /* @__PURE__ */ jsxs13("header", { className: "mb-rejection-heading", children: [
5313
- /* @__PURE__ */ jsx13("span", { className: "mb-rejection-icon", "aria-hidden": "true", children: "!" }),
5314
- /* @__PURE__ */ jsxs13("div", { children: [
5315
- /* @__PURE__ */ jsx13("strong", { children: title }),
5316
- /* @__PURE__ */ jsxs13("span", { children: [
5376
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-rejection-notice", className), style: mindBillAppearanceStyle(appearance, style), role: "alert", "aria-label": "Bill rejection reasons", children: [
5377
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5378
+ /* @__PURE__ */ jsxs14("div", { className: "mb-rejection-overview", children: [
5379
+ /* @__PURE__ */ jsxs14("header", { className: "mb-rejection-heading", children: [
5380
+ /* @__PURE__ */ jsx14("span", { className: "mb-rejection-icon", "aria-hidden": "true", children: "!" }),
5381
+ /* @__PURE__ */ jsxs14("div", { children: [
5382
+ /* @__PURE__ */ jsx14("strong", { children: title }),
5383
+ /* @__PURE__ */ jsxs14("span", { children: [
5317
5384
  "Fix the ",
5318
5385
  issues.length === 1 ? "issue" : "issues",
5319
5386
  " below, then resubmit."
5320
5387
  ] })
5321
5388
  ] })
5322
5389
  ] }),
5323
- /* @__PURE__ */ jsxs13("ol", { className: "mb-rejection-progress", "aria-label": "Submission status", children: [
5324
- /* @__PURE__ */ jsxs13("li", { className: "is-complete", children: [
5325
- /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "\u2713" }),
5326
- /* @__PURE__ */ jsx13("b", { children: "Sent" }),
5327
- submittedAt ? /* @__PURE__ */ jsx13("small", { children: formatDate(submittedAt) }) : null
5390
+ /* @__PURE__ */ jsxs14("ol", { className: "mb-rejection-progress", "aria-label": "Submission status", children: [
5391
+ /* @__PURE__ */ jsxs14("li", { className: "is-complete", children: [
5392
+ /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: "\u2713" }),
5393
+ /* @__PURE__ */ jsx14("b", { children: "Sent" }),
5394
+ submittedAt ? /* @__PURE__ */ jsx14("small", { children: formatDate(submittedAt) }) : null
5328
5395
  ] }),
5329
- /* @__PURE__ */ jsxs13("li", { className: "is-rejected", "aria-current": "step", children: [
5330
- /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "!" }),
5331
- /* @__PURE__ */ jsx13("b", { children: "Rejected" }),
5332
- rejection.receivedAt ? /* @__PURE__ */ jsx13("small", { children: formatDate(rejection.receivedAt) }) : null
5396
+ /* @__PURE__ */ jsxs14("li", { className: "is-rejected", "aria-current": "step", children: [
5397
+ /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: "!" }),
5398
+ /* @__PURE__ */ jsx14("b", { children: "Rejected" }),
5399
+ rejection.receivedAt ? /* @__PURE__ */ jsx14("small", { children: formatDate(rejection.receivedAt) }) : null
5333
5400
  ] })
5334
5401
  ] })
5335
5402
  ] }),
5336
- /* @__PURE__ */ jsxs13("div", { className: "mb-rejection-issues", "aria-label": "Rejection reasons", children: [
5337
- /* @__PURE__ */ jsxs13("div", { className: "mb-rejection-issues-heading", children: [
5338
- /* @__PURE__ */ jsxs13("strong", { children: [
5339
- /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "\u25B3" }),
5403
+ /* @__PURE__ */ jsxs14("div", { className: "mb-rejection-issues", "aria-label": "Rejection reasons", children: [
5404
+ /* @__PURE__ */ jsxs14("div", { className: "mb-rejection-issues-heading", children: [
5405
+ /* @__PURE__ */ jsxs14("strong", { children: [
5406
+ /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: "\u25B3" }),
5340
5407
  " Rejection reasons"
5341
5408
  ] }),
5342
- /* @__PURE__ */ jsx13("span", { children: billRejectionIssueSummary(rejection, issues.length) })
5409
+ /* @__PURE__ */ jsx14("span", { children: billRejectionIssueSummary(rejection, issues.length) })
5343
5410
  ] }),
5344
- /* @__PURE__ */ jsx13("ol", { "aria-label": `${issues.length} rejection ${issues.length === 1 ? "reason" : "reasons"}`, children: issues.map((issue, index) => /* @__PURE__ */ jsxs13("li", { children: [
5345
- /* @__PURE__ */ jsx13("span", { className: "mb-rejection-bullet", "aria-hidden": "true" }),
5346
- /* @__PURE__ */ jsx13("p", { children: issue.description }),
5347
- issue.code ? /* @__PURE__ */ jsx13("span", { className: "mb-rejection-code", children: issue.code }) : null
5411
+ /* @__PURE__ */ jsx14("ol", { "aria-label": `${issues.length} rejection ${issues.length === 1 ? "reason" : "reasons"}`, children: issues.map((issue, index) => /* @__PURE__ */ jsxs14("li", { children: [
5412
+ /* @__PURE__ */ jsx14("span", { className: "mb-rejection-bullet", "aria-hidden": "true" }),
5413
+ /* @__PURE__ */ jsx14("p", { children: issue.description }),
5414
+ issue.code ? /* @__PURE__ */ jsx14("span", { className: "mb-rejection-code", children: issue.code }) : null
5348
5415
  ] }, `${issue.code ?? "issue"}-${index}`)) }),
5349
- hasCodes ? /* @__PURE__ */ jsxs13("p", { className: "mb-rejection-code-note", children: [
5350
- /* @__PURE__ */ jsx13("span", { "aria-hidden": "true", children: "i" }),
5416
+ hasCodes ? /* @__PURE__ */ jsxs14("p", { className: "mb-rejection-code-note", children: [
5417
+ /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: "i" }),
5351
5418
  " Technical error codes are included for support and auditability."
5352
5419
  ] }) : null
5353
5420
  ] })
@@ -5362,18 +5429,18 @@ function BillSnapshotSummary({ bill, patient, injury, delivery, appearance, clas
5362
5429
  ["Charged", currency(bill.totalCharge)],
5363
5430
  ["Balance", currency(bill.balanceDue)]
5364
5431
  ];
5365
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-snapshot", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill snapshot", children: [
5366
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5367
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5368
- /* @__PURE__ */ jsx13("strong", { children: "Bill snapshot" }),
5369
- /* @__PURE__ */ jsxs13("span", { children: [
5432
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-snapshot", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Bill snapshot", children: [
5433
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5434
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5435
+ /* @__PURE__ */ jsx14("strong", { children: "Bill snapshot" }),
5436
+ /* @__PURE__ */ jsxs14("span", { children: [
5370
5437
  "Bill #",
5371
5438
  bill.billNumber
5372
5439
  ] })
5373
5440
  ] }) }),
5374
- /* @__PURE__ */ jsx13("dl", { children: values.map(([label, value]) => /* @__PURE__ */ jsxs13("div", { children: [
5375
- /* @__PURE__ */ jsx13("dt", { children: label }),
5376
- /* @__PURE__ */ jsx13("dd", { children: value })
5441
+ /* @__PURE__ */ jsx14("dl", { children: values.map(([label, value]) => /* @__PURE__ */ jsxs14("div", { children: [
5442
+ /* @__PURE__ */ jsx14("dt", { children: label }),
5443
+ /* @__PURE__ */ jsx14("dd", { children: value })
5377
5444
  ] }, label)) })
5378
5445
  ] });
5379
5446
  }
@@ -5388,140 +5455,140 @@ function BillExplanationOfReview({
5388
5455
  style
5389
5456
  }) {
5390
5457
  const rows = payments.length ? payments : [null];
5391
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-eor-review", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Explanation of Review and payments", children: [
5392
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5393
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5394
- /* @__PURE__ */ jsx13("strong", { children: "Explanation of Review" }),
5395
- /* @__PURE__ */ jsx13("span", { children: "Payer response and payment reconciliation." })
5458
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-eor-review", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Explanation of Review and payments", children: [
5459
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5460
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5461
+ /* @__PURE__ */ jsx14("strong", { children: "Explanation of Review" }),
5462
+ /* @__PURE__ */ jsx14("span", { children: "Payer response and payment reconciliation." })
5396
5463
  ] }) }),
5397
- /* @__PURE__ */ jsxs13("dl", { className: "mb-eor-metrics", children: [
5398
- /* @__PURE__ */ jsxs13("div", { children: [
5399
- /* @__PURE__ */ jsx13("dt", { children: "Amount billed" }),
5400
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.billedAmount) })
5464
+ /* @__PURE__ */ jsxs14("dl", { className: "mb-eor-metrics", children: [
5465
+ /* @__PURE__ */ jsxs14("div", { children: [
5466
+ /* @__PURE__ */ jsx14("dt", { children: "Amount billed" }),
5467
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.billedAmount) })
5401
5468
  ] }),
5402
- /* @__PURE__ */ jsxs13("div", { children: [
5403
- /* @__PURE__ */ jsx13("dt", { children: "Payer allowed" }),
5404
- /* @__PURE__ */ jsx13("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
5469
+ /* @__PURE__ */ jsxs14("div", { children: [
5470
+ /* @__PURE__ */ jsx14("dt", { children: "Payer allowed" }),
5471
+ /* @__PURE__ */ jsx14("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
5405
5472
  ] }),
5406
- /* @__PURE__ */ jsxs13("div", { children: [
5407
- /* @__PURE__ */ jsx13("dt", { children: "Payer reported paid" }),
5408
- /* @__PURE__ */ jsx13("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
5473
+ /* @__PURE__ */ jsxs14("div", { children: [
5474
+ /* @__PURE__ */ jsx14("dt", { children: "Payer reported paid" }),
5475
+ /* @__PURE__ */ jsx14("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
5409
5476
  ] }),
5410
- /* @__PURE__ */ jsxs13("div", { className: "is-balance", children: [
5411
- /* @__PURE__ */ jsx13("dt", { children: "Balance due" }),
5412
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.balanceDue) })
5477
+ /* @__PURE__ */ jsxs14("div", { className: "is-balance", children: [
5478
+ /* @__PURE__ */ jsx14("dt", { children: "Balance due" }),
5479
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.balanceDue) })
5413
5480
  ] }),
5414
- /* @__PURE__ */ jsxs13("div", { children: [
5415
- /* @__PURE__ */ jsx13("dt", { children: "Payment posted" }),
5416
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedPrincipal) })
5481
+ /* @__PURE__ */ jsxs14("div", { children: [
5482
+ /* @__PURE__ */ jsx14("dt", { children: "Payment posted" }),
5483
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.postedPrincipal) })
5417
5484
  ] }),
5418
- /* @__PURE__ */ jsxs13("div", { children: [
5419
- /* @__PURE__ */ jsx13("dt", { children: "Penalty & interest" }),
5420
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedAdditional) })
5485
+ /* @__PURE__ */ jsxs14("div", { children: [
5486
+ /* @__PURE__ */ jsx14("dt", { children: "Penalty & interest" }),
5487
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.postedAdditional) })
5421
5488
  ] }),
5422
- /* @__PURE__ */ jsxs13("div", { children: [
5423
- /* @__PURE__ */ jsx13("dt", { children: "Total received" }),
5424
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.totalPostedCash) })
5489
+ /* @__PURE__ */ jsxs14("div", { children: [
5490
+ /* @__PURE__ */ jsx14("dt", { children: "Total received" }),
5491
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.totalPostedCash) })
5425
5492
  ] }),
5426
- /* @__PURE__ */ jsxs13("div", { children: [
5427
- /* @__PURE__ */ jsx13("dt", { children: "Expected" }),
5428
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.expectedAmount) })
5493
+ /* @__PURE__ */ jsxs14("div", { children: [
5494
+ /* @__PURE__ */ jsx14("dt", { children: "Expected" }),
5495
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.expectedAmount) })
5429
5496
  ] })
5430
5497
  ] }),
5431
- remittance.denialReason ? /* @__PURE__ */ jsxs13("div", { className: "mb-denial", children: [
5432
- /* @__PURE__ */ jsx13("strong", { children: "Denial reason" }),
5433
- /* @__PURE__ */ jsx13("p", { children: remittance.denialReason })
5498
+ remittance.denialReason ? /* @__PURE__ */ jsxs14("div", { className: "mb-denial", children: [
5499
+ /* @__PURE__ */ jsx14("strong", { children: "Denial reason" }),
5500
+ /* @__PURE__ */ jsx14("p", { children: remittance.denialReason })
5434
5501
  ] }) : null,
5435
- /* @__PURE__ */ jsx13("div", { className: "mb-eor-table-wrap", children: /* @__PURE__ */ jsxs13("table", { className: "mb-eor-table", children: [
5436
- /* @__PURE__ */ jsxs13("thead", { children: [
5437
- /* @__PURE__ */ jsxs13("tr", { className: "mb-eor-groups", children: [
5438
- /* @__PURE__ */ jsx13("th", { colSpan: 2, children: "Submission" }),
5439
- /* @__PURE__ */ jsx13("th", { colSpan: 5, children: "EOR payment information" }),
5440
- /* @__PURE__ */ jsx13("th", { colSpan: 2, children: "EOR post" }),
5441
- /* @__PURE__ */ jsx13("th", { children: "EOR" })
5502
+ /* @__PURE__ */ jsx14("div", { className: "mb-eor-table-wrap", children: /* @__PURE__ */ jsxs14("table", { className: "mb-eor-table", children: [
5503
+ /* @__PURE__ */ jsxs14("thead", { children: [
5504
+ /* @__PURE__ */ jsxs14("tr", { className: "mb-eor-groups", children: [
5505
+ /* @__PURE__ */ jsx14("th", { colSpan: 2, children: "Submission" }),
5506
+ /* @__PURE__ */ jsx14("th", { colSpan: 5, children: "EOR payment information" }),
5507
+ /* @__PURE__ */ jsx14("th", { colSpan: 2, children: "EOR post" }),
5508
+ /* @__PURE__ */ jsx14("th", { children: "EOR" })
5442
5509
  ] }),
5443
- /* @__PURE__ */ jsxs13("tr", { children: [
5444
- /* @__PURE__ */ jsx13("th", { children: "Submission" }),
5445
- /* @__PURE__ */ jsx13("th", { children: "Submission payment" }),
5446
- /* @__PURE__ */ jsx13("th", { children: "Payment method" }),
5447
- /* @__PURE__ */ jsx13("th", { children: "Reference" }),
5448
- /* @__PURE__ */ jsx13("th", { children: "Effective date" }),
5449
- /* @__PURE__ */ jsx13("th", { children: "Payment total" }),
5450
- /* @__PURE__ */ jsx13("th", { children: "Deposit date" }),
5451
- /* @__PURE__ */ jsx13("th", { children: "Post date" }),
5452
- /* @__PURE__ */ jsx13("th", { children: "Source" }),
5453
- /* @__PURE__ */ jsx13("th", { children: "Document" })
5510
+ /* @__PURE__ */ jsxs14("tr", { children: [
5511
+ /* @__PURE__ */ jsx14("th", { children: "Submission" }),
5512
+ /* @__PURE__ */ jsx14("th", { children: "Submission payment" }),
5513
+ /* @__PURE__ */ jsx14("th", { children: "Payment method" }),
5514
+ /* @__PURE__ */ jsx14("th", { children: "Reference" }),
5515
+ /* @__PURE__ */ jsx14("th", { children: "Effective date" }),
5516
+ /* @__PURE__ */ jsx14("th", { children: "Payment total" }),
5517
+ /* @__PURE__ */ jsx14("th", { children: "Deposit date" }),
5518
+ /* @__PURE__ */ jsx14("th", { children: "Post date" }),
5519
+ /* @__PURE__ */ jsx14("th", { children: "Source" }),
5520
+ /* @__PURE__ */ jsx14("th", { children: "Document" })
5454
5521
  ] })
5455
5522
  ] }),
5456
- /* @__PURE__ */ jsx13("tbody", { children: rows.map((payment, index) => {
5523
+ /* @__PURE__ */ jsx14("tbody", { children: rows.map((payment, index) => {
5457
5524
  const eor = eors[index] ?? eors[0];
5458
- return /* @__PURE__ */ jsxs13("tr", { children: [
5459
- /* @__PURE__ */ jsxs13("td", { "data-label": "Submission", children: [
5460
- /* @__PURE__ */ jsx13("strong", { children: "Original bill" }),
5461
- submittedAt ? /* @__PURE__ */ jsxs13("span", { children: [
5525
+ return /* @__PURE__ */ jsxs14("tr", { children: [
5526
+ /* @__PURE__ */ jsxs14("td", { "data-label": "Submission", children: [
5527
+ /* @__PURE__ */ jsx14("strong", { children: "Original bill" }),
5528
+ submittedAt ? /* @__PURE__ */ jsxs14("span", { children: [
5462
5529
  "Sent ",
5463
5530
  defaultFormatDate(submittedAt)
5464
5531
  ] }) : null
5465
5532
  ] }),
5466
- /* @__PURE__ */ jsx13("td", { "data-label": "Submission payment", children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) }),
5467
- /* @__PURE__ */ jsx13("td", { "data-label": "Payment method", children: payment ? humanize(payment.method) : "\u2014" }),
5468
- /* @__PURE__ */ jsx13("td", { "data-label": "Reference", children: payment?.checkNumber || "\u2014" }),
5469
- /* @__PURE__ */ jsx13("td", { "data-label": "Effective date", children: payment ? payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) : "\u2014" }),
5470
- /* @__PURE__ */ jsx13("td", { "data-label": "Payment total", children: payment ? currency(payment.amount) : currency(0) }),
5471
- /* @__PURE__ */ jsx13("td", { "data-label": "Deposit date", children: payment?.depositDate || "Not recorded" }),
5472
- /* @__PURE__ */ jsx13("td", { "data-label": "Post date", children: payment ? defaultFormatDate(payment.postedAt) : eor ? defaultFormatDate(eor.addedAt) : "\u2014" }),
5473
- /* @__PURE__ */ jsx13("td", { "data-label": "Source", children: payment ? payment.source.toUpperCase() : eor ? "EOR" : "\u2014" }),
5474
- /* @__PURE__ */ jsx13("td", { "data-label": "EOR", children: eor && onOpenEor ? /* @__PURE__ */ jsx13("button", { type: "button", className: "mb-eor-link", onClick: () => void onOpenEor(eor), children: eor.filename }) : eor?.filename || "\u2014" })
5533
+ /* @__PURE__ */ jsx14("td", { "data-label": "Submission payment", children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) }),
5534
+ /* @__PURE__ */ jsx14("td", { "data-label": "Payment method", children: payment ? humanize(payment.method) : "\u2014" }),
5535
+ /* @__PURE__ */ jsx14("td", { "data-label": "Reference", children: payment?.checkNumber || "\u2014" }),
5536
+ /* @__PURE__ */ jsx14("td", { "data-label": "Effective date", children: payment ? payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) : "\u2014" }),
5537
+ /* @__PURE__ */ jsx14("td", { "data-label": "Payment total", children: payment ? currency(payment.amount) : currency(0) }),
5538
+ /* @__PURE__ */ jsx14("td", { "data-label": "Deposit date", children: payment?.depositDate || "Not recorded" }),
5539
+ /* @__PURE__ */ jsx14("td", { "data-label": "Post date", children: payment ? defaultFormatDate(payment.postedAt) : eor ? defaultFormatDate(eor.addedAt) : "\u2014" }),
5540
+ /* @__PURE__ */ jsx14("td", { "data-label": "Source", children: payment ? payment.source.toUpperCase() : eor ? "EOR" : "\u2014" }),
5541
+ /* @__PURE__ */ jsx14("td", { "data-label": "EOR", children: eor && onOpenEor ? /* @__PURE__ */ jsx14("button", { type: "button", className: "mb-eor-link", onClick: () => void onOpenEor(eor), children: eor.filename }) : eor?.filename || "\u2014" })
5475
5542
  ] }, payment?.id ?? `empty-${index}`);
5476
5543
  }) })
5477
5544
  ] }) }),
5478
- eors.length > rows.length ? /* @__PURE__ */ jsx13("div", { className: "mb-eor-documents", children: eors.slice(rows.length).map((eor) => /* @__PURE__ */ jsx13("button", { type: "button", onClick: () => void onOpenEor?.(eor), children: eor.filename }, eor.id)) }) : null
5545
+ eors.length > rows.length ? /* @__PURE__ */ jsx14("div", { className: "mb-eor-documents", children: eors.slice(rows.length).map((eor) => /* @__PURE__ */ jsx14("button", { type: "button", onClick: () => void onOpenEor?.(eor), children: eor.filename }, eor.id)) }) : null
5479
5546
  ] });
5480
5547
  }
5481
5548
  function BillRemittanceCard({ remittance, appearance, className, style }) {
5482
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-remittance", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Remittance summary", children: [
5483
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5484
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5485
- /* @__PURE__ */ jsx13("strong", { children: "Remittance" }),
5486
- /* @__PURE__ */ jsx13("span", { children: "Amounts reported by the payer and posted to the bill." })
5549
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-remittance", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Remittance summary", children: [
5550
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5551
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5552
+ /* @__PURE__ */ jsx14("strong", { children: "Remittance" }),
5553
+ /* @__PURE__ */ jsx14("span", { children: "Amounts reported by the payer and posted to the bill." })
5487
5554
  ] }) }),
5488
- /* @__PURE__ */ jsxs13("dl", { children: [
5489
- /* @__PURE__ */ jsxs13("div", { children: [
5490
- /* @__PURE__ */ jsx13("dt", { children: "Amount billed" }),
5491
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.billedAmount) })
5555
+ /* @__PURE__ */ jsxs14("dl", { children: [
5556
+ /* @__PURE__ */ jsxs14("div", { children: [
5557
+ /* @__PURE__ */ jsx14("dt", { children: "Amount billed" }),
5558
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.billedAmount) })
5492
5559
  ] }),
5493
- /* @__PURE__ */ jsxs13("div", { children: [
5494
- /* @__PURE__ */ jsx13("dt", { children: "Expected" }),
5495
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.expectedAmount) })
5560
+ /* @__PURE__ */ jsxs14("div", { children: [
5561
+ /* @__PURE__ */ jsx14("dt", { children: "Expected" }),
5562
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.expectedAmount) })
5496
5563
  ] }),
5497
- /* @__PURE__ */ jsxs13("div", { children: [
5498
- /* @__PURE__ */ jsx13("dt", { children: "Payer allowed" }),
5499
- /* @__PURE__ */ jsx13("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
5564
+ /* @__PURE__ */ jsxs14("div", { children: [
5565
+ /* @__PURE__ */ jsx14("dt", { children: "Payer allowed" }),
5566
+ /* @__PURE__ */ jsx14("dd", { children: remittance.payerAllowedAmount === null ? "\u2014" : currency(remittance.payerAllowedAmount) })
5500
5567
  ] }),
5501
- /* @__PURE__ */ jsxs13("div", { children: [
5502
- /* @__PURE__ */ jsx13("dt", { children: "Payer reported paid" }),
5503
- /* @__PURE__ */ jsx13("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
5568
+ /* @__PURE__ */ jsxs14("div", { children: [
5569
+ /* @__PURE__ */ jsx14("dt", { children: "Payer reported paid" }),
5570
+ /* @__PURE__ */ jsx14("dd", { children: remittance.payerReportedPaid === null ? "\u2014" : currency(remittance.payerReportedPaid) })
5504
5571
  ] }),
5505
- /* @__PURE__ */ jsxs13("div", { children: [
5506
- /* @__PURE__ */ jsx13("dt", { children: "Payment posted" }),
5507
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedPrincipal) })
5572
+ /* @__PURE__ */ jsxs14("div", { children: [
5573
+ /* @__PURE__ */ jsx14("dt", { children: "Payment posted" }),
5574
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.postedPrincipal) })
5508
5575
  ] }),
5509
- /* @__PURE__ */ jsxs13("div", { children: [
5510
- /* @__PURE__ */ jsx13("dt", { children: "Penalty & interest" }),
5511
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.postedAdditional) })
5576
+ /* @__PURE__ */ jsxs14("div", { children: [
5577
+ /* @__PURE__ */ jsx14("dt", { children: "Penalty & interest" }),
5578
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.postedAdditional) })
5512
5579
  ] }),
5513
- /* @__PURE__ */ jsxs13("div", { children: [
5514
- /* @__PURE__ */ jsx13("dt", { children: "Total received" }),
5515
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.totalPostedCash) })
5580
+ /* @__PURE__ */ jsxs14("div", { children: [
5581
+ /* @__PURE__ */ jsx14("dt", { children: "Total received" }),
5582
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.totalPostedCash) })
5516
5583
  ] }),
5517
- /* @__PURE__ */ jsxs13("div", { children: [
5518
- /* @__PURE__ */ jsx13("dt", { children: "Balance due" }),
5519
- /* @__PURE__ */ jsx13("dd", { children: currency(remittance.balanceDue) })
5584
+ /* @__PURE__ */ jsxs14("div", { children: [
5585
+ /* @__PURE__ */ jsx14("dt", { children: "Balance due" }),
5586
+ /* @__PURE__ */ jsx14("dd", { children: currency(remittance.balanceDue) })
5520
5587
  ] })
5521
5588
  ] }),
5522
- remittance.denialReason ? /* @__PURE__ */ jsxs13("div", { className: "mb-denial", children: [
5523
- /* @__PURE__ */ jsx13("strong", { children: "Denial reason" }),
5524
- /* @__PURE__ */ jsx13("p", { children: remittance.denialReason })
5589
+ remittance.denialReason ? /* @__PURE__ */ jsxs14("div", { className: "mb-denial", children: [
5590
+ /* @__PURE__ */ jsx14("strong", { children: "Denial reason" }),
5591
+ /* @__PURE__ */ jsx14("p", { children: remittance.denialReason })
5525
5592
  ] }) : null
5526
5593
  ] });
5527
5594
  }
@@ -5536,72 +5603,72 @@ function BillPayerContactCard({ delivery, appearance, className, style }) {
5536
5603
  delivery.contacts.portalUrl ? ["Portal", "Open payer portal", delivery.contacts.portalUrl] : null
5537
5604
  ].filter(Boolean);
5538
5605
  if (!delivery.payerName && !contacts2.length) return null;
5539
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-contacts", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payer contact information", children: [
5540
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5541
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5542
- /* @__PURE__ */ jsx13("strong", { children: delivery.payerName || "Claims administrator" }),
5543
- /* @__PURE__ */ jsx13("span", { children: "Billing and follow-up contacts." })
5606
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-contacts", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payer contact information", children: [
5607
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5608
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5609
+ /* @__PURE__ */ jsx14("strong", { children: delivery.payerName || "Claims administrator" }),
5610
+ /* @__PURE__ */ jsx14("span", { children: "Billing and follow-up contacts." })
5544
5611
  ] }) }),
5545
- !contacts2.length ? /* @__PURE__ */ jsx13("p", { className: "mb-empty", children: "No payer contact details are available." }) : /* @__PURE__ */ jsx13("dl", { children: contacts2.map(([label, value, href]) => /* @__PURE__ */ jsxs13("div", { children: [
5546
- /* @__PURE__ */ jsx13("dt", { children: label }),
5547
- /* @__PURE__ */ jsx13("dd", { children: href ? /* @__PURE__ */ jsx13("a", { href, target: label === "Portal" ? "_blank" : void 0, rel: label === "Portal" ? "noreferrer noopener" : void 0, children: value }) : value })
5612
+ !contacts2.length ? /* @__PURE__ */ jsx14("p", { className: "mb-empty", children: "No payer contact details are available." }) : /* @__PURE__ */ jsx14("dl", { children: contacts2.map(([label, value, href]) => /* @__PURE__ */ jsxs14("div", { children: [
5613
+ /* @__PURE__ */ jsx14("dt", { children: label }),
5614
+ /* @__PURE__ */ jsx14("dd", { children: href ? /* @__PURE__ */ jsx14("a", { href, target: label === "Portal" ? "_blank" : void 0, rel: label === "Portal" ? "noreferrer noopener" : void 0, children: value }) : value })
5548
5615
  ] }, label)) })
5549
5616
  ] });
5550
5617
  }
5551
5618
  function BillPaymentLedger({ payments, appearance, className, style }) {
5552
- return /* @__PURE__ */ jsxs13("section", { className: classes("mb-surface mb-payments", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payment ledger", children: [
5553
- /* @__PURE__ */ jsx13("style", { children: lifecycleSurfaceStyles }),
5554
- /* @__PURE__ */ jsx13("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs13("div", { children: [
5555
- /* @__PURE__ */ jsx13("strong", { children: "Payments" }),
5556
- /* @__PURE__ */ jsx13("span", { children: "Funds recorded against this bill." })
5619
+ return /* @__PURE__ */ jsxs14("section", { className: classes("mb-surface mb-payments", className), style: mindBillAppearanceStyle(appearance, style), "aria-label": "Payment ledger", children: [
5620
+ /* @__PURE__ */ jsx14("style", { children: lifecycleSurfaceStyles }),
5621
+ /* @__PURE__ */ jsx14("header", { className: "mb-surface-heading", children: /* @__PURE__ */ jsxs14("div", { children: [
5622
+ /* @__PURE__ */ jsx14("strong", { children: "Payments" }),
5623
+ /* @__PURE__ */ jsx14("span", { children: "Funds recorded against this bill." })
5557
5624
  ] }) }),
5558
- !payments.length ? /* @__PURE__ */ jsx13("p", { className: "mb-empty", children: "No payments posted." }) : /* @__PURE__ */ jsx13("div", { className: "mb-payment-list", children: payments.map((payment) => {
5625
+ !payments.length ? /* @__PURE__ */ jsx14("p", { className: "mb-empty", children: "No payments posted." }) : /* @__PURE__ */ jsx14("div", { className: "mb-payment-list", children: payments.map((payment) => {
5559
5626
  const additional = payment.feeAmount ?? 0;
5560
- return /* @__PURE__ */ jsxs13("article", { children: [
5561
- /* @__PURE__ */ jsxs13("div", { className: "mb-payment-amount", children: [
5562
- /* @__PURE__ */ jsx13("strong", { children: currency(payment.amount) }),
5563
- /* @__PURE__ */ jsx13("span", { children: "Total received" })
5627
+ return /* @__PURE__ */ jsxs14("article", { children: [
5628
+ /* @__PURE__ */ jsxs14("div", { className: "mb-payment-amount", children: [
5629
+ /* @__PURE__ */ jsx14("strong", { children: currency(payment.amount) }),
5630
+ /* @__PURE__ */ jsx14("span", { children: "Total received" })
5564
5631
  ] }),
5565
- /* @__PURE__ */ jsxs13("dl", { children: [
5566
- /* @__PURE__ */ jsxs13("div", { children: [
5567
- /* @__PURE__ */ jsx13("dt", { children: "Applied to bill" }),
5568
- /* @__PURE__ */ jsx13("dd", { children: currency(payment.principalAmount) })
5632
+ /* @__PURE__ */ jsxs14("dl", { children: [
5633
+ /* @__PURE__ */ jsxs14("div", { children: [
5634
+ /* @__PURE__ */ jsx14("dt", { children: "Applied to bill" }),
5635
+ /* @__PURE__ */ jsx14("dd", { children: currency(payment.principalAmount) })
5569
5636
  ] }),
5570
- additional > 0 ? /* @__PURE__ */ jsxs13("div", { children: [
5571
- /* @__PURE__ */ jsx13("dt", { children: "Penalty & interest" }),
5572
- /* @__PURE__ */ jsx13("dd", { children: currency(additional) })
5637
+ additional > 0 ? /* @__PURE__ */ jsxs14("div", { children: [
5638
+ /* @__PURE__ */ jsx14("dt", { children: "Penalty & interest" }),
5639
+ /* @__PURE__ */ jsx14("dd", { children: currency(additional) })
5573
5640
  ] }) : null,
5574
- /* @__PURE__ */ jsxs13("div", { children: [
5575
- /* @__PURE__ */ jsx13("dt", { children: "Method" }),
5576
- /* @__PURE__ */ jsx13("dd", { children: payment.method.toUpperCase() })
5641
+ /* @__PURE__ */ jsxs14("div", { children: [
5642
+ /* @__PURE__ */ jsx14("dt", { children: "Method" }),
5643
+ /* @__PURE__ */ jsx14("dd", { children: payment.method.toUpperCase() })
5577
5644
  ] }),
5578
- /* @__PURE__ */ jsxs13("div", { children: [
5579
- /* @__PURE__ */ jsx13("dt", { children: "Reference" }),
5580
- /* @__PURE__ */ jsx13("dd", { children: payment.checkNumber || "\u2014" })
5645
+ /* @__PURE__ */ jsxs14("div", { children: [
5646
+ /* @__PURE__ */ jsx14("dt", { children: "Reference" }),
5647
+ /* @__PURE__ */ jsx14("dd", { children: payment.checkNumber || "\u2014" })
5581
5648
  ] }),
5582
- /* @__PURE__ */ jsxs13("div", { children: [
5583
- /* @__PURE__ */ jsx13("dt", { children: "Effective date" }),
5584
- /* @__PURE__ */ jsx13("dd", { children: payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) })
5649
+ /* @__PURE__ */ jsxs14("div", { children: [
5650
+ /* @__PURE__ */ jsx14("dt", { children: "Effective date" }),
5651
+ /* @__PURE__ */ jsx14("dd", { children: payment.receivedDate || payment.depositDate || defaultFormatDate(payment.postedAt) })
5585
5652
  ] }),
5586
- /* @__PURE__ */ jsxs13("div", { children: [
5587
- /* @__PURE__ */ jsx13("dt", { children: "Deposit date" }),
5588
- /* @__PURE__ */ jsx13("dd", { children: payment.depositDate || "Not recorded" })
5653
+ /* @__PURE__ */ jsxs14("div", { children: [
5654
+ /* @__PURE__ */ jsx14("dt", { children: "Deposit date" }),
5655
+ /* @__PURE__ */ jsx14("dd", { children: payment.depositDate || "Not recorded" })
5589
5656
  ] }),
5590
- /* @__PURE__ */ jsxs13("div", { children: [
5591
- /* @__PURE__ */ jsx13("dt", { children: "Posted" }),
5592
- /* @__PURE__ */ jsxs13("dd", { children: [
5657
+ /* @__PURE__ */ jsxs14("div", { children: [
5658
+ /* @__PURE__ */ jsx14("dt", { children: "Posted" }),
5659
+ /* @__PURE__ */ jsxs14("dd", { children: [
5593
5660
  defaultFormatDate(payment.postedAt),
5594
5661
  " \xB7 ",
5595
5662
  payment.source.toUpperCase()
5596
5663
  ] })
5597
5664
  ] }),
5598
- /* @__PURE__ */ jsxs13("div", { children: [
5599
- /* @__PURE__ */ jsx13("dt", { children: "Status" }),
5600
- /* @__PURE__ */ jsx13("dd", { children: humanize(payment.status || "posted") })
5665
+ /* @__PURE__ */ jsxs14("div", { children: [
5666
+ /* @__PURE__ */ jsx14("dt", { children: "Status" }),
5667
+ /* @__PURE__ */ jsx14("dd", { children: humanize(payment.status || "posted") })
5601
5668
  ] })
5602
5669
  ] }),
5603
- payment.feeReason ? /* @__PURE__ */ jsx13("p", { children: payment.feeReason }) : null,
5604
- payment.note ? /* @__PURE__ */ jsx13("p", { children: payment.note }) : null
5670
+ payment.feeReason ? /* @__PURE__ */ jsx14("p", { children: payment.feeReason }) : null,
5671
+ payment.note ? /* @__PURE__ */ jsx14("p", { children: payment.note }) : null
5605
5672
  ] }, payment.id);
5606
5673
  }) })
5607
5674
  ] });
@@ -5672,7 +5739,7 @@ import {
5672
5739
 
5673
5740
  // src/second-review-form.tsx
5674
5741
  import { useMemo as useMemo8, useState as useState11 } from "react";
5675
- import { Fragment as Fragment12, jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
5742
+ import { Fragment as Fragment13, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
5676
5743
  var SECOND_REVIEW_REASON_TEMPLATES = [
5677
5744
  {
5678
5745
  label: "Med-legal report denied",
@@ -5829,90 +5896,90 @@ function SecondReviewForm({
5829
5896
  setPreparing(false);
5830
5897
  }
5831
5898
  };
5832
- return /* @__PURE__ */ jsxs14(Fragment12, { children: [
5833
- /* @__PURE__ */ jsx14("style", { children: css10 }),
5834
- /* @__PURE__ */ jsxs14("section", { className: "mb-second-review", children: [
5835
- /* @__PURE__ */ jsxs14("div", { children: [
5836
- /* @__PURE__ */ jsx14("h3", { children: "Submit Second Review" }),
5837
- /* @__PURE__ */ jsx14("p", { children: "Select each disputed service and explain why it should be reconsidered." })
5899
+ return /* @__PURE__ */ jsxs15(Fragment13, { children: [
5900
+ /* @__PURE__ */ jsx15("style", { children: css10 }),
5901
+ /* @__PURE__ */ jsxs15("section", { className: "mb-second-review", children: [
5902
+ /* @__PURE__ */ jsxs15("div", { children: [
5903
+ /* @__PURE__ */ jsx15("h3", { children: "Submit Second Review" }),
5904
+ /* @__PURE__ */ jsx15("p", { children: "Select each disputed service and explain why it should be reconsidered." })
5838
5905
  ] }),
5839
- /* @__PURE__ */ jsxs14("label", { className: "mb-second-review-template", children: [
5840
- /* @__PURE__ */ jsx14("span", { className: "mb-second-review-label", children: "Apply a saved reason to selected lines" }),
5841
- /* @__PURE__ */ jsxs14("select", { className: "mb-second-review-select", defaultValue: "", onChange: (event) => {
5906
+ /* @__PURE__ */ jsxs15("label", { className: "mb-second-review-template", children: [
5907
+ /* @__PURE__ */ jsx15("span", { className: "mb-second-review-label", children: "Apply a saved reason to selected lines" }),
5908
+ /* @__PURE__ */ jsxs15("select", { className: "mb-second-review-select", defaultValue: "", onChange: (event) => {
5842
5909
  applyTemplate(event.target.value);
5843
5910
  event.target.value = "";
5844
5911
  }, children: [
5845
- /* @__PURE__ */ jsx14("option", { value: "", children: "Choose a reason template (optional)" }),
5846
- SECOND_REVIEW_REASON_TEMPLATES.map((template) => /* @__PURE__ */ jsx14("option", { value: template.value, children: template.label }, template.label))
5912
+ /* @__PURE__ */ jsx15("option", { value: "", children: "Choose a reason template (optional)" }),
5913
+ SECOND_REVIEW_REASON_TEMPLATES.map((template) => /* @__PURE__ */ jsx15("option", { value: template.value, children: template.label }, template.label))
5847
5914
  ] })
5848
5915
  ] }),
5849
- /* @__PURE__ */ jsxs14("section", { className: "mb-second-review-lines", "aria-label": "Service lines in dispute", children: [
5916
+ /* @__PURE__ */ jsxs15("section", { className: "mb-second-review-lines", "aria-label": "Service lines in dispute", children: [
5850
5917
  selectableLines.map((line) => {
5851
5918
  const draft = lines[line.id];
5852
- return /* @__PURE__ */ jsxs14("article", { className: "mb-second-review-line", "data-selected": draft?.selected, children: [
5853
- /* @__PURE__ */ jsxs14("div", { className: "mb-second-review-line-head", children: [
5854
- /* @__PURE__ */ jsxs14("label", { className: "mb-second-review-check", children: [
5855
- /* @__PURE__ */ jsx14("input", { type: "checkbox", checked: Boolean(draft?.selected), onChange: (event) => patchLine(line.id, { selected: event.target.checked }) }),
5856
- /* @__PURE__ */ jsxs14("span", { children: [
5919
+ return /* @__PURE__ */ jsxs15("article", { className: "mb-second-review-line", "data-selected": draft?.selected, children: [
5920
+ /* @__PURE__ */ jsxs15("div", { className: "mb-second-review-line-head", children: [
5921
+ /* @__PURE__ */ jsxs15("label", { className: "mb-second-review-check", children: [
5922
+ /* @__PURE__ */ jsx15("input", { type: "checkbox", checked: Boolean(draft?.selected), onChange: (event) => patchLine(line.id, { selected: event.target.checked }) }),
5923
+ /* @__PURE__ */ jsxs15("span", { children: [
5857
5924
  line.code,
5858
5925
  line.modifiers.length ? `-${line.modifiers.join("-")}` : ""
5859
5926
  ] })
5860
5927
  ] }),
5861
- /* @__PURE__ */ jsxs14("span", { className: "mb-second-review-metrics", children: [
5862
- /* @__PURE__ */ jsxs14("span", { children: [
5928
+ /* @__PURE__ */ jsxs15("span", { className: "mb-second-review-metrics", children: [
5929
+ /* @__PURE__ */ jsxs15("span", { children: [
5863
5930
  line.units,
5864
5931
  " unit",
5865
5932
  line.units === 1 ? "" : "s"
5866
5933
  ] }),
5867
- /* @__PURE__ */ jsx14("span", { children: money5(line.charge) })
5934
+ /* @__PURE__ */ jsx15("span", { children: money5(line.charge) })
5868
5935
  ] })
5869
5936
  ] }),
5870
- draft?.selected ? /* @__PURE__ */ jsxs14(Fragment12, { children: [
5871
- /* @__PURE__ */ jsxs14("label", { className: "mb-second-review-field", children: [
5872
- /* @__PURE__ */ jsx14("span", { className: "mb-second-review-label", children: "Reason for requesting Second Review" }),
5873
- /* @__PURE__ */ jsx14("textarea", { className: "mb-second-review-textarea", required: true, value: draft.reason, onChange: (event) => patchLine(line.id, { reason: event.target.value }) })
5937
+ draft?.selected ? /* @__PURE__ */ jsxs15(Fragment13, { children: [
5938
+ /* @__PURE__ */ jsxs15("label", { className: "mb-second-review-field", children: [
5939
+ /* @__PURE__ */ jsx15("span", { className: "mb-second-review-label", children: "Reason for requesting Second Review" }),
5940
+ /* @__PURE__ */ jsx15("textarea", { className: "mb-second-review-textarea", required: true, value: draft.reason, onChange: (event) => patchLine(line.id, { reason: event.target.value }) })
5874
5941
  ] }),
5875
- /* @__PURE__ */ jsxs14("div", { className: "mb-second-review-auth", role: "radiogroup", "aria-label": `Service or good ${line.code} authorized`, children: [
5876
- /* @__PURE__ */ jsx14("strong", { children: "Service/Good Authorized?" }),
5877
- [["yes", "Yes"], ["no", "No"], ["", "Not specified"]].map(([value, label]) => /* @__PURE__ */ jsxs14("label", { children: [
5878
- /* @__PURE__ */ jsx14("input", { type: "radio", name: `authorized-${line.id}`, checked: draft.serviceAuthorized === value, onChange: () => patchLine(line.id, { serviceAuthorized: value }) }),
5942
+ /* @__PURE__ */ jsxs15("div", { className: "mb-second-review-auth", role: "radiogroup", "aria-label": `Service or good ${line.code} authorized`, children: [
5943
+ /* @__PURE__ */ jsx15("strong", { children: "Service/Good Authorized?" }),
5944
+ [["yes", "Yes"], ["no", "No"], ["", "Not specified"]].map(([value, label]) => /* @__PURE__ */ jsxs15("label", { children: [
5945
+ /* @__PURE__ */ jsx15("input", { type: "radio", name: `authorized-${line.id}`, checked: draft.serviceAuthorized === value, onChange: () => patchLine(line.id, { serviceAuthorized: value }) }),
5879
5946
  label
5880
5947
  ] }, label))
5881
5948
  ] })
5882
5949
  ] }) : null
5883
5950
  ] }, line.id);
5884
5951
  }),
5885
- !selectableLines.length ? /* @__PURE__ */ jsx14("div", { className: "mb-second-review-error", children: "This bill has no stable service-line identifiers. Refresh the bill before submitting a Second Review." }) : null
5952
+ !selectableLines.length ? /* @__PURE__ */ jsx15("div", { className: "mb-second-review-error", children: "This bill has no stable service-line identifiers. Refresh the bill before submitting a Second Review." }) : null
5886
5953
  ] }),
5887
- /* @__PURE__ */ jsxs14("fieldset", { className: "mb-second-review-packet", children: [
5888
- /* @__PURE__ */ jsx14("legend", { children: "Supporting packet" }),
5889
- data.bill.attachments.map((attachment) => /* @__PURE__ */ jsxs14("label", { className: "mb-second-review-document", children: [
5890
- /* @__PURE__ */ jsx14("input", { type: "checkbox", checked: attachmentIds.includes(attachment.id), onChange: (event) => setAttachmentIds((current) => event.target.checked ? [...current, attachment.id] : current.filter((id) => id !== attachment.id)) }),
5891
- /* @__PURE__ */ jsxs14("span", { children: [
5892
- /* @__PURE__ */ jsx14("strong", { children: attachment.filename }),
5893
- /* @__PURE__ */ jsx14("small", { children: attachment.description || attachment.documentType })
5954
+ /* @__PURE__ */ jsxs15("fieldset", { className: "mb-second-review-packet", children: [
5955
+ /* @__PURE__ */ jsx15("legend", { children: "Supporting packet" }),
5956
+ data.bill.attachments.map((attachment) => /* @__PURE__ */ jsxs15("label", { className: "mb-second-review-document", children: [
5957
+ /* @__PURE__ */ jsx15("input", { type: "checkbox", checked: attachmentIds.includes(attachment.id), onChange: (event) => setAttachmentIds((current) => event.target.checked ? [...current, attachment.id] : current.filter((id) => id !== attachment.id)) }),
5958
+ /* @__PURE__ */ jsxs15("span", { children: [
5959
+ /* @__PURE__ */ jsx15("strong", { children: attachment.filename }),
5960
+ /* @__PURE__ */ jsx15("small", { children: attachment.description || attachment.documentType })
5894
5961
  ] }),
5895
- /* @__PURE__ */ jsx14("button", { className: "mb-second-review-link", type: "button", onClick: () => void openAttachment(attachment).catch(() => void 0), children: "View" })
5962
+ /* @__PURE__ */ jsx15("button", { className: "mb-second-review-link", type: "button", onClick: () => void openAttachment(attachment).catch(() => void 0), children: "View" })
5896
5963
  ] }, attachment.id)),
5897
- /* @__PURE__ */ jsxs14("label", { className: "mb-second-review-upload", children: [
5898
- /* @__PURE__ */ jsx14("input", { type: "file", accept: "application/pdf,.pdf", multiple: true, onChange: addUploads }),
5899
- /* @__PURE__ */ jsxs14("span", { children: [
5900
- /* @__PURE__ */ jsx14("strong", { children: "Choose one or more PDF files" }),
5964
+ /* @__PURE__ */ jsxs15("label", { className: "mb-second-review-upload", children: [
5965
+ /* @__PURE__ */ jsx15("input", { type: "file", accept: "application/pdf,.pdf", multiple: true, onChange: addUploads }),
5966
+ /* @__PURE__ */ jsxs15("span", { children: [
5967
+ /* @__PURE__ */ jsx15("strong", { children: "Choose one or more PDF files" }),
5901
5968
  " to attach"
5902
5969
  ] })
5903
5970
  ] }),
5904
- uploads.map((upload, index) => /* @__PURE__ */ jsxs14("div", { className: "mb-second-review-uploaded", children: [
5905
- /* @__PURE__ */ jsx14("span", { children: upload.file.name }),
5906
- /* @__PURE__ */ jsx14("button", { className: "mb-second-review-link", type: "button", onClick: () => setUploads((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "Remove" })
5971
+ uploads.map((upload, index) => /* @__PURE__ */ jsxs15("div", { className: "mb-second-review-uploaded", children: [
5972
+ /* @__PURE__ */ jsx15("span", { children: upload.file.name }),
5973
+ /* @__PURE__ */ jsx15("button", { className: "mb-second-review-link", type: "button", onClick: () => setUploads((current) => current.filter((_, itemIndex) => itemIndex !== index)), children: "Remove" })
5907
5974
  ] }, `${upload.file.name}-${index}`))
5908
5975
  ] }),
5909
- formError || error?.message ? /* @__PURE__ */ jsx14("div", { className: "mb-second-review-error", role: "alert", children: formError || error?.message }) : null,
5910
- /* @__PURE__ */ jsxs14("div", { className: "mb-second-review-actions", children: [
5911
- /* @__PURE__ */ jsx14("button", { className: "mb-second-review-button secondary", type: "button", disabled: submitting || preparing, onClick: onCancel, children: "Cancel" }),
5912
- /* @__PURE__ */ jsx14("button", { className: "mb-second-review-button primary", type: "button", disabled: submitting || preparing || !selected.length || invalidReason, onClick: () => void continueToDelivery(), children: preparing ? "Preparing\u2026" : "Continue to delivery" })
5976
+ formError || error?.message ? /* @__PURE__ */ jsx15("div", { className: "mb-second-review-error", role: "alert", children: formError || error?.message }) : null,
5977
+ /* @__PURE__ */ jsxs15("div", { className: "mb-second-review-actions", children: [
5978
+ /* @__PURE__ */ jsx15("button", { className: "mb-second-review-button secondary", type: "button", disabled: submitting || preparing, onClick: onCancel, children: "Cancel" }),
5979
+ /* @__PURE__ */ jsx15("button", { className: "mb-second-review-button primary", type: "button", disabled: submitting || preparing || !selected.length || invalidReason, onClick: () => void continueToDelivery(), children: preparing ? "Preparing\u2026" : "Continue to delivery" })
5913
5980
  ] })
5914
5981
  ] }),
5915
- delivery ? /* @__PURE__ */ jsx14(SendRouteDialog, { title: "Confirm Second Review delivery", delivery, submitting: submitting || preparing, error: formError || error?.message || null, onCancel: () => setDelivery(null), onConfirm: (route) => void submit(route) }) : null
5982
+ delivery ? /* @__PURE__ */ jsx15(SendRouteDialog, { title: "Confirm Second Review delivery", delivery, submitting: submitting || preparing, error: formError || error?.message || null, onCancel: () => setDelivery(null), onConfirm: (route) => void submit(route) }) : null
5916
5983
  ] });
5917
5984
  }
5918
5985
 
@@ -5924,7 +5991,7 @@ import {
5924
5991
  reportBillStatusContacts as reportBillStatusContacts2,
5925
5992
  secondReviewDeadline as secondReviewDeadline2
5926
5993
  } from "@mindbill/browser";
5927
- import { Fragment as Fragment13, jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
5994
+ import { Fragment as Fragment14, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
5928
5995
  var DEFAULT_REFRESH_INTERVAL2 = 6e4;
5929
5996
  function reservePreviewWindow() {
5930
5997
  const preview = window.open("about:blank", "_blank");
@@ -6091,8 +6158,8 @@ function LifecycleDialog({ children, title, wide = false, onClose }) {
6091
6158
  previous?.focus();
6092
6159
  };
6093
6160
  }, []);
6094
- return /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-dialog-backdrop", onMouseDown: (event) => event.currentTarget === event.target && onClose(), children: /* @__PURE__ */ jsxs15("div", { ref: dialog, className: ["mb-lifecycle-dialog", wide ? "wide" : ""].filter(Boolean).join(" "), role: "dialog", "aria-modal": "true", "aria-label": title, tabIndex: -1, children: [
6095
- /* @__PURE__ */ jsx15("button", { type: "button", className: "mb-lifecycle-dialog-close", "aria-label": "Close", onClick: onClose, children: "\xD7" }),
6161
+ return /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-dialog-backdrop", onMouseDown: (event) => event.currentTarget === event.target && onClose(), children: /* @__PURE__ */ jsxs16("div", { ref: dialog, className: ["mb-lifecycle-dialog", wide ? "wide" : ""].filter(Boolean).join(" "), role: "dialog", "aria-modal": "true", "aria-label": title, tabIndex: -1, children: [
6162
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-lifecycle-dialog-close", "aria-label": "Close", onClick: onClose, children: "\xD7" }),
6096
6163
  children
6097
6164
  ] }) });
6098
6165
  }
@@ -6131,22 +6198,22 @@ function correctionRejectionSummary(rejection) {
6131
6198
  function CorrectionRejectionReason({ rejection }) {
6132
6199
  const summary = correctionRejectionSummary(rejection);
6133
6200
  const details = rejection.issues?.filter((issue) => issue.description.trim() !== summary.description || Boolean(issue.code?.trim() && issue.code.trim() !== summary.code)) ?? [];
6134
- return /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-correction-reason", role: "alert", children: [
6135
- summary.code ? /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-correction-reason-code", children: [
6136
- /* @__PURE__ */ jsx15("span", { children: "Rejection code" }),
6137
- /* @__PURE__ */ jsx15("code", { children: summary.code }),
6138
- summary.clearinghouseDetail ? /* @__PURE__ */ jsxs15("small", { children: [
6139
- /* @__PURE__ */ jsx15("span", { children: "Clearinghouse detail" }),
6201
+ return /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-correction-reason", role: "alert", children: [
6202
+ summary.code ? /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-correction-reason-code", children: [
6203
+ /* @__PURE__ */ jsx16("span", { children: "Rejection code" }),
6204
+ /* @__PURE__ */ jsx16("code", { children: summary.code }),
6205
+ summary.clearinghouseDetail ? /* @__PURE__ */ jsxs16("small", { children: [
6206
+ /* @__PURE__ */ jsx16("span", { children: "Clearinghouse detail" }),
6140
6207
  summary.clearinghouseDetail
6141
6208
  ] }) : null
6142
6209
  ] }) : null,
6143
- /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-correction-reason-description", children: [
6144
- /* @__PURE__ */ jsx15("span", { children: "Reason" }),
6145
- /* @__PURE__ */ jsx15("strong", { children: summary.description })
6210
+ /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-correction-reason-description", children: [
6211
+ /* @__PURE__ */ jsx16("span", { children: "Reason" }),
6212
+ /* @__PURE__ */ jsx16("strong", { children: summary.description })
6146
6213
  ] }),
6147
- details.length ? /* @__PURE__ */ jsx15("ul", { "aria-label": "Additional rejection details", children: details.map((issue, index) => /* @__PURE__ */ jsxs15("li", { children: [
6148
- issue.code ? /* @__PURE__ */ jsx15("code", { children: issue.code }) : null,
6149
- /* @__PURE__ */ jsx15("span", { children: issue.description })
6214
+ details.length ? /* @__PURE__ */ jsx16("ul", { "aria-label": "Additional rejection details", children: details.map((issue, index) => /* @__PURE__ */ jsxs16("li", { children: [
6215
+ issue.code ? /* @__PURE__ */ jsx16("code", { children: issue.code }) : null,
6216
+ /* @__PURE__ */ jsx16("span", { children: issue.description })
6150
6217
  ] }, `${issue.code || "issue"}-${index}`)) }) : null
6151
6218
  ] });
6152
6219
  }
@@ -6187,16 +6254,16 @@ function CorrectionVerificationContact({ delivery }) {
6187
6254
  { label: "Mail", values: mailingAddresses }
6188
6255
  ].filter((method) => method.values.length);
6189
6256
  if (!methods.length) return null;
6190
- return /* @__PURE__ */ jsxs15("aside", { className: "mb-lifecycle-correction-contact", children: [
6191
- /* @__PURE__ */ jsx15("strong", { children: "Need to verify the rejected information?" }),
6192
- /* @__PURE__ */ jsxs15("span", { children: [
6257
+ return /* @__PURE__ */ jsxs16("aside", { className: "mb-lifecycle-correction-contact", children: [
6258
+ /* @__PURE__ */ jsx16("strong", { children: "Need to verify the rejected information?" }),
6259
+ /* @__PURE__ */ jsxs16("span", { children: [
6193
6260
  "Contact ",
6194
6261
  delivery.payerName,
6195
6262
  " using any available method:"
6196
6263
  ] }),
6197
- /* @__PURE__ */ jsx15("dl", { children: methods.map((method) => /* @__PURE__ */ jsxs15("div", { children: [
6198
- /* @__PURE__ */ jsx15("dt", { children: method.label }),
6199
- /* @__PURE__ */ jsx15("dd", { children: /* @__PURE__ */ jsx15("ul", { children: method.values.map((value) => /* @__PURE__ */ jsx15("li", { children: method.href ? /* @__PURE__ */ jsx15("a", { href: method.href(value), ...method.label === "Portal" ? { target: "_blank", rel: "noreferrer" } : {}, children: value }) : value }, value)) }) })
6264
+ /* @__PURE__ */ jsx16("dl", { children: methods.map((method) => /* @__PURE__ */ jsxs16("div", { children: [
6265
+ /* @__PURE__ */ jsx16("dt", { children: method.label }),
6266
+ /* @__PURE__ */ jsx16("dd", { children: /* @__PURE__ */ jsx16("ul", { children: method.values.map((value) => /* @__PURE__ */ jsx16("li", { children: method.href ? /* @__PURE__ */ jsx16("a", { href: method.href(value), ...method.label === "Portal" ? { target: "_blank", rel: "noreferrer" } : {}, children: value }) : value }, value)) }) })
6200
6267
  ] }, method.label)) })
6201
6268
  ] });
6202
6269
  }
@@ -6240,6 +6307,8 @@ function correctionBill(data) {
6240
6307
  ...billing ? { billingProvider: {
6241
6308
  name: billing.name,
6242
6309
  taxId: billing.taxId,
6310
+ ...billing.taxIdType ? { taxIdType: billing.taxIdType } : {},
6311
+ ...billing.taxIdType === "SSN" && billing.taxIdConfigured ? { sourceBillId: data.bill.id, ...billing.taxIdLast4 ? { taxIdLast4: billing.taxIdLast4 } : {} } : {},
6243
6312
  npi: billing.npi,
6244
6313
  ...billing.phone ? { phone: billing.phone } : {},
6245
6314
  address: {
@@ -6351,13 +6420,13 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6351
6420
  interestAmount: 0
6352
6421
  }));
6353
6422
  }, [data, onChanged]);
6354
- if (lifecycle.isLoading && !data) return /* @__PURE__ */ jsx15(Fragment13, { children: loadingFallback ?? /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-loading", children: "Loading bill\u2026" }) });
6423
+ if (lifecycle.isLoading && !data) return /* @__PURE__ */ jsx16(Fragment14, { children: loadingFallback ?? /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-loading", children: "Loading bill\u2026" }) });
6355
6424
  if (!data) {
6356
6425
  const error = lifecycle.error ?? new Error("Bill could not be loaded.");
6357
- return /* @__PURE__ */ jsx15(Fragment13, { children: errorFallback?.(error, lifecycle.refresh) ?? /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-error", role: "alert", children: [
6358
- /* @__PURE__ */ jsx15("strong", { children: "Billing is unavailable." }),
6359
- /* @__PURE__ */ jsx15("span", { children: error.message }),
6360
- /* @__PURE__ */ jsx15("button", { type: "button", onClick: () => void lifecycle.refresh(), children: "Try again" })
6426
+ return /* @__PURE__ */ jsx16(Fragment14, { children: errorFallback?.(error, lifecycle.refresh) ?? /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-error", role: "alert", children: [
6427
+ /* @__PURE__ */ jsx16("strong", { children: "Billing is unavailable." }),
6428
+ /* @__PURE__ */ jsx16("span", { children: error.message }),
6429
+ /* @__PURE__ */ jsx16("button", { type: "button", onClick: () => void lifecycle.refresh(), children: "Try again" })
6361
6430
  ] }) });
6362
6431
  }
6363
6432
  const complete = async (message, task) => {
@@ -6476,110 +6545,110 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6476
6545
  const statusContacts = reportBillStatusContacts(data.delivery);
6477
6546
  const receiptEntries = (data.history ?? []).filter((entry) => entry.kind === "submission" || entry.kind === "ack");
6478
6547
  const reviewDeadline = secondReviewDeadline(data.eors);
6479
- return /* @__PURE__ */ jsxs15("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
6480
- /* @__PURE__ */ jsx15("style", { children: CONNECTED_LIFECYCLE_STYLES }),
6481
- ribbonItems.length >= 2 ? /* @__PURE__ */ jsx15(BillSubmissionsRibbon, { items: ribbonItems, onSelect: (item) => {
6548
+ return /* @__PURE__ */ jsxs16("section", { className: ["mb-connected-lifecycle", className].filter(Boolean).join(" "), style: mindBillAppearanceStyle(appearance, style), children: [
6549
+ /* @__PURE__ */ jsx16("style", { children: CONNECTED_LIFECYCLE_STYLES }),
6550
+ ribbonItems.length >= 2 ? /* @__PURE__ */ jsx16(BillSubmissionsRibbon, { items: ribbonItems, onSelect: (item) => {
6482
6551
  setSelectedSubmissionId(item.id);
6483
6552
  setTab("details");
6484
6553
  }, ...appearance ? { appearance } : {} }) : null,
6485
- data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx15(BillRejectionNotice, { rejection: data.rejection, submittedAt: data.lifecycle.submittedAt ?? null, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx15(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
6486
- /* @__PURE__ */ jsxs15("header", { className: "mb-lifecycle-head", children: [
6487
- /* @__PURE__ */ jsxs15("div", { children: [
6488
- /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-title", children: /* @__PURE__ */ jsxs15("h2", { children: [
6554
+ data.lifecycle.state.toLowerCase() === "rejected" && data.rejection ? /* @__PURE__ */ jsx16(BillRejectionNotice, { rejection: data.rejection, submittedAt: data.lifecycle.submittedAt ?? null, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx16(BillLifecycleProgress, { state: data.lifecycle.state, nativeStatus: data.lifecycle.nativeStatus, submittedAt: data.lifecycle.submittedAt ?? null, agingDays: data.lifecycle.agingDays ?? null, ...appearance ? { appearance } : {} }),
6555
+ /* @__PURE__ */ jsxs16("header", { className: "mb-lifecycle-head", children: [
6556
+ /* @__PURE__ */ jsxs16("div", { children: [
6557
+ /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-title", children: /* @__PURE__ */ jsxs16("h2", { children: [
6489
6558
  "Bill #",
6490
6559
  data.bill.billNumber
6491
6560
  ] }) }),
6492
- /* @__PURE__ */ jsxs15("p", { children: [
6561
+ /* @__PURE__ */ jsxs16("p", { children: [
6493
6562
  "Claim ",
6494
6563
  data.injury.claimNumber || "\u2014",
6495
6564
  lifecycle.isRefreshing ? " \xB7 Refreshing\u2026" : ""
6496
6565
  ] })
6497
6566
  ] }),
6498
- /* @__PURE__ */ jsx15("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void lifecycle.downloadPacket().catch(() => void 0), children: "Download packet" })
6567
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating, onClick: () => void lifecycle.downloadPacket().catch(() => void 0), children: "Download packet" })
6499
6568
  ] }),
6500
- /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-tabs", role: "tablist", "aria-label": "Bill view", children: [
6501
- /* @__PURE__ */ jsx15("button", { type: "button", role: "tab", "aria-selected": tab === "details", onClick: () => setTab("details"), children: "Bill details" }),
6502
- /* @__PURE__ */ jsx15("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: "Bill history" })
6569
+ /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-tabs", role: "tablist", "aria-label": "Bill view", children: [
6570
+ /* @__PURE__ */ jsx16("button", { type: "button", role: "tab", "aria-selected": tab === "details", onClick: () => setTab("details"), children: "Bill details" }),
6571
+ /* @__PURE__ */ jsx16("button", { type: "button", role: "tab", "aria-selected": tab === "history", onClick: () => setTab("history"), children: "Bill history" })
6503
6572
  ] }),
6504
- tab === "details" ? /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: [
6505
- selectedAttempt && ribbonItems.length >= 2 ? /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-attempt-detail", "aria-label": "Selected submission detail", children: [
6506
- /* @__PURE__ */ jsxs15("header", { children: [
6507
- /* @__PURE__ */ jsxs15("div", { children: [
6508
- /* @__PURE__ */ jsx15("span", { children: "Selected submission" }),
6509
- /* @__PURE__ */ jsx15("h3", { children: selectedAttempt.label })
6573
+ tab === "details" ? /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: [
6574
+ selectedAttempt && ribbonItems.length >= 2 ? /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-attempt-detail", "aria-label": "Selected submission detail", children: [
6575
+ /* @__PURE__ */ jsxs16("header", { children: [
6576
+ /* @__PURE__ */ jsxs16("div", { children: [
6577
+ /* @__PURE__ */ jsx16("span", { children: "Selected submission" }),
6578
+ /* @__PURE__ */ jsx16("h3", { children: selectedAttempt.label })
6510
6579
  ] }),
6511
- /* @__PURE__ */ jsx15("strong", { children: selectedAttempt.isCurrent ? "Current" : "Previous" })
6580
+ /* @__PURE__ */ jsx16("strong", { children: selectedAttempt.isCurrent ? "Current" : "Previous" })
6512
6581
  ] }),
6513
- /* @__PURE__ */ jsxs15("dl", { children: [
6514
- /* @__PURE__ */ jsxs15("div", { children: [
6515
- /* @__PURE__ */ jsx15("dt", { children: "Bill" }),
6516
- /* @__PURE__ */ jsxs15("dd", { children: [
6582
+ /* @__PURE__ */ jsxs16("dl", { children: [
6583
+ /* @__PURE__ */ jsxs16("div", { children: [
6584
+ /* @__PURE__ */ jsx16("dt", { children: "Bill" }),
6585
+ /* @__PURE__ */ jsxs16("dd", { children: [
6517
6586
  "#",
6518
6587
  selectedAttempt.billNumber || data.bill.billNumber
6519
6588
  ] })
6520
6589
  ] }),
6521
- /* @__PURE__ */ jsxs15("div", { children: [
6522
- /* @__PURE__ */ jsx15("dt", { children: "Delivery" }),
6523
- /* @__PURE__ */ jsx15("dd", { children: selectedAttempt.deliveryLabel || "\u2014" })
6590
+ /* @__PURE__ */ jsxs16("div", { children: [
6591
+ /* @__PURE__ */ jsx16("dt", { children: "Delivery" }),
6592
+ /* @__PURE__ */ jsx16("dd", { children: selectedAttempt.deliveryLabel || "\u2014" })
6524
6593
  ] }),
6525
- /* @__PURE__ */ jsxs15("div", { children: [
6526
- /* @__PURE__ */ jsx15("dt", { children: "Sent" }),
6527
- /* @__PURE__ */ jsx15("dd", { children: selectedAttempt.sentAt ? new Date(selectedAttempt.sentAt).toLocaleString() : "\u2014" })
6594
+ /* @__PURE__ */ jsxs16("div", { children: [
6595
+ /* @__PURE__ */ jsx16("dt", { children: "Sent" }),
6596
+ /* @__PURE__ */ jsx16("dd", { children: selectedAttempt.sentAt ? new Date(selectedAttempt.sentAt).toLocaleString() : "\u2014" })
6528
6597
  ] }),
6529
- /* @__PURE__ */ jsxs15("div", { children: [
6530
- /* @__PURE__ */ jsx15("dt", { children: "Status" }),
6531
- /* @__PURE__ */ jsx15("dd", { children: selectedAttempt.ackLabel || selectedAttempt.status || "Submitted" })
6598
+ /* @__PURE__ */ jsxs16("div", { children: [
6599
+ /* @__PURE__ */ jsx16("dt", { children: "Status" }),
6600
+ /* @__PURE__ */ jsx16("dd", { children: selectedAttempt.ackLabel || selectedAttempt.status || "Submitted" })
6532
6601
  ] }),
6533
- selectedAttempt.complianceLabel ? /* @__PURE__ */ jsxs15("div", { children: [
6534
- /* @__PURE__ */ jsx15("dt", { children: selectedAttempt.complianceLabel }),
6535
- /* @__PURE__ */ jsx15("dd", { children: selectedAttempt.complianceAt ? new Date(selectedAttempt.complianceAt).toLocaleDateString() : "\u2014" })
6602
+ selectedAttempt.complianceLabel ? /* @__PURE__ */ jsxs16("div", { children: [
6603
+ /* @__PURE__ */ jsx16("dt", { children: selectedAttempt.complianceLabel }),
6604
+ /* @__PURE__ */ jsx16("dd", { children: selectedAttempt.complianceAt ? new Date(selectedAttempt.complianceAt).toLocaleDateString() : "\u2014" })
6536
6605
  ] }) : null
6537
6606
  ] })
6538
6607
  ] }) : null,
6539
- data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state) ? /* @__PURE__ */ jsx15(BillExplanationOfReview, { remittance: data.remittance, eors: data.eors, payments: data.payments, submittedAt: data.lifecycle.submittedAt ?? null, onOpenEor: lifecycle.openEor, ...appearance ? { appearance } : {} }) : null,
6540
- showSandboxControls ? /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
6541
- /* @__PURE__ */ jsxs15("div", { children: [
6542
- /* @__PURE__ */ jsx15("span", { children: "Sandbox demo controls" }),
6543
- /* @__PURE__ */ jsx15("h3", { children: "Simulate the next payer response" }),
6544
- /* @__PURE__ */ jsx15("p", { children: "This changes sandbox data only. The host receives the result through the same lifecycle API and components partners use." })
6608
+ data.eors.length || data.payments.length || ["processed", "denied", "partially_paid"].includes(data.lifecycle.state) ? /* @__PURE__ */ jsx16(BillExplanationOfReview, { remittance: data.remittance, eors: data.eors, payments: data.payments, submittedAt: data.lifecycle.submittedAt ?? null, onOpenEor: lifecycle.openEor, ...appearance ? { appearance } : {} }) : null,
6609
+ showSandboxControls ? /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-simulator", "aria-label": "Sandbox lifecycle simulator", children: [
6610
+ /* @__PURE__ */ jsxs16("div", { children: [
6611
+ /* @__PURE__ */ jsx16("span", { children: "Sandbox demo controls" }),
6612
+ /* @__PURE__ */ jsx16("h3", { children: "Simulate the next payer response" }),
6613
+ /* @__PURE__ */ jsx16("p", { children: "This changes sandbox data only. The host receives the result through the same lifecycle API and components partners use." })
6545
6614
  ] }),
6546
- simulations.length ? /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs15("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
6547
- /* @__PURE__ */ jsx15("strong", { children: scenario.label }),
6548
- /* @__PURE__ */ jsx15("span", { children: scenario.detail })
6549
- ] }, scenario.id)) }) : /* @__PURE__ */ jsx15("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
6615
+ simulations.length ? /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-simulator-actions", children: simulations.map((scenario) => /* @__PURE__ */ jsxs16("button", { type: "button", disabled: lifecycle.isMutating, onClick: () => void complete(`${scenario.label} simulated.`, () => lifecycle.simulateSandbox({ scenario: scenario.id })), children: [
6616
+ /* @__PURE__ */ jsx16("strong", { children: scenario.label }),
6617
+ /* @__PURE__ */ jsx16("span", { children: scenario.detail })
6618
+ ] }, scenario.id)) }) : /* @__PURE__ */ jsx16("p", { className: "mb-lifecycle-simulator-idle", children: "No simulated payer transition is needed at this stage. Use the bill action below to continue." })
6550
6619
  ] }) : null,
6551
- /* @__PURE__ */ jsx15(BillReadOnlyForm, { data, onOpenAttachment: lifecycle.openAttachment, ...appearance ? { appearance } : {} }),
6552
- /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-notes", "aria-label": "Bill notes", children: [
6553
- /* @__PURE__ */ jsxs15("header", { children: [
6554
- /* @__PURE__ */ jsxs15("div", { children: [
6555
- /* @__PURE__ */ jsx15("h3", { children: "Bill notes" }),
6556
- /* @__PURE__ */ jsx15("p", { children: "Shared with everyone working this bill through the Partner API." })
6620
+ /* @__PURE__ */ jsx16(BillReadOnlyForm, { data, onOpenAttachment: lifecycle.openAttachment, ...appearance ? { appearance } : {} }),
6621
+ /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-notes", "aria-label": "Bill notes", children: [
6622
+ /* @__PURE__ */ jsxs16("header", { children: [
6623
+ /* @__PURE__ */ jsxs16("div", { children: [
6624
+ /* @__PURE__ */ jsx16("h3", { children: "Bill notes" }),
6625
+ /* @__PURE__ */ jsx16("p", { children: "Shared with everyone working this bill through the Partner API." })
6557
6626
  ] }),
6558
- /* @__PURE__ */ jsx15("span", { children: billNotes.length })
6627
+ /* @__PURE__ */ jsx16("span", { children: billNotes.length })
6559
6628
  ] }),
6560
- billNotes.length ? /* @__PURE__ */ jsx15("ol", { children: billNotes.map((entry) => /* @__PURE__ */ jsxs15("li", { children: [
6561
- /* @__PURE__ */ jsx15("p", { children: entry.summary }),
6562
- /* @__PURE__ */ jsxs15("small", { children: [
6629
+ billNotes.length ? /* @__PURE__ */ jsx16("ol", { children: billNotes.map((entry) => /* @__PURE__ */ jsxs16("li", { children: [
6630
+ /* @__PURE__ */ jsx16("p", { children: entry.summary }),
6631
+ /* @__PURE__ */ jsxs16("small", { children: [
6563
6632
  entry.actor || "System",
6564
6633
  " \xB7 ",
6565
6634
  usDate(entry.date)
6566
6635
  ] })
6567
- ] }, entry.id)) }) : /* @__PURE__ */ jsx15("p", { className: "mb-lifecycle-notes-empty", children: "No notes yet." }),
6568
- /* @__PURE__ */ jsxs15("form", { onSubmit: (event) => {
6636
+ ] }, entry.id)) }) : /* @__PURE__ */ jsx16("p", { className: "mb-lifecycle-notes-empty", children: "No notes yet." }),
6637
+ /* @__PURE__ */ jsxs16("form", { onSubmit: (event) => {
6569
6638
  event.preventDefault();
6570
6639
  void addNote();
6571
6640
  }, children: [
6572
- /* @__PURE__ */ jsxs15("label", { children: [
6573
- /* @__PURE__ */ jsx15("span", { children: "Add a note" }),
6574
- /* @__PURE__ */ jsx15("textarea", { value: note, maxLength: 2e3, placeholder: "Add context for the billing team\u2026", onChange: (event) => setNote(event.target.value) })
6641
+ /* @__PURE__ */ jsxs16("label", { children: [
6642
+ /* @__PURE__ */ jsx16("span", { children: "Add a note" }),
6643
+ /* @__PURE__ */ jsx16("textarea", { value: note, maxLength: 2e3, placeholder: "Add context for the billing team\u2026", onChange: (event) => setNote(event.target.value) })
6575
6644
  ] }),
6576
- /* @__PURE__ */ jsx15("button", { type: "submit", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !note.trim(), children: lifecycle.isMutating ? "Adding\u2026" : "Add note" })
6645
+ /* @__PURE__ */ jsx16("button", { type: "submit", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !note.trim(), children: lifecycle.isMutating ? "Adding\u2026" : "Add note" })
6577
6646
  ] })
6578
6647
  ] })
6579
- ] }) : /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: data.history?.length ? /* @__PURE__ */ jsx15(BillHistoryTable, { entries: data.history, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx15(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
6580
- viewEor || actions.length ? /* @__PURE__ */ jsxs15("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
6581
- viewEor && data.eors[0] ? /* @__PURE__ */ jsx15("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
6582
- actions.map((action) => /* @__PURE__ */ jsx15("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
6648
+ ] }) : /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-tabpanel", role: "tabpanel", children: data.history?.length ? /* @__PURE__ */ jsx16(BillHistoryTable, { entries: data.history, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) : /* @__PURE__ */ jsx16(BillActivityTimeline, { events: data.activity, ...appearance ? { appearance } : {} }) }),
6649
+ viewEor || actions.length ? /* @__PURE__ */ jsxs16("aside", { className: "mb-lifecycle-actions-sheet", "aria-label": "Bill actions", children: [
6650
+ viewEor && data.eors[0] ? /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => void lifecycle.openEor(data.eors[0]).catch(() => void 0), children: viewEor.label }) : null,
6651
+ actions.map((action) => /* @__PURE__ */ jsx16("button", { type: "button", className: action.primary ? "mb-lifecycle-button primary" : "mb-lifecycle-button secondary", onClick: () => {
6583
6652
  const next = actionPanel(action);
6584
6653
  if (!next) return;
6585
6654
  if (next === "resubmit") setCorrectionError("");
@@ -6588,22 +6657,22 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6588
6657
  setPanel(next);
6589
6658
  }, children: action.label }, action.id))
6590
6659
  ] }) : null,
6591
- panel === "resubmit" && correctionInitialBill ? /* @__PURE__ */ jsx15(LifecycleDialog, { title: "Correct and resubmit", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-correction", children: [
6592
- /* @__PURE__ */ jsx15("header", { children: /* @__PURE__ */ jsxs15("div", { children: [
6593
- /* @__PURE__ */ jsx15("h3", { children: "Correct and resubmit" }),
6594
- /* @__PURE__ */ jsx15("p", { children: "Review the rejected snapshot, correct the highlighted information, and submit a new immutable attempt under this bill." })
6660
+ panel === "resubmit" && correctionInitialBill ? /* @__PURE__ */ jsx16(LifecycleDialog, { title: "Correct and resubmit", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-correction", children: [
6661
+ /* @__PURE__ */ jsx16("header", { children: /* @__PURE__ */ jsxs16("div", { children: [
6662
+ /* @__PURE__ */ jsx16("h3", { children: "Correct and resubmit" }),
6663
+ /* @__PURE__ */ jsx16("p", { children: "Review the rejected snapshot, correct the highlighted information, and submit a new immutable attempt under this bill." })
6595
6664
  ] }) }),
6596
- data.environment === "live" ? /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-live-warning", children: [
6597
- /* @__PURE__ */ jsx15("strong", { children: "Live clearinghouse submission" }),
6598
- /* @__PURE__ */ jsx15("span", { children: "Resubmitting sends a real bill. Confirm the corrected information before continuing." })
6665
+ data.environment === "live" ? /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-live-warning", children: [
6666
+ /* @__PURE__ */ jsx16("strong", { children: "Live clearinghouse submission" }),
6667
+ /* @__PURE__ */ jsx16("span", { children: "Resubmitting sends a real bill. Confirm the corrected information before continuing." })
6599
6668
  ] }) : null,
6600
- data.rejection ? /* @__PURE__ */ jsx15(CorrectionRejectionReason, { rejection: data.rejection }) : null,
6601
- /* @__PURE__ */ jsx15(CorrectionVerificationContact, { delivery: data.delivery }),
6602
- /* @__PURE__ */ jsxs15("label", { className: "mb-lifecycle-correction-note", children: [
6603
- /* @__PURE__ */ jsx15("span", { children: "Correction note (optional)" }),
6604
- /* @__PURE__ */ jsx15("textarea", { value: reason, placeholder: "What changed before resubmission?", onChange: (event) => setReason(event.target.value) })
6669
+ data.rejection ? /* @__PURE__ */ jsx16(CorrectionRejectionReason, { rejection: data.rejection }) : null,
6670
+ /* @__PURE__ */ jsx16(CorrectionVerificationContact, { delivery: data.delivery }),
6671
+ /* @__PURE__ */ jsxs16("label", { className: "mb-lifecycle-correction-note", children: [
6672
+ /* @__PURE__ */ jsx16("span", { children: "Correction note (optional)" }),
6673
+ /* @__PURE__ */ jsx16("textarea", { value: reason, placeholder: "What changed before resubmission?", onChange: (event) => setReason(event.target.value) })
6605
6674
  ] }),
6606
- /* @__PURE__ */ jsx15(
6675
+ /* @__PURE__ */ jsx16(
6607
6676
  BillSubmissionForm,
6608
6677
  {
6609
6678
  className: "mbsf-lifecycle-correction",
@@ -6629,18 +6698,18 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6629
6698
  ...appearance ? { appearance } : {}
6630
6699
  }
6631
6700
  ),
6632
- correctionError ? /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-message error", role: "alert", children: correctionError }) : null
6701
+ correctionError ? /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-message error", role: "alert", children: correctionError }) : null
6633
6702
  ] }) }) : null,
6634
- panel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */ jsx15(LifecycleDialog, { title: "Submit New Bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-correction", children: [
6635
- /* @__PURE__ */ jsx15("header", { children: /* @__PURE__ */ jsxs15("div", { children: [
6636
- /* @__PURE__ */ jsx15("h3", { children: "Submit New Bill" }),
6637
- /* @__PURE__ */ jsx15("p", { children: "This closed bill stays closed and keeps its record. Review the carried-over snapshot below and submit a fresh bill \u2014 both bills stay linked in the submissions timeline." })
6703
+ panel === "submit_new_bill" && correctionInitialBill ? /* @__PURE__ */ jsx16(LifecycleDialog, { title: "Submit New Bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-correction", children: [
6704
+ /* @__PURE__ */ jsx16("header", { children: /* @__PURE__ */ jsxs16("div", { children: [
6705
+ /* @__PURE__ */ jsx16("h3", { children: "Submit New Bill" }),
6706
+ /* @__PURE__ */ jsx16("p", { children: "This closed bill stays closed and keeps its record. Review the carried-over snapshot below and submit a fresh bill \u2014 both bills stay linked in the submissions timeline." })
6638
6707
  ] }) }),
6639
- /* @__PURE__ */ jsxs15("label", { className: "mb-lifecycle-correction-note", children: [
6640
- /* @__PURE__ */ jsx15("span", { children: "Submission note (optional)" }),
6641
- /* @__PURE__ */ jsx15("textarea", { value: reason, placeholder: "Why is a new bill being submitted?", onChange: (event) => setReason(event.target.value) })
6708
+ /* @__PURE__ */ jsxs16("label", { className: "mb-lifecycle-correction-note", children: [
6709
+ /* @__PURE__ */ jsx16("span", { children: "Submission note (optional)" }),
6710
+ /* @__PURE__ */ jsx16("textarea", { value: reason, placeholder: "Why is a new bill being submitted?", onChange: (event) => setReason(event.target.value) })
6642
6711
  ] }),
6643
- /* @__PURE__ */ jsx15(
6712
+ /* @__PURE__ */ jsx16(
6644
6713
  BillSubmissionForm,
6645
6714
  {
6646
6715
  className: "mbsf-lifecycle-correction",
@@ -6665,10 +6734,10 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6665
6734
  ...appearance ? { appearance } : {}
6666
6735
  }
6667
6736
  ),
6668
- newBillError ? /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-message error", role: "alert", children: newBillError }) : null
6737
+ newBillError ? /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-message error", role: "alert", children: newBillError }) : null
6669
6738
  ] }) }) : null,
6670
- panel === "second_review" ? /* @__PURE__ */ jsxs15(LifecycleDialog, { title: "Submit Second Review", wide: true, onClose: () => setPanel(""), children: [
6671
- /* @__PURE__ */ jsx15(
6739
+ panel === "second_review" ? /* @__PURE__ */ jsxs16(LifecycleDialog, { title: "Submit Second Review", wide: true, onClose: () => setPanel(""), children: [
6740
+ /* @__PURE__ */ jsx16(
6672
6741
  SecondReviewForm,
6673
6742
  {
6674
6743
  data,
@@ -6681,86 +6750,86 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6681
6750
  onSubmit: (input) => complete("Second Review submitted.", () => lifecycle.submitSecondReview({ ...input, ...actor }))
6682
6751
  }
6683
6752
  ),
6684
- reviewDeadline ? /* @__PURE__ */ jsxs15("p", { className: "mb-lifecycle-deadline-hint", children: [
6753
+ reviewDeadline ? /* @__PURE__ */ jsxs16("p", { className: "mb-lifecycle-deadline-hint", children: [
6685
6754
  "Second Review must be requested within 90 days of the denial EOR (dated ",
6686
6755
  usDate(reviewDeadline.eorDate),
6687
6756
  ") \u2014 file by ",
6688
- /* @__PURE__ */ jsx15("strong", { children: usDate(reviewDeadline.deadline) }),
6757
+ /* @__PURE__ */ jsx16("strong", { children: usDate(reviewDeadline.deadline) }),
6689
6758
  "."
6690
6759
  ] }) : null
6691
6760
  ] }) : null,
6692
- panel === "payment" ? /* @__PURE__ */ jsx15(LifecycleDialog, { title: "Post payment", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-panel", children: [
6693
- /* @__PURE__ */ jsxs15("div", { children: [
6694
- /* @__PURE__ */ jsx15("h3", { children: "Post payment" }),
6695
- /* @__PURE__ */ jsx15("p", { children: "Record a full or partial payment, plus any penalty and interest received." })
6761
+ panel === "payment" ? /* @__PURE__ */ jsx16(LifecycleDialog, { title: "Post payment", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-panel", children: [
6762
+ /* @__PURE__ */ jsxs16("div", { children: [
6763
+ /* @__PURE__ */ jsx16("h3", { children: "Post payment" }),
6764
+ /* @__PURE__ */ jsx16("p", { children: "Record a full or partial payment, plus any penalty and interest received." })
6696
6765
  ] }),
6697
- /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-fields two", children: [
6698
- /* @__PURE__ */ jsxs15("label", { children: [
6699
- /* @__PURE__ */ jsx15("span", { children: "Amount applied to bill" }),
6700
- /* @__PURE__ */ jsx15("input", { type: "number", min: "0.01", max: data.bill.balanceDue, step: "0.01", value: payment.amount || "", onChange: (event) => setPayment((current) => ({ ...current, amount: Number(event.target.value) })) })
6766
+ /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-fields two", children: [
6767
+ /* @__PURE__ */ jsxs16("label", { children: [
6768
+ /* @__PURE__ */ jsx16("span", { children: "Amount applied to bill" }),
6769
+ /* @__PURE__ */ jsx16("input", { type: "number", min: "0.01", max: data.bill.balanceDue, step: "0.01", value: payment.amount || "", onChange: (event) => setPayment((current) => ({ ...current, amount: Number(event.target.value) })) })
6701
6770
  ] }),
6702
- /* @__PURE__ */ jsxs15("label", { children: [
6703
- /* @__PURE__ */ jsx15("span", { children: "Penalty" }),
6704
- /* @__PURE__ */ jsx15("input", { type: "number", min: "0", step: "0.01", value: payment.penaltyAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, penaltyAmount: Number(event.target.value) })) })
6771
+ /* @__PURE__ */ jsxs16("label", { children: [
6772
+ /* @__PURE__ */ jsx16("span", { children: "Penalty" }),
6773
+ /* @__PURE__ */ jsx16("input", { type: "number", min: "0", step: "0.01", value: payment.penaltyAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, penaltyAmount: Number(event.target.value) })) })
6705
6774
  ] }),
6706
- /* @__PURE__ */ jsxs15("label", { children: [
6707
- /* @__PURE__ */ jsx15("span", { children: "Interest" }),
6708
- /* @__PURE__ */ jsx15("input", { type: "number", min: "0", step: "0.01", value: payment.interestAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, interestAmount: Number(event.target.value) })) })
6775
+ /* @__PURE__ */ jsxs16("label", { children: [
6776
+ /* @__PURE__ */ jsx16("span", { children: "Interest" }),
6777
+ /* @__PURE__ */ jsx16("input", { type: "number", min: "0", step: "0.01", value: payment.interestAmount || "", placeholder: "0.00", onChange: (event) => setPayment((current) => ({ ...current, interestAmount: Number(event.target.value) })) })
6709
6778
  ] }),
6710
- /* @__PURE__ */ jsxs15("label", { children: [
6711
- /* @__PURE__ */ jsx15("span", { children: "Method" }),
6712
- /* @__PURE__ */ jsxs15("select", { value: payment.method, onChange: (event) => setPayment((current) => ({ ...current, method: event.target.value })), children: [
6713
- /* @__PURE__ */ jsx15("option", { value: "check", children: "Check" }),
6714
- /* @__PURE__ */ jsx15("option", { value: "eft", children: "EFT" })
6779
+ /* @__PURE__ */ jsxs16("label", { children: [
6780
+ /* @__PURE__ */ jsx16("span", { children: "Method" }),
6781
+ /* @__PURE__ */ jsxs16("select", { value: payment.method, onChange: (event) => setPayment((current) => ({ ...current, method: event.target.value })), children: [
6782
+ /* @__PURE__ */ jsx16("option", { value: "check", children: "Check" }),
6783
+ /* @__PURE__ */ jsx16("option", { value: "eft", children: "EFT" })
6715
6784
  ] })
6716
6785
  ] }),
6717
- /* @__PURE__ */ jsxs15("label", { children: [
6718
- /* @__PURE__ */ jsx15("span", { children: payment.method === "check" ? "Check number" : "EFT reference" }),
6719
- /* @__PURE__ */ jsx15("input", { value: payment.checkNumber, onChange: (event) => setPayment((current) => ({ ...current, checkNumber: event.target.value })) })
6786
+ /* @__PURE__ */ jsxs16("label", { children: [
6787
+ /* @__PURE__ */ jsx16("span", { children: payment.method === "check" ? "Check number" : "EFT reference" }),
6788
+ /* @__PURE__ */ jsx16("input", { value: payment.checkNumber, onChange: (event) => setPayment((current) => ({ ...current, checkNumber: event.target.value })) })
6720
6789
  ] }),
6721
- /* @__PURE__ */ jsxs15("label", { children: [
6722
- /* @__PURE__ */ jsx15("span", { children: "Deposit date" }),
6723
- /* @__PURE__ */ jsx15("input", { required: true, value: payment.depositDate, placeholder: "MM/DD/YYYY", onChange: (event) => setPayment((current) => ({ ...current, depositDate: event.target.value })) })
6790
+ /* @__PURE__ */ jsxs16("label", { children: [
6791
+ /* @__PURE__ */ jsx16("span", { children: "Deposit date" }),
6792
+ /* @__PURE__ */ jsx16("input", { required: true, value: payment.depositDate, placeholder: "MM/DD/YYYY", onChange: (event) => setPayment((current) => ({ ...current, depositDate: event.target.value })) })
6724
6793
  ] }),
6725
- /* @__PURE__ */ jsxs15("label", { className: "full", children: [
6726
- /* @__PURE__ */ jsx15("span", { children: "Note (optional)" }),
6727
- /* @__PURE__ */ jsx15("input", { value: payment.note, onChange: (event) => setPayment((current) => ({ ...current, note: event.target.value })) })
6794
+ /* @__PURE__ */ jsxs16("label", { className: "full", children: [
6795
+ /* @__PURE__ */ jsx16("span", { children: "Note (optional)" }),
6796
+ /* @__PURE__ */ jsx16("input", { value: payment.note, onChange: (event) => setPayment((current) => ({ ...current, note: event.target.value })) })
6728
6797
  ] })
6729
6798
  ] }),
6730
- /* @__PURE__ */ jsxs15("div", { className: "mb-payment-total", children: [
6731
- /* @__PURE__ */ jsx15("span", { children: "Total received" }),
6732
- /* @__PURE__ */ jsx15("strong", { children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(payment.amount + (payment.penaltyAmount ?? 0) + (payment.interestAmount ?? 0)) })
6799
+ /* @__PURE__ */ jsxs16("div", { className: "mb-payment-total", children: [
6800
+ /* @__PURE__ */ jsx16("span", { children: "Total received" }),
6801
+ /* @__PURE__ */ jsx16("strong", { children: new Intl.NumberFormat(void 0, { style: "currency", currency: "USD" }).format(payment.amount + (payment.penaltyAmount ?? 0) + (payment.interestAmount ?? 0)) })
6733
6802
  ] }),
6734
- /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-panel-actions", children: [
6735
- /* @__PURE__ */ jsx15("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
6736
- /* @__PURE__ */ jsx15("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || payment.amount <= 0 || payment.amount > data.bill.balanceDue || (payment.penaltyAmount ?? 0) < 0 || (payment.interestAmount ?? 0) < 0 || !payment.depositDate, onClick: () => void complete("Payment posted.", () => lifecycle.postPayment({ ...payment, ...actor })), children: lifecycle.isMutating ? "Posting\u2026" : "Post payment" })
6803
+ /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-panel-actions", children: [
6804
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
6805
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || payment.amount <= 0 || payment.amount > data.bill.balanceDue || (payment.penaltyAmount ?? 0) < 0 || (payment.interestAmount ?? 0) < 0 || !payment.depositDate, onClick: () => void complete("Payment posted.", () => lifecycle.postPayment({ ...payment, ...actor })), children: lifecycle.isMutating ? "Posting\u2026" : "Post payment" })
6737
6806
  ] })
6738
6807
  ] }) }) : null,
6739
- panel === "close" || panel === "reopen" ? /* @__PURE__ */ jsx15(LifecycleDialog, { title: panel === "close" ? "Close bill" : "Reopen bill", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-panel", children: [
6740
- /* @__PURE__ */ jsxs15("div", { children: [
6741
- /* @__PURE__ */ jsx15("h3", { children: panel === "close" ? "Close bill" : "Reopen bill" }),
6742
- /* @__PURE__ */ jsx15("p", { children: panel === "close" ? "The immutable submission and history remain available." : "Return this bill to active follow-up without changing the submitted snapshot." })
6808
+ panel === "close" || panel === "reopen" ? /* @__PURE__ */ jsx16(LifecycleDialog, { title: panel === "close" ? "Close bill" : "Reopen bill", onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-panel", children: [
6809
+ /* @__PURE__ */ jsxs16("div", { children: [
6810
+ /* @__PURE__ */ jsx16("h3", { children: panel === "close" ? "Close bill" : "Reopen bill" }),
6811
+ /* @__PURE__ */ jsx16("p", { children: panel === "close" ? "The immutable submission and history remain available." : "Return this bill to active follow-up without changing the submitted snapshot." })
6743
6812
  ] }),
6744
- /* @__PURE__ */ jsxs15("label", { children: [
6745
- /* @__PURE__ */ jsx15("span", { children: "Reason" }),
6746
- /* @__PURE__ */ jsx15("textarea", { required: true, value: reason, onChange: (event) => setReason(event.target.value) })
6813
+ /* @__PURE__ */ jsxs16("label", { children: [
6814
+ /* @__PURE__ */ jsx16("span", { children: "Reason" }),
6815
+ /* @__PURE__ */ jsx16("textarea", { required: true, value: reason, onChange: (event) => setReason(event.target.value) })
6747
6816
  ] }),
6748
- /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-panel-actions", children: [
6749
- /* @__PURE__ */ jsx15("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
6750
- /* @__PURE__ */ jsx15("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !reason.trim(), onClick: () => void complete(panel === "close" ? "Bill closed." : "Bill reopened.", () => panel === "close" ? lifecycle.closeBill({ reason, ...actor }) : lifecycle.reopenBill({ reason, ...actor })), children: lifecycle.isMutating ? "Saving\u2026" : panel === "close" ? "Close bill" : "Reopen bill" })
6817
+ /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-panel-actions", children: [
6818
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-lifecycle-button secondary", onClick: () => setPanel(""), children: "Cancel" }),
6819
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "mb-lifecycle-button primary", disabled: lifecycle.isMutating || !reason.trim(), onClick: () => void complete(panel === "close" ? "Bill closed." : "Bill reopened.", () => panel === "close" ? lifecycle.closeBill({ reason, ...actor }) : lifecycle.reopenBill({ reason, ...actor })), children: lifecycle.isMutating ? "Saving\u2026" : panel === "close" ? "Close bill" : "Reopen bill" })
6751
6820
  ] })
6752
6821
  ] }) }) : null,
6753
- panel === "send_duplicate" && correctionInitialBill ? /* @__PURE__ */ jsx15(LifecycleDialog, { title: "Send duplicate bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs15("section", { className: "mb-lifecycle-correction", children: [
6754
- /* @__PURE__ */ jsx15("header", { children: /* @__PURE__ */ jsxs15("div", { children: [
6755
- /* @__PURE__ */ jsx15("h3", { children: "Send duplicate bill" }),
6756
- /* @__PURE__ */ jsx15("p", { children: "Review and edit any bill field before creating a duplicate submission. The original bill and its history stay unchanged." })
6822
+ panel === "send_duplicate" && correctionInitialBill ? /* @__PURE__ */ jsx16(LifecycleDialog, { title: "Send duplicate bill", wide: true, onClose: () => setPanel(""), children: /* @__PURE__ */ jsxs16("section", { className: "mb-lifecycle-correction", children: [
6823
+ /* @__PURE__ */ jsx16("header", { children: /* @__PURE__ */ jsxs16("div", { children: [
6824
+ /* @__PURE__ */ jsx16("h3", { children: "Send duplicate bill" }),
6825
+ /* @__PURE__ */ jsx16("p", { children: "Review and edit any bill field before creating a duplicate submission. The original bill and its history stay unchanged." })
6757
6826
  ] }) }),
6758
- data.environment === "live" ? /* @__PURE__ */ jsxs15("div", { className: "mb-lifecycle-live-warning", children: [
6759
- /* @__PURE__ */ jsx15("strong", { children: "Live clearinghouse submission" }),
6760
- /* @__PURE__ */ jsx15("span", { children: "The duplicate will be sent only after you confirm its delivery route in the next dialog." })
6827
+ data.environment === "live" ? /* @__PURE__ */ jsxs16("div", { className: "mb-lifecycle-live-warning", children: [
6828
+ /* @__PURE__ */ jsx16("strong", { children: "Live clearinghouse submission" }),
6829
+ /* @__PURE__ */ jsx16("span", { children: "The duplicate will be sent only after you confirm its delivery route in the next dialog." })
6761
6830
  ] }) : null,
6762
- /* @__PURE__ */ jsx15(CorrectionVerificationContact, { delivery: data.delivery }),
6763
- /* @__PURE__ */ jsx15(
6831
+ /* @__PURE__ */ jsx16(CorrectionVerificationContact, { delivery: data.delivery }),
6832
+ /* @__PURE__ */ jsx16(
6764
6833
  BillSubmissionForm,
6765
6834
  {
6766
6835
  className: "mbsf-lifecycle-correction",
@@ -6785,15 +6854,15 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6785
6854
  ...appearance ? { appearance } : {}
6786
6855
  }
6787
6856
  ),
6788
- duplicateError ? /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-message error", role: "alert", children: duplicateError }) : null
6857
+ duplicateError ? /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-message error", role: "alert", children: duplicateError }) : null
6789
6858
  ] }) }) : null,
6790
- panel === "report_status" ? /* @__PURE__ */ jsx15(
6859
+ panel === "report_status" ? /* @__PURE__ */ jsx16(
6791
6860
  ReportBillStatusDialog,
6792
6861
  {
6793
6862
  ...data.delivery.directory ? { directory: data.delivery.directory } : {},
6794
6863
  ...statusContacts.claimsAdmin ? { claimsAdmin: statusContacts.claimsAdmin } : {},
6795
6864
  ...statusContacts.billReview ? { billReview: statusContacts.billReview } : {},
6796
- ...receiptEntries.length ? { receipt: /* @__PURE__ */ jsx15(BillHistoryTable, { entries: receiptEntries, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) } : {},
6865
+ ...receiptEntries.length ? { receipt: /* @__PURE__ */ jsx16(BillHistoryTable, { entries: receiptEntries, onOpenDocument: lifecycle.openAttachment, ...appearance ? { appearance } : {} }) } : {},
6797
6866
  submitting: lifecycle.isMutating,
6798
6867
  error: lifecycle.error?.message ?? null,
6799
6868
  onCancel: () => setPanel(""),
@@ -6801,8 +6870,8 @@ function ConnectedBillLifecycle({ appearance, actorName, claimsAdministratorHint
6801
6870
  ...appearance ? { appearance } : {}
6802
6871
  }
6803
6872
  ) : null,
6804
- notice ? /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-message success", role: "status", children: notice }) : null,
6805
- lifecycle.error ? /* @__PURE__ */ jsx15("div", { className: "mb-lifecycle-message error", role: "alert", children: lifecycle.error.message }) : null
6873
+ notice ? /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-message success", role: "status", children: notice }) : null,
6874
+ lifecycle.error ? /* @__PURE__ */ jsx16("div", { className: "mb-lifecycle-message error", role: "alert", children: lifecycle.error.message }) : null
6806
6875
  ] });
6807
6876
  }
6808
6877
  var CONNECTED_LIFECYCLE_STYLES = `
@@ -6961,7 +7030,7 @@ function createBillingOperationsClient({
6961
7030
  }
6962
7031
 
6963
7032
  // src/connected-billing-workspace.tsx
6964
- import { Fragment as Fragment14, jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
7033
+ import { Fragment as Fragment15, jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
6965
7034
  var css11 = `
6966
7035
  .mbow{color:var(--mb-text);font:14px/1.45 var(--mb-font);background:var(--mb-soft);border-radius:var(--mb-radius);padding:20px}.mbow *{box-sizing:border-box}.mbow h2,.mbow h3,.mbow p{margin:0}.mbow a{color:var(--mb-accent)}
6967
7036
  .mbow-workspace{width:100%;height:100%;max-height:var(--mbow-available-height,100dvh);min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
@@ -6990,8 +7059,8 @@ function defaultRange(days = 29) {
6990
7059
  return { from: iso(from), to: iso(to) };
6991
7060
  }
6992
7061
  function Surface({ appearance, className = "", style, children, surfaceRef }) {
6993
- return /* @__PURE__ */ jsxs16("div", { ref: surfaceRef, className: `mbow ${className}`.trim(), style: mindBillAppearanceStyle(appearance, style), children: [
6994
- /* @__PURE__ */ jsx16("style", { children: css11 }),
7062
+ return /* @__PURE__ */ jsxs17("div", { ref: surfaceRef, className: `mbow ${className}`.trim(), style: mindBillAppearanceStyle(appearance, style), children: [
7063
+ /* @__PURE__ */ jsx17("style", { children: css11 }),
6995
7064
  children
6996
7065
  ] });
6997
7066
  }
@@ -7055,70 +7124,70 @@ function BillSearchContent({
7055
7124
  }, [load]);
7056
7125
  const update = (next) => setQuery((current) => ({ ...current, ...next, page: next.page ?? 1 }));
7057
7126
  const pageCount = Math.max(1, Math.ceil((result?.total ?? 0) / (result?.pageSize ?? 25)));
7058
- return /* @__PURE__ */ jsxs16(Fragment14, { children: [
7059
- heading ? /* @__PURE__ */ jsx16("div", { className: "mbow-head", children: /* @__PURE__ */ jsx16("div", { children: typeof heading === "string" ? /* @__PURE__ */ jsx16("h2", { children: heading }) : heading }) }) : null,
7060
- /* @__PURE__ */ jsxs16("form", { className: "mbow-toolbar", onSubmit: (event) => {
7127
+ return /* @__PURE__ */ jsxs17(Fragment15, { children: [
7128
+ heading ? /* @__PURE__ */ jsx17("div", { className: "mbow-head", children: /* @__PURE__ */ jsx17("div", { children: typeof heading === "string" ? /* @__PURE__ */ jsx17("h2", { children: heading }) : heading }) }) : null,
7129
+ /* @__PURE__ */ jsxs17("form", { className: "mbow-toolbar", onSubmit: (event) => {
7061
7130
  event.preventDefault();
7062
7131
  update({ q: draft.trim() });
7063
7132
  }, children: [
7064
- /* @__PURE__ */ jsx16("input", { className: "mbow-input", value: draft, onChange: (event) => setDraft(event.target.value), placeholder: "Search patient, bill ID, claim, or external ID\u2026", "aria-label": "Search bills" }),
7065
- /* @__PURE__ */ jsxs16("select", { className: "mbow-select", value: query.status ?? "all", onChange: (event) => update({ status: event.target.value }), "aria-label": "Bill status", children: [
7066
- /* @__PURE__ */ jsx16("option", { value: "all", children: "All statuses" }),
7067
- /* @__PURE__ */ jsx16("option", { value: "incomplete", children: "Incomplete" }),
7068
- /* @__PURE__ */ jsx16("option", { value: "sent", children: "Sent" }),
7069
- /* @__PURE__ */ jsx16("option", { value: "accepted", children: "Accepted" }),
7070
- /* @__PURE__ */ jsx16("option", { value: "accepted_no_response", children: "Accepted \u2014 response overdue" }),
7071
- /* @__PURE__ */ jsx16("option", { value: "rejected", children: "Rejected" }),
7072
- /* @__PURE__ */ jsx16("option", { value: "processed", children: "Processed" }),
7073
- /* @__PURE__ */ jsx16("option", { value: "paid", children: "Paid" }),
7074
- /* @__PURE__ */ jsx16("option", { value: "closed", children: "Closed" })
7133
+ /* @__PURE__ */ jsx17("input", { className: "mbow-input", value: draft, onChange: (event) => setDraft(event.target.value), placeholder: "Search patient, bill ID, claim, or external ID\u2026", "aria-label": "Search bills" }),
7134
+ /* @__PURE__ */ jsxs17("select", { className: "mbow-select", value: query.status ?? "all", onChange: (event) => update({ status: event.target.value }), "aria-label": "Bill status", children: [
7135
+ /* @__PURE__ */ jsx17("option", { value: "all", children: "All statuses" }),
7136
+ /* @__PURE__ */ jsx17("option", { value: "incomplete", children: "Incomplete" }),
7137
+ /* @__PURE__ */ jsx17("option", { value: "sent", children: "Sent" }),
7138
+ /* @__PURE__ */ jsx17("option", { value: "accepted", children: "Accepted" }),
7139
+ /* @__PURE__ */ jsx17("option", { value: "accepted_no_response", children: "Accepted \u2014 response overdue" }),
7140
+ /* @__PURE__ */ jsx17("option", { value: "rejected", children: "Rejected" }),
7141
+ /* @__PURE__ */ jsx17("option", { value: "processed", children: "Processed" }),
7142
+ /* @__PURE__ */ jsx17("option", { value: "paid", children: "Paid" }),
7143
+ /* @__PURE__ */ jsx17("option", { value: "closed", children: "Closed" })
7075
7144
  ] }),
7076
- /* @__PURE__ */ jsxs16("select", { className: "mbow-select", value: query.age ?? "all", onChange: (event) => update({ age: event.target.value }), "aria-label": "A/R age", children: [
7077
- /* @__PURE__ */ jsx16("option", { value: "all", children: "All A/R ages" }),
7078
- /* @__PURE__ */ jsx16("option", { value: "0-30", children: "0\u201330 days" }),
7079
- /* @__PURE__ */ jsx16("option", { value: "31-60", children: "31\u201360 days" }),
7080
- /* @__PURE__ */ jsx16("option", { value: "61-90", children: "61\u201390 days" }),
7081
- /* @__PURE__ */ jsx16("option", { value: "91+", children: "91+ days" }),
7082
- /* @__PURE__ */ jsx16("option", { value: "91-180", children: "91\u2013180 days" }),
7083
- /* @__PURE__ */ jsx16("option", { value: "181+", children: "181+ days" })
7145
+ /* @__PURE__ */ jsxs17("select", { className: "mbow-select", value: query.age ?? "all", onChange: (event) => update({ age: event.target.value }), "aria-label": "A/R age", children: [
7146
+ /* @__PURE__ */ jsx17("option", { value: "all", children: "All A/R ages" }),
7147
+ /* @__PURE__ */ jsx17("option", { value: "0-30", children: "0\u201330 days" }),
7148
+ /* @__PURE__ */ jsx17("option", { value: "31-60", children: "31\u201360 days" }),
7149
+ /* @__PURE__ */ jsx17("option", { value: "61-90", children: "61\u201390 days" }),
7150
+ /* @__PURE__ */ jsx17("option", { value: "91+", children: "91+ days" }),
7151
+ /* @__PURE__ */ jsx17("option", { value: "91-180", children: "91\u2013180 days" }),
7152
+ /* @__PURE__ */ jsx17("option", { value: "181+", children: "181+ days" })
7084
7153
  ] }),
7085
- /* @__PURE__ */ jsx16("button", { className: "mbow-button", type: "submit", children: "Search" })
7154
+ /* @__PURE__ */ jsx17("button", { className: "mbow-button", type: "submit", children: "Search" })
7086
7155
  ] }),
7087
- /* @__PURE__ */ jsxs16("div", { className: "mbow-card mbow-scroll", children: [
7088
- loading ? /* @__PURE__ */ jsx16("div", { className: "mbow-state", role: "status", children: "Loading bills\u2026" }) : error ? /* @__PURE__ */ jsxs16("div", { className: "mbow-state mbow-error", role: "alert", children: [
7156
+ /* @__PURE__ */ jsxs17("div", { className: "mbow-card mbow-scroll", children: [
7157
+ loading ? /* @__PURE__ */ jsx17("div", { className: "mbow-state", role: "status", children: "Loading bills\u2026" }) : error ? /* @__PURE__ */ jsxs17("div", { className: "mbow-state mbow-error", role: "alert", children: [
7089
7158
  error.message,
7090
7159
  " ",
7091
- /* @__PURE__ */ jsx16("button", { className: "mbow-button", type: "button", onClick: () => void load(), children: "Retry" })
7092
- ] }) : result?.items.length === 0 ? /* @__PURE__ */ jsx16("div", { className: "mbow-state", children: "No bills match these filters." }) : /* @__PURE__ */ jsxs16("table", { className: "mbow-table", children: [
7093
- /* @__PURE__ */ jsx16("thead", { children: /* @__PURE__ */ jsxs16("tr", { children: [
7094
- /* @__PURE__ */ jsx16("th", { children: "Bill" }),
7095
- /* @__PURE__ */ jsx16("th", { children: "Patient" }),
7096
- /* @__PURE__ */ jsx16("th", { children: "DOS" }),
7097
- /* @__PURE__ */ jsx16("th", { children: "Codes" }),
7098
- /* @__PURE__ */ jsx16("th", { children: "Claims administrator" }),
7099
- /* @__PURE__ */ jsx16("th", { children: "Status" }),
7100
- /* @__PURE__ */ jsx16("th", { children: "Submitted / A/R age" }),
7101
- /* @__PURE__ */ jsx16("th", { className: "mbow-money", children: "Balance due" })
7160
+ /* @__PURE__ */ jsx17("button", { className: "mbow-button", type: "button", onClick: () => void load(), children: "Retry" })
7161
+ ] }) : result?.items.length === 0 ? /* @__PURE__ */ jsx17("div", { className: "mbow-state", children: "No bills match these filters." }) : /* @__PURE__ */ jsxs17("table", { className: "mbow-table", children: [
7162
+ /* @__PURE__ */ jsx17("thead", { children: /* @__PURE__ */ jsxs17("tr", { children: [
7163
+ /* @__PURE__ */ jsx17("th", { children: "Bill" }),
7164
+ /* @__PURE__ */ jsx17("th", { children: "Patient" }),
7165
+ /* @__PURE__ */ jsx17("th", { children: "DOS" }),
7166
+ /* @__PURE__ */ jsx17("th", { children: "Codes" }),
7167
+ /* @__PURE__ */ jsx17("th", { children: "Claims administrator" }),
7168
+ /* @__PURE__ */ jsx17("th", { children: "Status" }),
7169
+ /* @__PURE__ */ jsx17("th", { children: "Submitted / A/R age" }),
7170
+ /* @__PURE__ */ jsx17("th", { className: "mbow-money", children: "Balance due" })
7102
7171
  ] }) }),
7103
- /* @__PURE__ */ jsx16("tbody", { children: result?.items.map((bill) => /* @__PURE__ */ jsxs16("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(bill), children: [
7104
- /* @__PURE__ */ jsxs16("td", { className: "mbow-strong", children: [
7172
+ /* @__PURE__ */ jsx17("tbody", { children: result?.items.map((bill) => /* @__PURE__ */ jsxs17("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(bill), children: [
7173
+ /* @__PURE__ */ jsxs17("td", { className: "mbow-strong", children: [
7105
7174
  "#",
7106
7175
  bill.billNumber
7107
7176
  ] }),
7108
- /* @__PURE__ */ jsx16("td", { children: bill.patientName }),
7109
- /* @__PURE__ */ jsx16("td", { children: shortDate(bill.dateOfService) }),
7110
- /* @__PURE__ */ jsx16("td", { children: bill.procedureCodes.join(", ") || "\u2014" }),
7111
- /* @__PURE__ */ jsx16("td", { children: bill.claimsAdministrator || "\u2014" }),
7112
- /* @__PURE__ */ jsx16("td", { children: /* @__PURE__ */ jsx16("span", { className: `mbow-badge ${bill.status.tone ?? ""}`, children: bill.status.label }) }),
7113
- /* @__PURE__ */ jsxs16("td", { children: [
7177
+ /* @__PURE__ */ jsx17("td", { children: bill.patientName }),
7178
+ /* @__PURE__ */ jsx17("td", { children: shortDate(bill.dateOfService) }),
7179
+ /* @__PURE__ */ jsx17("td", { children: bill.procedureCodes.join(", ") || "\u2014" }),
7180
+ /* @__PURE__ */ jsx17("td", { children: bill.claimsAdministrator || "\u2014" }),
7181
+ /* @__PURE__ */ jsx17("td", { children: /* @__PURE__ */ jsx17("span", { className: `mbow-badge ${bill.status.tone ?? ""}`, children: bill.status.label }) }),
7182
+ /* @__PURE__ */ jsxs17("td", { children: [
7114
7183
  shortDate(bill.submittedAt),
7115
- /* @__PURE__ */ jsx16("div", { className: "mbow-muted", children: bill.arAgeDays == null ? "\u2014" : `${bill.arAgeDays} days` })
7184
+ /* @__PURE__ */ jsx17("div", { className: "mbow-muted", children: bill.arAgeDays == null ? "\u2014" : `${bill.arAgeDays} days` })
7116
7185
  ] }),
7117
- /* @__PURE__ */ jsx16("td", { className: "mbow-money mbow-strong", children: money6(bill.balanceDue) })
7186
+ /* @__PURE__ */ jsx17("td", { className: "mbow-money mbow-strong", children: money6(bill.balanceDue) })
7118
7187
  ] }, bill.id)) })
7119
7188
  ] }),
7120
- result && !loading && !error ? /* @__PURE__ */ jsxs16("div", { className: "mbow-pager", children: [
7121
- /* @__PURE__ */ jsxs16("span", { children: [
7189
+ result && !loading && !error ? /* @__PURE__ */ jsxs17("div", { className: "mbow-pager", children: [
7190
+ /* @__PURE__ */ jsxs17("span", { children: [
7122
7191
  "Showing ",
7123
7192
  result.total === 0 ? 0 : (result.page - 1) * result.pageSize + 1,
7124
7193
  "\u2013",
@@ -7126,14 +7195,14 @@ function BillSearchContent({
7126
7195
  " of ",
7127
7196
  result.total
7128
7197
  ] }),
7129
- /* @__PURE__ */ jsxs16("span", { children: [
7130
- /* @__PURE__ */ jsx16("button", { className: "mbow-button", type: "button", disabled: result.page <= 1, onClick: () => update({ page: result.page - 1 }), children: "Previous" }),
7198
+ /* @__PURE__ */ jsxs17("span", { children: [
7199
+ /* @__PURE__ */ jsx17("button", { className: "mbow-button", type: "button", disabled: result.page <= 1, onClick: () => update({ page: result.page - 1 }), children: "Previous" }),
7131
7200
  " ",
7132
7201
  result.page,
7133
7202
  " / ",
7134
7203
  pageCount,
7135
7204
  " ",
7136
- /* @__PURE__ */ jsx16("button", { className: "mbow-button", type: "button", disabled: result.page >= pageCount, onClick: () => update({ page: result.page + 1 }), children: "Next" })
7205
+ /* @__PURE__ */ jsx17("button", { className: "mbow-button", type: "button", disabled: result.page >= pageCount, onClick: () => update({ page: result.page + 1 }), children: "Next" })
7137
7206
  ] })
7138
7207
  ] }) : null
7139
7208
  ] })
@@ -7141,7 +7210,7 @@ function BillSearchContent({
7141
7210
  }
7142
7211
  function ConnectedBillSearch({ appearance, className, style, initialQuery, onSelectBill, heading = "All bills", ...options }) {
7143
7212
  const client = useClient(options);
7144
- return /* @__PURE__ */ jsx16(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx16(BillSearchContent, { client, initialQuery, onSelectBill, heading }) });
7213
+ return /* @__PURE__ */ jsx17(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx17(BillSearchContent, { client, initialQuery, onSelectBill, heading }) });
7145
7214
  }
7146
7215
  function taskQuery(cell) {
7147
7216
  const [taskType, taskLabel] = cell.rowId.split("::", 2);
@@ -7172,24 +7241,24 @@ function BillTasksContent({ client, onDrillDown, appearance }) {
7172
7241
  void load(controller.signal);
7173
7242
  return () => controller.abort();
7174
7243
  }, [load]);
7175
- if (loading && !result) return /* @__PURE__ */ jsx16("div", { className: "mbow-state", children: "Loading bill tasks\u2026" });
7176
- if (error && !result) return /* @__PURE__ */ jsx16("div", { className: "mbow-state mbow-error", children: error.message });
7177
- if (!result) return /* @__PURE__ */ jsx16(Fragment14, {});
7244
+ if (loading && !result) return /* @__PURE__ */ jsx17("div", { className: "mbow-state", children: "Loading bill tasks\u2026" });
7245
+ if (error && !result) return /* @__PURE__ */ jsx17("div", { className: "mbow-state mbow-error", children: error.message });
7246
+ if (!result) return /* @__PURE__ */ jsx17(Fragment15, {});
7178
7247
  const selectionProps = loading || error ? {} : {
7179
7248
  onSelectCell: (cell) => onDrillDown?.({ ...taskQuery(cell), ...claimsAdminId ? { claimsAdministrator: claimsAdminId } : {} })
7180
7249
  };
7181
- return /* @__PURE__ */ jsxs16(Fragment14, { children: [
7182
- /* @__PURE__ */ jsxs16("p", { className: "mbow-task-note", children: [
7250
+ return /* @__PURE__ */ jsxs17(Fragment15, { children: [
7251
+ /* @__PURE__ */ jsxs17("p", { className: "mbow-task-note", children: [
7183
7252
  "Open follow-up work grouped by task and age. ",
7184
7253
  result.waiting ? "Sent and accepted bills waiting for a payer are shown below." : "Find sent and accepted bills in All bills."
7185
7254
  ] }),
7186
- loading ? /* @__PURE__ */ jsx16("p", { role: "status", children: "Updating bill tasks\u2026" }) : null,
7187
- error ? /* @__PURE__ */ jsx16("p", { role: "alert", className: "mbow-error", children: error.message }) : null,
7188
- /* @__PURE__ */ jsx16(BillTasksDashboard, { data: result.dashboard, appearance: appearance ?? { preset: "mindbill" }, toolbar: /* @__PURE__ */ jsxs16("select", { "aria-label": "Claims administrator filter", className: "mbow-select", value: claimsAdminId, onChange: (event) => setClaimsAdminId(event.target.value), children: [
7189
- /* @__PURE__ */ jsx16("option", { value: "", children: "All claims administrators" }),
7190
- result.filters.claimsAdministrators.map((item) => /* @__PURE__ */ jsx16("option", { value: item.id, children: item.name }, item.id))
7255
+ loading ? /* @__PURE__ */ jsx17("p", { role: "status", children: "Updating bill tasks\u2026" }) : null,
7256
+ error ? /* @__PURE__ */ jsx17("p", { role: "alert", className: "mbow-error", children: error.message }) : null,
7257
+ /* @__PURE__ */ jsx17(BillTasksDashboard, { data: result.dashboard, appearance: appearance ?? { preset: "mindbill" }, toolbar: /* @__PURE__ */ jsxs17("select", { "aria-label": "Claims administrator filter", className: "mbow-select", value: claimsAdminId, onChange: (event) => setClaimsAdminId(event.target.value), children: [
7258
+ /* @__PURE__ */ jsx17("option", { value: "", children: "All claims administrators" }),
7259
+ result.filters.claimsAdministrators.map((item) => /* @__PURE__ */ jsx17("option", { value: item.id, children: item.name }, item.id))
7191
7260
  ] }), ...selectionProps }),
7192
- result.waiting ? /* @__PURE__ */ jsx16(
7261
+ result.waiting ? /* @__PURE__ */ jsx17(
7193
7262
  BillTasksDashboard,
7194
7263
  {
7195
7264
  data: result.waiting,
@@ -7207,17 +7276,17 @@ function BillTasksContent({ client, onDrillDown, appearance }) {
7207
7276
  }
7208
7277
  function ConnectedBillTasksDashboard({ appearance, className, style, onDrillDown, ...options }) {
7209
7278
  const client = useClient(options);
7210
- return /* @__PURE__ */ jsx16(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx16(BillTasksContent, { client, onDrillDown, appearance }) });
7279
+ return /* @__PURE__ */ jsx17(Surface, { appearance, className, style, children: /* @__PURE__ */ jsx17(BillTasksContent, { client, onDrillDown, appearance }) });
7211
7280
  }
7212
7281
  function RangeToolbar({ from, to, setFrom, setTo }) {
7213
- return /* @__PURE__ */ jsxs16("div", { className: "mbow-toolbar", children: [
7214
- /* @__PURE__ */ jsxs16("label", { children: [
7282
+ return /* @__PURE__ */ jsxs17("div", { className: "mbow-toolbar", children: [
7283
+ /* @__PURE__ */ jsxs17("label", { children: [
7215
7284
  "From ",
7216
- /* @__PURE__ */ jsx16("input", { className: "mbow-input", type: "date", value: from, onChange: (event) => setFrom(event.target.value) })
7285
+ /* @__PURE__ */ jsx17("input", { className: "mbow-input", type: "date", value: from, onChange: (event) => setFrom(event.target.value) })
7217
7286
  ] }),
7218
- /* @__PURE__ */ jsxs16("label", { children: [
7287
+ /* @__PURE__ */ jsxs17("label", { children: [
7219
7288
  "To ",
7220
- /* @__PURE__ */ jsx16("input", { className: "mbow-input", type: "date", value: to, onChange: (event) => setTo(event.target.value) })
7289
+ /* @__PURE__ */ jsx17("input", { className: "mbow-input", type: "date", value: to, onChange: (event) => setTo(event.target.value) })
7221
7290
  ] })
7222
7291
  ] });
7223
7292
  }
@@ -7236,64 +7305,64 @@ function ConnectedServiceLineItemsReport({ appearance, className, style, initial
7236
7305
  });
7237
7306
  return () => controller.abort();
7238
7307
  }, [client, from, to]);
7239
- return /* @__PURE__ */ jsxs16(Surface, { appearance, className, style, children: [
7240
- /* @__PURE__ */ jsx16("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs16("div", { children: [
7241
- /* @__PURE__ */ jsx16("h2", { children: "Original submissions by procedure" }),
7242
- /* @__PURE__ */ jsx16("p", { className: "mbow-sub", children: "First payer submission for each patient and date of service." })
7308
+ return /* @__PURE__ */ jsxs17(Surface, { appearance, className, style, children: [
7309
+ /* @__PURE__ */ jsx17("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs17("div", { children: [
7310
+ /* @__PURE__ */ jsx17("h2", { children: "Original submissions by procedure" }),
7311
+ /* @__PURE__ */ jsx17("p", { className: "mbow-sub", children: "First payer submission for each patient and date of service." })
7243
7312
  ] }) }),
7244
- /* @__PURE__ */ jsx16(RangeToolbar, { from, to, setFrom, setTo }),
7245
- error ? /* @__PURE__ */ jsx16("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx16("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs16(Fragment14, { children: [
7246
- /* @__PURE__ */ jsxs16("div", { className: "mbow-metrics", children: [
7247
- /* @__PURE__ */ jsx16(Metric, { label: "Original bills", value: String(data.totalBills) }),
7248
- /* @__PURE__ */ jsx16(Metric, { label: "Service lines", value: String(data.totalLines) }),
7249
- /* @__PURE__ */ jsx16(Metric, { label: "Total billed", value: money6(data.totalBilled) }),
7250
- /* @__PURE__ */ jsx16(Metric, { label: "Report window", value: data.windowLabel })
7313
+ /* @__PURE__ */ jsx17(RangeToolbar, { from, to, setFrom, setTo }),
7314
+ error ? /* @__PURE__ */ jsx17("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx17("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs17(Fragment15, { children: [
7315
+ /* @__PURE__ */ jsxs17("div", { className: "mbow-metrics", children: [
7316
+ /* @__PURE__ */ jsx17(Metric, { label: "Original bills", value: String(data.totalBills) }),
7317
+ /* @__PURE__ */ jsx17(Metric, { label: "Service lines", value: String(data.totalLines) }),
7318
+ /* @__PURE__ */ jsx17(Metric, { label: "Total billed", value: money6(data.totalBilled) }),
7319
+ /* @__PURE__ */ jsx17(Metric, { label: "Report window", value: data.windowLabel })
7251
7320
  ] }),
7252
- /* @__PURE__ */ jsxs16("div", { className: "mbow-card mbow-scroll", children: [
7253
- /* @__PURE__ */ jsx16("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx16("h3", { children: "Procedure summary" }) }),
7254
- /* @__PURE__ */ jsxs16("table", { className: "mbow-table", children: [
7255
- /* @__PURE__ */ jsx16("thead", { children: /* @__PURE__ */ jsxs16("tr", { children: [
7256
- /* @__PURE__ */ jsx16("th", { children: "Procedure code" }),
7257
- /* @__PURE__ */ jsx16("th", { children: "Bills" }),
7258
- /* @__PURE__ */ jsx16("th", { children: "Service lines" }),
7259
- /* @__PURE__ */ jsx16("th", { className: "mbow-money", children: "Total billed" })
7321
+ /* @__PURE__ */ jsxs17("div", { className: "mbow-card mbow-scroll", children: [
7322
+ /* @__PURE__ */ jsx17("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx17("h3", { children: "Procedure summary" }) }),
7323
+ /* @__PURE__ */ jsxs17("table", { className: "mbow-table", children: [
7324
+ /* @__PURE__ */ jsx17("thead", { children: /* @__PURE__ */ jsxs17("tr", { children: [
7325
+ /* @__PURE__ */ jsx17("th", { children: "Procedure code" }),
7326
+ /* @__PURE__ */ jsx17("th", { children: "Bills" }),
7327
+ /* @__PURE__ */ jsx17("th", { children: "Service lines" }),
7328
+ /* @__PURE__ */ jsx17("th", { className: "mbow-money", children: "Total billed" })
7260
7329
  ] }) }),
7261
- /* @__PURE__ */ jsx16("tbody", { children: data.cptRows.map((row) => /* @__PURE__ */ jsxs16("tr", { children: [
7262
- /* @__PURE__ */ jsx16("td", { className: "mbow-strong", children: row.code }),
7263
- /* @__PURE__ */ jsx16("td", { children: row.bills }),
7264
- /* @__PURE__ */ jsx16("td", { children: row.lines }),
7265
- /* @__PURE__ */ jsx16("td", { className: "mbow-money", children: money6(row.billed) })
7330
+ /* @__PURE__ */ jsx17("tbody", { children: data.cptRows.map((row) => /* @__PURE__ */ jsxs17("tr", { children: [
7331
+ /* @__PURE__ */ jsx17("td", { className: "mbow-strong", children: row.code }),
7332
+ /* @__PURE__ */ jsx17("td", { children: row.bills }),
7333
+ /* @__PURE__ */ jsx17("td", { children: row.lines }),
7334
+ /* @__PURE__ */ jsx17("td", { className: "mbow-money", children: money6(row.billed) })
7266
7335
  ] }, row.code)) })
7267
7336
  ] })
7268
7337
  ] }),
7269
- /* @__PURE__ */ jsxs16("div", { className: "mbow-card mbow-scroll", style: { marginTop: 16 }, children: [
7270
- /* @__PURE__ */ jsx16("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx16("h3", { children: "All original bills" }) }),
7271
- /* @__PURE__ */ jsxs16("table", { className: "mbow-table", children: [
7272
- /* @__PURE__ */ jsx16("thead", { children: /* @__PURE__ */ jsxs16("tr", { children: [
7273
- /* @__PURE__ */ jsx16("th", { children: "Bill" }),
7274
- /* @__PURE__ */ jsx16("th", { children: "First submitted" }),
7275
- /* @__PURE__ */ jsx16("th", { children: "Patient \xB7 Claim" }),
7276
- /* @__PURE__ */ jsx16("th", { children: "DOS" }),
7277
- /* @__PURE__ */ jsx16("th", { children: "Claims administrator" }),
7278
- /* @__PURE__ */ jsx16("th", { children: "Codes" }),
7279
- /* @__PURE__ */ jsx16("th", { className: "mbow-money", children: "Billed" }),
7280
- /* @__PURE__ */ jsx16("th", { children: "Status" })
7338
+ /* @__PURE__ */ jsxs17("div", { className: "mbow-card mbow-scroll", style: { marginTop: 16 }, children: [
7339
+ /* @__PURE__ */ jsx17("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx17("h3", { children: "All original bills" }) }),
7340
+ /* @__PURE__ */ jsxs17("table", { className: "mbow-table", children: [
7341
+ /* @__PURE__ */ jsx17("thead", { children: /* @__PURE__ */ jsxs17("tr", { children: [
7342
+ /* @__PURE__ */ jsx17("th", { children: "Bill" }),
7343
+ /* @__PURE__ */ jsx17("th", { children: "First submitted" }),
7344
+ /* @__PURE__ */ jsx17("th", { children: "Patient \xB7 Claim" }),
7345
+ /* @__PURE__ */ jsx17("th", { children: "DOS" }),
7346
+ /* @__PURE__ */ jsx17("th", { children: "Claims administrator" }),
7347
+ /* @__PURE__ */ jsx17("th", { children: "Codes" }),
7348
+ /* @__PURE__ */ jsx17("th", { className: "mbow-money", children: "Billed" }),
7349
+ /* @__PURE__ */ jsx17("th", { children: "Status" })
7281
7350
  ] }) }),
7282
- /* @__PURE__ */ jsx16("tbody", { children: data.billRows.map((row) => /* @__PURE__ */ jsxs16("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(row.billId), children: [
7283
- /* @__PURE__ */ jsxs16("td", { className: "mbow-strong", children: [
7351
+ /* @__PURE__ */ jsx17("tbody", { children: data.billRows.map((row) => /* @__PURE__ */ jsxs17("tr", { className: onSelectBill ? "clickable" : "", onClick: () => onSelectBill?.(row.billId), children: [
7352
+ /* @__PURE__ */ jsxs17("td", { className: "mbow-strong", children: [
7284
7353
  "#",
7285
7354
  row.billNumber
7286
7355
  ] }),
7287
- /* @__PURE__ */ jsx16("td", { children: shortDate(row.submittedDate) }),
7288
- /* @__PURE__ */ jsxs16("td", { children: [
7356
+ /* @__PURE__ */ jsx17("td", { children: shortDate(row.submittedDate) }),
7357
+ /* @__PURE__ */ jsxs17("td", { children: [
7289
7358
  row.patient,
7290
- /* @__PURE__ */ jsx16("div", { className: "mbow-muted", children: row.claim })
7359
+ /* @__PURE__ */ jsx17("div", { className: "mbow-muted", children: row.claim })
7291
7360
  ] }),
7292
- /* @__PURE__ */ jsx16("td", { children: shortDate(row.dos) }),
7293
- /* @__PURE__ */ jsx16("td", { children: row.claimsAdmin }),
7294
- /* @__PURE__ */ jsx16("td", { children: row.codes.join(", ") }),
7295
- /* @__PURE__ */ jsx16("td", { className: "mbow-money", children: money6(row.billed) }),
7296
- /* @__PURE__ */ jsx16("td", { children: row.status })
7361
+ /* @__PURE__ */ jsx17("td", { children: shortDate(row.dos) }),
7362
+ /* @__PURE__ */ jsx17("td", { children: row.claimsAdmin }),
7363
+ /* @__PURE__ */ jsx17("td", { children: row.codes.join(", ") }),
7364
+ /* @__PURE__ */ jsx17("td", { className: "mbow-money", children: money6(row.billed) }),
7365
+ /* @__PURE__ */ jsx17("td", { children: row.status })
7297
7366
  ] }, row.billId)) })
7298
7367
  ] })
7299
7368
  ] })
@@ -7301,9 +7370,9 @@ function ConnectedServiceLineItemsReport({ appearance, className, style, initial
7301
7370
  ] });
7302
7371
  }
7303
7372
  function Metric({ label, value }) {
7304
- return /* @__PURE__ */ jsxs16("div", { className: "mbow-metric", children: [
7305
- /* @__PURE__ */ jsx16("span", { children: label }),
7306
- /* @__PURE__ */ jsx16("strong", { children: value })
7373
+ return /* @__PURE__ */ jsxs17("div", { className: "mbow-metric", children: [
7374
+ /* @__PURE__ */ jsx17("span", { children: label }),
7375
+ /* @__PURE__ */ jsx17("strong", { children: value })
7307
7376
  ] });
7308
7377
  }
7309
7378
  function ConnectedProductivityReport({ appearance, className, style, initialFrom, initialTo, ...options }) {
@@ -7322,41 +7391,41 @@ function ConnectedProductivityReport({ appearance, className, style, initialFrom
7322
7391
  return () => controller.abort();
7323
7392
  }, [client, from, to]);
7324
7393
  const maxSent = data ? Math.max(1, ...Object.values(data.sentTotal)) : 1;
7325
- return /* @__PURE__ */ jsxs16(Surface, { appearance, className, style, children: [
7326
- /* @__PURE__ */ jsx16("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs16("div", { children: [
7327
- /* @__PURE__ */ jsx16("h2", { children: "Productivity" }),
7328
- /* @__PURE__ */ jsx16("p", { className: "mbow-sub", children: "Bills created and sent per biller, plus accepted-first-try rate." })
7394
+ return /* @__PURE__ */ jsxs17(Surface, { appearance, className, style, children: [
7395
+ /* @__PURE__ */ jsx17("div", { className: "mbow-head", children: /* @__PURE__ */ jsxs17("div", { children: [
7396
+ /* @__PURE__ */ jsx17("h2", { children: "Productivity" }),
7397
+ /* @__PURE__ */ jsx17("p", { className: "mbow-sub", children: "Bills created and sent per biller, plus accepted-first-try rate." })
7329
7398
  ] }) }),
7330
- /* @__PURE__ */ jsx16(RangeToolbar, { from, to, setFrom, setTo }),
7331
- error ? /* @__PURE__ */ jsx16("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx16("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs16(Fragment14, { children: [
7332
- /* @__PURE__ */ jsxs16("div", { className: "mbow-metrics", children: [
7333
- /* @__PURE__ */ jsx16(Metric, { label: "Bills created", value: String(data.totalCreated) }),
7334
- /* @__PURE__ */ jsx16(Metric, { label: "Transmissions", value: String(data.totalSent) }),
7335
- /* @__PURE__ */ jsx16(Metric, { label: "Bills submitted", value: String(data.totalSubmitted) }),
7336
- /* @__PURE__ */ jsx16(Metric, { label: "Accepted first try", value: data.totalSubmitted ? `${Math.round(data.totalClean / data.totalSubmitted * 100)}%` : "\u2014" })
7399
+ /* @__PURE__ */ jsx17(RangeToolbar, { from, to, setFrom, setTo }),
7400
+ error ? /* @__PURE__ */ jsx17("div", { className: "mbow-state mbow-error", children: error.message }) : !data ? /* @__PURE__ */ jsx17("div", { className: "mbow-state", children: "Loading report\u2026" }) : /* @__PURE__ */ jsxs17(Fragment15, { children: [
7401
+ /* @__PURE__ */ jsxs17("div", { className: "mbow-metrics", children: [
7402
+ /* @__PURE__ */ jsx17(Metric, { label: "Bills created", value: String(data.totalCreated) }),
7403
+ /* @__PURE__ */ jsx17(Metric, { label: "Transmissions", value: String(data.totalSent) }),
7404
+ /* @__PURE__ */ jsx17(Metric, { label: "Bills submitted", value: String(data.totalSubmitted) }),
7405
+ /* @__PURE__ */ jsx17(Metric, { label: "Accepted first try", value: data.totalSubmitted ? `${Math.round(data.totalClean / data.totalSubmitted * 100)}%` : "\u2014" })
7337
7406
  ] }),
7338
- /* @__PURE__ */ jsxs16("div", { className: "mbow-card mbow-scroll", children: [
7339
- /* @__PURE__ */ jsx16("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx16("h3", { children: "Per-biller summary" }) }),
7340
- /* @__PURE__ */ jsxs16("table", { className: "mbow-table", children: [
7341
- /* @__PURE__ */ jsx16("thead", { children: /* @__PURE__ */ jsxs16("tr", { children: [
7342
- /* @__PURE__ */ jsx16("th", { children: "Biller" }),
7343
- /* @__PURE__ */ jsx16("th", { children: "Created" }),
7344
- /* @__PURE__ */ jsx16("th", { children: "Transmissions" }),
7345
- /* @__PURE__ */ jsx16("th", { children: "Submitted" }),
7346
- /* @__PURE__ */ jsx16("th", { children: "Accepted first try" }),
7347
- /* @__PURE__ */ jsx16("th", { children: "Volume" })
7407
+ /* @__PURE__ */ jsxs17("div", { className: "mbow-card mbow-scroll", children: [
7408
+ /* @__PURE__ */ jsx17("div", { className: "mbow-section-head", children: /* @__PURE__ */ jsx17("h3", { children: "Per-biller summary" }) }),
7409
+ /* @__PURE__ */ jsxs17("table", { className: "mbow-table", children: [
7410
+ /* @__PURE__ */ jsx17("thead", { children: /* @__PURE__ */ jsxs17("tr", { children: [
7411
+ /* @__PURE__ */ jsx17("th", { children: "Biller" }),
7412
+ /* @__PURE__ */ jsx17("th", { children: "Created" }),
7413
+ /* @__PURE__ */ jsx17("th", { children: "Transmissions" }),
7414
+ /* @__PURE__ */ jsx17("th", { children: "Submitted" }),
7415
+ /* @__PURE__ */ jsx17("th", { children: "Accepted first try" }),
7416
+ /* @__PURE__ */ jsx17("th", { children: "Volume" })
7348
7417
  ] }) }),
7349
- /* @__PURE__ */ jsx16("tbody", { children: data.billers.map((biller) => {
7418
+ /* @__PURE__ */ jsx17("tbody", { children: data.billers.map((biller) => {
7350
7419
  const sent = data.sentTotal[biller.name] ?? 0;
7351
7420
  const submitted = data.submittedTotal[biller.name] ?? 0;
7352
7421
  const clean = data.cleanTotal[biller.name] ?? 0;
7353
- return /* @__PURE__ */ jsxs16("tr", { children: [
7354
- /* @__PURE__ */ jsx16("td", { className: "mbow-strong", children: biller.name }),
7355
- /* @__PURE__ */ jsx16("td", { children: data.createdTotal[biller.name] ?? 0 }),
7356
- /* @__PURE__ */ jsx16("td", { children: sent }),
7357
- /* @__PURE__ */ jsx16("td", { children: submitted }),
7358
- /* @__PURE__ */ jsx16("td", { children: submitted ? `${Math.round(clean / submitted * 100)}%` : "\u2014" }),
7359
- /* @__PURE__ */ jsx16("td", { children: /* @__PURE__ */ jsx16("div", { className: "mbow-bar", children: /* @__PURE__ */ jsx16("i", { style: { width: `${sent / maxSent * 100}%` } }) }) })
7422
+ return /* @__PURE__ */ jsxs17("tr", { children: [
7423
+ /* @__PURE__ */ jsx17("td", { className: "mbow-strong", children: biller.name }),
7424
+ /* @__PURE__ */ jsx17("td", { children: data.createdTotal[biller.name] ?? 0 }),
7425
+ /* @__PURE__ */ jsx17("td", { children: sent }),
7426
+ /* @__PURE__ */ jsx17("td", { children: submitted }),
7427
+ /* @__PURE__ */ jsx17("td", { children: submitted ? `${Math.round(clean / submitted * 100)}%` : "\u2014" }),
7428
+ /* @__PURE__ */ jsx17("td", { children: /* @__PURE__ */ jsx17("div", { className: "mbow-bar", children: /* @__PURE__ */ jsx17("i", { style: { width: `${sent / maxSent * 100}%` } }) }) })
7360
7429
  ] }, biller.name);
7361
7430
  }) })
7362
7431
  ] })
@@ -7373,28 +7442,28 @@ function ConnectedBillingWorkspace({ appearance, className, style, initialView =
7373
7442
  const workspaceClassName = ["mbow-workspace", className].filter(Boolean).join(" ");
7374
7443
  const hasExplicitHeight = style?.height != null || style?.maxHeight != null;
7375
7444
  const workspaceStyle = availableHeight == null || hasExplicitHeight ? style : { ...style, maxHeight: availableHeight };
7376
- if (selectedBillId) return /* @__PURE__ */ jsxs16(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
7377
- /* @__PURE__ */ jsx16("button", { className: "mbow-button mbow-back", type: "button", onClick: () => setSelectedBillId(null), children: "\u2190 Back to bills" }),
7378
- /* @__PURE__ */ jsx16(ConnectedBillLifecycle, { billId: selectedBillId, ...options, ...appearance ? { appearance } : {} })
7445
+ if (selectedBillId) return /* @__PURE__ */ jsxs17(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
7446
+ /* @__PURE__ */ jsx17("button", { className: "mbow-button mbow-back", type: "button", onClick: () => setSelectedBillId(null), children: "\u2190 Back to bills" }),
7447
+ /* @__PURE__ */ jsx17(ConnectedBillLifecycle, { billId: selectedBillId, ...options, ...appearance ? { appearance } : {} })
7379
7448
  ] });
7380
7449
  const selectView = (next) => {
7381
7450
  setView(next);
7382
7451
  setSelectedBillId(null);
7383
7452
  };
7384
7453
  const appearanceProps = appearance ? { appearance } : {};
7385
- return /* @__PURE__ */ jsxs16(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
7386
- /* @__PURE__ */ jsxs16("div", { className: "mbow-head", children: [
7387
- /* @__PURE__ */ jsxs16("div", { children: [
7388
- /* @__PURE__ */ jsx16("h2", { children: "Billing" }),
7389
- /* @__PURE__ */ jsx16("p", { className: "mbow-sub", children: "Follow up on open work or find any bill and its current status." })
7454
+ return /* @__PURE__ */ jsxs17(Surface, { surfaceRef: workspaceRef, appearance, className: workspaceClassName, style: workspaceStyle, children: [
7455
+ /* @__PURE__ */ jsxs17("div", { className: "mbow-head", children: [
7456
+ /* @__PURE__ */ jsxs17("div", { children: [
7457
+ /* @__PURE__ */ jsx17("h2", { children: "Billing" }),
7458
+ /* @__PURE__ */ jsx17("p", { className: "mbow-sub", children: "Follow up on open work or find any bill and its current status." })
7390
7459
  ] }),
7391
- onCreateBill ? /* @__PURE__ */ jsx16("div", { className: "mbow-actions", children: /* @__PURE__ */ jsx16("button", { className: "mbow-button primary", type: "button", onClick: onCreateBill, children: "+ Add bill" }) }) : null
7460
+ onCreateBill ? /* @__PURE__ */ jsx17("div", { className: "mbow-actions", children: /* @__PURE__ */ jsx17("button", { className: "mbow-button primary", type: "button", onClick: onCreateBill, children: "+ Add bill" }) }) : null
7392
7461
  ] }),
7393
- /* @__PURE__ */ jsx16("div", { className: "mbow-tabs", role: "tablist", children: [["tasks", "Bill tasks"], ["bills", "All bills"], ["procedures", "Procedures"], ["productivity", "Productivity"]].map(([id, label]) => /* @__PURE__ */ jsx16("button", { className: `mbow-tab ${view === id ? "active" : ""}`, type: "button", role: "tab", "aria-selected": view === id, onClick: () => selectView(id), children: label }, id)) }),
7394
- view === "tasks" ? /* @__PURE__ */ jsx16(BillTasksContent, { client, onDrillDown: (query) => {
7462
+ /* @__PURE__ */ jsx17("div", { className: "mbow-tabs", role: "tablist", children: [["tasks", "Bill tasks"], ["bills", "All bills"], ["procedures", "Procedures"], ["productivity", "Productivity"]].map(([id, label]) => /* @__PURE__ */ jsx17("button", { className: `mbow-tab ${view === id ? "active" : ""}`, type: "button", role: "tab", "aria-selected": view === id, onClick: () => selectView(id), children: label }, id)) }),
7463
+ view === "tasks" ? /* @__PURE__ */ jsx17(BillTasksContent, { client, onDrillDown: (query) => {
7395
7464
  setBillQuery(query);
7396
7465
  setView("bills");
7397
- }, appearance }) : view === "bills" ? /* @__PURE__ */ jsx16(BillSearchContent, { client, initialQuery: billQuery, onSelectBill: (bill) => setSelectedBillId(bill.id) }) : view === "procedures" ? /* @__PURE__ */ jsx16(ConnectedServiceLineItemsReport, { ...options, ...appearanceProps, onSelectBill: setSelectedBillId }) : /* @__PURE__ */ jsx16(ConnectedProductivityReport, { ...options, ...appearanceProps })
7466
+ }, appearance }) : view === "bills" ? /* @__PURE__ */ jsx17(BillSearchContent, { client, initialQuery: billQuery, onSelectBill: (bill) => setSelectedBillId(bill.id) }) : view === "procedures" ? /* @__PURE__ */ jsx17(ConnectedServiceLineItemsReport, { ...options, ...appearanceProps, onSelectBill: setSelectedBillId }) : /* @__PURE__ */ jsx17(ConnectedProductivityReport, { ...options, ...appearanceProps })
7398
7467
  ] });
7399
7468
  }
7400
7469