@burdenoff/microfe-healthybowl 2026.1005.2 → 2026.1007.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/healthybowl/components/BedLayoutGrid.js +128 -115
  2. package/dist/healthybowl/components/BedLayoutGrid.js.map +1 -1
  3. package/dist/healthybowl/components/CropPicker.js +37 -0
  4. package/dist/healthybowl/components/CropPicker.js.map +1 -0
  5. package/dist/healthybowl/components/DataTable.js +125 -108
  6. package/dist/healthybowl/components/DataTable.js.map +1 -1
  7. package/dist/healthybowl/components/FilterBar.js +9 -6
  8. package/dist/healthybowl/components/FilterBar.js.map +1 -1
  9. package/dist/healthybowl/components/PlantCatalogPicker.js +32 -0
  10. package/dist/healthybowl/components/PlantCatalogPicker.js.map +1 -0
  11. package/dist/healthybowl/components/WorkspaceRecordPicker.js +164 -0
  12. package/dist/healthybowl/components/WorkspaceRecordPicker.js.map +1 -0
  13. package/dist/healthybowl/components/index.js +3 -1
  14. package/dist/healthybowl/hooks/useCropPage.js +71 -0
  15. package/dist/healthybowl/hooks/useCropPage.js.map +1 -0
  16. package/dist/healthybowl/hooks/usePlantCatalog.js +133 -44
  17. package/dist/healthybowl/hooks/usePlantCatalog.js.map +1 -1
  18. package/dist/healthybowl/hooks/usePlantingEstimate.js +6 -6
  19. package/dist/healthybowl/hooks/usePlantingEstimate.js.map +1 -1
  20. package/dist/healthybowl/hooks/useWorkspaceRead.js +46 -0
  21. package/dist/healthybowl/hooks/useWorkspaceRead.js.map +1 -0
  22. package/dist/healthybowl/pages/HomePage.js +143 -142
  23. package/dist/healthybowl/pages/HomePage.js.map +1 -1
  24. package/dist/healthybowl/pages/analytics/ReportsPage.js +8 -8
  25. package/dist/healthybowl/pages/catalog/PlantCatalogPage.js +266 -192
  26. package/dist/healthybowl/pages/catalog/PlantCatalogPage.js.map +1 -1
  27. package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js +58 -0
  28. package/dist/healthybowl/pages/catalog/WorkspaceBrowseFilters.js.map +1 -0
  29. package/dist/healthybowl/pages/catalog/browsePagination.js +24 -0
  30. package/dist/healthybowl/pages/catalog/browsePagination.js.map +1 -0
  31. package/dist/healthybowl/pages/compliance/ComplianceDocumentsPage.js +6 -6
  32. package/dist/healthybowl/pages/crops/CropDetailsPage.js +340 -348
  33. package/dist/healthybowl/pages/crops/CropDetailsPage.js.map +1 -1
  34. package/dist/healthybowl/pages/crops/CropPlanningPage.js +468 -434
  35. package/dist/healthybowl/pages/crops/CropPlanningPage.js.map +1 -1
  36. package/dist/healthybowl/pages/crops/CropsPage.js +633 -542
  37. package/dist/healthybowl/pages/crops/CropsPage.js.map +1 -1
  38. package/dist/healthybowl/pages/crops/FieldDetailsPage.js +875 -800
  39. package/dist/healthybowl/pages/crops/FieldDetailsPage.js.map +1 -1
  40. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js +459 -448
  41. package/dist/healthybowl/pages/crops/PlanningDetailsPage.js.map +1 -1
  42. package/dist/healthybowl/pages/crops/SuccessionCropLabel.js +21 -0
  43. package/dist/healthybowl/pages/crops/SuccessionCropLabel.js.map +1 -0
  44. package/dist/healthybowl/pages/crops/planningEdit.js +30 -0
  45. package/dist/healthybowl/pages/crops/planningEdit.js.map +1 -0
  46. package/dist/healthybowl/pages/fields/FieldMapPage.js +989 -941
  47. package/dist/healthybowl/pages/fields/FieldMapPage.js.map +1 -1
  48. package/dist/healthybowl/pages/financial/GeneralLedgerPage.js +6 -6
  49. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js +7 -7
  50. package/dist/healthybowl/pages/financial/InvoiceManagementPage.js.map +1 -1
  51. package/dist/healthybowl/pages/financial/TransactionsPage.js +541 -541
  52. package/dist/healthybowl/pages/financial/TransactionsPage.js.map +1 -1
  53. package/dist/healthybowl/pages/government-schemes/ApplicationTrackingPage.js +10 -10
  54. package/dist/healthybowl/pages/government-schemes/CommunicationPage.js +207 -207
  55. package/dist/healthybowl/pages/government-schemes/CommunicationPage.js.map +1 -1
  56. package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js +38 -38
  57. package/dist/healthybowl/pages/government-schemes/SchemeAdminPage.js.map +1 -1
  58. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js +15 -15
  59. package/dist/healthybowl/pages/government-schemes/TrainingProgramsPage.js.map +1 -1
  60. package/dist/healthybowl/pages/livestock/AnimalRegistryPage.js +4 -4
  61. package/dist/healthybowl/pages/livestock/BreedingManagementPage.js +4 -4
  62. package/dist/healthybowl/pages/livestock/FeedManagementPage.js +4 -4
  63. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js +16 -16
  64. package/dist/healthybowl/pages/livestock/HealthRecordsPage.js.map +1 -1
  65. package/dist/healthybowl/pages/livestock/ProductionTrackingPage.js +4 -4
  66. package/dist/healthybowl/pages/livestock/VaccinationSchedulePage.js +4 -4
  67. package/dist/healthybowl/pages/market/MarketPricesPage.js +305 -305
  68. package/dist/healthybowl/pages/market/MarketPricesPage.js.map +1 -1
  69. package/dist/healthybowl/pages/network/CohortsPage.js +107 -107
  70. package/dist/healthybowl/pages/network/CohortsPage.js.map +1 -1
  71. package/dist/healthybowl/pages/network/CommunityPage.js +247 -247
  72. package/dist/healthybowl/pages/network/CommunityPage.js.map +1 -1
  73. package/dist/healthybowl/pages/network/EventsPage.js +16 -16
  74. package/dist/healthybowl/pages/network/EventsPage.js.map +1 -1
  75. package/dist/healthybowl/pages/network/ExpertsPage.js +470 -470
  76. package/dist/healthybowl/pages/network/ExpertsPage.js.map +1 -1
  77. package/dist/healthybowl/pages/network/MentorsPage.js +6 -6
  78. package/dist/healthybowl/pages/pest-management/PestIssuesPage.js +8 -8
  79. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js +7 -7
  80. package/dist/healthybowl/pages/pest-management/TreatmentLibraryPage.js.map +1 -1
  81. package/dist/healthybowl/pages/production/ProductionBatchesPage.js +7 -7
  82. package/dist/healthybowl/pages/production/RecipeManagementPage.js +5 -5
  83. package/dist/healthybowl/pages/production/ValueAddedProductsPage.js +7 -7
  84. package/dist/healthybowl/pages/soil/SoilTestsPage.js +6 -6
  85. package/dist/healthybowl/pages/soil/SoilTestsPage.js.map +1 -1
  86. package/dist/healthybowl/pages/suppliers/SuppliersPage.js +10 -10
  87. package/dist/healthybowl/pages/sustainability/CarbonCreditLedgerPage.js +6 -6
  88. package/dist/healthybowl/pages/terrace/PlantingFormModal.js +151 -131
  89. package/dist/healthybowl/pages/terrace/PlantingFormModal.js.map +1 -1
  90. package/dist/healthybowl/pages/traceability/BatchTrackingPage.js +6 -6
  91. package/dist/healthybowl/utils/cropComparison.js +1 -1
  92. package/dist/healthybowl/utils/cropComparison.js.map +1 -1
  93. package/dist/healthybowl/utils/cropPicker.js +35 -0
  94. package/dist/healthybowl/utils/cropPicker.js.map +1 -0
  95. package/dist/healthybowl/utils/plantingCapacity.js +2 -2
  96. package/dist/healthybowl/utils/plantingCapacity.js.map +1 -1
  97. package/dist/healthybowl/utils/quotaLabels.js +8 -0
  98. package/dist/healthybowl/utils/quotaLabels.js.map +1 -0
  99. package/dist/healthybowl/utils/seedRate.js +1 -8
  100. package/dist/healthybowl/utils/seedRate.js.map +1 -1
  101. package/package.json +1 -1
