@burdenoff/microfe-healthybowl 2026.904.21 → 2026.904.22

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 (140) hide show
  1. package/dist/components/assistant/AssistantChatArea.js +7 -9
  2. package/dist/components/assistant/AssistantChatArea.js.map +1 -1
  3. package/dist/healthybowl/HealthyBowlRoot.js +56 -57
  4. package/dist/healthybowl/HealthyBowlRoot.js.map +1 -1
  5. package/dist/healthybowl/HealthyBowlRoutes.js +36 -48
  6. package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
  7. package/dist/healthybowl/components/CreateFarmTaskButton.js.map +1 -1
  8. package/dist/healthybowl/components/PageLayout.js +10 -11
  9. package/dist/healthybowl/components/PageLayout.js.map +1 -1
  10. package/dist/healthybowl/context/HealthyBowlContext.js +7 -7
  11. package/dist/healthybowl/context/HealthyBowlContext.js.map +1 -1
  12. package/dist/healthybowl/hooks/useHealthyBowlCompliance.js +141 -157
  13. package/dist/healthybowl/hooks/useHealthyBowlCompliance.js.map +1 -1
  14. package/dist/healthybowl/hooks/useHealthyBowlData.js +0 -18
  15. package/dist/healthybowl/hooks/useHealthyBowlData.js.map +1 -1
  16. package/dist/healthybowl/hooks/useHealthyBowlDistribution.js +37 -52
  17. package/dist/healthybowl/hooks/useHealthyBowlDistribution.js.map +1 -1
  18. package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js +78 -135
  19. package/dist/healthybowl/hooks/useHealthyBowlLivestockDepth.js.map +1 -1
  20. package/dist/healthybowl/hooks/useIrrigationAutomation.js +1 -1
  21. package/dist/healthybowl/hooks/useIrrigationAutomation.js.map +1 -1
  22. package/dist/healthybowl/hooks/useSuccessionPlanning.js +1 -1
  23. package/dist/healthybowl/hooks/useSuccessionPlanning.js.map +1 -1
  24. package/dist/healthybowl/hooks/useWeatherIntelligence.js +1 -1
  25. package/dist/healthybowl/hooks/useWeatherIntelligence.js.map +1 -1
  26. package/dist/healthybowl/offline/OfflineStatusPill.js +21 -40
  27. package/dist/healthybowl/offline/OfflineStatusPill.js.map +1 -1
  28. package/dist/healthybowl/offline/OfflineSyncProvider.js +130 -153
  29. package/dist/healthybowl/offline/OfflineSyncProvider.js.map +1 -1
  30. package/dist/healthybowl/offline/graphql.js.map +1 -1
  31. package/dist/healthybowl/offline/store.js +1 -1
  32. package/dist/healthybowl/offline/syncEngine.js +1 -2
  33. package/dist/healthybowl/offline/syncEngine.js.map +1 -1
  34. package/dist/healthybowl/offline/types.js.map +1 -1
  35. package/dist/healthybowl/pages/GettingStartedPage.js +0 -1
  36. package/dist/healthybowl/pages/GettingStartedPage.js.map +1 -1
  37. package/dist/healthybowl/pages/analytics/InsightsPage.js +2 -2
  38. package/dist/healthybowl/pages/analytics/InsightsPage.js.map +1 -1
  39. package/dist/healthybowl/pages/analytics/ReportsPage.js +99 -136
  40. package/dist/healthybowl/pages/analytics/ReportsPage.js.map +1 -1
  41. package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js +162 -204
  42. package/dist/healthybowl/pages/compliance/ComplianceOverviewPage.js.map +1 -1
  43. package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js +178 -196
  44. package/dist/healthybowl/pages/compliance/IcsGroupDetailPage.js.map +1 -1
  45. package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js +141 -142
  46. package/dist/healthybowl/pages/compliance/IcsGrowerDetailPage.js.map +1 -1
  47. package/dist/healthybowl/pages/crops/CropFieldsPage.js +0 -2
  48. package/dist/healthybowl/pages/crops/CropFieldsPage.js.map +1 -1
  49. package/dist/healthybowl/pages/crops/CropHarvestPage.js +272 -316
  50. package/dist/healthybowl/pages/crops/CropHarvestPage.js.map +1 -1
  51. package/dist/healthybowl/pages/crops/CropPlanningPage.js +0 -6
  52. package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
  53. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +846 -871
  54. package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
  55. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js +334 -376
  56. package/dist/healthybowl/pages/crops/HarvestDetailsPage.js.map +1 -1
  57. package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js +188 -415
  58. package/dist/healthybowl/pages/distribution/CsaPlanDetailPage.js.map +1 -1
  59. package/dist/healthybowl/pages/distribution/labels.js +2 -10
  60. package/dist/healthybowl/pages/distribution/labels.js.map +1 -1
  61. package/dist/healthybowl/pages/farm/FarmProfilePage.js +0 -1
  62. package/dist/healthybowl/pages/farm/FarmProfilePage.js.map +1 -1
  63. package/dist/healthybowl/pages/field-capture/CaptureObservationForm.js +8 -8
  64. package/dist/healthybowl/pages/fields/FieldMapPage.js +0 -2
  65. package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
  66. package/dist/healthybowl/pages/financial/FinancialReportsPage.js +107 -92
  67. package/dist/healthybowl/pages/financial/FinancialReportsPage.js.map +1 -1
  68. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +188 -228
  69. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js.map +1 -1
  70. package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js +191 -261
  71. package/dist/healthybowl/pages/government-schemes/SchemeDetailsPage.js.map +1 -1
  72. package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js +14 -14
  73. package/dist/healthybowl/pages/inputs-insurance/InputsInsuranceOverviewPage.js.map +1 -1
  74. package/dist/healthybowl/pages/irrigation/IrrigationPage.js +307 -338
  75. package/dist/healthybowl/pages/irrigation/IrrigationPage.js.map +1 -1
  76. package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js +102 -126
  77. package/dist/healthybowl/pages/livestock/AnimalDepthFormModal.js.map +1 -1
  78. package/dist/healthybowl/pages/livestock/AnimalDepthPage.js +215 -257
  79. package/dist/healthybowl/pages/livestock/AnimalDepthPage.js.map +1 -1
  80. package/dist/healthybowl/pages/livestock/GrazingPage.js +0 -1
  81. package/dist/healthybowl/pages/livestock/GrazingPage.js.map +1 -1
  82. package/dist/healthybowl/pages/livestock/HerdDepthPage.js +0 -4
  83. package/dist/healthybowl/pages/livestock/HerdDepthPage.js.map +1 -1
  84. package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js +9 -8
  85. package/dist/healthybowl/pages/livestock/grazing/RecordGrazingMoveModal.js.map +1 -1
  86. package/dist/healthybowl/pages/network/ExpertsPage.js +419 -520
  87. package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
  88. package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js +130 -129
  89. package/dist/healthybowl/pages/weather/WeatherAlertHistoryPage.js.map +1 -1
  90. package/dist/healthybowl/pages/weather/WeatherSettingsPage.js +237 -285
  91. package/dist/healthybowl/pages/weather/WeatherSettingsPage.js.map +1 -1
  92. package/dist/healthybowl/utils/plantingCapacity.js +10 -10
  93. package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
  94. package/dist/node_modules/fast-equals/dist/es/index.js +86 -74
  95. package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
  96. package/dist/services/assistantApi.js +30 -59
  97. package/dist/services/assistantApi.js.map +1 -1
  98. package/dist/utils/pageContext.js +1 -15
  99. package/dist/utils/pageContext.js.map +1 -1
  100. package/package.json +1 -1
  101. package/dist/healthybowl/hooks/useAgronomyDecisions.js +0 -79
  102. package/dist/healthybowl/hooks/useAgronomyDecisions.js.map +0 -1
  103. package/dist/healthybowl/hooks/useAnalyticsReports.js +0 -173
  104. package/dist/healthybowl/hooks/useAnalyticsReports.js.map +0 -1
  105. package/dist/healthybowl/hooks/useComplianceExports.js +0 -74
  106. package/dist/healthybowl/hooks/useComplianceExports.js.map +0 -1
  107. package/dist/healthybowl/hooks/useConsultationPayments.js +0 -59
  108. package/dist/healthybowl/hooks/useConsultationPayments.js.map +0 -1
  109. package/dist/healthybowl/hooks/usePlantingEstimate.js +0 -88
  110. package/dist/healthybowl/hooks/usePlantingEstimate.js.map +0 -1
  111. package/dist/healthybowl/offline/HeaderOfflinePill.js +0 -28
  112. package/dist/healthybowl/offline/HeaderOfflinePill.js.map +0 -1
  113. package/dist/healthybowl/offline/captureCache.js +0 -30
  114. package/dist/healthybowl/offline/captureCache.js.map +0 -1
  115. package/dist/healthybowl/offline/headerSlot.js +0 -24
  116. package/dist/healthybowl/offline/headerSlot.js.map +0 -1
  117. package/dist/healthybowl/pages/ai/AiDecisionsPage.js +0 -287
  118. package/dist/healthybowl/pages/ai/AiDecisionsPage.js.map +0 -1
  119. package/dist/healthybowl/pages/compliance/ResidueTestsPage.js +0 -291
  120. package/dist/healthybowl/pages/compliance/ResidueTestsPage.js.map +0 -1
  121. package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js +0 -300
  122. package/dist/healthybowl/pages/compliance/SubstanceRulesPage.js.map +0 -1
  123. package/dist/healthybowl/pages/compliance/substanceRuleForm.js +0 -135
  124. package/dist/healthybowl/pages/compliance/substanceRuleForm.js.map +0 -1
  125. package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js +0 -49
  126. package/dist/healthybowl/pages/government-schemes/schemeApplicationTransitions.js.map +0 -1
  127. package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js +0 -48
  128. package/dist/healthybowl/pages/government-schemes/schemeDocumentSlots.js.map +0 -1
  129. package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js +0 -54
  130. package/dist/healthybowl/pages/government-schemes/useSchemeApplicationTransition.js.map +0 -1
  131. package/dist/healthybowl/pages/livestock/PedigreeTree.js +0 -154
  132. package/dist/healthybowl/pages/livestock/PedigreeTree.js.map +0 -1
  133. package/dist/healthybowl/pages/livestock/eidTagInput.js +0 -39
  134. package/dist/healthybowl/pages/livestock/eidTagInput.js.map +0 -1
  135. package/dist/healthybowl/pages/livestock/pedigreeLayout.js +0 -68
  136. package/dist/healthybowl/pages/livestock/pedigreeLayout.js.map +0 -1
  137. package/dist/healthybowl/pages/weather/alertDelivery.js +0 -105
  138. package/dist/healthybowl/pages/weather/alertDelivery.js.map +0 -1
  139. package/dist/healthybowl/utils/icsInspection.js +0 -18
  140. package/dist/healthybowl/utils/icsInspection.js.map +0 -1
