kaafil-react-uikit 0.9.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/dist/admin/index.cjs +458 -360
  3. package/dist/admin/index.cjs.map +1 -1
  4. package/dist/admin/index.d.cts +112 -14
  5. package/dist/admin/index.d.ts +112 -14
  6. package/dist/admin/index.js +117 -19
  7. package/dist/admin/index.js.map +1 -1
  8. package/dist/{chunk-TYBIAPPT.cjs → chunk-2OWH2KDY.cjs} +86 -86
  9. package/dist/chunk-2OWH2KDY.cjs.map +1 -0
  10. package/dist/{chunk-2WPNGUX5.cjs → chunk-3AF2M2JD.cjs} +17 -17
  11. package/dist/{chunk-2WPNGUX5.cjs.map → chunk-3AF2M2JD.cjs.map} +1 -1
  12. package/dist/{chunk-FO5VJJUO.cjs → chunk-64R4ZJTA.cjs} +12 -12
  13. package/dist/{chunk-FO5VJJUO.cjs.map → chunk-64R4ZJTA.cjs.map} +1 -1
  14. package/dist/{chunk-YWMDBY43.js → chunk-7752B4NM.js} +5 -5
  15. package/dist/{chunk-YWMDBY43.js.map → chunk-7752B4NM.js.map} +1 -1
  16. package/dist/{chunk-TESIDLJ6.js → chunk-7V2XJIXD.js} +11 -8
  17. package/dist/chunk-7V2XJIXD.js.map +1 -0
  18. package/dist/{chunk-SO4F5LTH.js → chunk-AFWZFFEM.js} +7 -6
  19. package/dist/chunk-AFWZFFEM.js.map +1 -0
  20. package/dist/{chunk-PFTWPEVV.cjs → chunk-AJE2RNOR.cjs} +4 -4
  21. package/dist/{chunk-PFTWPEVV.cjs.map → chunk-AJE2RNOR.cjs.map} +1 -1
  22. package/dist/{chunk-IAXVUR7H.cjs → chunk-F4GGHUMX.cjs} +57 -56
  23. package/dist/chunk-F4GGHUMX.cjs.map +1 -0
  24. package/dist/{chunk-6PQWLUBA.js → chunk-K5Z6N2FY.js} +5 -5
  25. package/dist/{chunk-6PQWLUBA.js.map → chunk-K5Z6N2FY.js.map} +1 -1
  26. package/dist/{chunk-CCK3WPMF.js → chunk-KV7ODN2X.js} +3 -3
  27. package/dist/{chunk-CCK3WPMF.js.map → chunk-KV7ODN2X.js.map} +1 -1
  28. package/dist/{chunk-ELJPQSXY.cjs → chunk-NCHZLGEE.cjs} +11 -11
  29. package/dist/{chunk-ELJPQSXY.cjs.map → chunk-NCHZLGEE.cjs.map} +1 -1
  30. package/dist/{chunk-SMGXVEN3.cjs → chunk-S53XNHRU.cjs} +11 -8
  31. package/dist/{chunk-TESIDLJ6.js.map → chunk-S53XNHRU.cjs.map} +1 -1
  32. package/dist/{chunk-FSSB6J3X.js → chunk-TGP4GTIY.js} +6 -6
  33. package/dist/chunk-TGP4GTIY.js.map +1 -0
  34. package/dist/{chunk-TJGE4ZSX.js → chunk-UUID3H4R.js} +3 -3
  35. package/dist/{chunk-TJGE4ZSX.js.map → chunk-UUID3H4R.js.map} +1 -1
  36. package/dist/{chunk-GOSSRXBN.js → chunk-VCROLPO3.js} +3 -3
  37. package/dist/{chunk-GOSSRXBN.js.map → chunk-VCROLPO3.js.map} +1 -1
  38. package/dist/chunk-ZZK7USFC.cjs +12 -0
  39. package/dist/{chunk-PG7HNBTO.cjs.map → chunk-ZZK7USFC.cjs.map} +1 -1
  40. package/dist/core/index.cjs +107 -107
  41. package/dist/core/index.js +10 -10
  42. package/dist/manager/index.cjs +375 -263
  43. package/dist/manager/index.cjs.map +1 -1
  44. package/dist/manager/index.d.cts +136 -17
  45. package/dist/manager/index.d.ts +136 -17
  46. package/dist/manager/index.js +142 -30
  47. package/dist/manager/index.js.map +1 -1
  48. package/dist/offline/index.cjs +12 -1
  49. package/dist/offline/index.cjs.map +1 -1
  50. package/dist/offline/index.d.cts +51 -3
  51. package/dist/offline/index.d.ts +51 -3
  52. package/dist/offline/index.js +12 -1
  53. package/dist/offline/index.js.map +1 -1
  54. package/dist/traveller/index.cjs +35 -35
  55. package/dist/traveller/index.js +5 -5
  56. package/package.json +1 -1
  57. package/dist/chunk-FSSB6J3X.js.map +0 -1
  58. package/dist/chunk-IAXVUR7H.cjs.map +0 -1
  59. package/dist/chunk-PG7HNBTO.cjs +0 -12
  60. package/dist/chunk-SMGXVEN3.cjs.map +0 -1
  61. package/dist/chunk-SO4F5LTH.js.map +0 -1
  62. package/dist/chunk-TYBIAPPT.cjs.map +0 -1
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkIAXVUR7H_cjs = require('../chunk-IAXVUR7H.cjs');
4
- var chunkTYBIAPPT_cjs = require('../chunk-TYBIAPPT.cjs');
5
- require('../chunk-PFTWPEVV.cjs');
6
- var chunkFO5VJJUO_cjs = require('../chunk-FO5VJJUO.cjs');
7
- var chunkSMGXVEN3_cjs = require('../chunk-SMGXVEN3.cjs');
3
+ var chunkF4GGHUMX_cjs = require('../chunk-F4GGHUMX.cjs');
4
+ var chunk2OWH2KDY_cjs = require('../chunk-2OWH2KDY.cjs');
5
+ require('../chunk-AJE2RNOR.cjs');
6
+ var chunk64R4ZJTA_cjs = require('../chunk-64R4ZJTA.cjs');
7
+ var chunkS53XNHRU_cjs = require('../chunk-S53XNHRU.cjs');
8
8
  var react = require('react');
9
9
  var jsxRuntime = require('react/jsx-runtime');
10
10
 
@@ -109,13 +109,13 @@ function CloseIcon(props) {
109
109
  );
110
110
  }
111
111
  function StatusPill({ tone, children, style }) {
112
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
112
+ return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-shared-patterns-pill", "data-tone": tone, style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
113
113
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-pill-dot", "aria-hidden": "true" }),
114
114
  children
115
115
  ] });
116
116
  }
117
117
  function Tag({ tone, children, style }) {
118
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style: chunkSMGXVEN3_cjs.tokenStyle(style), children });
118
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-tag", "data-tone": tone, style: chunkS53XNHRU_cjs.tokenStyle(style), children });
119
119
  }
120
120
 
121
121
  // src/admin/composite/office/AgencySettingsScreen/internal/fieldDisplayValue.ts
@@ -183,7 +183,7 @@ function SheetDialog({
183
183
  role: "dialog",
184
184
  "aria-modal": "true",
185
185
  "aria-labelledby": titleId,
186
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
186
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
187
187
  children: [
188
188
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-sheet-header", children: [
189
189
  eyebrow === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-admin-shared-patterns-sheet-eyebrow", children: eyebrow }),
@@ -479,7 +479,7 @@ function TriStateToggle({ entry, onChange, t }) {
479
479
  function NoRender() {
480
480
  return null;
481
481
  }
482
- var fieldKindRegistry = chunkSMGXVEN3_cjs.createRegistry({
482
+ var fieldKindRegistry = chunkS53XNHRU_cjs.createRegistry({
483
483
  fallback: { render: NoRender }
484
484
  });
485
485
  fieldKindRegistry.register("toggle", {
@@ -629,11 +629,11 @@ function SectionCard({
629
629
  onDismissError,
630
630
  style
631
631
  }) {
632
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
632
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
633
633
  const [dialogOpen, setDialogOpen] = react.useState(false);
634
634
  const setFields = section.fields.filter((field) => stored?.[field.key] !== void 0);
635
635
  const isCustomized = setFields.length > 0;
636
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
636
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-inner", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
637
637
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-agency-settings-screen__panel-head", children: [
638
638
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__panel-head-copy", children: [
639
639
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "kf-agency-settings-screen__panel-eyebrow", children: [
@@ -999,14 +999,21 @@ function orderSectionsByCustomized(sections, isCustomized) {
999
999
  ...sections.filter((section) => !isCustomized(section))
1000
1000
  ];
1001
1001
  }
1002
- function AgencySettingsScreen({
1002
+ function AgencySettingsScreen(props) {
1003
+ const session = chunkS53XNHRU_cjs.useSession();
1004
+ if (session.status !== "authenticated") {
1005
+ return null;
1006
+ }
1007
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyAgencySettingsScreen, { ...props });
1008
+ }
1009
+ function ReadyAgencySettingsScreen({
1003
1010
  title,
1004
1011
  subtitle,
1005
1012
  components,
1006
1013
  style
1007
1014
  }) {
1008
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
1009
- const { document: document2, loaded, lastFetchFailed, refresh, patchSettings } = chunkIAXVUR7H_cjs.useAgencySettings();
1015
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
1016
+ const { document: document2, loaded, lastFetchFailed, refresh, patchSettings } = chunkF4GGHUMX_cjs.useAgencySettings();
1010
1017
  const [selectedSectionId, setSelectedSectionId] = react.useState(AGENCY_SETTINGS_SECTIONS[0]?.id);
1011
1018
  const [savingSectionId, setSavingSectionId] = react.useState(void 0);
1012
1019
  const [sectionError, setSectionError] = react.useState(void 0);
@@ -1023,13 +1030,13 @@ function AgencySettingsScreen({
1023
1030
  try {
1024
1031
  await patchSettings({ version: document2.version, [sectionId]: patch });
1025
1032
  } catch (error) {
1026
- const kind = chunkTYBIAPPT_cjs.classifyError(error).code === "CONFLICT_VERSION" ? "conflict" : "failed";
1033
+ const kind = chunk2OWH2KDY_cjs.classifyError(error).code === "CONFLICT_VERSION" ? "conflict" : "failed";
1027
1034
  setSectionError({ sectionId, kind });
1028
1035
  } finally {
1029
1036
  setSavingSectionId(void 0);
1030
1037
  }
1031
1038
  }
1032
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
1039
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
1033
1040
  title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-agency-settings-screen__heading", children: [
1034
1041
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-agency-settings-screen__eyebrow", children: t("chrome.agencySettingsScreen.eyebrow") }),
1035
1042
  /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "kf-agency-settings-screen__title", children: title }),
@@ -1146,7 +1153,7 @@ function summaryFor(t, selected, everyLabelKey, optionLabelKey) {
1146
1153
  return selected.length === 0 ? t(everyLabelKey) : selected.map(optionLabelKey).join(", ");
1147
1154
  }
1148
1155
  function AutoAttachPanel({ template, saving, onSave }) {
1149
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
1156
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
1150
1157
  const titleId = react.useId();
1151
1158
  const [dialogOpen, setDialogOpen] = react.useState(false);
1152
1159
  const [draft, setDraft] = react.useState(() => draftFromTemplate(template));
@@ -1382,9 +1389,9 @@ function TemplateEditorHeader({
1382
1389
  onPublish,
1383
1390
  style
1384
1391
  }) {
1385
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
1392
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
1386
1393
  const statusLabelKey5 = template.status === "PUBLISHED" ? "chrome.checklistTemplateEditor.status.published" : "chrome.checklistTemplateEditor.status.draft";
1387
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
1394
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
1388
1395
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header-identity", children: [
1389
1396
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__header-top", children: [
1390
1397
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1453,7 +1460,7 @@ function TemplateItemEditDialog({
1453
1460
  onRemove,
1454
1461
  onClose
1455
1462
  }) {
1456
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
1463
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
1457
1464
  const titleId = react.useId();
1458
1465
  return /* @__PURE__ */ jsxRuntime.jsxs(
1459
1466
  SheetDialog,
@@ -1603,7 +1610,7 @@ function TemplateItemRow({
1603
1610
  onReorder,
1604
1611
  style
1605
1612
  }) {
1606
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
1613
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
1607
1614
  const dayOffset = item.dayOffset.trim().length > 0 ? Number.parseInt(item.dayOffset, 10) : null;
1608
1615
  const dayLabel = dayOffset === null ? "\u2014" : dayOffset > 0 ? `D+${dayOffset}` : `D${dayOffset}`;
1609
1616
  return (
@@ -1631,7 +1638,7 @@ function TemplateItemRow({
1631
1638
  onReorder(draggedDraftId, item.draftId);
1632
1639
  }
1633
1640
  },
1634
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
1641
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
1635
1642
  children: [
1636
1643
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__item-drag", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(DragHandleIcon, {}) }),
1637
1644
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__item-index", children: String(index + 1).padStart(2, "0") }),
@@ -1703,8 +1710,8 @@ function ChecklistTemplateEditor({
1703
1710
  components,
1704
1711
  style
1705
1712
  }) {
1706
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
1707
- const { templates, loaded, lastFetchFailed, refresh, patchTemplate, publishTemplate } = chunkIAXVUR7H_cjs.useAgencyChecklistTemplates();
1713
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
1714
+ const { templates, loaded, lastFetchFailed, refresh, patchTemplate, publishTemplate } = chunkF4GGHUMX_cjs.useAgencyChecklistTemplates();
1708
1715
  const template = templates.find((candidate) => candidate.id === templateId);
1709
1716
  const [title, setTitle] = react.useState("");
1710
1717
  const [items, setItems] = react.useState([]);
@@ -1821,7 +1828,7 @@ function ChecklistTemplateEditor({
1821
1828
  }
1822
1829
  };
1823
1830
  if (lastFetchFailed && !loaded) {
1824
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", role: "alert", children: [
1831
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", role: "alert", children: [
1825
1832
  /* @__PURE__ */ jsxRuntime.jsx(WarningIcon2, { className: "kf-checklist-template-editor__status-icon kf-checklist-template-editor__status-icon--danger" }),
1826
1833
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-editor__status-title", children: t("chrome.checklistTemplateEditor.errorTitle") }),
1827
1834
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1836,20 +1843,20 @@ function ChecklistTemplateEditor({
1836
1843
  ] }) });
1837
1844
  }
1838
1845
  if (!loaded) {
1839
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__skeleton", "aria-hidden": "true", children: [
1846
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__skeleton", "aria-hidden": "true", children: [
1840
1847
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" }),
1841
1848
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" }),
1842
1849
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-checklist-template-editor__skeleton-block" })
1843
1850
  ] }) });
1844
1851
  }
1845
1852
  if (template === void 0) {
1846
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", children: [
1853
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-checklist-template-editor", "data-framed": "true", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor__status-block", children: [
1847
1854
  /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIcon2, { className: "kf-checklist-template-editor__status-icon" }),
1848
1855
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-editor__status-title", children: t("chrome.checklistTemplateEditor.notFoundTitle") })
1849
1856
  ] }) });
1850
1857
  }
1851
1858
  const editingItem = items.find((item) => item.draftId === editingDraftId);
1852
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
1859
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-editor", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
1853
1860
  /* @__PURE__ */ jsxRuntime.jsx(
1854
1861
  TemplateEditorHeader2,
1855
1862
  {
@@ -1952,7 +1959,7 @@ var AUDIENCE_HINT_KEY = {
1952
1959
  EXTERNAL: "chrome.checklistTemplateLibrary.audience.externalHint"
1953
1960
  };
1954
1961
  function CreateTemplateSheet({ onSubmit, onClose }) {
1955
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
1962
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
1956
1963
  const titleId = react.useId();
1957
1964
  const [locale, setLocale] = react.useState("en");
1958
1965
  const [title, setTitle] = react.useState("");
@@ -2069,7 +2076,7 @@ function DeleteTemplateConfirmSheet({
2069
2076
  onConfirm,
2070
2077
  onClose
2071
2078
  }) {
2072
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
2079
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
2073
2080
  const titleId = react.useId();
2074
2081
  if (template === void 0) {
2075
2082
  return null;
@@ -2188,7 +2195,7 @@ function TemplateRow({
2188
2195
  onDelete,
2189
2196
  style
2190
2197
  }) {
2191
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
2198
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
2192
2199
  const statusLabelKey5 = template.status === "PUBLISHED" ? "chrome.checklistTemplateLibrary.status.published" : "chrome.checklistTemplateLibrary.status.draft";
2193
2200
  return /* @__PURE__ */ jsxRuntime.jsxs(
2194
2201
  "tr",
@@ -2197,7 +2204,7 @@ function TemplateRow({
2197
2204
  className: "kf-checklist-template-library__table-row",
2198
2205
  "data-selectable": onSelect !== void 0 ? "true" : void 0,
2199
2206
  "data-selected": selected === true ? "true" : void 0,
2200
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
2207
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
2201
2208
  children: [
2202
2209
  /* @__PURE__ */ jsxRuntime.jsx(
2203
2210
  "td",
@@ -2287,7 +2294,7 @@ function TemplateLibrarySkeleton() {
2287
2294
  ] }, rowIndex)) }) }) });
2288
2295
  }
2289
2296
  function CardHeading({ count }) {
2290
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
2297
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
2291
2298
  return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-checklist-template-library__card-title", children: t(
2292
2299
  count === 1 ? "chrome.checklistTemplateLibrary.countLabelOne" : "chrome.checklistTemplateLibrary.countLabel"
2293
2300
  ).replace("{count}", String(count)) });
@@ -2303,8 +2310,8 @@ function ChecklistTemplateLibrary({
2303
2310
  components,
2304
2311
  style
2305
2312
  }) {
2306
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
2307
- const { templates, loaded, lastFetchFailed, refresh, createTemplate, removeTemplate } = chunkIAXVUR7H_cjs.useAgencyChecklistTemplates();
2313
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
2314
+ const { templates, loaded, lastFetchFailed, refresh, createTemplate, removeTemplate } = chunkF4GGHUMX_cjs.useAgencyChecklistTemplates();
2308
2315
  const isControlled = controlledCreating !== void 0 && onCreatingChange !== void 0;
2309
2316
  const [internalCreating, setInternalCreating] = react.useState(false);
2310
2317
  const creating = isControlled ? controlledCreating : internalCreating;
@@ -2340,7 +2347,7 @@ function ChecklistTemplateLibrary({
2340
2347
  ]
2341
2348
  }
2342
2349
  );
2343
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
2350
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
2344
2351
  title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library__heading", children: [
2345
2352
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-checklist-template-library__heading-copy", children: [
2346
2353
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-checklist-template-library__title", children: title }),
@@ -2635,8 +2642,8 @@ function BuilderHeader({
2635
2642
  pending,
2636
2643
  style
2637
2644
  }) {
2638
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
2639
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
2645
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
2646
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
2640
2647
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header-identity", children: [
2641
2648
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__header-top", children: [
2642
2649
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2832,7 +2839,7 @@ var fallback = {
2832
2839
  preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-form-builder__preview-unsupported", children: field.label }),
2833
2840
  configFields: NoConfigFields
2834
2841
  };
2835
- var fieldRegistry = chunkSMGXVEN3_cjs.createRegistry({ fallback });
2842
+ var fieldRegistry = chunkS53XNHRU_cjs.createRegistry({ fallback });
2836
2843
  fieldRegistry.register("HEADING", {
2837
2844
  preview: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-form-builder__preview-heading", children: field.label }),
2838
2845
  configFields: NoConfigFields
@@ -3304,7 +3311,7 @@ fieldRegistry.register("ADDRESS", {
3304
3311
  }
3305
3312
  });
3306
3313
  function FieldEditDialog(props) {
3307
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
3314
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
3308
3315
  const titleId = react.useId();
3309
3316
  const { bindings, saving, onClose } = props;
3310
3317
  const isEdit = props.mode === "edit";
@@ -3541,7 +3548,7 @@ function FieldEditDialog(props) {
3541
3548
  );
3542
3549
  }
3543
3550
  function LivePreviewPane({ title, sections, fields }) {
3544
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
3551
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
3545
3552
  const [frame, setFrame] = react.useState("desktop");
3546
3553
  const [answers, setAnswers] = react.useState({});
3547
3554
  function setAnswer(fieldId, value) {
@@ -3630,7 +3637,7 @@ function FieldRow({
3630
3637
  onDragEnd,
3631
3638
  style
3632
3639
  }) {
3633
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
3640
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
3634
3641
  const hasHelp = field.helpText !== null && field.helpText.length > 0;
3635
3642
  return /* @__PURE__ */ jsxRuntime.jsxs(
3636
3643
  "li",
@@ -3638,7 +3645,7 @@ function FieldRow({
3638
3645
  className: "kf-form-builder__field-row",
3639
3646
  "data-dragging": dragging ? "true" : void 0,
3640
3647
  "data-drag-over": dragOver ? "true" : void 0,
3641
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
3648
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
3642
3649
  onDragOver: (event) => {
3643
3650
  event.preventDefault();
3644
3651
  onDragOverRow();
@@ -3700,7 +3707,7 @@ function SectionBlock({
3700
3707
  onOpenField,
3701
3708
  onReorderField
3702
3709
  }) {
3703
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
3710
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
3704
3711
  const [title, setTitle] = react.useState(section.title ?? "");
3705
3712
  const [draggedFieldId, setDraggedFieldId] = react.useState(void 0);
3706
3713
  const [dragOverFieldId, setDragOverFieldId] = react.useState(void 0);
@@ -3834,7 +3841,7 @@ function draftFromForm(form) {
3834
3841
  };
3835
3842
  }
3836
3843
  function TargetingSummary({ form }) {
3837
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
3844
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
3838
3845
  const anchorLabel = (anchor) => t(`chrome.formBuilder.summary.anchor.${anchor}`);
3839
3846
  const eventTypes = form.appliesToEventTypes.length === 0 ? t("chrome.formBuilder.summary.everyEventType") : form.appliesToEventTypes.map((type) => t(`chrome.formBuilder.targeting.eventType.${type}`)).join(" \xB7 ");
3840
3847
  const tripModes = form.appliesToTripModes.length === 0 ? t("chrome.formBuilder.summary.everyTripMode") : form.appliesToTripModes.map((mode) => t(`chrome.formBuilder.targeting.tripMode.${mode}`)).join(" \xB7 ");
@@ -3895,7 +3902,7 @@ function TargetingSummary({ form }) {
3895
3902
  ] }, cell.key)) });
3896
3903
  }
3897
3904
  function TargetingPanel({ form, saving, onSave }) {
3898
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
3905
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
3899
3906
  const [editing, setEditing] = react.useState(false);
3900
3907
  const [submitted, setSubmitted] = react.useState(false);
3901
3908
  const [draft, setDraft] = react.useState(() => draftFromForm(form));
@@ -4191,7 +4198,7 @@ function buildReorderSections(sections, fieldsBySection) {
4191
4198
  }));
4192
4199
  }
4193
4200
  function FormBuilder({ formId, onBack, components, style }) {
4194
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
4201
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
4195
4202
  const {
4196
4203
  getForm,
4197
4204
  patchForm,
@@ -4209,7 +4216,7 @@ function FormBuilder({ formId, onBack, components, style }) {
4209
4216
  deleteField,
4210
4217
  reorderForm,
4211
4218
  listBindings
4212
- } = chunkIAXVUR7H_cjs.useAgencyForms();
4219
+ } = chunkF4GGHUMX_cjs.useAgencyForms();
4213
4220
  const [form, setForm] = react.useState(void 0);
4214
4221
  const [loadFailed, setLoadFailed] = react.useState(false);
4215
4222
  const [bindings, setBindings] = react.useState([]);
@@ -4420,7 +4427,7 @@ function FormBuilder({ formId, onBack, components, style }) {
4420
4427
  }
4421
4428
  }
4422
4429
  if (loadFailed && form === void 0) {
4423
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__status-block", role: "alert", children: [
4430
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__status-block", role: "alert", children: [
4424
4431
  /* @__PURE__ */ jsxRuntime.jsx(WarningIcon4, { className: "kf-form-builder__status-icon kf-form-builder__status-icon--danger" }),
4425
4432
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-form-builder__status-title", children: t("chrome.formBuilder.errorTitle") }),
4426
4433
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4435,13 +4442,13 @@ function FormBuilder({ formId, onBack, components, style }) {
4435
4442
  ] }) });
4436
4443
  }
4437
4444
  if (form === void 0) {
4438
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__skeleton", "aria-hidden": "true", children: [
4445
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-form-builder", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder__skeleton", "aria-hidden": "true", children: [
4439
4446
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" }),
4440
4447
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" }),
4441
4448
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-form-builder__skeleton-block" })
4442
4449
  ] }) });