@@ -1,36 +1,38 @@
1
- import { formatDate as e } from "../../utils/helpers.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { useBasePath as n } from "../../hooks/useBasePath.js";
4
- import { StatusBadge as r } from "../../components/StatusBadge.js";
5
- import { EmptyState as ee } from "../../components/EmptyState.js";
6
- import { ErrorState as te } from "../../components/ErrorState.js";
7
- import { ToastContainer as ne } from "../../components/Toast.js";
8
- import { useConfirm as re } from "../../components/ConfirmDialog.js";
9
- import { Breadcrumbs as ie } from "../../components/Breadcrumbs.js";
10
- import { PageLoader as i } from "../../components/PageLoader.js";
11
- import { Modal as a } from "../../components/Modal.js";
12
- import { HBEntityTags as o } from "../../components/HBEntityTags.js";
1
+ import { useHealthyBowl as e } from "../../context/HealthyBowlContext.js";
2
+ import { formatDate as t } from "../../utils/helpers.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { useBasePath as r } from "../../hooks/useBasePath.js";
5
+ import { useCropDetail as ee } from "../../hooks/useCropPage.js";
6
+ import { StatusBadge as i } from "../../components/StatusBadge.js";
7
+ import { EmptyState as te } from "../../components/EmptyState.js";
8
+ import { ErrorState as ne } from "../../components/ErrorState.js";
9
+ import { ToastContainer as re } from "../../components/Toast.js";
10
+ import { useConfirm as ie } from "../../components/ConfirmDialog.js";
11
+ import { Breadcrumbs as ae } from "../../components/Breadcrumbs.js";
12
+ import { PageLoader as a } from "../../components/PageLoader.js";
13
+ import { Modal as o } from "../../components/Modal.js";
14
+ import { HBEntityTags as oe } from "../../components/HBEntityTags.js";
13
15
  import { HBEntityImages as s } from "../../components/HBEntityImages.js";
14
- import { useToast as ae } from "../../hooks/useToast.js";
15
- import { CreateFarmTaskButton as c } from "../../components/CreateFarmTaskButton.js";
16
+ import { useToast as se } from "../../hooks/useToast.js";
17
+ import { CreateFarmTaskButton as ce } from "../../components/CreateFarmTaskButton.js";
16
18
  import "../../components/index.js";
17
- import { useHealthyBowlData as oe } from "../../hooks/useHealthyBowlData.js";
18
- import { isNative as se, nativeNotify as ce, nativeToast as le } from "../../../utils/nativeBridge.js";
19
- import { useEffect as ue, useState as l } from "react";
20
- import { useI18n as de } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { AlertTriangle as fe, ArrowLeft as pe, Calendar as u, Droplets as me, Edit as he, Leaf as ge, MapPin as d, ScanSearch as _e, Sprout as f, Sun as ve, Trash2 as ye, TrendingUp as p } from "lucide-react";
22
- import { useNavigate as be, useParams as xe } from "react-router";
23
- import { Fragment as Se, jsx as m, jsxs as h } from "react/jsx-runtime";
24
- import { Button as g, GlassCard as Ce, Select as we, SelectContent as Te, SelectItem as _, SelectTrigger as Ee, SelectValue as De } from "@burdenoff/fe-libs/ui";
19
+ import { useHealthyBowlData as le } from "../../hooks/useHealthyBowlData.js";
20
+ import { isNative as ue, nativeNotify as de, nativeToast as fe } from "../../../utils/nativeBridge.js";
21
+ import { useState as c } from "react";
22
+ import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { AlertTriangle as me, ArrowLeft as he, Calendar as l, Droplets as ge, Edit as _e, Leaf as ve, MapPin as u, ScanSearch as d, Sprout as f, Sun as ye, Trash2 as be, TrendingUp as p } from "lucide-react";
24
+ import { useNavigate as xe, useParams as m } from "react-router";
25
+ import { Fragment as Se, jsx as h, jsxs as g } from "react/jsx-runtime";
26
+ import { Button as _, GlassCard as Ce, Select as we, SelectContent as Te, SelectItem as v, SelectTrigger as Ee, SelectValue as De } from "@burdenoff/fe-libs/ui";
25
27
  //#region src/healthybowl/pages/crops/CropDetailsPage.tsx