@@ -5,22 +5,21 @@ import { PageLoader as r } from "../../components/PageLoader.js";
5
5
  import { useToast as i } from "../../hooks/useToast.js";
6
6
  import "../../components/index.js";
7
7
  import { useWeatherIntelligence as a } from "../../hooks/useWeatherIntelligence.js";
8
- import { channelWarnings as o, detectTimezone as s, hasNoDeliverableChannel as c, isValidAlertEmail as l, timezoneChoices as ee } from "./alertDelivery.js";
9
- import { useEffect as u, useMemo as d, useState as f } from "react";
10
- import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { Activity as m, AlertTriangle as h, Bell as g, CloudSun as te, Loader2 as _, MoonStar as v, RefreshCw as y, Save as b, Sparkles as x } from "lucide-react";
12
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
13
- import { Button as T } from "@burdenoff/fe-libs/ui";
8
+ import { useEffect as o, useMemo as s, useState as c } from "react";
9
+ import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import { Activity as u, Bell as d, CloudSun as f, Loader2 as p, MoonStar as m, RefreshCw as h, Save as g, Sparkles as _ } from "lucide-react";
11
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
+ import { Button as b } from "@burdenoff/fe-libs/ui";
14
13
  //#region src/healthybowl/pages/weather/WeatherSettingsPage.tsx
15
- var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", D = [
14
+ var x = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", S = [
16
15
  12,
17
16
  24,
18
17
  48