4443
4450
  }
4444
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
4451
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-form-builder", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
4445
4452
  onBack !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: onBack, className: "kf-form-builder__back-link", children: [
4446
4453
  /* @__PURE__ */ jsxRuntime.jsx(BackIcon, {}),
4447
4454
  t("chrome.formBuilder.backToLibrary")
@@ -4595,7 +4602,7 @@ var AUDIENCE_LABEL_KEY2 = {
4595
4602
  MANAGER: "chrome.formsLibrary.audience.manager"
4596
4603
  };
4597
4604
  function CreateFormSheet({ onSubmit, onClose }) {
4598
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
4605
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
4599
4606
  const titleId = react.useId();
4600
4607
  const [locale, setLocale] = react.useState("en");
4601
4608
  const [title, setTitle] = react.useState("");
@@ -4623,7 +4630,7 @@ function CreateFormSheet({ onSubmit, onClose }) {
4623
4630
  });
4624
4631
  onClose();
4625
4632
  } catch (error) {
4626
- setErrorCode(chunkTYBIAPPT_cjs.classifyError(error).code ?? "unknown");
4633
+ setErrorCode(chunk2OWH2KDY_cjs.classifyError(error).code ?? "unknown");
4627
4634
  } finally {
4628
4635
  setPending(false);
4629
4636
  }
@@ -4811,7 +4818,7 @@ function formatDate2(iso) {
4811
4818
  });
4812
4819
  }
4813
4820
  function FormRow({ form, selected, onSelect, style }) {
4814
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
4821
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
4815
4822
  return /* @__PURE__ */ jsxRuntime.jsxs(
4816
4823
  "tr",
4817
4824
  {
@@ -4819,7 +4826,7 @@ function FormRow({ form, selected, onSelect, style }) {
4819
4826
  className: "kf-forms-library__table-row",
4820
4827
  "data-selectable": onSelect !== void 0 ? "true" : void 0,
4821
4828
  "data-selected": selected === true ? "true" : void 0,
4822
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
4829
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
4823
4830
  children: [
4824
4831
  /* @__PURE__ */ jsxRuntime.jsx(
4825
4832
  "td",
@@ -4875,7 +4882,7 @@ function FormsLibrarySkeleton() {
4875
4882
  ] }, rowIndex)) }) }) });
4876
4883
  }
4877
4884
  function CardHeading2({ count }) {
4878
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
4885
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
4879
4886
  return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-forms-library__card-title", children: t(
4880
4887
  count === 1 ? "chrome.formsLibrary.countLabelOne" : "chrome.formsLibrary.countLabel"
4881
4888
  ).replace("{count}", String(count)) });
@@ -4890,7 +4897,7 @@ function StatusFilterBar({
4890
4897
  active,
4891
4898
  onChange
4892
4899
  }) {
4893
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
4900
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
4894
4901
  return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-forms-library__filter-bar", children: [
4895
4902
  /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.formsLibrary.filter.legend") }),
4896
4903
  STATUS_FILTERS.map((filter) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -4916,8 +4923,8 @@ function FormsLibrary({
4916
4923
  components,
4917
4924
  style
4918
4925
  }) {
4919
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
4920
- const { forms, loaded, lastFetchFailed, refresh, createForm } = chunkIAXVUR7H_cjs.useAgencyForms();
4926
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
4927
+ const { forms, loaded, lastFetchFailed, refresh, createForm } = chunkF4GGHUMX_cjs.useAgencyForms();
4921
4928
  const isControlled = controlledCreating !== void 0 && onCreatingChange !== void 0;
4922
4929
  const [internalCreating, setInternalCreating] = react.useState(false);
4923
4930
  const creating = isControlled ? controlledCreating : internalCreating;
@@ -4928,7 +4935,7 @@ function FormsLibrary({
4928
4935
  await createForm(input);
4929
4936
  };
4930
4937
  const visibleForms = statusFilter === "ALL" ? forms : forms.filter((form) => form.status === statusFilter);
4931
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
4938
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
4932
4939
  title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-forms-library__heading", children: [
4933
4940
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-forms-library__title", children: title }),
4934
4941
  subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-forms-library__subtitle", children: subtitle }) : null
@@ -5004,9 +5011,9 @@ function FormsAuthoringFlow({ initialFormId, style }) {
5004
5011
  setSelectedFormId(void 0);
5005
5012
  }
5006
5013
  if (selectedFormId === void 0) {
5007
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormsLibrary, { onSelectForm: handleSelect }) });
5014
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormsLibrary, { onSelectForm: handleSelect }) });
5008
5015
  }
5009
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormBuilder, { formId: selectedFormId, onBack: handleBack }) });
5016
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-forms-authoring-flow", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(FormBuilder, { formId: selectedFormId, onBack: handleBack }) });
5010
5017
  }