26
- var v = (e) => {
28
+ var y = (e) => {
27
29
  switch (e) {
28
30
  case "excellent": return "success";
29
31
  case "good": return "info";
30
32
  case "fair": return "warning";
31
33
  default: return "error";
32
34
  }
33
- }, y = (e) => {
35
+ }, Oe = (e) => {
34
36
  switch (e) {
35
37
  case "harvest_ready": return "success";
36
38
  case "growing":
@@ -45,106 +47,110 @@ var v = (e) => {
45
47
  "Fruiting",
46
48
  "Mature"
47
49
  ], x = () => {
48
- let { t: x } = de(), S = re(), { crops: C, fields: w, errors: T, loadings: E, updateCrop: Oe, deleteCrop: ke, refetch: Ae } = oe(), je = {
49
- Seedling: x("healthybowl.crops.detail.stages.seedling", "Seedling"),
50
- Vegetative: x("healthybowl.crops.detail.stages.vegetative", "Vegetative"),
51
- Flowering: x("healthybowl.crops.detail.stages.flowering", "Flowering"),
52
- Fruiting: x("healthybowl.crops.detail.stages.fruiting", "Fruiting"),
53
- Mature: x("healthybowl.crops.detail.stages.mature", "Mature")
54
- }, { cropId: D } = xe(), O = be(), { buildPath: k } = n(), { toasts: Me, toast: A, dismiss: Ne } = ae(), [Pe, j] = l(!1), [M, N] = l(!1), [P, Fe] = l(() => C.find((e) => e.id === D));
55
- ue(() => {
56
- let e = C.find((e) => e.id === D);
57
- e && Fe(e);
58
- }, [C, D]);
59
- let [F, I] = l(""), [L, R] = l(""), [z, B] = l(""), [V, H] = l(""), [U, W] = l(""), [G, K] = l("good"), [q, J] = l([]), Y = () => {
60
- P && (I(P.name), R(P.variety), B(P.category), H(String(P.yieldEstimate)), W(P.expectedHarvestDate), K(P.healthStatus), J(P.imageIds ?? []), j(!0));
50
+ let { workspaceId: t } = e(), { cropId: r } = m();
51
+ return t ? /* @__PURE__ */ h(S, {}, `${t}:${r ?? ""}`) : /* @__PURE__ */ h(n, {
52
+ title: "Crop details",
53
+ children: /* @__PURE__ */ h("p", {
54
+ className: "text-sm text-text-secondary",
55
+ children: "Choose a workspace to view its crop records."
56
+ })
57
+ });
58
+ }, S = () => {
59
+ let { t: e } = pe(), x = ie(), { fields: S, updateCrop: C, deleteCrop: w } = le(), T = {
60
+ Seedling: e("healthybowl.crops.detail.stages.seedling", "Seedling"),
61
+ Vegetative: e("healthybowl.crops.detail.stages.vegetative", "Vegetative"),
62
+ Flowering: e("healthybowl.crops.detail.stages.flowering", "Flowering"),
63
+ Fruiting: e("healthybowl.crops.detail.stages.fruiting", "Fruiting"),
64
+ Mature: e("healthybowl.crops.detail.stages.mature", "Mature")
65
+ }, { cropId: ke } = m(), E = xe(), { buildPath: D } = r(), { toasts: Ae, toast: O, dismiss: k } = se(), [je, A] = c(!1), [j, M] = c(!1), { crop: N, loading: Me, error: Ne, refetch: P } = ee(ke), [F, I] = c(""), [L, R] = c(""), [z, B] = c(""), [V, H] = c(""), [U, W] = c(""), [G, K] = c("good"), [q, J] = c([]), Y = () => {
66
+ N && (I(N.name), R(N.variety), B(N.category), H(String(N.yieldEstimate)), W(N.expectedHarvestDate), K(N.healthStatus), J(N.imageIds ?? []), A(!0));
61
67
  };
62
- if (!P) return /* @__PURE__ */ m(t, {
63
- title: x("healthybowl.crops.detail.notFound.pageTitle", "Crop Not Found"),
64
- children: E.crops ? /* @__PURE__ */ m(i, {}) : T.crops ? /* @__PURE__ */ m(te, { onRetry: Ae }) : /* @__PURE__ */ m(ee, {
65
- title: x("healthybowl.crops.detail.notFound.title", "Crop not found"),
66
- description: x("healthybowl.crops.detail.notFound.description", "The crop you are looking for does not exist."),
67
- action: /* @__PURE__ */ m(g, {
68
- onClick: () => O(k("crops")),
69
- children: x("healthybowl.crops.detail.actions.backToCrops", "Back to Crops")
68
+ if (!N) return /* @__PURE__ */ h(n, {
69
+ title: e("healthybowl.crops.detail.notFound.pageTitle", "Crop Not Found"),
70
+ children: Me ? /* @__PURE__ */ h(a, {}) : Ne ? /* @__PURE__ */ h(ne, { onRetry: () => void P().catch(() => void 0) }) : /* @__PURE__ */ h(te, {
71
+ title: e("healthybowl.crops.detail.notFound.title", "Crop not found"),
72
+ description: e("healthybowl.crops.detail.notFound.description", "The crop you are looking for does not exist."),
73
+ action: /* @__PURE__ */ h(_, {
74
+ onClick: () => E(D("crops")),
75
+ children: e("healthybowl.crops.detail.actions.backToCrops", "Back to Crops")
70
76
  })
71
77
  })
72
78
  });
73
- let X = w.find((e) => e.id === P.field || e.name === P.fieldName), Z = (() => {
74
- let e = new URLSearchParams({ cropId: P.id });
75
- return X?.id && e.set("fieldId", X.id), `${k("pest-management/ai-detection")}?${e.toString()}`;
76
- })(), Q = b.indexOf(P.growthStage), $ = P.daysToHarvest, Ie = X ? Math.round(P.yieldEstimate / X.area) : P.yieldEstimate;
77
- return P ? /* @__PURE__ */ h(t, {
78
- title: P.name,
79
- description: x("healthybowl.crops.detail.headerSubtitle", "{{variety}} - {{category}}", {
80
- variety: P.variety,
81
- category: P.category
79
+ let X = S.find((e) => e.id === N.field || e.name === N.fieldName), Z = (() => {
80
+ let e = new URLSearchParams({ cropId: N.id });
81
+ return X?.id && e.set("fieldId", X.id), `${D("pest-management/ai-detection")}?${e.toString()}`;
82
+ })(), Q = b.indexOf(N.growthStage), $ = N.daysToHarvest, Pe = X ? Math.round(N.yieldEstimate / X.area) : N.yieldEstimate;
83
+ return /* @__PURE__ */ g(n, {
84
+ title: N.name,
85
+ description: e("healthybowl.crops.detail.headerSubtitle", "{{variety}} - {{category}}", {
86
+ variety: N.variety,
87
+ category: N.category
82
88
  }),
83
- actions: /* @__PURE__ */ h("div", {
89
+ actions: /* @__PURE__ */ g("div", {
84
90
  className: "flex items-center gap-2",
85
91
  children: [
86
- /* @__PURE__ */ m(c, {
92
+ /* @__PURE__ */ h(ce, {
87
93
  entityType: "CROP",
88
- entityId: P.id,
89
- entityLabel: P.name
94
+ entityId: N.id,
95
+ entityLabel: N.name
90
96
  }),
91
- /* @__PURE__ */ h(g, {
97
+ /* @__PURE__ */ g(_, {
92
98
  variant: "outline",
93
- onClick: () => O(Z),
99
+ onClick: () => E(Z),
94
100
  children: [
95
- /* @__PURE__ */ m(_e, { className: "h-4 w-4" }),
101
+ /* @__PURE__ */ h(d, { className: "h-4 w-4" }),
96
102
  " ",
97
- x("healthybowl.crops.detail.actions.diagnose", "Diagnose")
103
+ e("healthybowl.crops.detail.actions.diagnose", "Diagnose")
98
104
  ]
99
105
  }),
100
- /* @__PURE__ */ h(g, {
106
+ /* @__PURE__ */ g(_, {
101
107
  variant: "outline",
102
108
  onClick: Y,
103
109
  children: [
104
- /* @__PURE__ */ m(he, { className: "h-4 w-4" }),
110
+ /* @__PURE__ */ h(_e, { className: "h-4 w-4" }),
105
111
  " ",
106
- x("healthybowl.common.edit", "Edit")
112
+ e("healthybowl.common.edit", "Edit")
107
113
  ]
108
114
  }),
109
- /* @__PURE__ */ h(g, {
115
+ /* @__PURE__ */ g(_, {
110
116
  variant: "destructive",
111
117
  onClick: async () => {
112
- if (P && await S({
113
- title: x("healthybowl.crops.detail.delete.confirmTitle", "Delete crop?"),
114
- message: x("healthybowl.crops.detail.delete.confirmMessage", "{{name}} will be permanently removed.", { name: P.name }),
115
- okButtonTitle: x("healthybowl.common.delete", "Delete"),
116
- cancelButtonTitle: x("healthybowl.common.cancel", "Cancel")
118
+ if (N && await x({
119
+ title: e("healthybowl.crops.detail.delete.confirmTitle", "Delete crop?"),
120
+ message: e("healthybowl.crops.detail.delete.confirmMessage", "{{name}} will be permanently removed.", { name: N.name }),
121
+ okButtonTitle: e("healthybowl.common.delete", "Delete"),
122
+ cancelButtonTitle: e("healthybowl.common.cancel", "Cancel")
117
123
  }) !== !1) {
118
- N(!0);
124
+ M(!0);
119
125
  try {
120
- await ke(P.id), A({
121
- title: x("healthybowl.crops.detail.toast.deleted.title", "Crop deleted"),
122
- description: x("healthybowl.crops.detail.toast.deleted.description", "{{name}} has been removed.", { name: P.name }),
126
+ await w(N.id), O({
127
+ title: e("healthybowl.crops.detail.toast.deleted.title", "Crop deleted"),
128
+ description: e("healthybowl.crops.detail.toast.deleted.description", "{{name}} has been removed.", { name: N.name }),
123
129
  variant: "success"
124
- }), se() && (le(x("healthybowl.crops.detail.toast.deleted.title", "Crop deleted")), ce("success")), O(k("crops"));
125
- } catch (e) {
126
- A({
127
- title: x("healthybowl.crops.detail.toast.deleteFailed.title", "Delete failed"),
128
- description: String(e),
130
+ }), ue() && (fe(e("healthybowl.crops.detail.toast.deleted.title", "Crop deleted")), de("success")), E(D("crops"));
131
+ } catch (t) {
132
+ O({
133
+ title: e("healthybowl.crops.detail.toast.deleteFailed.title", "Delete failed"),
134
+ description: String(t),
129
135
  variant: "error"
130
- }), N(!1);
136
+ }), M(!1);
131
137
  }
132
138
  }
133
139
  },
134
- disabled: M,
140
+ disabled: j,
135
141
  children: [
136
- /* @__PURE__ */ m(ye, { className: "h-4 w-4" }),
142
+ /* @__PURE__ */ h(be, { className: "h-4 w-4" }),
137
143
  " ",
138
- x("healthybowl.common.delete", "Delete")
144
+ e("healthybowl.common.delete", "Delete")
139
145
  ]
140
146
  }),
141
- /* @__PURE__ */ h(g, {
147
+ /* @__PURE__ */ g(_, {
142
148
  variant: "outline",
143
- onClick: () => O(k("crops")),
149
+ onClick: () => E(D("crops")),
144
150
  children: [
145
- /* @__PURE__ */ m(pe, { className: "h-4 w-4" }),
151
+ /* @__PURE__ */ h(he, { className: "h-4 w-4" }),
146
152
  " ",
147
- x("healthybowl.common.back", "Back")
153
+ e("healthybowl.common.back", "Back")
148
154
  ]
149
155
  })
150
156
  ]
@@ -153,149 +159,149 @@ var v = (e) => {
153
159
  nextSteps: [
154
160
  {
155
161
  id: "diagnose",
156
- label: x("healthybowl.crops.detail.nextSteps.diagnose.label", "Diagnose this crop"),
157
- description: x("healthybowl.crops.detail.nextSteps.diagnose.desc", "Upload a plant photo and check for pest or disease symptoms."),
162
+ label: e("healthybowl.crops.detail.nextSteps.diagnose.label", "Diagnose this crop"),
163
+ description: e("healthybowl.crops.detail.nextSteps.diagnose.desc", "Upload a plant photo and check for pest or disease symptoms."),
158
164
  href: Z
159
165
  },
160
166
  {
161
167
  id: "edit",
162
- label: x("healthybowl.crops.detail.nextSteps.edit.label", "Update this crop"),
163
- description: x("healthybowl.crops.detail.nextSteps.edit.desc", "Keep its status, health and details accurate as it grows."),
168
+ label: e("healthybowl.crops.detail.nextSteps.edit.label", "Update this crop"),
169
+ description: e("healthybowl.crops.detail.nextSteps.edit.desc", "Keep its status, health and details accurate as it grows."),
164
170
  onClick: Y
165
171
  },
166
172
  {
167
173
  id: "fields",
168
- label: x("healthybowl.crops.detail.nextSteps.fields.label", "Check the field it grows in"),
169
- description: x("healthybowl.crops.detail.nextSteps.fields.desc", "Review soil, irrigation and conditions for this crop’s field."),
170
- href: k("crops/fields")
174
+ label: e("healthybowl.crops.detail.nextSteps.fields.label", "Check the field it grows in"),
175
+ description: e("healthybowl.crops.detail.nextSteps.fields.desc", "Review soil, irrigation and conditions for this crop’s field."),
176
+ href: D("crops/fields")
171
177
  },
172
178
  {
173
179
  id: "harvest",
174
- label: x("healthybowl.crops.detail.nextSteps.harvest.label", "Record a harvest"),
175
- description: x("healthybowl.crops.detail.nextSteps.harvest.desc", "Log yield and quality once this crop is ready to pick."),
176
- href: k("crops/harvest")
180
+ label: e("healthybowl.crops.detail.nextSteps.harvest.label", "Record a harvest"),
181
+ description: e("healthybowl.crops.detail.nextSteps.harvest.desc", "Log yield and quality once this crop is ready to pick."),
182
+ href: D("crops/harvest")
177
183
  }
178
184
  ],
179
185
  nextStepsKey: "healthybowl-crop-detail",
180
186
  children: [
181
- /* @__PURE__ */ m(ie, { items: [{
182
- label: x("healthybowl.crops.detail.breadcrumb.crops", "Crops"),
183
- href: k("crops")
184
- }, { label: P.name }] }),
185
- /* @__PURE__ */ h("div", {
187
+ /* @__PURE__ */ h(ae, { items: [{
188
+ label: e("healthybowl.crops.detail.breadcrumb.crops", "Crops"),
189
+ href: D("crops")
190
+ }, { label: N.name }] }),
191
+ /* @__PURE__ */ g("div", {
186
192
  className: "flex flex-wrap items-center gap-3",
187
193
  children: [
188
- /* @__PURE__ */ m(r, {
189
- label: (P.status ?? "unknown").replace("_", " "),
190
- variant: y(P.status ?? "unknown"),
194
+ /* @__PURE__ */ h(i, {
195
+ label: (N.status ?? "unknown").replace("_", " "),
196
+ variant: Oe(N.status ?? "unknown"),
191
197
  dot: !0
192
198
  }),
193
- /* @__PURE__ */ m(r, {
194
- label: P.healthStatus,
195
- variant: v(P.healthStatus),
199
+ /* @__PURE__ */ h(i, {
200
+ label: N.healthStatus,
201
+ variant: y(N.healthStatus),
196
202
  dot: !0
197
203
  }),
198
- P.organicCertified && /* @__PURE__ */ m(r, {
199
- label: x("healthybowl.crops.detail.badge.organicCertified", "Organic Certified"),
204
+ N.organicCertified && /* @__PURE__ */ h(i, {
205
+ label: e("healthybowl.crops.detail.badge.organicCertified", "Organic Certified"),
200
206
  variant: "success"
201
207
  }),
202
- /* @__PURE__ */ m(r, {
203
- label: P.season,
208
+ /* @__PURE__ */ h(i, {
209
+ label: N.season,
204
210
  variant: "muted"
205
211
  })
206
212
  ]
207
213
  }),
208
- /* @__PURE__ */ m(o, {
214
+ /* @__PURE__ */ h(oe, {
209
215
  entityType: "CROP",
210
- entityId: P.id,
211
- tags: P.entityTags ?? [],
216
+ entityId: N.id,
217
+ tags: N.entityTags ?? [],
212
218
  className: "mt-1"
213
219
  }),
214
- (P.imageIds ?? []).length > 0 && /* @__PURE__ */ m(s, {
220
+ (N.imageIds ?? []).length > 0 && /* @__PURE__ */ h(s, {
215
221
  entity: "Crop",
216
- imageIds: P.imageIds ?? [],
222
+ imageIds: N.imageIds ?? [],
217
223
  onChange: () => {},
218
224
  readOnly: !0,
219
225
  className: "mt-1"
220
226
  }),
221
- /* @__PURE__ */ h("div", {
227
+ /* @__PURE__ */ g("div", {
222
228
  className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
223
- children: [/* @__PURE__ */ h("div", {
229
+ children: [/* @__PURE__ */ g("div", {
224
230
  className: "space-y-6 lg:col-span-2",
225
231
  children: [
226
- /* @__PURE__ */ h(Ce, {
232
+ /* @__PURE__ */ g(Ce, {
227
233
  treatment: "glass",
228
234
  glow: !0,
229
235
  className: "border-border-seam p-6",
230
- children: [/* @__PURE__ */ h("h3", {
236
+ children: [/* @__PURE__ */ g("h3", {
231
237
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
232
238
  children: [
233
- /* @__PURE__ */ m(ve, { className: "h-4 w-4 text-warning" }),
239
+ /* @__PURE__ */ h(ye, { className: "h-4 w-4 text-warning" }),
234
240
  " ",
235
- x("healthybowl.crops.detail.overview.title", "Crop Overview")
241
+ e("healthybowl.crops.detail.overview.title", "Crop Overview")
236
242
  ]
237
- }), /* @__PURE__ */ m("div", {
243
+ }), /* @__PURE__ */ h("div", {
238
244
  className: "grid grid-cols-2 gap-4 md:grid-cols-4",
239
245
  children: [
240
246
  {
241
247
  key: "category",
242
248
  icon: f,
243
- label: x("healthybowl.crops.detail.overview.category", "Category"),
244
- value: P.category
249
+ label: e("healthybowl.crops.detail.overview.category", "Category"),
250
+ value: N.category
245
251
  },
246
252
  {
247
253
  key: "season",
248
- icon: u,
249
- label: x("healthybowl.crops.detail.overview.season", "Season"),
250
- value: P.season
254
+ icon: l,
255
+ label: e("healthybowl.crops.detail.overview.season", "Season"),
256
+ value: N.season
251
257
  },
252
258
  {
253
259
  key: "growthStage",
254
- icon: ge,
255
- label: x("healthybowl.crops.detail.overview.growthStage", "Growth Stage"),
256
- value: P.growthStage
260
+ icon: ve,
261
+ label: e("healthybowl.crops.detail.overview.growthStage", "Growth Stage"),
262
+ value: N.growthStage
257
263
  },
258
264
  {
259
265
  key: "field",
260
- icon: d,
261
- label: x("healthybowl.crops.detail.overview.field", "Field"),
262
- value: P.fieldName
266
+ icon: u,
267
+ label: e("healthybowl.crops.detail.overview.field", "Field"),
268
+ value: N.fieldName
263
269
  }
264
- ].map(({ key: e, icon: t, label: n, value: r }) => /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ h("div", {
270
+ ].map(({ key: e, icon: t, label: n, value: r }) => /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("div", {
265
271
  className: "flex items-center gap-1 text-text-secondary",
266
- children: [/* @__PURE__ */ m(t, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ m("span", {
272
+ children: [/* @__PURE__ */ h(t, { className: "h-3.5 w-3.5" }), /* @__PURE__ */ h("span", {
267
273
  className: "text-xs",
268
274
  children: n
269
275
  })]
270
- }), /* @__PURE__ */ m("p", {
276
+ }), /* @__PURE__ */ h("p", {
271
277
  className: "mt-1 text-sm font-semibold capitalize text-text-primary",
272
278
  children: r
273
279
  })] }, e))
274
280
  })]
275
281
  }),
276
- X && /* @__PURE__ */ h("div", {
282
+ X && /* @__PURE__ */ g("div", {
277
283
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
278
- children: [/* @__PURE__ */ h("h3", {
284
+ children: [/* @__PURE__ */ g("h3", {
279
285
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
280
286
  children: [
281
- /* @__PURE__ */ m(d, { className: "h-4 w-4 text-success" }),
287
+ /* @__PURE__ */ h(u, { className: "h-4 w-4 text-success" }),
282
288
  " ",
283
- x("healthybowl.crops.detail.fieldDetails.title", "Field Details")
289
+ e("healthybowl.crops.detail.fieldDetails.title", "Field Details")
284
290
  ]
285
- }), /* @__PURE__ */ h("div", {
291
+ }), /* @__PURE__ */ g("div", {
286
292
  className: "grid grid-cols-2 gap-4 md:grid-cols-4",
287
293
  children: [
288
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
294
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("span", {
289
295
  className: "text-xs text-text-secondary",
290
- children: x("healthybowl.crops.detail.fieldDetails.field", "Field")
291
- }), /* @__PURE__ */ m("p", {
296
+ children: e("healthybowl.crops.detail.fieldDetails.field", "Field")
297
+ }), /* @__PURE__ */ h("p", {
292
298
  className: "text-sm font-semibold text-text-primary",
293
299
  children: X.name
294
300
  })] }),
295
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
301
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("span", {
296
302
  className: "text-xs text-text-secondary",
297
- children: x("healthybowl.crops.detail.fieldDetails.area", "Area")
298
- }), /* @__PURE__ */ h("p", {
303
+ children: e("healthybowl.crops.detail.fieldDetails.area", "Area")
304
+ }), /* @__PURE__ */ g("p", {
299
305
  className: "text-sm font-semibold text-text-primary",
300
306
  children: [
301
307
  X.area,
@@ -303,120 +309,120 @@ var v = (e) => {
303
309
  X.unit
304
310
  ]
305
311
  })] }),
306
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
312
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("span", {
307
313
  className: "text-xs text-text-secondary",
308
- children: x("healthybowl.crops.detail.fieldDetails.soilType", "Soil Type")
309
- }), /* @__PURE__ */ m("p", {
314
+ children: e("healthybowl.crops.detail.fieldDetails.soilType", "Soil Type")
315
+ }), /* @__PURE__ */ h("p", {
310
316
  className: "text-sm font-semibold text-text-primary",
311
317
  children: X.soilType
312
318
  })] }),
313
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
319
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("span", {
314
320
  className: "text-xs text-text-secondary",
315
- children: x("healthybowl.crops.detail.fieldDetails.irrigation", "Irrigation")
316
- }), /* @__PURE__ */ m("p", {
321
+ children: e("healthybowl.crops.detail.fieldDetails.irrigation", "Irrigation")
322
+ }), /* @__PURE__ */ h("p", {
317
323
  className: "text-sm font-semibold text-text-primary",
318
324
  children: X.irrigationType
319
325
  })] })
320
326
  ]
321
327
  })]
322
328
  }),
323
- /* @__PURE__ */ h("div", {
329
+ /* @__PURE__ */ g("div", {
324
330
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
325
331
  children: [
326
- /* @__PURE__ */ h("h3", {
332
+ /* @__PURE__ */ g("h3", {
327
333
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
328
334
  children: [
329
- /* @__PURE__ */ m(u, { className: "h-4 w-4 text-info" }),
335
+ /* @__PURE__ */ h(l, { className: "h-4 w-4 text-info" }),
330
336
  " ",
331
- x("healthybowl.crops.detail.timeline.title", "Timeline")
337
+ e("healthybowl.crops.detail.timeline.title", "Timeline")
332
338
  ]
333
339
  }),
334
- /* @__PURE__ */ h("div", {
340
+ /* @__PURE__ */ g("div", {
335
341
  className: "grid grid-cols-1 gap-4 md:grid-cols-2",
336
- children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
342
+ children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("span", {
337
343
  className: "text-xs text-text-secondary",
338
- children: x("healthybowl.crops.detail.timeline.plantedOn", "Planted On")
339
- }), /* @__PURE__ */ m("p", {
344
+ children: e("healthybowl.crops.detail.timeline.plantedOn", "Planted On")
345
+ }), /* @__PURE__ */ h("p", {
340
346
  className: "text-sm font-semibold text-text-primary",
341
- children: e(P.plantingDate)
342
- })] }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("span", {
347
+ children: t(N.plantingDate)
348
+ })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("span", {
343
349
  className: "text-xs text-text-secondary",
344
- children: x("healthybowl.crops.detail.timeline.expectedHarvest", "Expected Harvest")
345
- }), /* @__PURE__ */ m("p", {
350
+ children: e("healthybowl.crops.detail.timeline.expectedHarvest", "Expected Harvest")
351
+ }), /* @__PURE__ */ h("p", {
346
352
  className: "text-sm font-semibold text-text-primary",
347
- children: e(P.expectedHarvestDate)
353
+ children: t(N.expectedHarvestDate)
348
354
  })] })]
349
355
  }),
350
- /* @__PURE__ */ m("div", {
356
+ /* @__PURE__ */ h("div", {
351
357
  className: "mt-4",
352
- children: $ > 0 ? /* @__PURE__ */ m("div", {
358
+ children: $ > 0 ? /* @__PURE__ */ h("div", {
353
359
  className: "rounded-lg bg-info/10 p-3",
354
- children: /* @__PURE__ */ h("p", {
360
+ children: /* @__PURE__ */ g("p", {
355
361
  className: "text-sm text-info",
356
362
  children: [
357
- /* @__PURE__ */ m("span", {
363
+ /* @__PURE__ */ h("span", {
358
364
  className: "font-bold",
359
- children: x("healthybowl.crops.detail.timeline.daysCount", "{{count}} days", { count: $ })
365
+ children: e("healthybowl.crops.detail.timeline.daysCount", "{{count}} days", { count: $ })
360
366
  }),
361
367
  " ",
362
- x("healthybowl.crops.detail.timeline.untilHarvest", "until expected harvest")
368
+ e("healthybowl.crops.detail.timeline.untilHarvest", "until expected harvest")
363
369
  ]
364
370
  })
365
- }) : /* @__PURE__ */ m("div", {
371
+ }) : /* @__PURE__ */ h("div", {
366
372
  className: "rounded-lg bg-success-subtle p-3",
367
- children: /* @__PURE__ */ m("p", {
373
+ children: /* @__PURE__ */ h("p", {
368
374
  className: "text-sm font-bold text-success",
369
- children: x("healthybowl.crops.detail.timeline.readyForHarvest", "Ready for harvest!")
375
+ children: e("healthybowl.crops.detail.timeline.readyForHarvest", "Ready for harvest!")
370
376
  })
371
377
  })
372
378
  })
373
379
  ]
374
380
  }),
375
- /* @__PURE__ */ h("div", {
381
+ /* @__PURE__ */ g("div", {
376
382
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
377
383
  children: [
378
- /* @__PURE__ */ h("div", {
384
+ /* @__PURE__ */ g("div", {
379
385
  className: "flex items-center justify-between",
380
- children: [/* @__PURE__ */ m("h3", {
386
+ children: [/* @__PURE__ */ h("h3", {
381
387
  className: "text-sm font-semibold text-text-primary",
382
- children: x("healthybowl.crops.detail.growthProgress.title", "Growth Progress")
383
- }), /* @__PURE__ */ h("span", {
388
+ children: e("healthybowl.crops.detail.growthProgress.title", "Growth Progress")
389
+ }), /* @__PURE__ */ g("span", {
384
390
  className: "text-lg font-bold text-text-primary",
385
- children: [P.progress, "%"]
391
+ children: [N.progress, "%"]
386
392
  })]
387
393
  }),
388
- /* @__PURE__ */ m("div", {
394
+ /* @__PURE__ */ h("div", {
389
395
  className: "mt-3 h-4 rounded-full bg-bg-sunken",
390
- children: /* @__PURE__ */ m("div", {
396
+ children: /* @__PURE__ */ h("div", {
391
397
  className: "h-4 rounded-full bg-action-primary-bg transition-all",
392
- style: { width: `${P.progress}%` }
398
+ style: { width: `${N.progress}%` }
393
399
  })
394
400
  }),
395
- /* @__PURE__ */ h("div", {
401
+ /* @__PURE__ */ g("div", {
396
402
  className: "mt-6",
397
- children: [/* @__PURE__ */ m("h4", {
403
+ children: [/* @__PURE__ */ h("h4", {
398
404
  className: "mb-3 text-xs font-medium text-text-secondary",
399
- children: x("healthybowl.crops.detail.growthProgress.stageLabel", "Growth Stage")
400
- }), /* @__PURE__ */ m("div", {
405
+ children: e("healthybowl.crops.detail.growthProgress.stageLabel", "Growth Stage")
406
+ }), /* @__PURE__ */ h("div", {
401
407
  className: "flex items-center",
402
- children: b.map((e, t) => /* @__PURE__ */ h("div", {
408
+ children: b.map((e, t) => /* @__PURE__ */ g("div", {
403
409
  className: "flex flex-1 flex-col items-center gap-1.5",
404
- children: [/* @__PURE__ */ h("div", {
410
+ children: [/* @__PURE__ */ g("div", {
405
411
  className: "flex w-full items-center",
406
412
  children: [
407
- /* @__PURE__ */ m("div", { className: `h-0.5 flex-1 ${t === 0 ? "bg-transparent" : t <= Q ? "bg-action-primary-bg" : "bg-bg-sunken"}` }),
408
- /* @__PURE__ */ m("div", {
413
+ /* @__PURE__ */ h("div", { className: `h-0.5 flex-1 ${t === 0 ? "bg-transparent" : t <= Q ? "bg-action-primary-bg" : "bg-bg-sunken"}` }),
414
+ /* @__PURE__ */ h("div", {
409
415
  className: `h-4 w-4 shrink-0 rounded-full border-2 ${t <= Q ? "border-primary bg-action-primary-bg" : "border-muted bg-bg-surface"}`,
410
- children: t <= Q && /* @__PURE__ */ m("div", {
416
+ children: t <= Q && /* @__PURE__ */ h("div", {
411
417
  className: "flex h-full items-center justify-center",
412
- children: /* @__PURE__ */ m("div", { className: "h-1.5 w-1.5 rounded-full bg-primary-foreground" })
418
+ children: /* @__PURE__ */ h("div", { className: "h-1.5 w-1.5 rounded-full bg-primary-foreground" })
413
419
  })
414
420
  }),
415
- /* @__PURE__ */ m("div", { className: `h-0.5 flex-1 ${t === b.length - 1 ? "bg-transparent" : t < Q ? "bg-action-primary-bg" : "bg-bg-sunken"}` })
421
+ /* @__PURE__ */ h("div", { className: `h-0.5 flex-1 ${t === b.length - 1 ? "bg-transparent" : t < Q ? "bg-action-primary-bg" : "bg-bg-sunken"}` })
416
422
  ]
417
- }), /* @__PURE__ */ m("span", {
423
+ }), /* @__PURE__ */ h("span", {
418
424
  className: `text-center text-xs ${t <= Q ? "font-medium text-text-primary" : "text-text-secondary"}`,
419
- children: je[e] ?? e
425
+ children: T[e] ?? e
420
426
  })]
421
427
  }, e))
422
428
  })]
@@ -424,160 +430,160 @@ var v = (e) => {
424
430
  ]
425
431
  })
426
432
  ]
427
- }), /* @__PURE__ */ h("div", {
433
+ }), /* @__PURE__ */ g("div", {
428
434
  className: "space-y-6",
429
435
  children: [
430
- /* @__PURE__ */ h("div", {
436
+ /* @__PURE__ */ g("div", {
431
437
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
432
438
  children: [
433
- /* @__PURE__ */ m("h3", {
439
+ /* @__PURE__ */ h("h3", {
434
440
  className: "mb-4 text-sm font-semibold text-text-primary",
435
- children: x("healthybowl.crops.detail.currentStatus.title", "Current Status")
441
+ children: e("healthybowl.crops.detail.currentStatus.title", "Current Status")
436
442
  }),
437
- /* @__PURE__ */ h("div", {
443
+ /* @__PURE__ */ g("div", {
438
444
  className: "space-y-3",
439
445
  children: [
440
- /* @__PURE__ */ h("div", {
446
+ /* @__PURE__ */ g("div", {
441
447
  className: "flex items-center justify-between",
442
- children: [/* @__PURE__ */ m("span", {
448
+ children: [/* @__PURE__ */ h("span", {
443
449
  className: "text-xs text-text-secondary",
444
- children: x("healthybowl.crops.detail.currentStatus.health", "Health")
445
- }), /* @__PURE__ */ m(r, {
446
- label: P.healthStatus,
447
- variant: v(P.healthStatus)
450
+ children: e("healthybowl.crops.detail.currentStatus.health", "Health")
451
+ }), /* @__PURE__ */ h(i, {
452
+ label: N.healthStatus,
453
+ variant: y(N.healthStatus)
448
454
  })]
449
455
  }),
450
- /* @__PURE__ */ h("div", {
456
+ /* @__PURE__ */ g("div", {
451
457
  className: "flex items-center justify-between",
452
- children: [/* @__PURE__ */ m("span", {
458
+ children: [/* @__PURE__ */ h("span", {
453
459
  className: "text-xs text-text-secondary",
454
- children: x("healthybowl.crops.detail.currentStatus.healthScore", "Health Score")
455
- }), typeof P.healthScore == "number" ? /* @__PURE__ */ h("span", {
460
+ children: e("healthybowl.crops.detail.currentStatus.healthScore", "Health Score")
461
+ }), typeof N.healthScore == "number" ? /* @__PURE__ */ g("span", {
456
462
  className: "text-xs font-medium tabular-nums text-text-primary",
457
- children: [x("healthybowl.crops.detail.currentStatus.healthScoreValue", "{{score}}/100", { score: P.healthScore }), /* @__PURE__ */ h("span", {
463
+ children: [e("healthybowl.crops.detail.currentStatus.healthScoreValue", "{{score}}/100", { score: N.healthScore }), /* @__PURE__ */ g("span", {
458
464
  className: "ml-1.5 font-normal text-text-secondary",
459
- children: [P.healthScoreSource ?? "NDVI", P.healthScoreAt ? ` · ${e(P.healthScoreAt)}` : ""]
465
+ children: [N.healthScoreSource ?? "NDVI", N.healthScoreAt ? ` · ${t(N.healthScoreAt)}` : ""]
460
466
  })]
461
- }) : /* @__PURE__ */ m("span", {
467
+ }) : /* @__PURE__ */ h("span", {
462
468
  className: "text-xs text-text-secondary",
463
469
  children: "—"
464
470
  })]
465
471
  }),
466
- /* @__PURE__ */ h("div", {
472
+ /* @__PURE__ */ g("div", {
467
473
  className: "flex items-center justify-between",
468
- children: [/* @__PURE__ */ m("span", {
474
+ children: [/* @__PURE__ */ h("span", {
469
475
  className: "text-xs text-text-secondary",
470
- children: x("healthybowl.crops.detail.currentStatus.growthStage", "Growth Stage")
471
- }), /* @__PURE__ */ m("span", {
476
+ children: e("healthybowl.crops.detail.currentStatus.growthStage", "Growth Stage")
477
+ }), /* @__PURE__ */ h("span", {
472
478
  className: "text-xs font-medium text-text-primary",
473
- children: P.growthStage
479
+ children: N.growthStage
474
480
  })]
475
481
  }),
476
- /* @__PURE__ */ h("div", {
482
+ /* @__PURE__ */ g("div", {
477
483
  className: "flex items-center justify-between",
478
- children: [/* @__PURE__ */ m("span", {
484
+ children: [/* @__PURE__ */ h("span", {
479
485
  className: "text-xs text-text-secondary",
480
- children: x("healthybowl.crops.detail.currentStatus.organic", "Organic")
481
- }), /* @__PURE__ */ m("span", {
486
+ children: e("healthybowl.crops.detail.currentStatus.organic", "Organic")
487
+ }), /* @__PURE__ */ h("span", {
482
488
  className: "text-xs font-medium text-text-primary",
483
- children: P.organicCertified ? x("healthybowl.common.yes", "Yes") : x("healthybowl.common.no", "No")
489
+ children: N.organicCertified ? e("healthybowl.common.yes", "Yes") : e("healthybowl.common.no", "No")
484
490
  })]
485
491
  })
486
492
  ]
487
493
  }),
488
- P.healthStatus === "fair" && /* @__PURE__ */ m("div", {
494
+ N.healthStatus === "fair" && /* @__PURE__ */ h("div", {
489
495
  className: "mt-3 rounded-lg bg-warning/10 p-3",
490
- children: /* @__PURE__ */ h("div", {
496
+ children: /* @__PURE__ */ g("div", {
491
497
  className: "flex items-start gap-2",
492
- children: [/* @__PURE__ */ m(fe, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), /* @__PURE__ */ m("p", {
498
+ children: [/* @__PURE__ */ h(me, { className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-warning" }), /* @__PURE__ */ h("p", {
493
499
  className: "text-xs text-warning",
494
- children: x("healthybowl.crops.detail.currentStatus.attentionWarning", "This crop needs attention. Check for potential issues.")
500
+ children: e("healthybowl.crops.detail.currentStatus.attentionWarning", "This crop needs attention. Check for potential issues.")
495
501
  })]
496
502
  })
497
503
  })
498
504
  ]
499
505
  }),
500
- /* @__PURE__ */ h("div", {
506
+ /* @__PURE__ */ g("div", {
501
507
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
502
- children: [/* @__PURE__ */ h("h3", {
508
+ children: [/* @__PURE__ */ g("h3", {
503
509
  className: "mb-4 flex items-center gap-2 text-sm font-semibold text-text-primary",
504
510
  children: [
505
- /* @__PURE__ */ m(p, { className: "h-4 w-4 text-success" }),
511
+ /* @__PURE__ */ h(p, { className: "h-4 w-4 text-success" }),
506
512
  " ",
507
- x("healthybowl.crops.detail.yield.title", "Yield Estimation")
513
+ e("healthybowl.crops.detail.yield.title", "Yield Estimation")
508
514
  ]
509
- }), /* @__PURE__ */ h("div", {
515
+ }), /* @__PURE__ */ g("div", {
510
516
  className: "text-center",
511
517
  children: [
512
- /* @__PURE__ */ m("p", {
518
+ /* @__PURE__ */ h("p", {
513
519
  className: "text-3xl font-bold text-success",
514
- children: (P.yieldEstimate ?? 0).toLocaleString()
520
+ children: (N.yieldEstimate ?? 0).toLocaleString()
515
521
  }),
516
- /* @__PURE__ */ m("p", {
522
+ /* @__PURE__ */ h("p", {
517
523
  className: "text-xs text-text-secondary",
518
- children: x("healthybowl.crops.detail.yield.expected", "{{unit}} expected", { unit: P.yieldUnit ?? x("healthybowl.crops.detail.yield.unitsFallback", "units") })
524
+ children: e("healthybowl.crops.detail.yield.expected", "{{unit}} expected", { unit: N.yieldUnit ?? e("healthybowl.crops.detail.yield.unitsFallback", "units") })
519
525
  }),
520
- /* @__PURE__ */ m("p", {
526
+ /* @__PURE__ */ h("p", {
521
527
  className: "mt-1 text-xs text-text-secondary",
522
- children: P.yieldEstimateSource === "NDVI_FORECAST" ? x("healthybowl.crops.detail.yield.sourceNdvi", "NDVI forecast{{date}}", { date: P.yieldEstimateAt ? ` · ${e(P.yieldEstimateAt)}` : "" }) : x("healthybowl.crops.detail.yield.sourceFarmer", "Farmer-entered")
528
+ children: N.yieldEstimateSource === "NDVI_FORECAST" ? e("healthybowl.crops.detail.yield.sourceNdvi", "NDVI forecast{{date}}", { date: N.yieldEstimateAt ? ` · ${t(N.yieldEstimateAt)}` : "" }) : e("healthybowl.crops.detail.yield.sourceFarmer", "Farmer-entered")
523
529
  }),
524
- X && /* @__PURE__ */ m("p", {
530
+ X && /* @__PURE__ */ h("p", {
525
531
  className: "mt-2 text-xs text-text-secondary",
526
- children: x("healthybowl.crops.detail.yield.perUnit", "~{{amount}} {{unit}} per {{denominator}}", {
527
- amount: Ie,
528
- unit: P.yieldUnit,
532
+ children: e("healthybowl.crops.detail.yield.perUnit", "~{{amount}} {{unit}} per {{denominator}}", {
533
+ amount: Pe,
534
+ unit: N.yieldUnit,
529
535
  denominator: (X.unit ?? "").replace(/s$/, "")
530
536
  })
531
537
  })
532
538
  ]
533
539
  })]
534
540
  }),
535
- /* @__PURE__ */ h("div", {
541
+ /* @__PURE__ */ g("div", {
536
542
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
537
- children: [/* @__PURE__ */ m("h3", {
543
+ children: [/* @__PURE__ */ h("h3", {
538
544
  className: "mb-4 text-sm font-semibold text-text-primary",
539
- children: x("healthybowl.crops.detail.quickActions.title", "Quick Actions")
540
- }), /* @__PURE__ */ h("div", {
545
+ children: e("healthybowl.crops.detail.quickActions.title", "Quick Actions")
546
+ }), /* @__PURE__ */ g("div", {
541
547
  className: "space-y-2",
542
548
  children: [
543
- /* @__PURE__ */ h(g, {
549
+ /* @__PURE__ */ g(_, {
544
550
  variant: "outline",
545
- onClick: () => O(k("analytics")),
551
+ onClick: () => E(D("analytics")),
546
552
  className: "w-full justify-start",
547
553
  children: [
548
- /* @__PURE__ */ m(p, { className: "h-4 w-4 text-text-secondary" }),
554
+ /* @__PURE__ */ h(p, { className: "h-4 w-4 text-text-secondary" }),
549
555
  " ",
550
- x("healthybowl.crops.detail.quickActions.viewAnalytics", "View Analytics")
556
+ e("healthybowl.crops.detail.quickActions.viewAnalytics", "View Analytics")
551
557
  ]
552
558
  }),
553
- /* @__PURE__ */ h(g, {
559
+ /* @__PURE__ */ g(_, {
554
560
  variant: "outline",
555
- onClick: () => O(k("weather")),
561
+ onClick: () => E(D("weather")),
556
562
  className: "w-full justify-start",
557
563
  children: [
558
- /* @__PURE__ */ m(me, { className: "h-4 w-4 text-text-secondary" }),
564
+ /* @__PURE__ */ h(ge, { className: "h-4 w-4 text-text-secondary" }),
559
565
  " ",
560
- x("healthybowl.crops.detail.quickActions.checkWeather", "Check Weather")
566
+ e("healthybowl.crops.detail.quickActions.checkWeather", "Check Weather")
561
567
  ]
562
568
  }),
563
- X && /* @__PURE__ */ h(g, {
569
+ X && /* @__PURE__ */ g(_, {
564
570
  variant: "outline",
565
- onClick: () => O(k(`crops/fields/${X.id}`)),
571
+ onClick: () => E(D(`crops/fields/${X.id}`)),
566
572
  className: "w-full justify-start",
567
573
  children: [
568
- /* @__PURE__ */ m(d, { className: "h-4 w-4 text-text-secondary" }),
574
+ /* @__PURE__ */ h(u, { className: "h-4 w-4 text-text-secondary" }),
569
575
  " ",
570
- x("healthybowl.crops.detail.quickActions.viewField", "View Field")
576
+ e("healthybowl.crops.detail.quickActions.viewField", "View Field")
571
577
  ]
572
578
  }),
573
- /* @__PURE__ */ h(g, {
579
+ /* @__PURE__ */ g(_, {
574
580
  variant: "outline",
575
- onClick: () => O(k("crops")),
581
+ onClick: () => E(D("crops")),
576
582
  className: "w-full justify-start",
577
583
  children: [
578
- /* @__PURE__ */ m(f, { className: "h-4 w-4 text-text-secondary" }),
584
+ /* @__PURE__ */ h(f, { className: "h-4 w-4 text-text-secondary" }),
579
585
  " ",
580
- x("healthybowl.crops.detail.quickActions.allCrops", "All Crops")
586
+ e("healthybowl.crops.detail.quickActions.allCrops", "All Crops")
581
587
  ]
582
588
  })
583
589
  ]
@@ -586,31 +592,31 @@ var v = (e) => {
586
592
  ]
587
593
  })]
588
594
  }),
589
- /* @__PURE__ */ m(a, {
590
- open: Pe,
591
- onClose: () => j(!1),
592
- title: x("healthybowl.crops.detail.editModal.title", "Edit {{name}}", { name: P.name }),
593
- description: x("healthybowl.crops.detail.editModal.description", "Update crop details"),
595
+ /* @__PURE__ */ h(o, {
596
+ open: je,
597
+ onClose: () => A(!1),
598
+ title: e("healthybowl.crops.detail.editModal.title", "Edit {{name}}", { name: N.name }),
599
+ description: e("healthybowl.crops.detail.editModal.description", "Update crop details"),
594
600
  size: "lg",
595
- footer: /* @__PURE__ */ h(Se, { children: [/* @__PURE__ */ m(g, {
601
+ footer: /* @__PURE__ */ g(Se, { children: [/* @__PURE__ */ h(_, {
596
602
  variant: "outline",
597
- onClick: () => j(!1),
598
- children: x("healthybowl.common.cancel", "Cancel")
599
- }), /* @__PURE__ */ m(g, {
603
+ onClick: () => A(!1),
604
+ children: e("healthybowl.common.cancel", "Cancel")
605
+ }), /* @__PURE__ */ h(_, {
600
606
  onClick: async () => {
601
- if (P) {
607
+ if (N) {
602
608
  if (!F.trim()) {
603
- A({
604
- title: x("healthybowl.crops.detail.toast.missingFields.title", "Missing required fields"),
605
- description: x("healthybowl.crops.detail.toast.missingFields.description", "Crop name is required."),
609
+ O({
610
+ title: e("healthybowl.crops.detail.toast.missingFields.title", "Missing required fields"),
611
+ description: e("healthybowl.crops.detail.toast.missingFields.description", "Crop name is required."),
606
612
  variant: "warning"
607
613
  });
608
614
  return;
609
615
  }
610
- N(!0);
616
+ M(!0);
611
617
  try {
612
- await Oe({
613
- id: P.id,
618
+ await C({
619
+ id: N.id,
614
620
  name: F.trim(),
615
621
  variety: L,
616
622
  category: z,
@@ -618,110 +624,110 @@ var v = (e) => {
618
624
  expectedHarvestDate: U || void 0,
619
625
  healthStatus: G,
620
626
  imageIds: q
621
- }), A({
622
- title: x("healthybowl.crops.detail.toast.updated.title", "Crop updated"),
623
- description: x("healthybowl.crops.detail.toast.updated.description", "{{name}} details have been saved.", { name: F.trim() }),
627
+ }), await P(), O({
628
+ title: e("healthybowl.crops.detail.toast.updated.title", "Crop updated"),
629
+ description: e("healthybowl.crops.detail.toast.updated.description", "{{name}} details have been saved.", { name: F.trim() }),
624
630
  variant: "success"
625
- }), j(!1);
626
- } catch (e) {
627
- A({
628
- title: x("healthybowl.crops.detail.toast.updateFailed.title", "Update failed"),
629
- description: String(e),
631
+ }), A(!1);
632
+ } catch (t) {
633
+ O({
634
+ title: e("healthybowl.crops.detail.toast.updateFailed.title", "Update failed"),
635
+ description: String(t),
630
636
  variant: "error"
631
637
  });
632
638
  } finally {
633
- N(!1);
639
+ M(!1);
634
640
  }
635
641
  }
636
642
  },
637
- disabled: M,
638
- children: M ? x("healthybowl.crops.detail.editModal.saving", "Saving...") : x("healthybowl.crops.detail.editModal.saveChanges", "Save Changes")
643
+ disabled: j,
644
+ children: j ? e("healthybowl.crops.detail.editModal.saving", "Saving...") : e("healthybowl.crops.detail.editModal.saveChanges", "Save Changes")
639
645
  })] }),
640
- children: /* @__PURE__ */ h("div", {
646
+ children: /* @__PURE__ */ g("div", {
641
647
  className: "grid gap-4 sm:grid-cols-2",
642
648
  children: [
643
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
649
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
644
650
  className: "text-sm font-medium text-text-primary",
645
- children: x("healthybowl.crops.detail.form.cropName", "Crop Name")
646
- }), /* @__PURE__ */ m("input", {
651
+ children: e("healthybowl.crops.detail.form.cropName", "Crop Name")
652
+ }), /* @__PURE__ */ h("input", {
647
653
  value: F,
648
654
  onChange: (e) => I(e.target.value),
649
655
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
650
656
  })] }),
651
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
657
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
652
658
  className: "text-sm font-medium text-text-primary",
653
- children: x("healthybowl.crops.detail.form.variety", "Variety")
654
- }), /* @__PURE__ */ m("input", {
659
+ children: e("healthybowl.crops.detail.form.variety", "Variety")
660
+ }), /* @__PURE__ */ h("input", {
655
661
  value: L,
656
662
  onChange: (e) => R(e.target.value),
657
663
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
658
664
  })] }),
659
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
665
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
660
666
  className: "text-sm font-medium text-text-primary",
661
- children: x("healthybowl.crops.detail.form.category", "Category")
662
- }), /* @__PURE__ */ m("input", {
667
+ children: e("healthybowl.crops.detail.form.category", "Category")
668
+ }), /* @__PURE__ */ h("input", {
663
669
  value: z,
664
670
  onChange: (e) => B(e.target.value),
665
671
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
666
672
  })] }),
667
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
673
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
668
674
  className: "text-sm font-medium text-text-primary",
669
- children: x("healthybowl.crops.detail.form.yieldEstimate", "Yield Estimate ({{unit}})", { unit: P.yieldUnit })
670
- }), /* @__PURE__ */ m("input", {
675
+ children: e("healthybowl.crops.detail.form.yieldEstimate", "Yield Estimate ({{unit}})", { unit: N.yieldUnit })
676
+ }), /* @__PURE__ */ h("input", {
671
677
  type: "number",
672
678
  value: V,
673
679
  onChange: (e) => H(e.target.value),
674
680
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
675
681
  })] }),
676
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
682
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
677
683
  className: "text-sm font-medium text-text-primary",
678
- children: x("healthybowl.crops.detail.form.expectedHarvest", "Expected Harvest")
679
- }), /* @__PURE__ */ m("input", {
684
+ children: e("healthybowl.crops.detail.form.expectedHarvest", "Expected Harvest")
685
+ }), /* @__PURE__ */ h("input", {
680
686
  type: "date",
681
687
  value: U,
682
688
  onChange: (e) => W(e.target.value),
683
689
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
684
690
  })] }),
685
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("label", {
691
+ /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
686
692
  className: "text-sm font-medium text-text-primary",
687
- children: x("healthybowl.crops.detail.form.healthStatus", "Health Status")
688
- }), /* @__PURE__ */ h(we, {
693
+ children: e("healthybowl.crops.detail.form.healthStatus", "Health Status")
694
+ }), /* @__PURE__ */ g(we, {
689
695
  value: G,
690
696
  onValueChange: (e) => K(e),
691
- children: [/* @__PURE__ */ m(Ee, {
697
+ children: [/* @__PURE__ */ h(Ee, {
692
698
  className: "mt-1 w-full",
693
- children: /* @__PURE__ */ m(De, {})
694
- }), /* @__PURE__ */ h(Te, { children: [
695
- /* @__PURE__ */ m(_, {
699
+ children: /* @__PURE__ */ h(De, {})
700
+ }), /* @__PURE__ */ g(Te, { children: [
701
+ /* @__PURE__ */ h(v, {
696
702
  value: "excellent",
697
- children: x("healthybowl.crops.detail.form.healthOptions.excellent", "Excellent")
703
+ children: e("healthybowl.crops.detail.form.healthOptions.excellent", "Excellent")
698
704
  }),
699
- /* @__PURE__ */ m(_, {
705
+ /* @__PURE__ */ h(v, {
700
706
  value: "good",
701
- children: x("healthybowl.crops.detail.form.healthOptions.good", "Good")
707
+ children: e("healthybowl.crops.detail.form.healthOptions.good", "Good")
702
708
  }),
703
- /* @__PURE__ */ m(_, {
709
+ /* @__PURE__ */ h(v, {
704
710
  value: "fair",
705
- children: x("healthybowl.crops.detail.form.healthOptions.fair", "Fair")
711
+ children: e("healthybowl.crops.detail.form.healthOptions.fair", "Fair")
706
712
  }),
707
- /* @__PURE__ */ m(_, {
713
+ /* @__PURE__ */ h(v, {
708
714
  value: "poor",
709
- children: x("healthybowl.crops.detail.form.healthOptions.poor", "Poor")
715
+ children: e("healthybowl.crops.detail.form.healthOptions.poor", "Poor")
710
716
  }),
711
- /* @__PURE__ */ m(_, {
717
+ /* @__PURE__ */ h(v, {
712
718
  value: "critical",
713
- children: x("healthybowl.crops.detail.form.healthOptions.critical", "Critical")
719
+ children: e("healthybowl.crops.detail.form.healthOptions.critical", "Critical")
714
720
  })
715
721
  ] })]
716
722
  })] }),
717
- /* @__PURE__ */ h("div", {
723
+ /* @__PURE__ */ g("div", {
718
724
  className: "sm:col-span-2",
719
- children: [/* @__PURE__ */ m("label", {
725
+ children: [/* @__PURE__ */ h("label", {
720
726
  className: "text-sm font-medium text-text-primary",
721
- children: x("healthybowl.crops.detail.form.photos", "Photos")
722
- }), /* @__PURE__ */ m("div", {
727
+ children: e("healthybowl.crops.detail.form.photos", "Photos")
728
+ }), /* @__PURE__ */ h("div", {
723
729
  className: "mt-1",
724
- children: /* @__PURE__ */ m(s, {
730
+ children: /* @__PURE__ */ h(s, {
725
731
  entity: "Crop",
726
732
  imageIds: q,
727
733
  onChange: J
@@ -731,25 +737,11 @@ var v = (e) => {
731
737
  ]
732
738
  })
733
739
  }),
734
- /* @__PURE__ */ m(ne, {
735
- toasts: Me,
736
- onDismiss: Ne
740
+ /* @__PURE__ */ h(re, {
741
+ toasts: Ae,
742
+ onDismiss: k
737
743
  })
738
744
  ]
739
- }) : /* @__PURE__ */ m(t, {
740
- title: x("healthybowl.crops.detail.notFound.pageTitle", "Crop Not Found"),
741
- description: x("healthybowl.crops.detail.notFound.altDescription", "The requested crop could not be found."),
742
- children: /* @__PURE__ */ h("div", {
743
- className: "flex flex-col items-center justify-center py-12 text-center",
744
- children: [/* @__PURE__ */ m("p", {
745
- className: "text-text-secondary",
746
- children: x("healthybowl.crops.detail.notFound.altHint", "This crop may have been removed or the ID is invalid.")
747
- }), /* @__PURE__ */ m(g, {
748
- onClick: () => O(k("crops")),
749
- className: "mt-4",
750
- children: x("healthybowl.crops.detail.actions.backToCrops", "Back to Crops")
751
- })]
752
- })
753
745
  });
754
746
  };
755
747
  //#endregion