19
- ], O = [
18
+ ], C = [
20
19
  5,
21
20
  7,
22
21
  10
23
- ], k = ["metric", "imperial"], ne = [
22
+ ], w = ["metric", "imperial"], T = [
24
23
  {
25
24
  code: "en",
26
25
  labelKey: "healthybowl.weather.settings.language.en",
@@ -46,18 +45,16 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
46
45
  labelKey: "healthybowl.weather.settings.language.te",
47
46
  fallback: "Telugu"
48
47
  }
49
- ], A = (e) => ({
48
+ ], E = (e) => ({
50
49
  inAppEnabled: e.inAppEnabled,
51
50
  smsEnabled: e.smsEnabled,
52
51
  smsNumber: e.smsNumber ?? "",
53
52
  emailEnabled: e.emailEnabled,
54
- alertEmail: e.alertEmail ?? "",
55
53
  webhookEnabled: e.webhookEnabled,
56
54
  webhookUrl: e.webhookUrl ?? "",
57
55
  quietHoursEnabled: e.quietHoursEnabled,
58
56
  quietHoursStart: e.quietHoursStart ?? "22:00",
59
57
  quietHoursEnd: e.quietHoursEnd ?? "06:00",
60
- quietHoursTimezone: e.quietHoursTimezone ?? s(),
61
58
  escalateCriticalFrost: e.escalateCriticalFrost,
62
59
  alertLeadTimeHours: e.alertLeadTimeHours,
63
60
  baselineYears: e.baselineYears,
@@ -66,386 +63,341 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
66
63
  aiAdvisoryEnabled: e.aiAdvisoryEnabled,
67
64
  advisoryLanguage: e.advisoryLanguage ?? "en",
68
65
  units: e.units ?? "metric"
69
- }), j = ({ icon: e, title: t, description: n, children: r }) => /* @__PURE__ */ w("section", {
66
+ }), D = ({ icon: e, title: t, description: n, children: r }) => /* @__PURE__ */ y("section", {
70
67
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5",
71
- children: [/* @__PURE__ */ w("div", {
68
+ children: [/* @__PURE__ */ y("div", {
72
69
  className: "mb-4 flex items-start gap-2",
73
- children: [/* @__PURE__ */ C("span", {
70
+ children: [/* @__PURE__ */ v("span", {
74
71
  className: "mt-0.5 text-text-secondary",
75
72
  children: e
76
- }), /* @__PURE__ */ w("div", {
73
+ }), /* @__PURE__ */ y("div", {
77
74
  className: "space-y-0.5",
78
- children: [/* @__PURE__ */ C("h2", {
75
+ children: [/* @__PURE__ */ v("h2", {
79
76
  className: "text-sm font-semibold text-text-primary",
80
77
  children: t
81
- }), n && /* @__PURE__ */ C("p", {
78
+ }), n && /* @__PURE__ */ v("p", {
82
79
  className: "text-xs text-text-secondary",
83
80
  children: n
84
81
  })]
85
82
  })]
86
83
  }), r]
87
- }), M = ({ checked: e, onChange: t, label: n, labelId: r }) => {
88
- let { t: i } = p();
89
- return /* @__PURE__ */ w("div", {
84
+ }), O = ({ checked: e, onChange: t, label: n, labelId: r }) => {
85
+ let { t: i } = l();
86
+ return /* @__PURE__ */ y("div", {
90
87
  className: "flex items-center justify-between gap-3",
91
- children: [/* @__PURE__ */ w("span", {
88
+ children: [/* @__PURE__ */ y("span", {
92
89
  id: r,
93
90
  className: "flex items-center gap-2 text-sm text-text-primary",
94
- children: [n, /* @__PURE__ */ w("span", {
91
+ children: [n, /* @__PURE__ */ y("span", {
95
92
  className: "inline-flex items-center gap-1 text-xs text-text-secondary",
96
- children: [/* @__PURE__ */ C("span", { className: `h-2 w-2 rounded-full ${e ? "bg-success" : "bg-bg-sunken"}` }), e ? i("healthybowl.weather.settings.on", "On") : i("healthybowl.weather.settings.off", "Off")]
93
+ children: [/* @__PURE__ */ v("span", { className: `h-2 w-2 rounded-full ${e ? "bg-success" : "bg-bg-sunken"}` }), e ? i("healthybowl.weather.settings.on", "On") : i("healthybowl.weather.settings.off", "Off")]
97
94
  })]
98
- }), /* @__PURE__ */ C("button", {
95
+ }), /* @__PURE__ */ v("button", {
99
96
  type: "button",
100
97
  role: "switch",
101
98
  "aria-checked": e,
102
99
  "aria-labelledby": r,
103
100
  onClick: () => t(!e),
104
101
  className: `relative inline-flex h-6 w-11 shrink-0 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${e ? "bg-success" : "bg-bg-sunken"}`,
105
- children: /* @__PURE__ */ C("span", { className: `inline-block h-5 w-5 transform rounded-full bg-bg-surface shadow-sm transition-transform ${e ? "translate-x-5" : "translate-x-0.5"}` })
102
+ children: /* @__PURE__ */ v("span", { className: `inline-block h-5 w-5 transform rounded-full bg-bg-surface shadow-sm transition-transform ${e ? "translate-x-5" : "translate-x-0.5"}` })
106
103
  })]
107
104
  });
108
- }, N = ({ label: e, htmlFor: t, children: n }) => /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
105
+ }, k = ({ label: e, htmlFor: t, children: n }) => /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
109
106
  htmlFor: t,
110
107
  className: "mb-1 block text-sm font-medium text-text-primary",
111
108
  children: e
112
- }), n] }), P = () => {
113
- let { t: s } = p(), { toast: P } = i(), { settings: F, loadingSettings: I, errorSettings: L, refetchSettings: R, saveSettings: z, syncHistory: B } = a(), [V, H] = f(null), [U, W] = f(!1), [G, K] = f(!1);
114
- u(() => {
115
- F && H(A(F));
116
- }, [F]);
117
- let q = (e, t) => H((n) => n && {
109
+ }), n] }), A = () => {
110
+ let { t: A } = l(), { toast: j } = i(), { settings: M, loadingSettings: N, errorSettings: P, refetchSettings: F, saveSettings: I, syncHistory: L } = a(), [R, z] = c(null), [B, V] = c(!1), [H, U] = c(!1);
111
+ o(() => {
112
+ M && z(E(M));
113
+ }, [M]);
114
+ let W = (e, t) => z((n) => n && {
118
115
  ...n,
119
116
  [e]: t
120
- }), J = d(() => !F?.historyStartYear || !F?.historyEndYear ? null : `${F.historyStartYear} – ${F.historyEndYear}`, [F]), Y = d(() => {
121
- if (!F?.historyLastSyncedAt) return null;
122
- let e = new Date(F.historyLastSyncedAt);
117
+ }), G = s(() => !M?.historyStartYear || !M?.historyEndYear ? null : `${M.historyStartYear} – ${M.historyEndYear}`, [M]), K = s(() => {
118
+ if (!M?.historyLastSyncedAt) return null;
119
+ let e = new Date(M.historyLastSyncedAt);
123
120
  return Number.isNaN(e.getTime()) ? null : e.toLocaleString();
124
- }, [F]), X = async () => {
125
- K(!0);
121
+ }, [M]), q = async () => {
122
+ U(!0);
126
123
  try {
127
- await B(), await R(), P({
128
- title: s("healthybowl.weather.settings.toast.resynced.title", "History re-synced"),
129
- description: s("healthybowl.weather.settings.toast.resynced.description", "The historical weather archive has been refreshed from Open-Meteo ERA5."),
124
+ await L(), await F(), j({
125
+ title: A("healthybowl.weather.settings.toast.resynced.title", "History re-synced"),
126
+ description: A("healthybowl.weather.settings.toast.resynced.description", "The historical weather archive has been refreshed from Open-Meteo ERA5."),
130
127
  variant: "success"
131
128
  });
132
129
  } catch (e) {
133
- P({
134
- title: s("healthybowl.weather.settings.toast.resyncError.title", "Could not re-sync history"),
130
+ j({
131
+ title: A("healthybowl.weather.settings.toast.resyncError.title", "Could not re-sync history"),
135
132
  description: e instanceof Error ? e.message : void 0,
136
133
  variant: "error"
137
134
  });
138
135
  } finally {
139
- K(!1);
136
+ U(!1);
140
137
  }
141
- }, Z = V ? o(V) : [], Q = V ? c(V) : !1, $ = !!(V && V.emailEnabled && V.alertEmail.trim() && !l(V.alertEmail)), re = async () => {
142
- if (!V) return;
138
+ }, J = async () => {
139
+ if (!R) return;
143
140
  let e = {
144
- inAppEnabled: V.inAppEnabled,
145
- smsEnabled: V.smsEnabled,
146
- smsNumber: V.smsNumber.trim() || null,
147
- emailEnabled: V.emailEnabled,
148
- alertEmail: V.alertEmail.trim() || null,
149
- webhookEnabled: V.webhookEnabled,
150
- webhookUrl: V.webhookUrl.trim() || null,
151
- quietHoursEnabled: V.quietHoursEnabled,
152
- quietHoursStart: V.quietHoursStart || null,
153
- quietHoursEnd: V.quietHoursEnd || null,
154
- quietHoursTimezone: V.quietHoursTimezone || null,
155
- escalateCriticalFrost: V.escalateCriticalFrost,
156
- alertLeadTimeHours: V.alertLeadTimeHours,
157
- baselineYears: V.baselineYears,
158
- deviationThresholdPct: V.deviationThresholdPct,
159
- weeklyDigestEmail: V.weeklyDigestEmail,
160
- aiAdvisoryEnabled: V.aiAdvisoryEnabled,
161
- advisoryLanguage: V.advisoryLanguage || null,
162
- units: V.units || null
141
+ inAppEnabled: R.inAppEnabled,
142
+ smsEnabled: R.smsEnabled,
143
+ smsNumber: R.smsNumber.trim() || null,
144
+ emailEnabled: R.emailEnabled,
145
+ webhookEnabled: R.webhookEnabled,
146
+ webhookUrl: R.webhookUrl.trim() || null,
147
+ quietHoursEnabled: R.quietHoursEnabled,
148
+ quietHoursStart: R.quietHoursStart || null,
149
+ quietHoursEnd: R.quietHoursEnd || null,
150
+ escalateCriticalFrost: R.escalateCriticalFrost,
151
+ alertLeadTimeHours: R.alertLeadTimeHours,
152
+ baselineYears: R.baselineYears,
153
+ deviationThresholdPct: R.deviationThresholdPct,
154
+ weeklyDigestEmail: R.weeklyDigestEmail,
155
+ aiAdvisoryEnabled: R.aiAdvisoryEnabled,
156
+ advisoryLanguage: R.advisoryLanguage || null,
157
+ units: R.units || null
163
158
  };
164
- W(!0);
159
+ V(!0);
165
160
  try {
166
- await z(e), P({
167
- title: s("healthybowl.weather.settings.toast.saved.title", "Settings saved"),
168
- description: s("healthybowl.weather.settings.toast.saved.description", "Your weather & alert preferences have been updated."),
161
+ await I(e), j({
162
+ title: A("healthybowl.weather.settings.toast.saved.title", "Settings saved"),
163
+ description: A("healthybowl.weather.settings.toast.saved.description", "Your weather & alert preferences have been updated."),
169
164
  variant: "success"
170
165
  });
171
166
  } catch (e) {
172
- P({
173
- title: s("healthybowl.weather.settings.toast.saveError.title", "Could not save settings"),
167
+ j({
168
+ title: A("healthybowl.weather.settings.toast.saveError.title", "Could not save settings"),
174
169
  description: e instanceof Error ? e.message : void 0,
175
170
  variant: "error"
176
171
  });
177
172
  } finally {
178
- W(!1);
173
+ V(!1);
179
174
  }
180
175
  };
181
- return /* @__PURE__ */ C(e, {
182
- title: s("healthybowl.weather.settings.title", "Weather & Alert Settings"),
183
- description: s("healthybowl.weather.settings.description", "Configure your weather archive, notification channels, quiet hours and AI advisory"),
176
+ return /* @__PURE__ */ v(e, {
177
+ title: A("healthybowl.weather.settings.title", "Weather & Alert Settings"),
178
+ description: A("healthybowl.weather.settings.description", "Configure your weather archive, notification channels, quiet hours and AI advisory"),
184
179
  purpose: "Everything that controls how HealthyBowl watches the weather for your farm: which years of history it compares against, how it reaches you when frost, a storm, heat or an anomaly is coming (in-app, SMS, email or a FluidGrids webhook), when to stay quiet, and how sensitive the anomaly detection is. Tune it once and every early-warning alert follows these rules.",
185
- children: I && !F ? /* @__PURE__ */ C(r, {}) : L && !F ? /* @__PURE__ */ C(n, { onRetry: () => void R() }) : !V || !F ? /* @__PURE__ */ C(t, {
186
- title: s("healthybowl.weather.settings.empty.title", "No weather settings yet"),
187
- description: s("healthybowl.weather.settings.empty.description", "Weather settings will appear here once your workspace weather archive is initialised.")
188
- }) : /* @__PURE__ */ w("div", {
180
+ children: N && !M ? /* @__PURE__ */ v(r, {}) : P && !M ? /* @__PURE__ */ v(n, { onRetry: () => void F() }) : !R || !M ? /* @__PURE__ */ v(t, {
181
+ title: A("healthybowl.weather.settings.empty.title", "No weather settings yet"),
182
+ description: A("healthybowl.weather.settings.empty.description", "Weather settings will appear here once your workspace weather archive is initialised.")
183
+ }) : /* @__PURE__ */ y("div", {
189
184
  className: "space-y-6",
190
185
  children: [
191
- /* @__PURE__ */ C(j, {
192
- icon: /* @__PURE__ */ C(te, { className: "h-4 w-4" }),
193
- title: s("healthybowl.weather.settings.location.title", "Farm Location & Data"),
194
- description: s("healthybowl.weather.settings.location.description", "The historical weather archive your early-warning system compares against."),
195
- children: /* @__PURE__ */ w("div", {
186
+ /* @__PURE__ */ v(D, {
187
+ icon: /* @__PURE__ */ v(f, { className: "h-4 w-4" }),
188
+ title: A("healthybowl.weather.settings.location.title", "Farm Location & Data"),
189
+ description: A("healthybowl.weather.settings.location.description", "The historical weather archive your early-warning system compares against."),
190
+ children: /* @__PURE__ */ y("div", {
196
191
  className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
197
- children: [/* @__PURE__ */ w("div", {
192
+ children: [/* @__PURE__ */ y("div", {
198
193
  className: "space-y-3",
199
194
  children: [
200
- /* @__PURE__ */ w("div", {
195
+ /* @__PURE__ */ y("div", {
201
196
  className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
202
- children: [/* @__PURE__ */ C("span", {
197
+ children: [/* @__PURE__ */ v("span", {
203
198
  className: "text-text-secondary",
204
- children: s("healthybowl.weather.settings.location.archive", "Historical archive")
205
- }), /* @__PURE__ */ C("span", {
199
+ children: A("healthybowl.weather.settings.location.archive", "Historical archive")
200
+ }), /* @__PURE__ */ v("span", {
206
201
  className: "font-medium text-text-primary",
207
- children: J ? s("healthybowl.weather.settings.location.archiveValue", "{{range}} (Open-Meteo ERA5)", { range: J }) : s("healthybowl.weather.settings.location.notSynced", "Not synced yet (Open-Meteo ERA5)")
202
+ children: G ? A("healthybowl.weather.settings.location.archiveValue", "{{range}} (Open-Meteo ERA5)", { range: G }) : A("healthybowl.weather.settings.location.notSynced", "Not synced yet (Open-Meteo ERA5)")
208
203
  })]
209
204
  }),
210
- /* @__PURE__ */ w("div", {
205
+ /* @__PURE__ */ y("div", {
211
206
  className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm",
212
- children: [/* @__PURE__ */ C("span", {
207
+ children: [/* @__PURE__ */ v("span", {
213
208
  className: "text-text-secondary",
214
- children: s("healthybowl.weather.settings.location.lastSynced", "Last synced")
215
- }), /* @__PURE__ */ C("span", {
209
+ children: A("healthybowl.weather.settings.location.lastSynced", "Last synced")
210
+ }), /* @__PURE__ */ v("span", {
216
211
  className: "font-medium text-text-primary",
217
- children: Y ?? s("healthybowl.weather.settings.location.never", "Never")
212
+ children: K ?? A("healthybowl.weather.settings.location.never", "Never")
218
213
  })]
219
214
  }),
220
- /* @__PURE__ */ w(T, {
215
+ /* @__PURE__ */ y(b, {
221
216
  variant: "outline",
222
217
  size: "sm",
223
- onClick: () => void X(),
224
- disabled: G,
225
- children: [G ? /* @__PURE__ */ C(_, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(y, { className: "h-4 w-4" }), s("healthybowl.weather.settings.location.resync", "Re-sync history")]
218
+ onClick: () => void q(),
219
+ disabled: H,
220
+ children: [H ? /* @__PURE__ */ v(p, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ v(h, { className: "h-4 w-4" }), A("healthybowl.weather.settings.location.resync", "Re-sync history")]
226
221
  })
227
222
  ]
228
- }), /* @__PURE__ */ C(N, {
229
- label: s("healthybowl.weather.settings.location.units", "Units"),
223
+ }), /* @__PURE__ */ v(k, {
224
+ label: A("healthybowl.weather.settings.location.units", "Units"),
230
225
  htmlFor: "hb-weather-units",
231
- children: /* @__PURE__ */ C("select", {
226
+ children: /* @__PURE__ */ v("select", {
232
227
  id: "hb-weather-units",
233
- value: V.units,
234
- onChange: (e) => q("units", e.target.value),
235
- className: E,
236
- children: k.map((e) => /* @__PURE__ */ C("option", {
228
+ value: R.units,
229
+ onChange: (e) => W("units", e.target.value),
230
+ className: x,
231
+ children: w.map((e) => /* @__PURE__ */ v("option", {
237
232
  value: e,
238
- children: e === "metric" ? s("healthybowl.weather.settings.units.metric", "Metric (°C, mm)") : s("healthybowl.weather.settings.units.imperial", "Imperial (°F, in)")
233
+ children: e === "metric" ? A("healthybowl.weather.settings.units.metric", "Metric (°C, mm)") : A("healthybowl.weather.settings.units.imperial", "Imperial (°F, in)")
239
234
  }, e))
240
235
  })
241
236
  })]
242
237
  })
243
238
  }),
244
- /* @__PURE__ */ w(j, {
245
- icon: /* @__PURE__ */ C(g, { className: "h-4 w-4" }),
246
- title: s("healthybowl.weather.settings.channels.title", "Notification Channels"),
247
- description: s("healthybowl.weather.settings.channels.description", "How HealthyBowl reaches you when an alert fires."),
248
- children: [/* @__PURE__ */ w("div", {
239
+ /* @__PURE__ */ v(D, {
240
+ icon: /* @__PURE__ */ v(d, { className: "h-4 w-4" }),
241
+ title: A("healthybowl.weather.settings.channels.title", "Notification Channels"),
242
+ description: A("healthybowl.weather.settings.channels.description", "How HealthyBowl reaches you when an alert fires."),
243
+ children: /* @__PURE__ */ y("div", {
249
244
  className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
250
- children: [/* @__PURE__ */ w("div", {
245
+ children: [/* @__PURE__ */ y("div", {
251
246
  className: "space-y-4",
252
- children: [/* @__PURE__ */ C(M, {
253
- checked: V.inAppEnabled,
254
- onChange: (e) => q("inAppEnabled", e),
255
- label: s("healthybowl.weather.settings.channels.inApp", "In-app notifications"),
247
+ children: [/* @__PURE__ */ v(O, {
248
+ checked: R.inAppEnabled,
249
+ onChange: (e) => W("inAppEnabled", e),
250
+ label: A("healthybowl.weather.settings.channels.inApp", "In-app notifications"),
256
251
  labelId: "hb-weather-inapp"
257
- }), /* @__PURE__ */ w("div", {
252
+ }), /* @__PURE__ */ v("div", {
258
253
  className: "space-y-2",
259
- children: [/* @__PURE__ */ C(M, {
260
- checked: V.emailEnabled,
261
- onChange: (e) => q("emailEnabled", e),
262
- label: s("healthybowl.weather.settings.channels.email", "Email alerts"),
254
+ children: /* @__PURE__ */ v(O, {
255
+ checked: R.emailEnabled,
256
+ onChange: (e) => W("emailEnabled", e),
257
+ label: A("healthybowl.weather.settings.channels.email", "Email alerts"),
263
258
  labelId: "hb-weather-email"
264
- }), V.emailEnabled && /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("input", {
265
- type: "email",
266
- value: V.alertEmail,
267
- onChange: (e) => q("alertEmail", e.target.value),
268
- placeholder: s("healthybowl.weather.settings.channels.emailPlaceholder", "alerts@yourfarm.com"),
269
- "aria-label": s("healthybowl.weather.settings.channels.alertEmail", "Alert email address"),
270
- "aria-invalid": $,
271
- className: E
272
- }), $ && /* @__PURE__ */ C("p", {
273
- className: "text-xs text-error",
274
- children: s("healthybowl.weather.settings.channels.emailInvalid", "Enter a valid email address, or email alerts will not be sent.")
275
- })] })]
259
+ })
276
260
  })]
277
- }), /* @__PURE__ */ w("div", {
261
+ }), /* @__PURE__ */ y("div", {
278
262
  className: "space-y-4",
279
- children: [/* @__PURE__ */ w("div", {
263
+ children: [/* @__PURE__ */ y("div", {
280
264
  className: "space-y-2",
281
- children: [/* @__PURE__ */ C(M, {
282
- checked: V.smsEnabled,
283
- onChange: (e) => q("smsEnabled", e),
284
- label: s("healthybowl.weather.settings.channels.sms", "SMS alerts"),
265
+ children: [/* @__PURE__ */ v(O, {
266
+ checked: R.smsEnabled,
267
+ onChange: (e) => W("smsEnabled", e),
268
+ label: A("healthybowl.weather.settings.channels.sms", "SMS alerts"),
285
269
  labelId: "hb-weather-sms"
286
- }), V.smsEnabled && /* @__PURE__ */ C("input", {
270
+ }), R.smsEnabled && /* @__PURE__ */ v("input", {
287
271
  type: "tel",
288
- value: V.smsNumber,
289
- onChange: (e) => q("smsNumber", e.target.value),
290
- placeholder: s("healthybowl.weather.settings.channels.smsPlaceholder", "+91 98765 43210"),
291
- "aria-label": s("healthybowl.weather.settings.channels.smsNumber", "SMS number"),
292
- className: E
272
+ value: R.smsNumber,
273
+ onChange: (e) => W("smsNumber", e.target.value),
274
+ placeholder: A("healthybowl.weather.settings.channels.smsPlaceholder", "+91 98765 43210"),
275
+ "aria-label": A("healthybowl.weather.settings.channels.smsNumber", "SMS number"),
276
+ className: x
293
277
  })]
294
- }), /* @__PURE__ */ w("div", {
278
+ }), /* @__PURE__ */ y("div", {
295
279
  className: "space-y-2",
296
- children: [/* @__PURE__ */ C(M, {
297
- checked: V.webhookEnabled,
298
- onChange: (e) => q("webhookEnabled", e),
299
- label: s("healthybowl.weather.settings.channels.webhook", "Webhook (FluidGrids)"),
280
+ children: [/* @__PURE__ */ v(O, {
281
+ checked: R.webhookEnabled,
282
+ onChange: (e) => W("webhookEnabled", e),
283
+ label: A("healthybowl.weather.settings.channels.webhook", "Webhook (FluidGrids)"),
300
284
  labelId: "hb-weather-webhook"
301
- }), V.webhookEnabled && /* @__PURE__ */ C("input", {
285
+ }), R.webhookEnabled && /* @__PURE__ */ v("input", {
302
286
  type: "url",
303
- value: V.webhookUrl,
304
- onChange: (e) => q("webhookUrl", e.target.value),
305
- placeholder: s("healthybowl.weather.settings.channels.webhookPlaceholder", "https://www.example.com/fluidgrids"),
306
- "aria-label": s("healthybowl.weather.settings.channels.webhookUrl", "Webhook URL"),
307
- className: E
287
+ value: R.webhookUrl,
288
+ onChange: (e) => W("webhookUrl", e.target.value),
289
+ placeholder: A("healthybowl.weather.settings.channels.webhookPlaceholder", "https://www.example.com/fluidgrids"),
290
+ "aria-label": A("healthybowl.weather.settings.channels.webhookUrl", "Webhook URL"),
291
+ className: x
308
292
  })]
309
293
  })]
310
294
  })]
311
- }), (Z.length > 0 || Q) && /* @__PURE__ */ w("div", {
312
- className: "mt-4 space-y-2 rounded-md border border-warning/40 bg-warning/10 p-3",
313
- children: [Q && /* @__PURE__ */ w("p", {
314
- className: "flex items-start gap-2 text-xs text-text-primary",
315
- children: [/* @__PURE__ */ C(h, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), s("healthybowl.weather.settings.channels.warning.none", "No channel can reach you. Weather alerts will be recorded but not delivered.")]
316
- }), Z.map((e) => /* @__PURE__ */ w("p", {
317
- className: "flex items-start gap-2 text-xs text-text-primary",
318
- children: [/* @__PURE__ */ C(h, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), s(e.messageKey, e.messageFallback)]
319
- }, e.channel))]
320
- })]
295
+ })
321
296
  }),
322
- /* @__PURE__ */ C(j, {
323
- icon: /* @__PURE__ */ C(v, { className: "h-4 w-4" }),
324
- title: s("healthybowl.weather.settings.quiet.title", "Quiet Hours & Delivery"),
325
- description: s("healthybowl.weather.settings.quiet.description", "Suppress non-critical alerts overnight and choose how far ahead to warn you."),
326
- children: /* @__PURE__ */ w("div", {
297
+ /* @__PURE__ */ v(D, {
298
+ icon: /* @__PURE__ */ v(m, { className: "h-4 w-4" }),
299
+ title: A("healthybowl.weather.settings.quiet.title", "Quiet Hours & Delivery"),
300
+ description: A("healthybowl.weather.settings.quiet.description", "Suppress non-critical alerts overnight and choose how far ahead to warn you."),
301
+ children: /* @__PURE__ */ y("div", {
327
302
  className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
328
- children: [/* @__PURE__ */ w("div", {
303
+ children: [/* @__PURE__ */ y("div", {
329
304
  className: "space-y-3",
330
- children: [/* @__PURE__ */ C(M, {
331
- checked: V.quietHoursEnabled,
332
- onChange: (e) => q("quietHoursEnabled", e),
333
- label: s("healthybowl.weather.settings.quiet.doNotDisturb", "Do not disturb"),
305
+ children: [/* @__PURE__ */ v(O, {
306
+ checked: R.quietHoursEnabled,
307
+ onChange: (e) => W("quietHoursEnabled", e),
308
+ label: A("healthybowl.weather.settings.quiet.doNotDisturb", "Do not disturb"),
334
309
  labelId: "hb-weather-quiet"
335
- }), V.quietHoursEnabled && /* @__PURE__ */ w("div", {
310
+ }), R.quietHoursEnabled && /* @__PURE__ */ y("div", {
336
311
  className: "grid grid-cols-2 gap-3",
337
- children: [
338
- /* @__PURE__ */ C(N, {
339
- label: s("healthybowl.weather.settings.quiet.from", "From"),
340
- htmlFor: "hb-weather-quiet-start",
341
- children: /* @__PURE__ */ C("input", {
342
- id: "hb-weather-quiet-start",
343
- type: "time",
344
- value: V.quietHoursStart,
345
- onChange: (e) => q("quietHoursStart", e.target.value),
346
- className: E
347
- })
348
- }),
349
- /* @__PURE__ */ C(N, {
350
- label: s("healthybowl.weather.settings.quiet.to", "To"),
351
- htmlFor: "hb-weather-quiet-end",
352
- children: /* @__PURE__ */ C("input", {
353
- id: "hb-weather-quiet-end",
354
- type: "time",
355
- value: V.quietHoursEnd,
356
- onChange: (e) => q("quietHoursEnd", e.target.value),
357
- className: E
358
- })
359
- }),
360
- /* @__PURE__ */ w("div", {
361
- className: "col-span-2",
362
- children: [/* @__PURE__ */ C(N, {
363
- label: s("healthybowl.weather.settings.quiet.timezone", "Timezone"),
364
- htmlFor: "hb-weather-quiet-tz",
365
- children: /* @__PURE__ */ C("select", {
366
- id: "hb-weather-quiet-tz",
367
- value: V.quietHoursTimezone,
368
- onChange: (e) => q("quietHoursTimezone", e.target.value),
369
- className: E,
370
- children: ee(V.quietHoursTimezone).map((e) => /* @__PURE__ */ C("option", {
371
- value: e,
372
- children: e
373
- }, e))
374
- })
375
- }), /* @__PURE__ */ C("p", {
376
- className: "mt-1 text-xs text-text-secondary",
377
- children: s("healthybowl.weather.settings.quiet.timezoneHint", "Quiet hours are read in this zone. Without it they are read as UTC.")
378
- })]
312
+ children: [/* @__PURE__ */ v(k, {
313
+ label: A("healthybowl.weather.settings.quiet.from", "From"),
314
+ htmlFor: "hb-weather-quiet-start",
315
+ children: /* @__PURE__ */ v("input", {
316
+ id: "hb-weather-quiet-start",
317
+ type: "time",
318
+ value: R.quietHoursStart,
319
+ onChange: (e) => W("quietHoursStart", e.target.value),
320
+ className: x
379
321
  })
380
- ]
322
+ }), /* @__PURE__ */ v(k, {
323
+ label: A("healthybowl.weather.settings.quiet.to", "To"),
324
+ htmlFor: "hb-weather-quiet-end",
325
+ children: /* @__PURE__ */ v("input", {
326
+ id: "hb-weather-quiet-end",
327
+ type: "time",
328
+ value: R.quietHoursEnd,
329
+ onChange: (e) => W("quietHoursEnd", e.target.value),
330
+ className: x
331
+ })
332
+ })]
381
333
  })]
382
- }), /* @__PURE__ */ w("div", {
334
+ }), /* @__PURE__ */ y("div", {
383
335
  className: "space-y-4",
384
- children: [/* @__PURE__ */ C(M, {
385
- checked: V.escalateCriticalFrost,
386
- onChange: (e) => q("escalateCriticalFrost", e),
387
- label: s("healthybowl.weather.settings.quiet.escalate", "Escalate critical frost alerts even during quiet hours"),
336
+ children: [/* @__PURE__ */ v(O, {
337
+ checked: R.escalateCriticalFrost,
338
+ onChange: (e) => W("escalateCriticalFrost", e),
339
+ label: A("healthybowl.weather.settings.quiet.escalate", "Escalate critical frost alerts even during quiet hours"),
388
340
  labelId: "hb-weather-escalate"
389
- }), /* @__PURE__ */ C(N, {
390
- label: s("healthybowl.weather.settings.quiet.leadTime", "Alert lead time"),
341
+ }), /* @__PURE__ */ v(k, {
342
+ label: A("healthybowl.weather.settings.quiet.leadTime", "Alert lead time"),
391
343
  htmlFor: "hb-weather-lead",
392
- children: /* @__PURE__ */ C("select", {
344
+ children: /* @__PURE__ */ v("select", {
393
345
  id: "hb-weather-lead",
394
- value: V.alertLeadTimeHours,
395
- onChange: (e) => q("alertLeadTimeHours", Number(e.target.value)),
396
- className: E,
397
- children: D.map((e) => /* @__PURE__ */ C("option", {
346
+ value: R.alertLeadTimeHours,
347
+ onChange: (e) => W("alertLeadTimeHours", Number(e.target.value)),
348
+ className: x,
349
+ children: S.map((e) => /* @__PURE__ */ v("option", {
398
350
  value: e,
399
- children: s("healthybowl.weather.settings.quiet.leadTimeOption", "{{hours}} hours before", { hours: e })
351
+ children: A("healthybowl.weather.settings.quiet.leadTimeOption", "{{hours}} hours before", { hours: e })
400
352
  }, e))
401
353
  })
402
354
  })]
403
355
  })]
404
356
  })
405
357
  }),
406
- /* @__PURE__ */ C(j, {
407
- icon: /* @__PURE__ */ C(m, { className: "h-4 w-4" }),
408
- title: s("healthybowl.weather.settings.anomaly.title", "Anomaly Detection"),
409
- description: s("healthybowl.weather.settings.anomaly.description", "Tune how HealthyBowl decides this season is running abnormally versus the baseline."),
410
- children: /* @__PURE__ */ w("div", {
358
+ /* @__PURE__ */ v(D, {
359
+ icon: /* @__PURE__ */ v(u, { className: "h-4 w-4" }),
360
+ title: A("healthybowl.weather.settings.anomaly.title", "Anomaly Detection"),
361
+ description: A("healthybowl.weather.settings.anomaly.description", "Tune how HealthyBowl decides this season is running abnormally versus the baseline."),
362
+ children: /* @__PURE__ */ y("div", {
411
363
  className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-3",
412
364
  children: [
413
- /* @__PURE__ */ C(N, {
414
- label: s("healthybowl.weather.settings.anomaly.baseline", "Baseline window"),
365
+ /* @__PURE__ */ v(k, {
366
+ label: A("healthybowl.weather.settings.anomaly.baseline", "Baseline window"),
415
367
  htmlFor: "hb-weather-baseline",
416
- children: /* @__PURE__ */ C("select", {
368
+ children: /* @__PURE__ */ v("select", {
417
369
  id: "hb-weather-baseline",
418
- value: V.baselineYears,
419
- onChange: (e) => q("baselineYears", Number(e.target.value)),
420
- className: E,
421
- children: O.map((e) => /* @__PURE__ */ C("option", {
370
+ value: R.baselineYears,
371
+ onChange: (e) => W("baselineYears", Number(e.target.value)),
372
+ className: x,
373
+ children: C.map((e) => /* @__PURE__ */ v("option", {
422
374
  value: e,
423
- children: s("healthybowl.weather.settings.anomaly.baselineOption", "{{years}} years", { years: e })
375
+ children: A("healthybowl.weather.settings.anomaly.baselineOption", "{{years}} years", { years: e })
424
376
  }, e))
425
377
  })
426
378
  }),
427
- /* @__PURE__ */ C(N, {
428
- label: s("healthybowl.weather.settings.anomaly.deviation", "Deviation threshold: {{pct}}%", { pct: V.deviationThresholdPct }),
379
+ /* @__PURE__ */ v(k, {
380
+ label: A("healthybowl.weather.settings.anomaly.deviation", "Deviation threshold: {{pct}}%", { pct: R.deviationThresholdPct }),
429
381
  htmlFor: "hb-weather-deviation",
430
- children: /* @__PURE__ */ C("input", {
382
+ children: /* @__PURE__ */ v("input", {
431
383
  id: "hb-weather-deviation",
432
384
  type: "range",
433
385
  min: 0,
434
386
  max: 100,
435
387
  step: 5,
436
- value: V.deviationThresholdPct,
437
- onChange: (e) => q("deviationThresholdPct", Number(e.target.value)),
388
+ value: R.deviationThresholdPct,
389
+ onChange: (e) => W("deviationThresholdPct", Number(e.target.value)),
438
390
  className: "h-2 w-full cursor-pointer appearance-none rounded-full bg-bg-sunken accent-[var(--color-primary)]"
439
391
  })
440
392
  }),
441
- /* @__PURE__ */ C("div", {
393
+ /* @__PURE__ */ v("div", {
442
394
  className: "flex items-end",
443
- children: /* @__PURE__ */ C("div", {
395
+ children: /* @__PURE__ */ v("div", {
444
396
  className: "w-full",
445
- children: /* @__PURE__ */ C(M, {
446
- checked: V.weeklyDigestEmail,
447
- onChange: (e) => q("weeklyDigestEmail", e),
448
- label: s("healthybowl.weather.settings.anomaly.digest", "Weekly anomaly digest email"),
397
+ children: /* @__PURE__ */ v(O, {
398
+ checked: R.weeklyDigestEmail,
399
+ onChange: (e) => W("weeklyDigestEmail", e),
400
+ label: A("healthybowl.weather.settings.anomaly.digest", "Weekly anomaly digest email"),
449
401
  labelId: "hb-weather-digest"
450
402
  })
451
403
  })
@@ -453,46 +405,46 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
453
405
  ]
454
406
  })
455
407
  }),
456
- /* @__PURE__ */ C(j, {
457
- icon: /* @__PURE__ */ C(x, { className: "h-4 w-4" }),
458
- title: s("healthybowl.weather.settings.ai.title", "AI Advisory"),
459
- description: s("healthybowl.weather.settings.ai.description", "Plain-language explanations and recommended actions attached to each alert."),
460
- children: /* @__PURE__ */ w("div", {
408
+ /* @__PURE__ */ v(D, {
409
+ icon: /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
410
+ title: A("healthybowl.weather.settings.ai.title", "AI Advisory"),
411
+ description: A("healthybowl.weather.settings.ai.description", "Plain-language explanations and recommended actions attached to each alert."),
412
+ children: /* @__PURE__ */ y("div", {
461
413
  className: "grid grid-cols-1 gap-x-8 gap-y-4 md:grid-cols-2",
462
- children: [/* @__PURE__ */ C(M, {
463
- checked: V.aiAdvisoryEnabled,
464
- onChange: (e) => q("aiAdvisoryEnabled", e),
465
- label: s("healthybowl.weather.settings.ai.explanations", "Plain-English explanations"),
414
+ children: [/* @__PURE__ */ v(O, {
415
+ checked: R.aiAdvisoryEnabled,
416
+ onChange: (e) => W("aiAdvisoryEnabled", e),
417
+ label: A("healthybowl.weather.settings.ai.explanations", "Plain-English explanations"),
466
418
  labelId: "hb-weather-ai"
467
- }), /* @__PURE__ */ C(N, {
468
- label: s("healthybowl.weather.settings.ai.language", "Language"),
419
+ }), /* @__PURE__ */ v(k, {
420
+ label: A("healthybowl.weather.settings.ai.language", "Language"),
469
421
  htmlFor: "hb-weather-language",
470
- children: /* @__PURE__ */ C("select", {
422
+ children: /* @__PURE__ */ v("select", {
471
423
  id: "hb-weather-language",
472
- value: V.advisoryLanguage,
473
- onChange: (e) => q("advisoryLanguage", e.target.value),
474
- className: E,
475
- children: ne.map((e) => /* @__PURE__ */ C("option", {
424
+ value: R.advisoryLanguage,
425
+ onChange: (e) => W("advisoryLanguage", e.target.value),
426
+ className: x,
427
+ children: T.map((e) => /* @__PURE__ */ v("option", {
476
428
  value: e.code,
477
- children: s(e.labelKey, e.fallback)
429
+ children: A(e.labelKey, e.fallback)
478
430
  }, e.code))
479
431
  })
480
432
  })]
481
433
  })
482
434
  }),
483
- /* @__PURE__ */ w("div", {
435
+ /* @__PURE__ */ y("div", {
484
436
  className: "flex items-center gap-3",
485
- children: [/* @__PURE__ */ w(T, {
486
- onClick: () => void re(),
487
- disabled: U || $,
488
- children: [U ? /* @__PURE__ */ C(_, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(b, { className: "h-4 w-4" }), U ? s("healthybowl.weather.settings.actions.saving", "Saving…") : s("healthybowl.weather.settings.actions.save", "Save changes")]
489
- }), /* @__PURE__ */ C(T, {
437
+ children: [/* @__PURE__ */ y(b, {
438
+ onClick: () => void J(),
439
+ disabled: B,
440
+ children: [B ? /* @__PURE__ */ v(p, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ v(g, { className: "h-4 w-4" }), B ? A("healthybowl.weather.settings.actions.saving", "Saving…") : A("healthybowl.weather.settings.actions.save", "Save changes")]
441
+ }), /* @__PURE__ */ v(b, {
490
442
  variant: "ghost",
491
443
  onClick: () => {
492
- F && H(A(F));
444
+ M && z(E(M));
493
445
  },
494
- disabled: U,
495
- children: s("healthybowl.weather.settings.actions.cancel", "Cancel")
446
+ disabled: B,
447
+ children: A("healthybowl.weather.settings.actions.cancel", "Cancel")
496
448
  })]
497
449
  })
498
450
  ]
@@ -500,6 +452,6 @@ var E = "h-9 w-full rounded-md border border-border-subtle bg-bg-surface px-3 te
500
452
  });
501
453
  };
502
454
  //#endregion
503
- export { P as WeatherSettingsPage };
455
+ export { A as WeatherSettingsPage };
504
456
 
505
457
  //# sourceMappingURL=WeatherSettingsPage.js.map