5011
5018
  function SearchIcon(props) {
5012
5019
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5157,7 +5164,7 @@ function AdminAvatar({
5157
5164
  className: "kf-admin-shared-patterns-avatar",
5158
5165
  "data-size": size,
5159
5166
  "aria-hidden": "true",
5160
- style: chunkSMGXVEN3_cjs.tokenStyle(style, {
5167
+ style: chunkS53XNHRU_cjs.tokenStyle(style, {
5161
5168
  "--kf-admin-shared-patterns-avatar-computed-size": SIZE_VAR[size],
5162
5169
  "--kf-admin-shared-patterns-avatar-computed-bg": `var(--kf-color-avatar-${step})`
5163
5170
  }),
@@ -5177,7 +5184,7 @@ function ManagerResultRow({
5177
5184
  onSelect,
5178
5185
  style
5179
5186
  }) {
5180
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5187
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5181
5188
  const initials = initialsFromName(manager.fullName);
5182
5189
  return /* @__PURE__ */ jsxRuntime.jsxs(
5183
5190
  "tr",
@@ -5185,7 +5192,7 @@ function ManagerResultRow({
5185
5192
  role: "row",
5186
5193
  className: "kf-manager-directory-flow__table-row",
5187
5194
  "data-selectable": onSelect !== void 0 ? "true" : void 0,
5188
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
5195
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
5189
5196
  children: [
5190
5197
  /* @__PURE__ */ jsxRuntime.jsx(
5191
5198
  "td",
@@ -5294,8 +5301,8 @@ function ManagerResultsListBody({
5294
5301
  onCountChange,
5295
5302
  onRetry
5296
5303
  }) {
5297
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5298
- const directories = chunkIAXVUR7H_cjs.useDirectories();
5304
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5305
+ const directories = chunkF4GGHUMX_cjs.useDirectories();
5299
5306
  const [errorMessage, setErrorMessage] = react.useState(void 0);
5300
5307
  const [hasSettled, setHasSettled] = react.useState(false);
5301
5308
  const ManagerRow = ManagerResultRowComponent ?? ManagerResultRow;
@@ -5306,7 +5313,7 @@ function ManagerResultsListBody({
5306
5313
  setErrorMessage(void 0);
5307
5314
  return page;
5308
5315
  } catch (error) {
5309
- setErrorMessage(chunkTYBIAPPT_cjs.classifyError(error).code ?? "unknown");
5316
+ setErrorMessage(chunk2OWH2KDY_cjs.classifyError(error).code ?? "unknown");
5310
5317
  return { rows: [], nextCursor: void 0 };
5311
5318
  } finally {
5312
5319
  setHasSettled(true);
@@ -5314,7 +5321,7 @@ function ManagerResultsListBody({
5314
5321
  },
5315
5322
  [directories, filters]
5316
5323
  );
5317
- const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkIAXVUR7H_cjs.usePaginatedList(fetch);
5324
+ const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkF4GGHUMX_cjs.usePaginatedList(fetch);
5318
5325
  const isLoading = !hasSettled;
5319
5326
  const reportedCount = isLoading || errorMessage !== void 0 ? void 0 : rows.length;
5320
5327
  react.useEffect(() => {
@@ -5411,7 +5418,7 @@ function ManagerSearchInput({
5411
5418
  debounceMs,
5412
5419
  onDebouncedChange
5413
5420
  }) {
5414
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5421
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5415
5422
  const [value, setValue] = react.useState("");
5416
5423
  react.useEffect(() => {
5417
5424
  const timer = setTimeout(() => onDebouncedChange(value), debounceMs);
@@ -5450,12 +5457,12 @@ function ManagerDirectoryFlow({
5450
5457
  components,
5451
5458
  style
5452
5459
  }) {
5453
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5460
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5454
5461
  const [query, setQuery] = react.useState("");
5455
5462
  const [count, setCount] = react.useState(void 0);
5456
5463
  const trimmedQuery = query.trim();
5457
5464
  const handleCountChange = react.useCallback((next) => setCount(next), []);
5458
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
5465
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
5459
5466
  title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-directory-flow__heading", children: [
5460
5467
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-manager-directory-flow__title", children: title }),
5461
5468
  subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-directory-flow__subtitle", children: subtitle }) : null
@@ -5527,7 +5534,7 @@ function formatDate3(iso) {
5527
5534
  return new Date(iso).toLocaleDateString("en-GB", { day: "2-digit", month: "short" });
5528
5535
  }
5529
5536
  function ManagerAssignmentsCard({ trips }) {
5530
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5537
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5531
5538
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-manager-profile-section__card", children: [
5532
5539
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section__card-head", children: [
5533
5540
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-manager-profile-section__card-title", children: t("chrome.managerProfileSection.trips.title") }),
@@ -5591,7 +5598,7 @@ function HeroProfileHeader({
5591
5598
  glowTone,
5592
5599
  style
5593
5600
  }) {
5594
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero", "data-glow": glowTone, style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
5601
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero", "data-glow": glowTone, style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
5595
5602
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-hero-glow", "aria-hidden": "true" }),
5596
5603
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shared-patterns-hero-row", children: [
5597
5604
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shared-patterns-hero-avatar", "aria-hidden": "true", children: avatarInitials }),
@@ -5624,7 +5631,7 @@ function initialsFromName2(name) {
5624
5631
  return `${first}${last}`.toUpperCase();
5625
5632
  }
5626
5633
  function ManagerProfileHero({ profile, onBack }) {
5627
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5634
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5628
5635
  const initials = initialsFromName2(profile.fullName);
5629
5636
  const stats = [
5630
5637
  { key: "trips", label: t("chrome.managerProfileSection.hero.trips"), value: profile.tripCount },
@@ -5683,12 +5690,12 @@ function ManagerProfileSection({
5683
5690
  components,
5684
5691
  style
5685
5692
  }) {
5686
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5687
- const { read, readFailed, refresh } = chunkIAXVUR7H_cjs.useAgencyManagerProfile(managerRef);
5693
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5694
+ const { read, readFailed, refresh } = chunkF4GGHUMX_cjs.useAgencyManagerProfile(managerRef);
5688
5695
  const Hero = components?.Hero ?? ManagerProfileHero;
5689
5696
  const AssignmentsCard = components?.AssignmentsCard ?? ManagerAssignmentsCard;
5690
5697
  if (readFailed) {
5691
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section__status-block", role: "alert", children: [
5698
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section__status-block", role: "alert", children: [
5692
5699
  /* @__PURE__ */ jsxRuntime.jsx(WarningIcon7, { className: "kf-manager-profile-section__status-icon kf-manager-profile-section__status-icon--danger" }),
5693
5700
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-profile-section__status-title", children: t("chrome.managerProfileSection.errorTitle") }),
5694
5701
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-manager-profile-section__status-body", children: t("chrome.managerProfileSection.errorBody") }),
@@ -5704,9 +5711,9 @@ function ManagerProfileSection({
5704
5711
  ] }) });
5705
5712
  }
5706
5713
  if (read === void 0) {
5707
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ManagerProfileSkeleton, {}) });
5714
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-manager-profile-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ManagerProfileSkeleton, {}) });
5708
5715
  }
5709
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
5716
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-manager-profile-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
5710
5717
  /* @__PURE__ */ jsxRuntime.jsx(Hero, { profile: read, onBack }),
5711
5718
  /* @__PURE__ */ jsxRuntime.jsx(AssignmentsCard, { trips: read.trips })
5712
5719
  ] });
@@ -5733,7 +5740,7 @@ function TemplateAuthoringFlow({
5733
5740
  initialTemplateId,
5734
5741
  style
5735
5742
  }) {
5736
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5743
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5737
5744
  const [selectedTemplateId, setSelectedTemplateId] = react.useState(
5738
5745
  initialTemplateId
5739
5746
  );
@@ -5744,9 +5751,9 @@ function TemplateAuthoringFlow({
5744
5751
  setSelectedTemplateId(void 0);
5745
5752
  }
5746
5753
  if (selectedTemplateId === void 0) {
5747
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-template-authoring-flow", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistTemplateLibrary, { onSelectTemplate: handleSelect }) });
5754
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-template-authoring-flow", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistTemplateLibrary, { onSelectTemplate: handleSelect }) });
5748
5755
  }
5749
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-template-authoring-flow", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
5756
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-template-authoring-flow", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
5750
5757
  /* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", onClick: handleBack, className: "kf-template-authoring-flow__back-link", children: [
5751
5758
  /* @__PURE__ */ jsxRuntime.jsx(BackIcon3, {}),
5752
5759
  t("chrome.templateAuthoringFlow.backToLibrary")
@@ -5755,8 +5762,8 @@ function TemplateAuthoringFlow({
5755
5762
  ] });
5756
5763
  }
5757
5764
  function AddTravellerModal({ onClose, onCreated }) {
5758
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
5759
- const directories = chunkIAXVUR7H_cjs.useDirectories();
5765
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5766
+ const directories = chunkF4GGHUMX_cjs.useDirectories();
5760
5767
  const titleId = react.useId();
5761
5768
  const [fullName, setFullName] = react.useState("");
5762
5769
  const [phone, setPhone] = react.useState("");
@@ -5780,7 +5787,7 @@ function AddTravellerModal({ onClose, onCreated }) {
5780
5787
  });
5781
5788
  onCreated(created);
5782
5789
  } catch (error) {
5783
- setErrorMessage(chunkTYBIAPPT_cjs.classifyError(error).code ?? "unknown");
5790
+ setErrorMessage(chunk2OWH2KDY_cjs.classifyError(error).code ?? "unknown");
5784
5791
  } finally {
5785
5792
  setIsSubmitting(false);
5786
5793
  }
@@ -5994,7 +6001,7 @@ function TravellerResultRow({
5994
6001
  onSelect,
5995
6002
  style
5996
6003
  }) {
5997
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6004
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
5998
6005
  const initials = initialsFromName3(traveller.fullName);
5999
6006
  return /* @__PURE__ */ jsxRuntime.jsxs(
6000
6007
  "tr",
@@ -6002,7 +6009,7 @@ function TravellerResultRow({
6002
6009
  role: "row",
6003
6010
  className: "kf-traveller-directory__table-row",
6004
6011
  "data-selectable": onSelect !== void 0 ? "true" : void 0,
6005
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
6012
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
6006
6013
  children: [
6007
6014
  /* @__PURE__ */ jsxRuntime.jsx(
6008
6015
  "td",
@@ -6130,8 +6137,8 @@ function TravellerResultsListBody({
6130
6137
  onCountChange,
6131
6138
  onRetry
6132
6139
  }) {
6133
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6134
- const directories = chunkIAXVUR7H_cjs.useDirectories();
6140
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6141
+ const directories = chunkF4GGHUMX_cjs.useDirectories();
6135
6142
  const [errorMessage, setErrorMessage] = react.useState(void 0);
6136
6143
  const [hasSettled, setHasSettled] = react.useState(false);
6137
6144
  const fetch = react.useCallback(
@@ -6142,7 +6149,7 @@ function TravellerResultsListBody({
6142
6149
  setErrorMessage(void 0);
6143
6150
  return page;
6144
6151
  } catch (error) {
6145
- setErrorMessage(chunkTYBIAPPT_cjs.classifyError(error).code ?? "unknown");
6152
+ setErrorMessage(chunk2OWH2KDY_cjs.classifyError(error).code ?? "unknown");
6146
6153
  return { rows: [], nextCursor: void 0 };
6147
6154
  } finally {
6148
6155
  setHasSettled(true);
@@ -6150,7 +6157,7 @@ function TravellerResultsListBody({
6150
6157
  },
6151
6158
  [directories, query]
6152
6159
  );
6153
- const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkIAXVUR7H_cjs.usePaginatedList(fetch);
6160
+ const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkF4GGHUMX_cjs.usePaginatedList(fetch);
6154
6161
  const isLoading = !hasSettled;
6155
6162
  const reportedCount = isLoading || errorMessage !== void 0 ? void 0 : rows.length;
6156
6163
  react.useEffect(() => {
@@ -6245,7 +6252,7 @@ function TravellerSearchInput({
6245
6252
  debounceMs,
6246
6253
  onDebouncedChange
6247
6254
  }) {
6248
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6255
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6249
6256
  const [value, setValue] = react.useState("");
6250
6257
  react.useEffect(() => {
6251
6258
  const timer = setTimeout(() => onDebouncedChange(value), debounceMs);
@@ -6285,13 +6292,13 @@ function TravellerSearchBox({
6285
6292
  trailingAction,
6286
6293
  style
6287
6294
  }) {
6288
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6295
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6289
6296
  const [query, setQuery] = react.useState("");
6290
6297
  const [count, setCount] = react.useState(void 0);
6291
6298
  const trimmed = query.trim();
6292
6299
  const handleCountChange = react.useCallback((next) => setCount(next), []);
6293
6300
  const isBelowFloor = minQueryLength > 0 && trimmed.length < minQueryLength;
6294
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
6301
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
6295
6302
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory__search-box-input-row", children: [
6296
6303
  /* @__PURE__ */ jsxRuntime.jsx(TravellerSearchInput, { debounceMs, onDebouncedChange: setQuery }),
6297
6304
  count !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-traveller-directory__count", children: t(
@@ -6323,7 +6330,7 @@ function TravellerDirectoryFlow({
6323
6330
  components,
6324
6331
  style
6325
6332
  }) {
6326
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6333
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6327
6334
  const [uncontrolledOpen, setUncontrolledOpen] = react.useState(false);
6328
6335
  const isControlled = adding !== void 0 && onAddingChange !== void 0;
6329
6336
  const isAddModalOpen = isControlled ? adding : uncontrolledOpen;
@@ -6346,7 +6353,7 @@ function TravellerDirectoryFlow({
6346
6353
  );
6347
6354
  const SearchBox = components?.TravellerSearchBox ?? TravellerSearchBox;
6348
6355
  const AddModal = components?.AddTravellerModal ?? AddTravellerModal;
6349
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
6356
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
6350
6357
  title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-directory-flow__heading", children: [
6351
6358
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-directory-flow__title", children: title }),
6352
6359
  subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-directory-flow__subtitle", children: subtitle }) : null
@@ -6372,7 +6379,7 @@ function TravellerDirectoryFlow({
6372
6379
  ] });
6373
6380
  }
6374
6381
  function useAgencyTravellerProfile(travellerRef) {
6375
- const client = chunkSMGXVEN3_cjs.useKaafilClient();
6382
+ const client = chunkS53XNHRU_cjs.useKaafilClient();
6376
6383
  const [read, setRead] = react.useState(void 0);
6377
6384
  const [readFailed, setReadFailed] = react.useState(false);
6378
6385
  const refresh = react.useCallback(async () => {
@@ -6429,7 +6436,7 @@ function formatMinor(minor, currency) {
6429
6436
  }).format(minor / 100);
6430
6437
  }
6431
6438
  function TravellerLifetimeCard({ lifetime }) {
6432
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6439
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6433
6440
  if (lifetime.currency === null) {
6434
6441
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
6435
6442
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
@@ -6477,7 +6484,7 @@ function formatTimestamp(iso) {
6477
6484
  });
6478
6485
  }
6479
6486
  function TravellerNotesList({ notes }) {
6480
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6487
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6481
6488
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
6482
6489
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
6483
6490
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-profile-section__card-title", children: t("chrome.travellerProfileSection.notes.title") }),
@@ -6523,7 +6530,7 @@ function formatDateOfBirth(iso) {
6523
6530
  });
6524
6531
  }
6525
6532
  function TravellerPersonalCard({ profile }) {
6526
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6533
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6527
6534
  const p = profile.profile;
6528
6535
  const dob = formatDateOfBirth(p.dateOfBirth);
6529
6536
  const email = p.email ?? profile.email;
@@ -6638,7 +6645,7 @@ function formatMinor2(minor, currency) {
6638
6645
  }).format(minor / 100);
6639
6646
  }
6640
6647
  function TravellerProfileHero({ profile, onBack }) {
6641
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6648
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6642
6649
  const initials = initialsFromName4(profile.fullName);
6643
6650
  const { lifetime } = profile;
6644
6651
  const stats = lifetime.currency !== null ? [
@@ -6729,7 +6736,7 @@ function formatMinor3(minor, currency) {
6729
6736
  }).format(minor / 100);
6730
6737
  }
6731
6738
  function TravellerTripHistoryTable({ trips }) {
6732
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6739
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6733
6740
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-traveller-profile-section__card", children: [
6734
6741
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__card-head", children: [
6735
6742
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-traveller-profile-section__card-title", children: t("chrome.travellerProfileSection.trips.title") }),
@@ -6780,7 +6787,7 @@ function TravellerProfileSection({
6780
6787
  components,
6781
6788
  style
6782
6789
  }) {
6783
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
6790
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
6784
6791
  const { read, readFailed, refresh } = useAgencyTravellerProfile(travellerRef);
6785
6792
  const Hero = components?.Hero ?? TravellerProfileHero;
6786
6793
  const PersonalCard = components?.PersonalCard ?? TravellerPersonalCard;
@@ -6788,7 +6795,7 @@ function TravellerProfileSection({
6788
6795
  const TripHistoryTable = components?.TripHistoryTable ?? TravellerTripHistoryTable;
6789
6796
  const NotesList = components?.NotesList ?? TravellerNotesList;
6790
6797
  if (readFailed) {
6791
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__status-block", role: "alert", children: [
6798
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__status-block", role: "alert", children: [
6792
6799
  /* @__PURE__ */ jsxRuntime.jsx(WarningIcon9, { className: "kf-traveller-profile-section__status-icon kf-traveller-profile-section__status-icon--danger" }),
6793
6800
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-title", children: t("chrome.travellerProfileSection.errorTitle") }),
6794
6801
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-traveller-profile-section__status-body", children: t("chrome.travellerProfileSection.errorBody") }),
@@ -6804,9 +6811,9 @@ function TravellerProfileSection({
6804
6811
  ] }) });
6805
6812
  }
6806
6813
  if (read === void 0) {
6807
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TravellerProfileSkeleton, {}) });
6814
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-traveller-profile-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TravellerProfileSkeleton, {}) });
6808
6815
  }
6809
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
6816
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
6810
6817
  /* @__PURE__ */ jsxRuntime.jsx(Hero, { profile: read, onBack }),
6811
6818
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__body", children: [
6812
6819
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-traveller-profile-section__column", children: [
@@ -6898,7 +6905,7 @@ function ToggleSwitch({
6898
6905
  disabled,
6899
6906
  className: "kf-admin-shared-patterns-toggle-row",
6900
6907
  onClick: () => onChange(!checked),
6901
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
6908
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
6902
6909
  children: /* @__PURE__ */ jsxRuntime.jsx(
6903
6910
  "span",
6904
6911
  {
@@ -7336,7 +7343,7 @@ function TriggerDetailPanel({
7336
7343
  style
7337
7344
  }) {
7338
7345
  const [dialogOpen, setDialogOpen] = react.useState(false);
7339
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
7346
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
7340
7347
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__detail-head", children: [
7341
7348
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trigger-template-editor__detail-eyebrow", children: t("chrome.triggerTemplateEditor.selected") }),
7342
7349
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -7420,8 +7427,8 @@ function TriggerTemplateEditor({
7420
7427
  onTriggerPatched,
7421
7428
  style
7422
7429
  }) {
7423
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7424
- const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } = chunkIAXVUR7H_cjs.useAgencyJourneyTriggers();
7430
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7431
+ const { triggers, loaded, lastFetchFailed, refresh, patchTrigger } = chunkF4GGHUMX_cjs.useAgencyJourneyTriggers();
7425
7432
  const [savingId, setSavingId] = react.useState(void 0);
7426
7433
  const [selectedId, setSelectedId] = react.useState(void 0);
7427
7434
  const filtered = tripModeFilter === void 0 ? triggers : triggers.filter((trigger) => trigger.tripMode === tripModeFilter);
@@ -7456,7 +7463,7 @@ function TriggerTemplateEditor({
7456
7463
  setSavingId(void 0);
7457
7464
  }
7458
7465
  }
7459
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
7466
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
7460
7467
  title !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trigger-template-editor__heading", children: [
7461
7468
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trigger-template-editor__title", children: title }),
7462
7469
  subtitle !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trigger-template-editor__subtitle", children: subtitle }) : null
@@ -7604,14 +7611,14 @@ function BookingsSkeleton() {
7604
7611
  ] }, id)) });
7605
7612
  }
7606
7613
  function BookingsEmpty() {
7607
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7614
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7608
7615
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", children: [
7609
7616
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.emptyTitle") }),
7610
7617
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.emptyBody") })
7611
7618
  ] });
7612
7619
  }
7613
7620
  function BookingsFailed({ onRetry }) {
7614
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7621
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7615
7622
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", role: "alert", children: [
7616
7623
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t("chrome.tripBookings.failedTitle") }),
7617
7624
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__state-body", children: t("chrome.tripBookings.failedBody") }),
@@ -7619,7 +7626,7 @@ function BookingsFailed({ onRetry }) {
7619
7626
  ] });
7620
7627
  }
7621
7628
  function BookingsDark({ reason }) {
7622
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7629
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7623
7630
  if (reason === "mode") return null;
7624
7631
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__state", "data-dark": reason, children: [
7625
7632
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-bookings-section__state-title", children: t(
@@ -7659,13 +7666,20 @@ function voucherCount(row) {
7659
7666
  return row.voucherFileKeys?.length ?? 0;
7660
7667
  }
7661
7668
  var DAY = { day: "numeric", month: "short", year: "numeric" };
7662
- function TripBookingsSection({
7669
+ function TripBookingsSection(props) {
7670
+ const session = chunkS53XNHRU_cjs.useSession();
7671
+ if (session.status !== "authenticated") {
7672
+ return null;
7673
+ }
7674
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripBookingsSection, { ...props });
7675
+ }
7676
+ function ReadyTripBookingsSection({
7663
7677
  tripRef,
7664
7678
  onOpenDocuments,
7665
7679
  style
7666
7680
  }) {
7667
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7668
- const bookings = chunkIAXVUR7H_cjs.useBookings(tripRef);
7681
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7682
+ const bookings = chunkF4GGHUMX_cjs.useBookings(tripRef);
7669
7683
  const ready = bookings.status === "ready" ? bookings : null;
7670
7684
  const groups = react.useMemo(
7671
7685
  () => ready === null ? [] : groupByKind(liveBookings(ready.bookings)),
@@ -7675,7 +7689,7 @@ function TripBookingsSection({
7675
7689
  const unreadable = ready !== null && ready.syncedAt === void 0;
7676
7690
  const refreshLive = ready?.refreshLive;
7677
7691
  if (bookings.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(BookingsDark, { reason: bookings.reason });
7678
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
7692
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-bookings-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
7679
7693
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-bookings-section__head", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-bookings-section__head-text", children: [
7680
7694
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-bookings-section__title", children: t("chrome.tripBookings.panelLabel") }),
7681
7695
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-bookings-section__subtitle", children: t("chrome.tripBookings.subtitle").replace("{count}", String(total)) })
@@ -7747,7 +7761,7 @@ function LockIcon2() {
7747
7761
  );
7748
7762
  }
7749
7763
  function CloseoutLockNotice({ whatKey }) {
7750
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7764
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7751
7765
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-closeout-lock", role: "status", children: [
7752
7766
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-closeout-lock__glyph", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon2, {}) }),
7753
7767
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-admin-closeout-lock__body", children: [
@@ -7851,7 +7865,7 @@ function ChecklistSkeleton() {
7851
7865
  ] }, column)) });
7852
7866
  }
7853
7867
  function ChecklistEmpty({ onPull }) {
7854
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7868
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7855
7869
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
7856
7870
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ChecklistIcon, {}) }),
7857
7871
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.emptyTitle") }),
@@ -7860,7 +7874,7 @@ function ChecklistEmpty({ onPull }) {
7860
7874
  ] });
7861
7875
  }
7862
7876
  function ChecklistFailed({ onRetry }) {
7863
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7877
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7864
7878
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", children: [
7865
7879
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-checklist-section__state-title", children: t("chrome.tripChecklist.failedTitle") }),
7866
7880
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-checklist-section__state-body", children: t("chrome.tripChecklist.failedBody") }),
@@ -7868,7 +7882,7 @@ function ChecklistFailed({ onRetry }) {
7868
7882
  ] });
7869
7883
  }
7870
7884
  function ChecklistDark({ reason }) {
7871
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7885
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7872
7886
  if (reason === "mode") return null;
7873
7887
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__state", "data-dark": reason, children: [
7874
7888
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-checklist-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(LockIcon3, {}) }),
@@ -7968,7 +7982,7 @@ function ItemDialog({
7968
7982
  onClose,
7969
7983
  onSubmit
7970
7984
  }) {
7971
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
7985
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
7972
7986
  const titleId = react.useId();
7973
7987
  const [values, setValues] = react.useState(initial);
7974
7988
  const [sectionChoice, setSectionChoice] = react.useState(
@@ -8165,7 +8179,7 @@ function ChecklistItemRow({
8165
8179
  onToggle,
8166
8180
  onEdit
8167
8181
  }) {
8168
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
8182
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
8169
8183
  const complete = item.status === "COMPLETE";
8170
8184
  const day = dayOffsetLabel(item.dayOffset);
8171
8185
  const actorKey = actorLabelKey(item.performedByKind);
@@ -8217,7 +8231,7 @@ function SectionCard2({
8217
8231
  onAddToSection,
8218
8232
  ItemRow: ItemRow2 = ChecklistItemRow
8219
8233
  }) {
8220
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
8234
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
8221
8235
  const openMandatory = items.filter((one) => one.isMandatory && one.status === "OPEN").length;
8222
8236
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section__section", children: [
8223
8237
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-checklist-section__section-head", children: [
@@ -8271,7 +8285,7 @@ function PhasePanel({
8271
8285
  onAddToPhase,
8272
8286
  ItemRow: ItemRow2
8273
8287
  }) {
8274
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
8288
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
8275
8289
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: sections.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__phase-empty", children: [
8276
8290
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: t("chrome.tripChecklist.phaseEmpty") }),
8277
8291
  readOnly ? null : /* @__PURE__ */ jsxRuntime.jsx(
@@ -8307,7 +8321,7 @@ function PhaseSwitcher({
8307
8321
  value,
8308
8322
  onChange
8309
8323
  }) {
8310
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
8324
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
8311
8325
  return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-checklist-section__segment", children: [
8312
8326
  /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripChecklist.phaseLabel") }),
8313
8327
  OPTIONS.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -8340,7 +8354,7 @@ function TemplatePickerDialog({
8340
8354
  onClose,
8341
8355
  onPull
8342
8356
  }) {
8343
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
8357
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
8344
8358
  const titleId = react.useId();
8345
8359
  const [selectedId, setSelectedId] = react.useState(null);
8346
8360
  const [mode, setMode] = react.useState("append");
@@ -8461,7 +8475,14 @@ function codeOf(error) {
8461
8475
  const classification = error !== null && typeof error === "object" && "classification" in error ? error.classification : void 0;
8462
8476
  return classification?.code ?? "unknown";
8463
8477
  }
8464
- function TripChecklistSection({
8478
+ function TripChecklistSection(props) {
8479
+ const session = chunkS53XNHRU_cjs.useSession();
8480
+ if (session.status !== "authenticated") {
8481
+ return null;
8482
+ }
8483
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripChecklistSection, { ...props });
8484
+ }
8485
+ function ReadyTripChecklistSection({
8465
8486
  tripRef,
8466
8487
  readOnly = false,
8467
8488
  initialPhase,
@@ -8469,8 +8490,8 @@ function TripChecklistSection({
8469
8490
  components,
8470
8491
  style
8471
8492
  }) {
8472
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
8473
- const checklists = chunkTYBIAPPT_cjs.useChecklists(tripRef);
8493
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
8494
+ const checklists = chunk2OWH2KDY_cjs.useChecklists(tripRef);
8474
8495
  const [overlay, setOverlay] = react.useState({ kind: "none" });
8475
8496
  const [pending, setPending] = react.useState(false);
8476
8497
  const [busyItemId, setBusyItemId] = react.useState(null);
@@ -8637,7 +8658,7 @@ function TripChecklistSection({
8637
8658
  const inert = readOnly || locked;
8638
8659
  const unreadable = aggregate?.lastFetchFailed === true && aggregate.loaded === false;
8639
8660
  const percent = overallPercent(aggregate?.progress);
8640
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
8661
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-checklist-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
8641
8662
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head", children: [
8642
8663
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-checklist-section__head-text", children: [
8643
8664
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-checklist-section__title", children: t("chrome.tripChecklist.panelLabel") }),
@@ -9026,7 +9047,7 @@ var STATUS_LABEL_KEY5 = {
9026
9047
  CANCELLED: "chrome.tripDirectory.status.cancelled"
9027
9048
  };
9028
9049
  function TripRow({ trip, index, onOpen, style }) {
9029
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9050
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9030
9051
  const derived = deriveTripRow(trip, index);
9031
9052
  return /* @__PURE__ */ jsxRuntime.jsxs(
9032
9053
  "tr",
@@ -9034,7 +9055,7 @@ function TripRow({ trip, index, onOpen, style }) {
9034
9055
  role: "row",
9035
9056
  className: "kf-trip-directory-flow__row",
9036
9057
  "data-dimming": derived.dimming === "none" ? void 0 : derived.dimming,
9037
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
9058
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
9038
9059
  children: [
9039
9060
  /* @__PURE__ */ jsxRuntime.jsxs(
9040
9061
  "td",
@@ -9153,8 +9174,8 @@ function TripResultsListBody({
9153
9174
  hasActiveFilter,
9154
9175
  onRetry
9155
9176
  }) {
9156
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9157
- const { makeTripsFetch } = chunkIAXVUR7H_cjs.useAgencyTrips();
9177
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9178
+ const { makeTripsFetch } = chunkF4GGHUMX_cjs.useAgencyTrips();
9158
9179
  const [errorCode, setErrorCode] = react.useState(void 0);
9159
9180
  const [hasSettled, setHasSettled] = react.useState(false);
9160
9181
  const Row = TripRowComponent ?? TripRow;
@@ -9165,7 +9186,7 @@ function TripResultsListBody({
9165
9186
  setErrorCode(void 0);
9166
9187
  return page;
9167
9188
  } catch (error) {
9168
- setErrorCode(chunkTYBIAPPT_cjs.classifyError(error).code ?? "unknown");
9189
+ setErrorCode(chunk2OWH2KDY_cjs.classifyError(error).code ?? "unknown");
9169
9190
  return { rows: [], nextCursor: void 0 };
9170
9191
  } finally {
9171
9192
  setHasSettled(true);
@@ -9173,7 +9194,7 @@ function TripResultsListBody({
9173
9194
  },
9174
9195
  [makeTripsFetch, filters]
9175
9196
  );
9176
- const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkIAXVUR7H_cjs.usePaginatedList(fetch);
9197
+ const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkF4GGHUMX_cjs.usePaginatedList(fetch);
9177
9198
  const isLoading = !hasSettled;
9178
9199
  const reportedCount = isLoading || errorCode !== void 0 ? void 0 : rows.length;
9179
9200
  react.useEffect(() => {
@@ -9275,7 +9296,7 @@ function TripSearchInput({
9275
9296
  debounceMs,
9276
9297
  onDebouncedChange
9277
9298
  }) {
9278
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9299
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9279
9300
  const [value, setValue] = react.useState("");
9280
9301
  react.useEffect(() => {
9281
9302
  const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
@@ -9345,7 +9366,7 @@ function TripDirectoryFlow({
9345
9366
  components,
9346
9367
  style
9347
9368
  }) {
9348
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9369
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9349
9370
  const [eventType, setEventType] = react.useState(initialEventType ?? "TRIP");
9350
9371
  const [segment, setSegment] = react.useState("all");
9351
9372
  const [q, setQ] = react.useState("");
@@ -9365,7 +9386,7 @@ function TripDirectoryFlow({
9365
9386
  );
9366
9387
  const filterKey = react.useMemo(() => JSON.stringify(filters), [filters]);
9367
9388
  const hasActiveFilter = segment !== "all" || q.length > 0 || status !== void 0;
9368
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
9389
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
9369
9390
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar", children: [
9370
9391
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-directory-flow__toolbar-row", children: [
9371
9392
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -9626,7 +9647,7 @@ function KindIcon({
9626
9647
  return /* @__PURE__ */ jsxRuntime.jsx(GenericFileIcon, {});
9627
9648
  }
9628
9649
  function DocumentRow({ row, onOpen }) {
9629
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9650
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9630
9651
  const { file, spend } = row;
9631
9652
  const purged = file.status === "purged";
9632
9653
  const retention = retentionStateOf(file);
@@ -9687,7 +9708,7 @@ function DocumentsSkeleton() {
9687
9708
  ] }, id)) });
9688
9709
  }
9689
9710
  function DocumentsEmpty() {
9690
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9711
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9691
9712
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", children: [
9692
9713
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-documents-section__state-mark", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(EmptyDocumentsIcon, {}) }),
9693
9714
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.emptyTitle") }),
@@ -9695,7 +9716,7 @@ function DocumentsEmpty() {
9695
9716
  ] });
9696
9717
  }
9697
9718
  function DocumentsFailed({ onRetry }) {
9698
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9719
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9699
9720
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", role: "alert", children: [
9700
9721
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t("chrome.tripDocuments.failedTitle") }),
9701
9722
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-documents-section__state-body", children: t("chrome.tripDocuments.failedBody") }),
@@ -9703,7 +9724,7 @@ function DocumentsFailed({ onRetry }) {
9703
9724
  ] });
9704
9725
  }
9705
9726
  function DocumentsDark({ reason }) {
9706
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9727
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9707
9728
  if (reason === "mode") return null;
9708
9729
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__state", "data-dark": reason, children: [
9709
9730
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-documents-section__state-title", children: t(
@@ -9726,7 +9747,7 @@ function DocumentViewer({
9726
9747
  failed,
9727
9748
  onClose
9728
9749
  }) {
9729
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9750
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9730
9751
  const titleId = react.useId();
9731
9752
  const { file } = row;
9732
9753
  const classKey = retentionClassLabelKey(file.retentionClass);
@@ -9807,7 +9828,7 @@ function DocumentViewer({
9807
9828
  );
9808
9829
  }
9809
9830
  function PurposeChips({ counts, value, onChange }) {
9810
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9831
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9811
9832
  const options = [
9812
9833
  {
9813
9834
  key: "all",
@@ -9877,7 +9898,7 @@ function UploadDialog({
9877
9898
  onClose,
9878
9899
  onSubmit
9879
9900
  }) {
9880
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
9901
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
9881
9902
  const titleId = react.useId();
9882
9903
  const nameId = react.useId();
9883
9904
  const fileId = react.useId();
@@ -10038,13 +10059,20 @@ function UploadDialog({
10038
10059
  }
10039
10060
  );
10040
10061
  }
10041
- function TripDocumentsSection({ tripRef, style }) {
10042
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10043
- const files = chunkTYBIAPPT_cjs.useFiles({ tripRef });
10044
- const expenses = chunkTYBIAPPT_cjs.useExpenses(tripRef);
10045
- const bookings = chunkIAXVUR7H_cjs.useBookings(tripRef);
10046
- const { listTripManifest } = chunkIAXVUR7H_cjs.useDirectories();
10047
- const { statuses, loaded: capabilityLoaded } = chunkIAXVUR7H_cjs.useCapabilityStatuses(tripRef);
10062
+ function TripDocumentsSection(props) {
10063
+ const session = chunkS53XNHRU_cjs.useSession();
10064
+ if (session.status !== "authenticated") {
10065
+ return null;
10066
+ }
10067
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripDocumentsSection, { ...props });
10068
+ }
10069
+ function ReadyTripDocumentsSection({ tripRef, style }) {
10070
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10071
+ const files = chunk2OWH2KDY_cjs.useFiles({ tripRef });
10072
+ const expenses = chunk2OWH2KDY_cjs.useExpenses(tripRef);
10073
+ const bookings = chunkF4GGHUMX_cjs.useBookings(tripRef);
10074
+ const { listTripManifest } = chunkF4GGHUMX_cjs.useDirectories();
10075
+ const { statuses, loaded: capabilityLoaded } = chunkF4GGHUMX_cjs.useCapabilityStatuses(tripRef);
10048
10076
  const capability = statuses.get("files");
10049
10077
  const [state, setState] = react.useState({ kind: "loading" });
10050
10078
  const [purpose, setPurpose] = react.useState(null);
@@ -10191,7 +10219,7 @@ function TripDocumentsSection({ tripRef, style }) {
10191
10219
  if (capabilityLoaded && capability === "mode-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "mode" });
10192
10220
  if (capabilityLoaded && capability === "flag-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "flag" });
10193
10221
  if (capabilityLoaded && capability === "data-dark") return /* @__PURE__ */ jsxRuntime.jsx(DocumentsDark, { reason: "data" });
10194
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
10222
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-documents-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
10195
10223
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head", children: [
10196
10224
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-documents-section__head-text", children: [
10197
10225
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-documents-section__title", children: t("chrome.tripDocuments.panelLabel") }),
@@ -10480,7 +10508,7 @@ function ExpensesSkeleton() {
10480
10508
  ] }, id)) });
10481
10509
  }
10482
10510
  function ExpensesEmpty({ onLog }) {
10483
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10511
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10484
10512
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", children: [
10485
10513
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(WalletIcon, {}) }),
10486
10514
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.emptyTitle") }),
@@ -10489,7 +10517,7 @@ function ExpensesEmpty({ onLog }) {
10489
10517
  ] });
10490
10518
  }
10491
10519
  function ExpensesFailed({ onRetry }) {
10492
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10520
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10493
10521
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__state", role: "alert", children: [
10494
10522
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-expenses-section__state-title", children: t("chrome.tripExpenses.failedTitle") }),
10495
10523
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-expenses-section__state-body", children: t("chrome.tripExpenses.failedBody") }),
@@ -10497,7 +10525,7 @@ function ExpensesFailed({ onRetry }) {
10497
10525
  ] });
10498
10526
  }
10499
10527
  function ExpensesDark({ reason }) {
10500
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10528
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10501
10529
  if (reason === "mode") {
10502
10530
  return null;
10503
10531
  }
@@ -10518,7 +10546,7 @@ function ExpensesTable({
10518
10546
  onVoid,
10519
10547
  onViewReceipt
10520
10548
  }) {
10521
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10549
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10522
10550
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-expenses-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-expenses-section__table", children: [
10523
10551
  /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripExpenses.tableCaption") }),
10524
10552
  /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
@@ -10578,7 +10606,7 @@ function LogExpenseDialog({
10578
10606
  onClose,
10579
10607
  onSubmit
10580
10608
  }) {
10581
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10609
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10582
10610
  const titleId = react.useId();
10583
10611
  const [category, setCategory] = react.useState("MISC");
10584
10612
  const [amount, setAmount] = react.useState("");
@@ -10741,9 +10769,9 @@ function ReceiptDialog({
10741
10769
  description,
10742
10770
  onClose
10743
10771
  }) {
10744
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10772
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10745
10773
  const titleId = react.useId();
10746
- const files = chunkTYBIAPPT_cjs.useFiles({ tripRef });
10774
+ const files = chunk2OWH2KDY_cjs.useFiles({ tripRef });
10747
10775
  const [phase, setPhase] = react.useState({ kind: "loading" });
10748
10776
  const [imageBroke, setImageBroke] = react.useState(false);
10749
10777
  const readUrl = files.url;
@@ -10817,7 +10845,7 @@ function VoidExpenseDialog({
10817
10845
  onClose,
10818
10846
  onSubmit
10819
10847
  }) {
10820
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10848
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10821
10849
  const titleId = react.useId();
10822
10850
  const [reason, setReason] = react.useState("");
10823
10851
  const trimmed = reason.trim();
@@ -10890,10 +10918,17 @@ function isCloseoutLocked2(error) {
10890
10918
  const classification = error.classification;
10891
10919
  return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
10892
10920
  }
10893
- function TripExpensesSection({ tripRef, style }) {
10894
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
10895
- const expenses = chunkTYBIAPPT_cjs.useExpenses(tripRef);
10896
- const vendors = chunkTYBIAPPT_cjs.useVendors(tripRef, "");
10921
+ function TripExpensesSection(props) {
10922
+ const session = chunkS53XNHRU_cjs.useSession();
10923
+ if (session.status !== "authenticated") {
10924
+ return null;
10925
+ }
10926
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripExpensesSection, { ...props });
10927
+ }
10928
+ function ReadyTripExpensesSection({ tripRef, style }) {
10929
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
10930
+ const expenses = chunk2OWH2KDY_cjs.useExpenses(tripRef);
10931
+ const vendors = chunk2OWH2KDY_cjs.useVendors(tripRef, "");
10897
10932
  const [category, setCategory] = react.useState(null);
10898
10933
  const [paymentMode, setPaymentMode] = react.useState(null);
10899
10934
  const [missingReceiptOnly, setMissingReceiptOnly] = react.useState(false);
@@ -10962,7 +10997,7 @@ function TripExpensesSection({ tripRef, style }) {
10962
10997
  return /* @__PURE__ */ jsxRuntime.jsx(ExpensesDark, { reason: expenses.reason });
10963
10998
  }
10964
10999
  const filtered = category !== null || paymentMode !== null || missingReceiptOnly;
10965
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
11000
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-expenses-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
10966
11001
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-expenses-section__toolbar", children: [
10967
11002
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-title", children: t("chrome.tripExpenses.panelLabel") }),
10968
11003
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-expenses-section__toolbar-spacer" }),
@@ -11242,7 +11277,7 @@ function FloatMovementDialog({
11242
11277
  onClose,
11243
11278
  onSubmit
11244
11279
  }) {
11245
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
11280
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
11246
11281
  const titleId = react.useId();
11247
11282
  const [managerId, setManagerId] = react.useState(manager?.managerId ?? null);
11248
11283
  const [amount, setAmount] = react.useState(
@@ -11475,7 +11510,7 @@ function FloatSkeleton() {
11475
11510
  ] }, id)) });
11476
11511
  }
11477
11512
  function FloatEmpty({ onIssue }) {
11478
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
11513
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
11479
11514
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", children: [
11480
11515
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(SafeIcon, {}) }),
11481
11516
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.emptyTitle") }),
@@ -11484,7 +11519,7 @@ function FloatEmpty({ onIssue }) {
11484
11519
  ] });
11485
11520
  }
11486
11521
  function FloatFailed({ onRetry }) {
11487
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
11522
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
11488
11523
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__state", role: "alert", children: [
11489
11524
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-float-section__state-title", children: t("chrome.tripFloat.failedTitle") }),
11490
11525
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-float-section__state-body", children: t("chrome.tripFloat.failedBody") }),
@@ -11492,7 +11527,7 @@ function FloatFailed({ onRetry }) {
11492
11527
  ] });
11493
11528
  }
11494
11529
  function FloatDark({ reason }) {
11495
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
11530
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
11496
11531
  if (reason === "mode") {
11497
11532
  return null;
11498
11533
  }
@@ -11515,7 +11550,7 @@ function ManagerFloatCard({
11515
11550
  onAdjust,
11516
11551
  onSettle
11517
11552
  }) {
11518
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
11553
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
11519
11554
  const bodyId = `kf-float-${row.managerId}`;
11520
11555
  const summary = row.summary;
11521
11556
  const shares = summary === void 0 ? void 0 : usageShares(summary);
@@ -11720,10 +11755,17 @@ function refusedBalanceOf(error) {
11720
11755
  const details = error.details;
11721
11756
  return details?.currentBalanceMinor;
11722
11757
  }
11723
- function TripFloatSection({ tripRef, style }) {
11724
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
11725
- const float = chunkTYBIAPPT_cjs.useFloat(tripRef);
11726
- const managers = chunkTYBIAPPT_cjs.useManagers(tripRef);
11758
+ function TripFloatSection(props) {
11759
+ const session = chunkS53XNHRU_cjs.useSession();
11760
+ if (session.status !== "authenticated") {
11761
+ return null;
11762
+ }
11763
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripFloatSection, { ...props });
11764
+ }
11765
+ function ReadyTripFloatSection({ tripRef, style }) {
11766
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
11767
+ const float = chunk2OWH2KDY_cjs.useFloat(tripRef);
11768
+ const managers = chunk2OWH2KDY_cjs.useManagers(tripRef);
11727
11769
  const [openManagerId, setOpenManagerId] = react.useState(null);
11728
11770
  const [ledgers, setLedgers] = react.useState({});
11729
11771
  const [overlay, setOverlay] = react.useState({ kind: "none" });
@@ -11849,7 +11891,7 @@ function TripFloatSection({ tripRef, style }) {
11849
11891
  if (float.status === "dark") {
11850
11892
  return /* @__PURE__ */ jsxRuntime.jsx(FloatDark, { reason: float.reason });
11851
11893
  }
11852
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
11894
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-float-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
11853
11895
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-float-section__toolbar", children: [
11854
11896
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-title", children: t("chrome.tripFloat.panelLabel") }),
11855
11897
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-float-section__toolbar-spacer" }),
@@ -11964,7 +12006,7 @@ function DispatchDialog({
11964
12006
  onClose,
11965
12007
  onSend
11966
12008
  }) {
11967
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12009
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
11968
12010
  const titleId = react.useId();
11969
12011
  const [everyone, setEveryone] = react.useState(true);
11970
12012
  const [picked, setPicked] = react.useState(/* @__PURE__ */ new Set());
@@ -12112,7 +12154,7 @@ function FormRow2({
12112
12154
  onExport,
12113
12155
  onOpenMissing
12114
12156
  }) {
12115
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12157
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12116
12158
  const canSeeMissing = supportsWhoIsMissing(form);
12117
12159
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", children: [
12118
12160
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "kf-trip-forms-section__row-body", children: [
@@ -12165,14 +12207,14 @@ function FormsSkeleton() {
12165
12207
  ] }, id)) });
12166
12208
  }
12167
12209
  function FormsEmpty() {
12168
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12210
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12169
12211
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", children: [
12170
12212
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.emptyTitle") }),
12171
12213
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.emptyBody") })
12172
12214
  ] });
12173
12215
  }
12174
12216
  function FormsFailed({ onRetry }) {
12175
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12217
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12176
12218
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", role: "alert", children: [
12177
12219
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t("chrome.tripForms.failedTitle") }),
12178
12220
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-forms-section__state-body", children: t("chrome.tripForms.failedBody") }),
@@ -12180,7 +12222,7 @@ function FormsFailed({ onRetry }) {
12180
12222
  ] });
12181
12223
  }
12182
12224
  function FormsDark({ reason }) {
12183
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12225
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12184
12226
  if (reason === "mode") return null;
12185
12227
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__state", "data-dark": reason, children: [
12186
12228
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-forms-section__state-title", children: t(reason === "flag" ? "chrome.tripForms.flagDarkTitle" : "chrome.tripForms.dataDarkTitle") }),
@@ -12225,7 +12267,7 @@ function OnBehalfDialog({
12225
12267
  onClose,
12226
12268
  onSubmit
12227
12269
  }) {
12228
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12270
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12229
12271
  const titleId = react.useId();
12230
12272
  const [values, setValues] = react.useState({});
12231
12273
  const answerable = react.useMemo(
@@ -12363,7 +12405,7 @@ function ParticipantRow({
12363
12405
  onFillOnBehalf,
12364
12406
  onOpenResponse
12365
12407
  }) {
12366
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12408
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12367
12409
  const status = row.response?.status;
12368
12410
  const submitted = status === "SUBMITTED";
12369
12411
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-forms-section__row", "data-done": submitted ? "true" : void 0, children: [
@@ -12416,7 +12458,7 @@ function ResponseViewer({
12416
12458
  failed,
12417
12459
  onClose
12418
12460
  }) {
12419
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12461
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12420
12462
  const titleId = react.useId();
12421
12463
  return /* @__PURE__ */ jsxRuntime.jsx(
12422
12464
  SheetDialog,
@@ -12446,15 +12488,22 @@ function codeOf4(error) {
12446
12488
  const classification = error !== null && typeof error === "object" && "classification" in error ? error.classification : void 0;
12447
12489
  return classification?.code ?? "unknown";
12448
12490
  }
12449
- function TripFormsSection({
12491
+ function TripFormsSection(props) {
12492
+ const session = chunkS53XNHRU_cjs.useSession();
12493
+ if (session.status !== "authenticated") {
12494
+ return null;
12495
+ }
12496
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripFormsSection, { ...props });
12497
+ }
12498
+ function ReadyTripFormsSection({
12450
12499
  tripRef,
12451
12500
  readOnly = false,
12452
12501
  components,
12453
12502
  style
12454
12503
  }) {
12455
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12456
- const forms = chunkTYBIAPPT_cjs.useForms(tripRef);
12457
- const { listTripManifest } = chunkIAXVUR7H_cjs.useDirectories();
12504
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12505
+ const forms = chunk2OWH2KDY_cjs.useForms(tripRef);
12506
+ const { listTripManifest } = chunkF4GGHUMX_cjs.useDirectories();
12458
12507
  const [openFormId, setOpenFormId] = react.useState(null);
12459
12508
  const [completion, setCompletion] = react.useState(void 0);
12460
12509
  const [manifest, setManifest] = react.useState(void 0);
@@ -12576,7 +12625,7 @@ function TripFormsSection({
12576
12625
  if (forms.status === "dark") return /* @__PURE__ */ jsxRuntime.jsx(FormsDark, { reason: forms.reason });
12577
12626
  const inert = readOnly;
12578
12627
  const unreadable = ready !== null && ready.syncedAt === void 0 && rows.length === 0;
12579
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
12628
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-forms-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
12580
12629
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head", children: [
12581
12630
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-forms-section__head-text", children: [
12582
12631
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-forms-section__title", children: openForm === null ? t("chrome.tripForms.panelLabel") : openForm.title }),
@@ -12726,7 +12775,7 @@ function ChangeLogDialog({
12726
12775
  onRetry,
12727
12776
  onClose
12728
12777
  }) {
12729
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
12778
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
12730
12779
  const titleId = react.useId();
12731
12780
  return /* @__PURE__ */ jsxRuntime.jsx(
12732
12781
  SheetDialog,
@@ -13073,7 +13122,7 @@ function ItemRow({
13073
13122
  onMoveBy,
13074
13123
  onOpenVendor
13075
13124
  }) {
13076
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13125
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13077
13126
  const derived = deriveItineraryItem(item, timeZone, serverTime);
13078
13127
  const isDone = item.status === "COMPLETED";
13079
13128
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -13195,7 +13244,7 @@ function DayCard({
13195
13244
  onSwitchToTimeline,
13196
13245
  onOpenVendor
13197
13246
  }) {
13198
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13247
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13199
13248
  const { draggingId, overIndex, rowProps, moveBy } = useListReorder({
13200
13249
  enabled: canEdit,
13201
13250
  onMove: onReorder
@@ -13246,7 +13295,7 @@ function DayCard({
13246
13295
  ] });
13247
13296
  }
13248
13297
  function DayPillStrip({ pills, activeIso, onSelect }) {
13249
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13298
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13250
13299
  return /* @__PURE__ */ jsxRuntime.jsx(
13251
13300
  "div",
13252
13301
  {
@@ -13323,7 +13372,7 @@ function EditDayDialog({
13323
13372
  onClose,
13324
13373
  onSubmit
13325
13374
  }) {
13326
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13375
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13327
13376
  const titleId = react.useId();
13328
13377
  const [cardTitle, setCardTitle] = react.useState(group.day.cardTitle);
13329
13378
  const [hasSummary, setHasSummary] = react.useState(
@@ -13466,7 +13515,7 @@ function ItemFormDialog({
13466
13515
  onSubmit,
13467
13516
  onDelete
13468
13517
  }) {
13469
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13518
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13470
13519
  const titleId = react.useId();
13471
13520
  const isEdit = item !== null;
13472
13521
  const [isoDate, setIsoDate] = react.useState(
@@ -13721,7 +13770,7 @@ function ItinerarySkeleton({ view }) {
13721
13770
  ] });
13722
13771
  }
13723
13772
  function ItineraryEmpty() {
13724
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13773
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13725
13774
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", children: [
13726
13775
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon, {}) }),
13727
13776
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.emptyTitle") }),
@@ -13729,7 +13778,7 @@ function ItineraryEmpty() {
13729
13778
  ] });
13730
13779
  }
13731
13780
  function ItineraryFailed({ onRetry }) {
13732
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13781
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13733
13782
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__state", role: "alert", children: [
13734
13783
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-itinerary-section__state-title", children: t("chrome.tripItinerary.failedTitle") }),
13735
13784
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-itinerary-section__state-body", children: t("chrome.tripItinerary.failedBody") }),
@@ -13737,7 +13786,7 @@ function ItineraryFailed({ onRetry }) {
13737
13786
  ] });
13738
13787
  }
13739
13788
  function TimelineView({ entries, onOpenDay }) {
13740
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13789
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13741
13790
  return /* @__PURE__ */ jsxRuntime.jsx("section", { className: "kf-trip-itinerary-section__timeline", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__timeline-grid", children: [
13742
13791
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__timeline-line", "aria-hidden": "true" }),
13743
13792
  entries.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13824,7 +13873,7 @@ var OPTIONS2 = [
13824
13873
  { value: "timeline", labelKey: "chrome.tripItinerary.viewTimeline" }
13825
13874
  ];
13826
13875
  function ViewSegment({ value, onChange }) {
13827
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13876
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13828
13877
  return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-itinerary-section__segment", children: [
13829
13878
  /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t("chrome.tripItinerary.viewLabel") }),
13830
13879
  OPTIONS2.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13845,13 +13894,20 @@ function codeOf5(error) {
13845
13894
  const classification = error !== null && typeof error === "object" && "classification" in error ? error.classification : void 0;
13846
13895
  return classification?.code ?? "unknown";
13847
13896
  }
13848
- function TripItinerarySection({
13897
+ function TripItinerarySection(props) {
13898
+ const session = chunkS53XNHRU_cjs.useSession();
13899
+ if (session.status !== "authenticated") {
13900
+ return null;
13901
+ }
13902
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripItinerarySection, { ...props });
13903
+ }
13904
+ function ReadyTripItinerarySection({
13849
13905
  tripRef,
13850
13906
  onOpenVendor,
13851
13907
  style
13852
13908
  }) {
13853
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
13854
- const itinerary = chunkTYBIAPPT_cjs.useItinerary(tripRef);
13909
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
13910
+ const itinerary = chunk2OWH2KDY_cjs.useItinerary(tripRef);
13855
13911
  const [view, setView] = react.useState("days");
13856
13912
  const [activeIso, setActiveIso] = react.useState(null);
13857
13913
  const [overlay, setOverlay] = react.useState({ kind: "none" });
@@ -14024,7 +14080,7 @@ function TripItinerarySection({
14024
14080
  setActiveIso(isoDate);
14025
14081
  setView("days");
14026
14082
  }
14027
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
14083
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-itinerary-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
14028
14084
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-itinerary-section__toolbar", children: [
14029
14085
  /* @__PURE__ */ jsxRuntime.jsx(ViewSegment, { value: view, onChange: setView }),
14030
14086
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-itinerary-section__toolbar-spacer" }),
@@ -14209,9 +14265,9 @@ function AddTravellerDialog({
14209
14265
  onClose,
14210
14266
  onAdded
14211
14267
  }) {
14212
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
14268
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
14213
14269
  const titleId = react.useId();
14214
- const { makeTravellersFetch, addTraveller, createAgencyTraveller } = chunkIAXVUR7H_cjs.useDirectories();
14270
+ const { makeTravellersFetch, addTraveller, createAgencyTraveller } = chunkF4GGHUMX_cjs.useDirectories();
14215
14271
  const [mode, setMode] = react.useState("search");
14216
14272
  const [term, setTerm] = react.useState("");
14217
14273
  const [debounced, setDebounced] = react.useState("");
@@ -14225,7 +14281,7 @@ function AddTravellerDialog({
14225
14281
  return () => clearTimeout(timer);
14226
14282
  }, [term]);
14227
14283
  function reportFailure(error) {
14228
- setErrorCode(chunkTYBIAPPT_cjs.classifyError(error).code ?? "unknown");
14284
+ setErrorCode(chunk2OWH2KDY_cjs.classifyError(error).code ?? "unknown");
14229
14285
  }
14230
14286
  async function addExisting(externalTravellerId, fullName) {
14231
14287
  setPending(true);
@@ -14377,8 +14433,8 @@ function DirectoryResults({
14377
14433
  pendingId,
14378
14434
  onPick
14379
14435
  }) {
14380
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
14381
- const { rows, hasNext, loadNext, settled, error } = chunkIAXVUR7H_cjs.usePaginatedList(fetch);
14436
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
14437
+ const { rows, hasNext, loadNext, settled, error } = chunkF4GGHUMX_cjs.usePaginatedList(fetch);
14382
14438
  if (!settled) {
14383
14439
  return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-manifest-section__dialog-note", "aria-live": "polite", children: t("chrome.tripManifest.addSearching") });
14384
14440
  }
@@ -14463,9 +14519,9 @@ function ManageGroupsDialog({
14463
14519
  onClose,
14464
14520
  onSaved
14465
14521
  }) {
14466
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
14522
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
14467
14523
  const titleId = react.useId();
14468
- const { createParty, patchParty, deleteParty } = chunkIAXVUR7H_cjs.useDirectories();
14524
+ const { createParty, patchParty, deleteParty } = chunkF4GGHUMX_cjs.useDirectories();
14469
14525
  const groups = deriveManifestGroups(rows).filter(
14470
14526
  (group) => group.id !== SOLO_GROUP_ID && group.party !== null
14471
14527
  );
@@ -14693,7 +14749,7 @@ function ManageGroupsDialog({
14693
14749
  }
14694
14750
  var DIET_BUCKET_CAP = 4;
14695
14751
  function ManifestFacetTiles({ facets, filtered }) {
14696
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
14752
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
14697
14753
  const dietEntries = Object.entries(facets.dietCounts).filter(([, count]) => count > 0).sort((a, b) => b[1] - a[1]);
14698
14754
  const shown = dietEntries.slice(0, DIET_BUCKET_CAP);
14699
14755
  const hiddenCount = dietEntries.length - shown.length;
@@ -14775,7 +14831,7 @@ function ManifestFiltersPopover({
14775
14831
  value,
14776
14832
  onChange
14777
14833
  }) {
14778
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
14834
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
14779
14835
  const [open, setOpen] = react.useState(false);
14780
14836
  const rootRef = react.useRef(null);
14781
14837
  const triggerRef = react.useRef(null);
@@ -14915,7 +14971,7 @@ var KIND_LABEL_KEY2 = {
14915
14971
  OTHER: "chrome.tripManifest.partyKind.other"
14916
14972
  };
14917
14973
  function ManifestGroupCard({ group, onEdit, children }) {
14918
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
14974
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
14919
14975
  const party = group.party;
14920
14976
  const isSolo = party === null;
14921
14977
  const heading = isSolo ? t("chrome.tripManifest.soloHeading") : party.label ?? t(KIND_LABEL_KEY2[party.kind] ?? "chrome.tripManifest.partyKind.other");
@@ -15003,7 +15059,7 @@ function ManifestRowKebab({
15003
15059
  onShareLink,
15004
15060
  onOpenProfile
15005
15061
  }) {
15006
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
15062
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15007
15063
  const [open, setOpen] = react.useState(false);
15008
15064
  const rootRef = react.useRef(null);
15009
15065
  const triggerRef = react.useRef(null);
@@ -15102,10 +15158,10 @@ function ManifestRow({
15102
15158
  onOpenProfile,
15103
15159
  style
15104
15160
  }) {
15105
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
15161
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15106
15162
  const derived = deriveManifestRow(row, index, serverTime);
15107
15163
  const traveller = row.traveller;
15108
- return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
15164
+ return /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__row", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
15109
15165
  /* @__PURE__ */ jsxRuntime.jsxs(
15110
15166
  "td",
15111
15167
  {
@@ -15179,7 +15235,7 @@ function ManifestTable({
15179
15235
  onOpenProfile,
15180
15236
  RowComponent
15181
15237
  }) {
15182
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
15238
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15183
15239
  const Row = RowComponent ?? ManifestRow;
15184
15240
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-manifest-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { role: "table", className: "kf-trip-manifest-section__table", children: [
15185
15241
  showHead ? /* @__PURE__ */ jsxRuntime.jsx("thead", { role: "rowgroup", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { role: "row", className: "kf-trip-manifest-section__head-row", children: [
@@ -15226,8 +15282,8 @@ function ManifestResultsBody({
15226
15282
  RowComponent,
15227
15283
  onRetry
15228
15284
  }) {
15229
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
15230
- const { makeManifestFetch, facets, groupedPageSize } = chunkIAXVUR7H_cjs.useAgencyTripManifest(tripRef);
15285
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15286
+ const { makeManifestFetch, facets, groupedPageSize } = chunkF4GGHUMX_cjs.useAgencyTripManifest(tripRef);
15231
15287
  const [errorCode, setErrorCode] = react.useState(void 0);
15232
15288
  const [hasSettled, setHasSettled] = react.useState(false);
15233
15289
  const [serverTime, setServerTime] = react.useState(void 0);
@@ -15244,7 +15300,7 @@ function ManifestResultsBody({
15244
15300
  if (meta?.serverTime !== void 0) setServerTime(meta.serverTime);
15245
15301
  return page;
15246
15302
  } catch (error) {
15247
- setErrorCode(chunkTYBIAPPT_cjs.classifyError(error).code ?? "unknown");
15303
+ setErrorCode(chunk2OWH2KDY_cjs.classifyError(error).code ?? "unknown");
15248
15304
  return { rows: [], nextCursor: void 0 };
15249
15305
  } finally {
15250
15306
  setHasSettled(true);
@@ -15252,7 +15308,7 @@ function ManifestResultsBody({
15252
15308
  },
15253
15309
  [makeManifestFetch, filters, grouped, groupedPageSize]
15254
15310
  );
15255
- const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkIAXVUR7H_cjs.usePaginatedList(fetch, {
15311
+ const { rows, hasNext, hasPrev, loadNext, loadPrev } = chunkF4GGHUMX_cjs.usePaginatedList(fetch, {
15256
15312
  accumulate: grouped
15257
15313
  });
15258
15314
  react.useEffect(() => {
@@ -15413,7 +15469,7 @@ function ManifestSearchInput({
15413
15469
  debounceMs,
15414
15470
  onDebouncedChange
15415
15471
  }) {
15416
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
15472
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15417
15473
  const [value, setValue] = react.useState("");
15418
15474
  react.useEffect(() => {
15419
15475
  const timer = setTimeout(() => onDebouncedChange(value.trim()), debounceMs);
@@ -15440,8 +15496,8 @@ function RemoveTravellerDialog({
15440
15496
  onClose,
15441
15497
  onRemoved
15442
15498
  }) {
15443
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
15444
- const { removeFromManifest } = chunkIAXVUR7H_cjs.useDirectories();
15499
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15500
+ const { removeFromManifest } = chunkF4GGHUMX_cjs.useDirectories();
15445
15501
  const titleId = react.useId();
15446
15502
  const [pending, setPending] = react.useState(false);
15447
15503
  const [errorCode, setErrorCode] = react.useState(void 0);
@@ -15528,7 +15584,7 @@ function shareAddress(build, token) {
15528
15584
  }
15529
15585
  var warnedNoShareUrl = false;
15530
15586
  function warnMissingShareUrl() {
15531
- if (warnedNoShareUrl || !chunkSMGXVEN3_cjs.isDevelopment()) return;
15587
+ if (warnedNoShareUrl || !chunkS53XNHRU_cjs.isDevelopment()) return;
15532
15588
  warnedNoShareUrl = true;
15533
15589
  console.warn(
15534
15590
  "[kaafil-react-uikit] No `buildShareUrl` on <KaafilUIKitProvider>, so the share dialog is showing operators a bare token instead of a sendable address. Kaafil returns a token, never a URL \u2014 the traveller page is on your domain. Fix: buildShareUrl={(token) => `${window.location.origin}/share/${token}`}"
@@ -15540,14 +15596,14 @@ function ShareLinkDialog({
15540
15596
  travellerName,
15541
15597
  onClose
15542
15598
  }) {
15543
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
15599
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15544
15600
  const titleId = react.useId();
15545
- const buildShareUrl = chunkIAXVUR7H_cjs.useBuildShareUrl();
15601
+ const buildShareUrl = chunkF4GGHUMX_cjs.useBuildShareUrl();
15546
15602
  const showsBareToken = buildShareUrl === null;
15547
15603
  if (showsBareToken) warnMissingShareUrl();
15548
15604
  const isFamily = travellerRef === null;
15549
- const offerable = chunkIAXVUR7H_cjs.familySafeSections(isFamily);
15550
- const { links, readFailed, mint, revoke, regenerate, reveal } = chunkIAXVUR7H_cjs.useShareLinks(
15605
+ const offerable = chunkF4GGHUMX_cjs.familySafeSections(isFamily);
15606
+ const { links, readFailed, mint, revoke, regenerate, reveal } = chunkF4GGHUMX_cjs.useShareLinks(
15551
15607
  tripRef,
15552
15608
  travellerRef
15553
15609
  );
@@ -15886,7 +15942,7 @@ function SideDrawer({
15886
15942
  "aria-modal": "true",
15887
15943
  "aria-labelledby": titleId,
15888
15944
  tabIndex: -1,
15889
- style: chunkSMGXVEN3_cjs.tokenStyle(style),
15945
+ style: chunkS53XNHRU_cjs.tokenStyle(style),
15890
15946
  children: [
15891
15947
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-admin-side-drawer__header", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__header-row", children: [
15892
15948
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-side-drawer__identity", children: [
@@ -15954,11 +16010,11 @@ function TravellerDetailDialog({
15954
16010
  onClose,
15955
16011
  onRemove
15956
16012
  }) {
15957
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16013
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
15958
16014
  const titleId = react.useId();
15959
- const { read, readFailed, refresh } = chunkTYBIAPPT_cjs.useTravellerProfile(tripRef, travellerRef);
15960
- const forms = chunkIAXVUR7H_cjs.useTravellerFormResponses(tripRef, travellerRef);
15961
- const { addTravellerNote } = chunkIAXVUR7H_cjs.useDirectories();
16015
+ const { read, readFailed, refresh } = chunk2OWH2KDY_cjs.useTravellerProfile(tripRef, travellerRef);
16016
+ const forms = chunkF4GGHUMX_cjs.useTravellerFormResponses(tripRef, travellerRef);
16017
+ const { addTravellerNote } = chunkF4GGHUMX_cjs.useDirectories();
15962
16018
  const [noteDraft, setNoteDraft] = react.useState("");
15963
16019
  const [notePending, setNotePending] = react.useState(false);
15964
16020
  const [noteFailed, setNoteFailed] = react.useState(false);
@@ -16187,7 +16243,7 @@ function DetailRow({
16187
16243
  absentLabel,
16188
16244
  meta
16189
16245
  }) {
16190
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16246
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16191
16247
  const has = value !== null && value !== void 0 && value.length > 0;
16192
16248
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__detail-row", children: [
16193
16249
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-manifest-section__detail-label", children: label }),
@@ -16210,7 +16266,7 @@ function TripManifestSection({
16210
16266
  components,
16211
16267
  style
16212
16268
  }) {
16213
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16269
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16214
16270
  const [q, setQ] = react.useState("");
16215
16271
  const [groupBy, setGroupBy] = react.useState("booking_group");
16216
16272
  const [filters, setFilters] = react.useState({});
@@ -16239,7 +16295,7 @@ function TripManifestSection({
16239
16295
  [groupBy, writeToken, wireFilters]
16240
16296
  );
16241
16297
  const hasActiveFilter = q.length > 0 || Object.keys(filters).length > 0;
16242
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
16298
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
16243
16299
  facets === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ManifestFacetTiles, { facets, filtered: hasActiveFilter }),
16244
16300
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-manifest-section__toolbar", children: [
16245
16301
  /* @__PURE__ */ jsxRuntime.jsx(ManifestSearchInput, { debounceMs: DEBOUNCE_MS, onDebouncedChange: setQ }),
@@ -16458,7 +16514,7 @@ function PaymentsSkeleton() {
16458
16514
  ] }, id)) });
16459
16515
  }
16460
16516
  function PaymentsEmpty({ onRecord }) {
16461
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16517
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16462
16518
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", children: [
16463
16519
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(ReceiptIcon, {}) }),
16464
16520
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.emptyTitle") }),
@@ -16467,7 +16523,7 @@ function PaymentsEmpty({ onRecord }) {
16467
16523
  ] });
16468
16524
  }
16469
16525
  function PaymentsFailed({ onRetry }) {
16470
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16526
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16471
16527
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__state", role: "alert", children: [
16472
16528
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-payments-section__state-title", children: t("chrome.tripPayments.failedTitle") }),
16473
16529
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-payments-section__state-body", children: t("chrome.tripPayments.failedBody") }),
@@ -16475,7 +16531,7 @@ function PaymentsFailed({ onRetry }) {
16475
16531
  ] });
16476
16532
  }
16477
16533
  function PaymentsDark({ reason }) {
16478
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16534
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16479
16535
  if (reason === "mode") {
16480
16536
  return null;
16481
16537
  }
@@ -16496,7 +16552,7 @@ function PaymentsTable({
16496
16552
  locked,
16497
16553
  onVoid
16498
16554
  }) {
16499
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16555
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16500
16556
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-payments-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-payments-section__table", children: [
16501
16557
  /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripPayments.tableCaption") }),
16502
16558
  /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
@@ -16555,7 +16611,7 @@ function RecordPaymentDialog({
16555
16611
  onClose,
16556
16612
  onSubmit
16557
16613
  }) {
16558
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16614
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16559
16615
  const titleId = react.useId();
16560
16616
  const [travellerId, setTravellerId] = react.useState(null);
16561
16617
  const [amount, setAmount] = react.useState("");
@@ -16730,7 +16786,7 @@ function VoidPaymentDialog({
16730
16786
  onClose,
16731
16787
  onSubmit
16732
16788
  }) {
16733
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16789
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16734
16790
  const titleId = react.useId();
16735
16791
  const [reason, setReason] = react.useState("");
16736
16792
  const trimmed = reason.trim();
@@ -16803,14 +16859,21 @@ function isCloseoutLocked4(error) {
16803
16859
  const classification = error.classification;
16804
16860
  return classification?.status === 423 || classification?.code === "TRIP_CLOSED_OUT";
16805
16861
  }
16806
- function TripPaymentsSection({
16862
+ function TripPaymentsSection(props) {
16863
+ const session = chunkS53XNHRU_cjs.useSession();
16864
+ if (session.status !== "authenticated") {
16865
+ return null;
16866
+ }
16867
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripPaymentsSection, { ...props });
16868
+ }
16869
+ function ReadyTripPaymentsSection({
16807
16870
  tripRef,
16808
16871
  balance,
16809
16872
  style
16810
16873
  }) {
16811
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
16812
- const collections = chunkTYBIAPPT_cjs.useCollections(tripRef);
16813
- const parties = chunkTYBIAPPT_cjs.useParties(tripRef);
16874
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
16875
+ const collections = chunk2OWH2KDY_cjs.useCollections(tripRef);
16876
+ const parties = chunk2OWH2KDY_cjs.useParties(tripRef);
16814
16877
  const [overlay, setOverlay] = react.useState({ kind: "none" });
16815
16878
  const [pending, setPending] = react.useState(false);
16816
16879
  const [errorCode, setErrorCode] = react.useState(void 0);
@@ -16890,7 +16953,7 @@ function TripPaymentsSection({
16890
16953
  }
16891
16954
  const currency = balance?.currency ?? rows[0]?.currency ?? "INR";
16892
16955
  const owingCount = eligibleRows.filter((row) => row.outstandingMinor > 0).length;
16893
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
16956
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-payments-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
16894
16957
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-payments-section__toolbar", children: [
16895
16958
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-title", children: t("chrome.tripPayments.panelLabel") }),
16896
16959
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-payments-section__toolbar-spacer" }),
@@ -17031,7 +17094,7 @@ function AssignTravellerDialog({
17031
17094
  onSubmit,
17032
17095
  onClose
17033
17096
  }) {
17034
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17097
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17035
17098
  const titleId = react.useId();
17036
17099
  const [pointId, setPointId] = react.useState(stops[0]?.id ?? "");
17037
17100
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -17102,7 +17165,7 @@ function BoardingRoster({
17102
17165
  onRetry,
17103
17166
  stops
17104
17167
  }) {
17105
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17168
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17106
17169
  if (failed) {
17107
17170
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
17108
17171
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.boardingFailedTitle") }),
@@ -17162,7 +17225,7 @@ function TravellerBoardRow({
17162
17225
  busy,
17163
17226
  onCorrect
17164
17227
  }) {
17165
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17228
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17166
17229
  const correctable = occupant.status !== "PENDING";
17167
17230
  const next = occupant.status === "BOARDED" ? "NO_SHOW" : "BOARDED";
17168
17231
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "kf-trip-pickups-section__roster-row", children: [
@@ -17200,7 +17263,7 @@ function DeleteStopDialog({
17200
17263
  onDelete,
17201
17264
  onClose
17202
17265
  }) {
17203
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17266
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17204
17267
  const titleId = react.useId();
17205
17268
  const [target, setTarget] = react.useState(siblings[0]?.id ?? "");
17206
17269
  const occupied = stop.expectedCount > 0;
@@ -17454,7 +17517,7 @@ function PickupsEmpty({
17454
17517
  kindLabel,
17455
17518
  onAdd
17456
17519
  }) {
17457
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17520
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17458
17521
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", children: [
17459
17522
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-pickups-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon, {}) }),
17460
17523
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.emptyTitle").replace("{kind}", kindLabel) }),
@@ -17463,7 +17526,7 @@ function PickupsEmpty({
17463
17526
  ] });
17464
17527
  }
17465
17528
  function PickupsFailed({ onRetry }) {
17466
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17529
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17467
17530
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__state", role: "alert", children: [
17468
17531
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-pickups-section__state-title", children: t("chrome.tripPickups.failedTitle") }),
17469
17532
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-pickups-section__state-body", children: t("chrome.tripPickups.failedBody") }),
@@ -17471,7 +17534,7 @@ function PickupsFailed({ onRetry }) {
17471
17534
  ] });
17472
17535
  }
17473
17536
  function PickupsDark({ reason }) {
17474
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17537
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17475
17538
  if (reason === "mode") {
17476
17539
  return null;
17477
17540
  }
@@ -17505,7 +17568,7 @@ function StopFormDialog({
17505
17568
  onClose,
17506
17569
  onSubmit
17507
17570
  }) {
17508
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17571
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17509
17572
  const titleId = react.useId();
17510
17573
  const isEdit = stop !== null;
17511
17574
  const [kind, setKind] = react.useState(stop?.kind ?? defaultKind);
@@ -17652,7 +17715,7 @@ function StopFormDialog({
17652
17715
  );
17653
17716
  }
17654
17717
  function StopKebab({ stopName, onEdit, onDelete }) {
17655
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17718
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17656
17719
  const [open, setOpen] = react.useState(false);
17657
17720
  const rootRef = react.useRef(null);
17658
17721
  const triggerRef = react.useRef(null);
@@ -17729,7 +17792,7 @@ function StopCard({
17729
17792
  onDelete,
17730
17793
  onMoveBy
17731
17794
  }) {
17732
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17795
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17733
17796
  const isClosed = stop.status === "CLOSED";
17734
17797
  const canReorder = !isClosed;
17735
17798
  const percent = boardedPercent(stop);
@@ -17877,7 +17940,7 @@ function Segment({
17877
17940
  value,
17878
17941
  onChange
17879
17942
  }) {
17880
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17943
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
17881
17944
  return /* @__PURE__ */ jsxRuntime.jsxs("fieldset", { className: "kf-trip-pickups-section__segment", children: [
17882
17945
  /* @__PURE__ */ jsxRuntime.jsx("legend", { className: "kf-visually-hidden", children: t(legendKey) }),
17883
17946
  options.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -17934,14 +17997,21 @@ function codeOf7(error) {
17934
17997
  const classification = error !== null && typeof error === "object" && "classification" in error ? error.classification : void 0;
17935
17998
  return classification?.code ?? "unknown";
17936
17999
  }
17937
- function TripPickupsSection({
18000
+ function TripPickupsSection(props) {
18001
+ const session = chunkS53XNHRU_cjs.useSession();
18002
+ if (session.status !== "authenticated") {
18003
+ return null;
18004
+ }
18005
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripPickupsSection, { ...props });
18006
+ }
18007
+ function ReadyTripPickupsSection({
17938
18008
  tripRef,
17939
18009
  timeZone,
17940
18010
  tripStartIso,
17941
18011
  style
17942
18012
  }) {
17943
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
17944
- const pickups = chunkTYBIAPPT_cjs.usePickups(tripRef);
18013
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18014
+ const pickups = chunk2OWH2KDY_cjs.usePickups(tripRef);
17945
18015
  const [kind, setKind] = react.useState("PICKUP");
17946
18016
  const [view, setView] = react.useState("stops");
17947
18017
  const [overlay, setOverlay] = react.useState({ kind: "none" });
@@ -18101,7 +18171,7 @@ function TripPickupsSection({
18101
18171
  const kindLabel = t(
18102
18172
  kind === "PICKUP" ? "chrome.tripPickups.kindPickupOne" : "chrome.tripPickups.kindDropOne"
18103
18173
  );
18104
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
18174
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-pickups-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
18105
18175
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-pickups-section__toolbar", children: [
18106
18176
  /* @__PURE__ */ jsxRuntime.jsx(ViewSwitcher, { value: view, onChange: setView }),
18107
18177
  /* @__PURE__ */ jsxRuntime.jsx(KindSwitcher, { value: kind, onChange: setKind }),
@@ -18324,7 +18394,7 @@ function AutoAssignDialog({
18324
18394
  onApply,
18325
18395
  onClose
18326
18396
  }) {
18327
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
18397
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18328
18398
  const titleId = react.useId();
18329
18399
  const [reassignAll, setReassignAll] = react.useState(false);
18330
18400
  const roomCodeById = new Map(group.rooms.map((room) => [room.id, room.code]));
@@ -18419,7 +18489,7 @@ function AutoAssignDialog({
18419
18489
  /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section__plan", children: [
18420
18490
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__plan-title", children: t("chrome.tripRooming.rulesTitle") }),
18421
18491
  /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "kf-trip-rooming-section__rule-list", children: preview.perRule.map((entry) => {
18422
- const severity = chunkTYBIAPPT_cjs.roomingHeuristicSeverity(entry.rule);
18492
+ const severity = chunk2OWH2KDY_cjs.roomingHeuristicSeverity(entry.rule);
18423
18493
  const relaxed = entry.outcome === "relaxed";
18424
18494
  const violation = relaxed && severity === "never";
18425
18495
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -18465,7 +18535,7 @@ function DeleteShell({
18465
18535
  onConfirm,
18466
18536
  onClose
18467
18537
  }) {
18468
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
18538
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18469
18539
  const titleId = react.useId();
18470
18540
  return /* @__PURE__ */ jsxRuntime.jsxs(
18471
18541
  SheetDialog,
@@ -18511,7 +18581,7 @@ function DeleteRoomDialog({
18511
18581
  onConfirm,
18512
18582
  onClose
18513
18583
  }) {
18514
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
18584
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18515
18585
  const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
18516
18586
  return /* @__PURE__ */ jsxRuntime.jsx(
18517
18587
  DeleteShell,
@@ -18537,7 +18607,7 @@ function DeleteWindowDialog({
18537
18607
  onConfirm,
18538
18608
  onClose
18539
18609
  }) {
18540
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
18610
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18541
18611
  return /* @__PURE__ */ jsxRuntime.jsx(
18542
18612
  DeleteShell,
18543
18613
  {
@@ -18635,15 +18705,15 @@ function roomTypeLabelKey(roomType) {
18635
18705
  return ROOM_TYPE_LABEL_KEY[roomType] ?? "chrome.tripRooming.roomType.shared";
18636
18706
  }
18637
18707
  function toneAttrs(tone) {
18638
- const parsed = chunkTYBIAPPT_cjs.parseRoomingTone(tone);
18708
+ const parsed = chunk2OWH2KDY_cjs.parseRoomingTone(tone);
18639
18709
  if (parsed === void 0) {
18640
- return { family: chunkTYBIAPPT_cjs.TONE_FAMILIES.UNKNOWN, shade: 0 };
18710
+ return { family: chunk2OWH2KDY_cjs.TONE_FAMILIES.UNKNOWN, shade: 0 };
18641
18711
  }
18642
- const shade = parsed.shade < chunkTYBIAPPT_cjs.SHADES_PER_FAMILY ? parsed.shade : parsed.shade % chunkTYBIAPPT_cjs.SHADES_PER_FAMILY;
18712
+ const shade = parsed.shade < chunk2OWH2KDY_cjs.SHADES_PER_FAMILY ? parsed.shade : parsed.shade % chunk2OWH2KDY_cjs.SHADES_PER_FAMILY;
18643
18713
  return { family: parsed.family, shade };
18644
18714
  }
18645
18715
  function glyphOf(occupant) {
18646
- return occupant.glyph === "" ? chunkTYBIAPPT_cjs.FALLBACK_GLYPH : occupant.glyph;
18716
+ return occupant.glyph === "" ? chunk2OWH2KDY_cjs.FALLBACK_GLYPH : occupant.glyph;
18647
18717
  }
18648
18718
  function TravellerGlyph({
18649
18719
  occupant,
@@ -18681,7 +18751,7 @@ var COLLAPSED_COUNT = 10;
18681
18751
  function IdentityLegend({
18682
18752
  occupants
18683
18753
  }) {
18684
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
18754
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18685
18755
  const [open, setOpen] = react.useState(false);
18686
18756
  if (occupants.length === 0) {
18687
18757
  return null;
@@ -18808,7 +18878,7 @@ function RoomFormDialog({
18808
18878
  onClose,
18809
18879
  onSubmit
18810
18880
  }) {
18811
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
18881
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18812
18882
  const titleId = react.useId();
18813
18883
  const isEdit = room !== null;
18814
18884
  const [code, setCode] = react.useState(room?.code ?? "");
@@ -18932,7 +19002,7 @@ function RoomingSkeleton() {
18932
19002
  ] }, id)) });
18933
19003
  }
18934
19004
  function RoomingEmpty({ onAddWindow }) {
18935
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19005
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18936
19006
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", children: [
18937
19007
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BedIcon, {}) }),
18938
19008
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.emptyTitle") }),
@@ -18941,7 +19011,7 @@ function RoomingEmpty({ onAddWindow }) {
18941
19011
  ] });
18942
19012
  }
18943
19013
  function RoomingFailed({ onRetry }) {
18944
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19014
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18945
19015
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__state", role: "alert", children: [
18946
19016
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-rooming-section__state-title", children: t("chrome.tripRooming.failedTitle") }),
18947
19017
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-rooming-section__state-body", children: t("chrome.tripRooming.failedBody") }),
@@ -18949,7 +19019,7 @@ function RoomingFailed({ onRetry }) {
18949
19019
  ] });
18950
19020
  }
18951
19021
  function RoomingDark({ reason }) {
18952
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19022
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18953
19023
  if (reason === "mode") {
18954
19024
  return null;
18955
19025
  }
@@ -18964,7 +19034,7 @@ function RoomingDark({ reason }) {
18964
19034
  ] });
18965
19035
  }
18966
19036
  function RoomKebab({ roomCode, onEdit, onDelete }) {
18967
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19037
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
18968
19038
  const [open, setOpen] = react.useState(false);
18969
19039
  const rootRef = react.useRef(null);
18970
19040
  const triggerRef = react.useRef(null);
@@ -19029,7 +19099,7 @@ function RoomKebab({ roomCode, onEdit, onDelete }) {
19029
19099
  ] });
19030
19100
  }
19031
19101
  function RoomCard({ room, drag, busy, onEdit, onDelete }) {
19032
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19102
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19033
19103
  const occupied = room.beds.filter((bed) => bed.occupant !== null).length;
19034
19104
  return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "kf-trip-rooming-section__room", "data-busy": busy ? "true" : void 0, children: [
19035
19105
  /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "kf-trip-rooming-section__room-head", children: [
@@ -19079,7 +19149,7 @@ function UnassignedStrip({
19079
19149
  drag,
19080
19150
  busy
19081
19151
  }) {
19082
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19152
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19083
19153
  return /* @__PURE__ */ jsxRuntime.jsxs(
19084
19154
  "div",
19085
19155
  {
@@ -19153,7 +19223,7 @@ function WindowAccordion({
19153
19223
  onEditRoom,
19154
19224
  onDeleteRoom
19155
19225
  }) {
19156
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19226
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19157
19227
  const percent = fillPercent(group);
19158
19228
  const bodyId = `kf-rooming-window-${group.window.id}`;
19159
19229
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -19303,7 +19373,7 @@ function WindowFormDialog({
19303
19373
  onClose,
19304
19374
  onSubmit
19305
19375
  }) {
19306
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19376
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19307
19377
  const titleId = react.useId();
19308
19378
  const isEdit = window !== null;
19309
19379
  const [label, setLabel] = react.useState(window?.label ?? "");
@@ -19409,15 +19479,22 @@ function codeOf8(error) {
19409
19479
  const classification = error !== null && typeof error === "object" && "classification" in error ? error.classification : void 0;
19410
19480
  return classification?.code ?? "unknown";
19411
19481
  }
19412
- function TripRoomingSection({
19482
+ function TripRoomingSection(props) {
19483
+ const session = chunkS53XNHRU_cjs.useSession();
19484
+ if (session.status !== "authenticated") {
19485
+ return null;
19486
+ }
19487
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripRoomingSection, { ...props });
19488
+ }
19489
+ function ReadyTripRoomingSection({
19413
19490
  tripRef,
19414
19491
  timeZone,
19415
19492
  tripStartIso,
19416
19493
  tripEndIso,
19417
19494
  style
19418
19495
  }) {
19419
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19420
- const rooming = chunkTYBIAPPT_cjs.useRooming(tripRef);
19496
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19497
+ const rooming = chunk2OWH2KDY_cjs.useRooming(tripRef);
19421
19498
  const [openWindowId, setOpenWindowId] = react.useState(null);
19422
19499
  const [overlay, setOverlay] = react.useState({ kind: "none" });
19423
19500
  const [pending, setPending] = react.useState(false);
@@ -19555,7 +19632,7 @@ function TripRoomingSection({
19555
19632
  return /* @__PURE__ */ jsxRuntime.jsx(RoomingDark, { reason: rooming.reason });
19556
19633
  }
19557
19634
  const pool = ready?.unassignedPool;
19558
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
19635
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-rooming-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
19559
19636
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-rooming-section__toolbar", children: [
19560
19637
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-title", children: t("chrome.tripRooming.panelLabel") }),
19561
19638
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-rooming-section__toolbar-spacer" }),
@@ -19789,7 +19866,7 @@ function isAgencyAuthored(vendor) {
19789
19866
  return vendor.externalId.startsWith("kf-");
19790
19867
  }
19791
19868
  function CategoryTabs({ selected, counts, total, onSelect }) {
19792
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19869
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19793
19870
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__chips", children: [
19794
19871
  /* @__PURE__ */ jsxRuntime.jsxs(
19795
19872
  "button",
@@ -19832,7 +19909,7 @@ function DeleteSupplierDialog({
19832
19909
  onConfirm,
19833
19910
  onClose
19834
19911
  }) {
19835
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
19912
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19836
19913
  const titleId = react.useId();
19837
19914
  const blockers = deleteBlockers(usage);
19838
19915
  const blockedLocally = blockers !== void 0 && blockers.vehicles + blockers.expenses > 0;
@@ -19985,7 +20062,7 @@ function SupplierFormDialog({
19985
20062
  onClose,
19986
20063
  onSubmit
19987
20064
  }) {
19988
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20065
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
19989
20066
  const titleId = react.useId();
19990
20067
  const isEdit = supplier !== null;
19991
20068
  const [name, setName] = react.useState(supplier?.name ?? "");
@@ -20107,7 +20184,7 @@ function SuppliersSkeleton() {
20107
20184
  ] }, id)) });
20108
20185
  }
20109
20186
  function SuppliersEmpty({ onAdd }) {
20110
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20187
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20111
20188
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
20112
20189
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(StorefrontIcon, {}) }),
20113
20190
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.emptyTitle") }),
@@ -20116,7 +20193,7 @@ function SuppliersEmpty({ onAdd }) {
20116
20193
  ] });
20117
20194
  }
20118
20195
  function SuppliersNoMatch({ onClear }) {
20119
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20196
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20120
20197
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", children: [
20121
20198
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.noMatchTitle") }),
20122
20199
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.noMatchBody") }),
@@ -20124,7 +20201,7 @@ function SuppliersNoMatch({ onClear }) {
20124
20201
  ] });
20125
20202
  }
20126
20203
  function SuppliersFailed({ onRetry }) {
20127
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20204
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20128
20205
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__state", role: "alert", children: [
20129
20206
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-suppliers-section__state-title", children: t("chrome.tripSuppliers.failedTitle") }),
20130
20207
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-suppliers-section__state-body", children: t("chrome.tripSuppliers.failedBody") }),
@@ -20132,7 +20209,7 @@ function SuppliersFailed({ onRetry }) {
20132
20209
  ] });
20133
20210
  }
20134
20211
  function SuppliersDark({ reason }) {
20135
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20212
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20136
20213
  if (reason === "mode") {
20137
20214
  return null;
20138
20215
  }
@@ -20147,7 +20224,7 @@ function SuppliersDark({ reason }) {
20147
20224
  ] });
20148
20225
  }
20149
20226
  function SupplierKebab({ name, busy, onEdit, onDelete }) {
20150
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20227
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20151
20228
  const [open, setOpen] = react.useState(false);
20152
20229
  const rootRef = react.useRef(null);
20153
20230
  const triggerRef = react.useRef(null);
@@ -20214,7 +20291,7 @@ function SupplierKebab({ name, busy, onEdit, onDelete }) {
20214
20291
  ] });
20215
20292
  }
20216
20293
  function SupplierUsageCell({ usage }) {
20217
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20294
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20218
20295
  const parts = [];
20219
20296
  if (usage.vehicles !== void 0 && usage.vehicles > 0) {
20220
20297
  parts.push(
@@ -20258,7 +20335,7 @@ function SupplierTable({
20258
20335
  onEdit,
20259
20336
  onDelete
20260
20337
  }) {
20261
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20338
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20262
20339
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-suppliers-section__table-wrap", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "kf-trip-suppliers-section__table", children: [
20263
20340
  /* @__PURE__ */ jsxRuntime.jsx("caption", { className: "kf-visually-hidden", children: t("chrome.tripSuppliers.tableCaption") }),
20264
20341
  /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
@@ -20325,12 +20402,19 @@ function serverBlockOf(error) {
20325
20402
  if (details?.rule !== "vendor.deleteBlockedByReferences") return void 0;
20326
20403
  return { vehicles: details.vehicleCount ?? 0, expenses: details.expenseCount ?? 0 };
20327
20404
  }
20328
- function TripSuppliersSection({ tripRef, style }) {
20329
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20330
- const vendors = chunkTYBIAPPT_cjs.useVendors(tripRef, "");
20331
- const seating = chunkTYBIAPPT_cjs.useSeating(tripRef);
20332
- const itinerary = chunkTYBIAPPT_cjs.useItinerary(tripRef);
20333
- const expenses = chunkTYBIAPPT_cjs.useExpenses(tripRef);
20405
+ function TripSuppliersSection(props) {
20406
+ const session = chunkS53XNHRU_cjs.useSession();
20407
+ if (session.status !== "authenticated") {
20408
+ return null;
20409
+ }
20410
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripSuppliersSection, { ...props });
20411
+ }
20412
+ function ReadyTripSuppliersSection({ tripRef, style }) {
20413
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20414
+ const vendors = chunk2OWH2KDY_cjs.useVendors(tripRef, "");
20415
+ const seating = chunk2OWH2KDY_cjs.useSeating(tripRef);
20416
+ const itinerary = chunk2OWH2KDY_cjs.useItinerary(tripRef);
20417
+ const expenses = chunk2OWH2KDY_cjs.useExpenses(tripRef);
20334
20418
  const [category, setCategory] = react.useState(null);
20335
20419
  const [query, setQuery] = react.useState("");
20336
20420
  const [sortKey, setSortKey] = react.useState("name");
@@ -20413,7 +20497,7 @@ function TripSuppliersSection({ tripRef, style }) {
20413
20497
  return /* @__PURE__ */ jsxRuntime.jsx(SuppliersDark, { reason: vendors.reason });
20414
20498
  }
20415
20499
  const filtered = category !== null || query.trim() !== "";
20416
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
20500
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-suppliers-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
20417
20501
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-suppliers-section__toolbar", children: [
20418
20502
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-title", children: t("chrome.tripSuppliers.panelLabel") }),
20419
20503
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-suppliers-section__toolbar-spacer" }),
@@ -20552,7 +20636,7 @@ function AutoAssignDialog2({
20552
20636
  onApply,
20553
20637
  onClose
20554
20638
  }) {
20555
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20639
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20556
20640
  const titleId = react.useId();
20557
20641
  const [reassignAll, setReassignAll] = react.useState(false);
20558
20642
  const [genderAdjacency, setGenderAdjacency] = react.useState("AVOID_UNRELATED");
@@ -20714,7 +20798,7 @@ function DayFilter({
20714
20798
  countByDay,
20715
20799
  onSelect
20716
20800
  }) {
20717
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20801
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20718
20802
  const days = Array.from({ length: durationDays }, (_unused, index) => index);
20719
20803
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__days", children: [
20720
20804
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__days-label", children: t("chrome.tripVehicles.showDay") }),
@@ -20847,7 +20931,7 @@ function DeleteVehicleDialog({
20847
20931
  onConfirm,
20848
20932
  onClose
20849
20933
  }) {
20850
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
20934
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
20851
20935
  const titleId = react.useId();
20852
20936
  const released = occupantsOf(vehicle).length;
20853
20937
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -21024,7 +21108,7 @@ function ManagerLinkDialog({
21024
21108
  onClose,
21025
21109
  onSubmit
21026
21110
  }) {
21027
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21111
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21028
21112
  const titleId = react.useId();
21029
21113
  const [chosen, setChosen] = react.useState(null);
21030
21114
  const demotedFrom = chosen === null ? void 0 : managerVehicleByRef.get(chosen);
@@ -21101,7 +21185,7 @@ function UnassignedStrip2({
21101
21185
  drag,
21102
21186
  busy
21103
21187
  }) {
21104
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21188
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21105
21189
  return /* @__PURE__ */ jsxRuntime.jsxs(
21106
21190
  "div",
21107
21191
  {
@@ -21168,7 +21252,7 @@ function OccupantRoster({
21168
21252
  variant,
21169
21253
  emptyKey
21170
21254
  }) {
21171
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21255
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21172
21256
  const target = { containerId: vehicleId, slotLabel: "" };
21173
21257
  const isOver = drag.overSlot !== null && drag.overSlot.containerId === vehicleId && drag.overSlot.slotLabel === "";
21174
21258
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -21212,7 +21296,7 @@ function OccupantRoster({
21212
21296
  );
21213
21297
  }
21214
21298
  function SeatTile({ seat, vehicleId, drag, busy }) {
21215
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21299
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21216
21300
  const target = { containerId: vehicleId, slotLabel: seat.seatLabel };
21217
21301
  const isOver = drag.overSlot !== null && drag.overSlot.containerId === target.containerId && drag.overSlot.slotLabel === target.slotLabel;
21218
21302
  const occupant = seat.occupant;
@@ -21275,7 +21359,7 @@ function VehicleKebab({
21275
21359
  onUnlinkManager,
21276
21360
  onDelete
21277
21361
  }) {
21278
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21362
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21279
21363
  const [open, setOpen] = react.useState(false);
21280
21364
  const rootRef = react.useRef(null);
21281
21365
  const triggerRef = react.useRef(null);
@@ -21385,7 +21469,7 @@ function VehicleCard({
21385
21469
  onUnlinkManager,
21386
21470
  onDelete
21387
21471
  }) {
21388
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21472
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21389
21473
  const percent = fillPercent2(vehicle);
21390
21474
  const days = daysLabel(vehicle.days);
21391
21475
  const bodyId = `kf-vehicle-${vehicle.id}`;
@@ -21520,7 +21604,7 @@ function VehicleDaysDialog({
21520
21604
  onClose,
21521
21605
  onSubmit
21522
21606
  }) {
21523
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21607
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21524
21608
  const titleId = react.useId();
21525
21609
  const [selected, setSelected] = react.useState(vehicle.days);
21526
21610
  const wholeTrip = selected.length === 0;
@@ -21619,7 +21703,7 @@ function VehicleFormDialog({
21619
21703
  onClose,
21620
21704
  onSubmit
21621
21705
  }) {
21622
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21706
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21623
21707
  const titleId = react.useId();
21624
21708
  const isEdit = vehicle !== null;
21625
21709
  const [regNo, setRegNo] = react.useState(vehicle?.regNo ?? "");
@@ -21814,7 +21898,7 @@ function VehiclesSkeleton() {
21814
21898
  ] }, id)) });
21815
21899
  }
21816
21900
  function VehiclesEmpty({ onAddVehicle }) {
21817
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21901
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21818
21902
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", children: [
21819
21903
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__state-glyph", children: /* @__PURE__ */ jsxRuntime.jsx(BusIcon2, {}) }),
21820
21904
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.emptyTitle") }),
@@ -21823,7 +21907,7 @@ function VehiclesEmpty({ onAddVehicle }) {
21823
21907
  ] });
21824
21908
  }
21825
21909
  function VehiclesFailed({ onRetry }) {
21826
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21910
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21827
21911
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__state", role: "alert", children: [
21828
21912
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "kf-trip-vehicles-section__state-title", children: t("chrome.tripVehicles.failedTitle") }),
21829
21913
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-vehicles-section__state-body", children: t("chrome.tripVehicles.failedBody") }),
@@ -21831,7 +21915,7 @@ function VehiclesFailed({ onRetry }) {
21831
21915
  ] });
21832
21916
  }
21833
21917
  function VehiclesDark({ reason }) {
21834
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21918
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21835
21919
  if (reason === "mode") {
21836
21920
  return null;
21837
21921
  }
@@ -21849,14 +21933,21 @@ function codeOf10(error) {
21849
21933
  const classification = error !== null && typeof error === "object" && "classification" in error ? error.classification : void 0;
21850
21934
  return classification?.code ?? "unknown";
21851
21935
  }
21852
- function TripVehiclesSection({
21936
+ function TripVehiclesSection(props) {
21937
+ const session = chunkS53XNHRU_cjs.useSession();
21938
+ if (session.status !== "authenticated") {
21939
+ return null;
21940
+ }
21941
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripVehiclesSection, { ...props });
21942
+ }
21943
+ function ReadyTripVehiclesSection({
21853
21944
  tripRef,
21854
21945
  durationDays,
21855
21946
  style
21856
21947
  }) {
21857
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
21858
- const seating = chunkTYBIAPPT_cjs.useSeating(tripRef);
21859
- const managers = chunkTYBIAPPT_cjs.useManagers(tripRef);
21948
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
21949
+ const seating = chunk2OWH2KDY_cjs.useSeating(tripRef);
21950
+ const managers = chunk2OWH2KDY_cjs.useManagers(tripRef);
21860
21951
  const [openVehicleId, setOpenVehicleId] = react.useState(null);
21861
21952
  const [day, setDay] = react.useState(null);
21862
21953
  const [overlay, setOverlay] = react.useState({ kind: "none" });
@@ -21990,7 +22081,7 @@ function TripVehiclesSection({
21990
22081
  return /* @__PURE__ */ jsxRuntime.jsx(VehiclesDark, { reason: seating.reason });
21991
22082
  }
21992
22083
  const pool = ready?.unassignedPool;
21993
- return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
22084
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-vehicles-section", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
21994
22085
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-vehicles-section__toolbar", children: [
21995
22086
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-title", children: t("chrome.tripVehicles.panelLabel") }),
21996
22087
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-vehicles-section__toolbar-spacer" }),
@@ -22283,7 +22374,7 @@ function WarningIcon13(props) {
22283
22374
 
22284
22375
  // src/admin/composite/office/TripWorkspace/internal/panels/deriveCloseout.ts
22285
22376
  function tabForBlocker(row) {
22286
- return chunkIAXVUR7H_cjs.resolveBlockerDeepLink({ actionKey: row.actionKey })?.tab;
22377
+ return chunkF4GGHUMX_cjs.resolveBlockerDeepLink({ actionKey: row.actionKey })?.tab;
22287
22378
  }
22288
22379
  function orderedBlockers(rows) {
22289
22380
  return [...rows].sort((a, b) => {
@@ -22323,8 +22414,8 @@ function codeOf11(error) {
22323
22414
  return classification?.code ?? "unknown";
22324
22415
  }
22325
22416
  function CloseoutCard({ tripRef, onOpenTab, litTabs }) {
22326
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
22327
- const closeout = chunkTYBIAPPT_cjs.useCloseout(tripRef);
22417
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
22418
+ const closeout = chunk2OWH2KDY_cjs.useCloseout(tripRef);
22328
22419
  const [note, setNote] = react.useState(null);
22329
22420
  const [pending, setPending] = react.useState(void 0);
22330
22421
  const [errorCode, setErrorCode] = react.useState(void 0);
@@ -22531,7 +22622,7 @@ function AssignManagerDialog({
22531
22622
  onClose,
22532
22623
  onAssign
22533
22624
  }) {
22534
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
22625
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
22535
22626
  const titleId = react.useId();
22536
22627
  const [query, setQuery] = react.useState("");
22537
22628
  const [selected, setSelected] = react.useState(null);
@@ -22663,8 +22754,8 @@ var ROLE_LABEL_KEY = {
22663
22754
  COORDINATOR: "chrome.tripWorkspace.managers.roleCoordinator"
22664
22755
  };
22665
22756
  function OverviewManagersCard({ trip, onChanged }) {
22666
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
22667
- const { promoteManager, assignManager, unassignManager, makeManagersFetch } = chunkIAXVUR7H_cjs.useDirectories();
22757
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
22758
+ const { promoteManager, assignManager, unassignManager, makeManagersFetch } = chunkF4GGHUMX_cjs.useDirectories();
22668
22759
  const [pendingId, setPendingId] = react.useState(void 0);
22669
22760
  const [errorCode, setErrorCode] = react.useState(void 0);
22670
22761
  const [assignOpen, setAssignOpen] = react.useState(false);
@@ -22825,13 +22916,13 @@ function TripOverviewPanel({
22825
22916
  onOpenTab,
22826
22917
  onTripChanged
22827
22918
  }) {
22828
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
22829
- const today = chunkTYBIAPPT_cjs.useManagerToday(trip.ref);
22830
- const expenses = chunkTYBIAPPT_cjs.useExpenses(trip.ref);
22919
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
22920
+ const today = chunk2OWH2KDY_cjs.useManagerToday(trip.ref);
22921
+ const expenses = chunk2OWH2KDY_cjs.useExpenses(trip.ref);
22831
22922
  const spendTotalMinor = expenses.status === "ready" && expenses.totals.loaded && !expenses.totals.lastFetchFailed ? expenses.totals.spendTotalMinor : void 0;
22832
22923
  const finance = deriveFinance(trip, spendTotalMinor);
22833
22924
  const quickActions = QUICK_ACTION_TABS.filter((key) => litTabs.has(key));
22834
- const closeoutProbe = chunkTYBIAPPT_cjs.useCloseout(trip.ref);
22925
+ const closeoutProbe = chunk2OWH2KDY_cjs.useCloseout(trip.ref);
22835
22926
  const closeoutStage = closeoutProbe.status === "ready" && hasReturned(closeoutProbe.aggregate) ? closeoutProbe.aggregate?.stage ?? null : null;
22836
22927
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview", children: [
22837
22928
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__overview-main", children: [
@@ -22870,7 +22961,7 @@ function TripOverviewPanel({
22870
22961
  function TodayCard({
22871
22962
  today
22872
22963
  }) {
22873
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
22964
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
22874
22965
  if (today.kind === "idle") return null;
22875
22966
  const openChecklist = today.checklist ?? [];
22876
22967
  const itinerary = today.itinerary ?? [];
@@ -22894,7 +22985,7 @@ function TodayCard({
22894
22985
  function FinanceCard({
22895
22986
  finance
22896
22987
  }) {
22897
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
22988
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
22898
22989
  return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "kf-trip-workspace__card", children: [
22899
22990
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__card-head", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "kf-trip-workspace__card-title", children: t("chrome.tripWorkspace.overview.financeTitle") }) }),
22900
22991
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__finance-body", children: [
@@ -23157,7 +23248,7 @@ var BLOCKER_BODY_KEY = {
23157
23248
  capabilityDark: "chrome.tripWorkspace.blocker.capabilityDarkBody"
23158
23249
  };
23159
23250
  function TripTabPlaceholder({ tabKey, blocker }) {
23160
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
23251
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
23161
23252
  const label = t(TAB_LABEL_KEY[tabKey]);
23162
23253
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__placeholder", children: [
23163
23254
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-trip-workspace__placeholder-glyph", children: blocker === "deferred" ? /* @__PURE__ */ jsxRuntime.jsx(ClockIcon2, {}) : /* @__PURE__ */ jsxRuntime.jsx(LockIcon11, {}) }),
@@ -23167,7 +23258,7 @@ function TripTabPlaceholder({ tabKey, blocker }) {
23167
23258
  ] });
23168
23259
  }
23169
23260
  function TripKpiStrip({ cells }) {
23170
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
23261
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
23171
23262
  if (cells.length === 0) return null;
23172
23263
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-strip", "data-columns": cells.length, children: cells.map((cell) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__kpi-card", children: [
23173
23264
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace__kpi-label", children: t(cell.labelKey) }),
@@ -23176,7 +23267,7 @@ function TripKpiStrip({ cells }) {
23176
23267
  ] }, cell.key)) });
23177
23268
  }
23178
23269
  function TripTabRail({ tabs, activeKey, onSelect }) {
23179
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
23270
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
23180
23271
  return /* @__PURE__ */ jsxRuntime.jsx(
23181
23272
  "div",
23182
23273
  {
@@ -23210,7 +23301,7 @@ var STATUS_LABEL_KEY9 = {
23210
23301
  CANCELLED: "chrome.tripDirectory.status.cancelled"
23211
23302
  };
23212
23303
  function TripWorkspaceHead({ trip, onBack, style }) {
23213
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
23304
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
23214
23305
  const head = deriveTripHead(trip);
23215
23306
  const subLabelParts = [
23216
23307
  head.dateRangeLabel,
@@ -23221,7 +23312,7 @@ function TripWorkspaceHead({ trip, onBack, style }) {
23221
23312
  trip.manifestCount === 1 ? "chrome.tripWorkspace.travellerCountOne" : "chrome.tripWorkspace.travellerCount"
23222
23313
  ).replace("{count}", String(trip.manifestCount))
23223
23314
  ];
23224
- return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__head-identity", children: [
23315
+ return /* @__PURE__ */ jsxRuntime.jsx("header", { className: "kf-trip-workspace__head", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__head-identity", children: [
23225
23316
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__eyebrow", children: [
23226
23317
  onBack === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(
23227
23318
  "button",
@@ -23252,7 +23343,14 @@ function TripWorkspaceHead({ trip, onBack, style }) {
23252
23343
  ] })
23253
23344
  ] }) });
23254
23345
  }
23255
- function TripWorkspace({
23346
+ function TripWorkspace(props) {
23347
+ const session = chunkS53XNHRU_cjs.useSession();
23348
+ if (session.status !== "authenticated") {
23349
+ return /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {});
23350
+ }
23351
+ return /* @__PURE__ */ jsxRuntime.jsx(ReadyTripWorkspace, { ...props });
23352
+ }
23353
+ function ReadyTripWorkspace({
23256
23354
  tripRef,
23257
23355
  initialTab,
23258
23356
  onBack,
@@ -23261,10 +23359,10 @@ function TripWorkspace({
23261
23359
  components,
23262
23360
  style
23263
23361
  }) {
23264
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
23265
- const { read, readFailed, refresh } = chunkIAXVUR7H_cjs.useAgencyTrip(tripRef);
23362
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
23363
+ const { read, readFailed, refresh } = chunkF4GGHUMX_cjs.useAgencyTrip(tripRef);
23266
23364
  if (readFailed) {
23267
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__status-block", role: "alert", children: [
23365
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace__status-block", role: "alert", children: [
23268
23366
  /* @__PURE__ */ jsxRuntime.jsx(WarningIcon13, { className: "kf-trip-workspace__status-icon" }),
23269
23367
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-title", children: t("chrome.tripWorkspace.errorTitle") }),
23270
23368
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "kf-trip-workspace__status-body", children: t("chrome.tripWorkspace.errorBody") }),
@@ -23280,7 +23378,7 @@ function TripWorkspace({
23280
23378
  ] }) });
23281
23379
  }
23282
23380
  if (read === void 0) {
23283
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {}) });
23381
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "kf-trip-workspace", style: chunkS53XNHRU_cjs.tokenStyle(style), children: /* @__PURE__ */ jsxRuntime.jsx(TripWorkspaceSkeleton, {}) });
23284
23382
  }
23285
23383
  return /* @__PURE__ */ jsxRuntime.jsx(
23286
23384
  TripWorkspaceBody,
@@ -23308,7 +23406,7 @@ function TripWorkspaceBody({
23308
23406
  components,
23309
23407
  style
23310
23408
  }) {
23311
- const { statuses, loaded } = chunkIAXVUR7H_cjs.useCapabilityStatuses(tripRef);
23409
+ const { statuses, loaded } = chunkF4GGHUMX_cjs.useCapabilityStatuses(tripRef);
23312
23410
  const Head = components?.TripWorkspaceHead ?? TripWorkspaceHead;
23313
23411
  const tabs = react.useMemo(() => resolveTripTabs(trip.eventType, statuses), [trip.eventType, statuses]);
23314
23412
  const [requestedTab, setRequestedTab] = react.useState(initialTab ?? "overview");
@@ -23392,7 +23490,7 @@ function TripWorkspaceBody({
23392
23490
  }),
23393
23491
  [trip, litTabs, tripRef, onTripChanged, onOpenTravellerProfile]
23394
23492
  );
23395
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
23493
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-trip-workspace", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
23396
23494
  /* @__PURE__ */ jsxRuntime.jsx(Head, { trip, ...onBack !== void 0 ? { onBack } : {} }),
23397
23495
  /* @__PURE__ */ jsxRuntime.jsx(TripKpiStrip, { cells: kpis }),
23398
23496
  loaded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -23589,7 +23687,7 @@ function AdminShell({
23589
23687
  function renderNavIcon(iconKey) {
23590
23688
  return NavIcon !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NavIcon, { iconKey }) : navIcon(iconKey);
23591
23689
  }
23592
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style: chunkSMGXVEN3_cjs.tokenStyle(style), children: [
23690
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell", style: chunkS53XNHRU_cjs.tokenStyle(style), children: [
23593
23691
  /* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "kf-admin-shell__sidebar", children: [
23594
23692
  brand !== void 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "kf-admin-shell__brand", children: [
23595
23693
  brand.logo !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "kf-admin-shell__brand-logo", children: brand.logo }) : null,
@@ -23693,7 +23791,7 @@ function AdminShell({
23693
23791
  ] });
23694
23792
  }
23695
23793
  function KaafilAgencyWorkspace(props) {
23696
- const session = chunkSMGXVEN3_cjs.useSession();
23794
+ const session = chunkS53XNHRU_cjs.useSession();
23697
23795
  if (session.status !== "authenticated") {
23698
23796
  return null;
23699
23797
  }
@@ -23718,8 +23816,8 @@ function ReadyKaafilAgencyWorkspace(props) {
23718
23816
  components,
23719
23817
  style
23720
23818
  } = props;
23721
- const { t } = chunkSMGXVEN3_cjs.useKaafilChrome();
23722
- const agencyAdminMe = chunkIAXVUR7H_cjs.useAgencyAdminMe();
23819
+ const { t } = chunkS53XNHRU_cjs.useKaafilChrome();
23820
+ const agencyAdminMe = chunkF4GGHUMX_cjs.useAgencyAdminMe();
23723
23821
  const [internalPane, setInternalPane] = react.useState(
23724
23822
  initialPane ?? "trips"
23725
23823
  );
@@ -23980,27 +24078,27 @@ function ReadyKaafilAgencyWorkspace(props) {
23980
24078
 
23981
24079
  Object.defineProperty(exports, "BootErrorScreen", {
23982
24080
  enumerable: true,
23983
- get: function () { return chunkFO5VJJUO_cjs.BootErrorScreen; }
24081
+ get: function () { return chunk64R4ZJTA_cjs.BootErrorScreen; }
23984
24082
  });
23985
24083
  Object.defineProperty(exports, "LockedTripScreen", {
23986
24084
  enumerable: true,
23987
- get: function () { return chunkFO5VJJUO_cjs.LockedTripScreen; }
24085
+ get: function () { return chunk64R4ZJTA_cjs.LockedTripScreen; }
23988
24086
  });
23989
24087
  Object.defineProperty(exports, "NotFoundScreen", {
23990
24088
  enumerable: true,
23991
- get: function () { return chunkFO5VJJUO_cjs.NotFoundScreen; }
24089
+ get: function () { return chunk64R4ZJTA_cjs.NotFoundScreen; }
23992
24090
  });
23993
24091
  Object.defineProperty(exports, "OfflineFallbackScreen", {
23994
24092
  enumerable: true,
23995
- get: function () { return chunkFO5VJJUO_cjs.OfflineFallbackScreen; }
24093
+ get: function () { return chunk64R4ZJTA_cjs.OfflineFallbackScreen; }
23996
24094
  });
23997
24095
  Object.defineProperty(exports, "PlanLockedScreen", {
23998
24096
  enumerable: true,
23999
- get: function () { return chunkFO5VJJUO_cjs.PlanLockedScreen; }
24097
+ get: function () { return chunk64R4ZJTA_cjs.PlanLockedScreen; }
24000
24098
  });
24001
24099
  Object.defineProperty(exports, "SessionExpiredScreen", {
24002
24100
  enumerable: true,
24003
- get: function () { return chunkFO5VJJUO_cjs.SessionExpiredScreen; }
24101
+ get: function () { return chunk64R4ZJTA_cjs.SessionExpiredScreen; }
24004
24102
  });
24005
24103
  exports.AdminShell = AdminShell;
24006
24104
  exports.AgencySettingsScreen = AgencySettingsScreen;