@burdenoff/microfe-healthybowl 2026.710.10 → 2026.710.11

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.
@@ -5,24 +5,24 @@ import { PageLayout as r } from "../../components/PageLayout.js";
5
5
  import { ErrorState as i } from "../../components/ErrorState.js";
6
6
  import { ToastContainer as a } from "../../components/Toast.js";
7
7
  import { useConfirm as o } from "../../components/ConfirmDialog.js";
8
- import { Modal as s } from "../../components/Modal.js";
9
- import { require_leaflet_src as c } from "../../../node_modules/leaflet/dist/leaflet-src.js";
10
- import { useToast as ee } from "../../hooks/useToast.js";
11
- import { ensureLeafletCss as te } from "../../utils/leaflet.js";
12
- import { extractPolygon as l, isValidPolygon as u, polygonAreaInUnit as d, polygonAreaSqMeters as ne, polygonCentroid as re, ringToPolygon as f } from "../../utils/geo.js";
13
- import { SOIL_PALETTE as ie, soilColor as ae, soilLegendFor as oe } from "../../utils/soil.js";
8
+ import { Modal as ee } from "../../components/Modal.js";
9
+ import { require_leaflet_src as s } from "../../../node_modules/leaflet/dist/leaflet-src.js";
10
+ import { useToast as te } from "../../hooks/useToast.js";
11
+ import { ensureLeafletCss as ne } from "../../utils/leaflet.js";
12
+ import { extractPolygon as re, isValidPolygon as c, polygonAreaInUnit as l, polygonAreaSqMeters as ie, polygonCentroid as ae, ringToPolygon as u } from "../../utils/geo.js";
13
+ import { SOIL_PALETTE as oe, soilColor as se, soilLegendFor as ce } from "../../utils/soil.js";
14
14
  import "../../utils/index.js";
15
15
  import "../../components/index.js";
16
- import { useHealthyBowlData as se } from "../../hooks/useHealthyBowlData.js";
17
- import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
18
- import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
- import { Check as le, Layers as ue, LocateFixed as de, MapPinned as fe, Pencil as pe, Plus as me, Ruler as he, Save as ge, Search as _e, Spline as ve, Trash2 as ye, X as be } from "lucide-react";
20
- import { Fragment as xe, jsx as v, jsxs as y } from "react/jsx-runtime";
21
- import { Button as b, Select as x, SelectContent as Se, SelectItem as S, SelectTrigger as Ce, SelectValue as we } from "@burdenoff/fe-libs/ui";
22
- import { gql as Te } from "@apollo/client";
23
- import { useMutation as Ee } from "@apollo/client/react";
16
+ import { useHealthyBowlData as le } from "../../hooks/useHealthyBowlData.js";
17
+ import { useCallback as d, useEffect as f, useMemo as p, useRef as m, useState as h } from "react";
18
+ import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
+ import { Check as de, Layers as fe, LocateFixed as pe, MapPinned as me, Pencil as he, Plus as ge, Ruler as _e, Save as ve, Search as ye, Spline as be, Trash2 as xe, X as Se } from "lucide-react";
20
+ import { Fragment as Ce, jsx as g, jsxs as _ } from "react/jsx-runtime";
21
+ import { Button as v, Select as we, SelectContent as Te, SelectItem as y, SelectTrigger as Ee, SelectValue as De } from "@burdenoff/fe-libs/ui";
22
+ import { gql as Oe } from "@apollo/client";
23
+ import { useMutation as ke } from "@apollo/client/react";
24
24
  //#region src/healthybowl/pages/fields/FieldMapPage.tsx
25
- var C = /* @__PURE__ */ e(c(), 1), De = Te`
25
+ var b = /* @__PURE__ */ e(s(), 1), Ae = Oe`
26
26
  mutation UpdateHealthyBowlFieldBoundaryOnMapPage($input: UpdateHealthyBowlFieldInput!) {
27
27
  updateHealthyBowlField(input: $input) {
28
28
  id
@@ -31,48 +31,48 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
31
31
  location
32
32
  }
33
33
  }
34
- `, Oe = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", ke = "Esri, Maxar, Earthstar Geographics", Ae = "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", je = "© OpenTopoMap (CC-BY-SA) · © OpenStreetMap contributors", Me = 21, Ne = 16, Pe = 2.47105, Fe = "#16a34a", Ie = {
34
+ `, je = "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", Me = "Esri, Maxar, Earthstar Geographics", Ne = "https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png", Pe = "© OpenTopoMap (CC-BY-SA) · © OpenStreetMap contributors", Fe = 21, Ie = 16, Le = 2.47105, Re = "#16a34a", ze = {
35
35
  color: "#f59e0b",
36
36
  weight: 2,
37
37
  dashArray: "6 4",
38
38
  fillColor: "#f59e0b",
39
39
  fillOpacity: .15
40
- }, Le = {
40
+ }, Be = {
41
41
  color: "#ffffff",
42
42
  weight: 2,
43
43
  dashArray: "6 4",
44
44
  fillColor: "#22c55e",
45
45
  fillOpacity: .2
46
- }, Re = {
46
+ }, Ve = {
47
47
  color: "#38bdf8",
48
48
  weight: 3,
49
49
  dashArray: "6 6"
50
- }, ze = (e) => !!(e && Number.isFinite(e.lat) && Number.isFinite(e.lng) && e.lat >= -90 && e.lat <= 90 && e.lng >= -180 && e.lng <= 180 && (e.lat !== 0 || e.lng !== 0)), Be = (e) => e.unit === "hectares" ? e.area * Pe : e.area, w = (e) => {
51
- let t = l(e.boundary);
52
- return t && u(t) ? t : null;
53
- }, Ve = C.default.divIcon({
50
+ }, He = (e) => !!(e && Number.isFinite(e.lat) && Number.isFinite(e.lng) && e.lat >= -90 && e.lat <= 90 && e.lng >= -180 && e.lng <= 180 && (e.lat !== 0 || e.lng !== 0)), Ue = (e) => /hect|(^|[^a-z])ha([^a-z]|$)/i.test(e ?? ""), We = (e) => Ue(e.unit) ? e.area * Le : e.area, Ge = (e) => `${e.area.toFixed(1)} ${Ue(e.unit) ? "ha" : "ac"}`, x = (e) => {
51
+ let t = re(e.boundary);
52
+ return t && c(t) ? t : null;
53
+ }, Ke = b.default.divIcon({
54
54
  className: "",
55
55
  html: "<span style=\"display:block;width:12px;height:12px;background:#22c55e;border:2px solid #fff;border-radius:2px;box-shadow:0 0 3px rgba(0,0,0,.6)\"></span>",
56
56
  iconSize: [16, 16],
57
57
  iconAnchor: [8, 8]
58
- }), He = () => {
59
- let { t: e } = ce(), { workspaceId: c } = n(), l = o(), { fields: u, crops: Te, loadings: Pe, errors: He, refetch: T, createField: Ue } = se(), { toasts: We, toast: E, dismiss: Ge } = ee(), [D] = Ee(De), [O, Ke] = _("loading"), [k, A] = _("view"), [j, M] = _(null), [N, qe] = _(!1), [P, Je] = _(!0), [Ye, Xe] = _(""), [Ze, Qe] = _(""), [$e, et] = _(!1), [tt, nt] = _(0), [rt, it] = _(null), [at, ot] = _(!1), [st, ct] = _(!1), [F, lt] = _(null), [I, L] = _(null), [ut, dt] = _(!1), [R, ft] = _(""), [pt, mt] = _("Clay loam"), [ht, gt] = _("Drip"), [_t, vt] = _("active"), yt = g(null), z = g(null), bt = g(null), xt = g(null), St = g(null), B = g(null), V = g(null), H = g(null), U = g([]), W = g(null), G = g([]), K = g(null), Ct = g([]), q = g("view"), wt = g(!1);
60
- m(() => {
61
- q.current = k;
62
- }, [k]);
63
- let Tt = h(() => u.filter((e) => w(e) !== null).length, [u]), Et = h(() => u.reduce((e, t) => e + Be(t), 0), [u]), Dt = h(() => oe(u.map((e) => e.soilType)), [u]), J = h(() => u.find((e) => e.id === j) ?? null, [u, j]), Ot = h(() => {
64
- let e = Ye.trim().toLowerCase();
65
- return e ? u.filter((t) => t.name.toLowerCase().includes(e) || (t.soilType ?? "").toLowerCase().includes(e)) : u;
66
- }, [u, Ye]), kt = p((e) => {
58
+ }), S = () => {
59
+ let { t: e } = ue(), { workspaceId: s } = n(), re = o(), { fields: c, crops: Oe, loadings: Le, errors: Ue, refetch: S, createField: qe } = le(), { toasts: Je, toast: C, dismiss: Ye } = te(), [w] = ke(Ae), [T, Xe] = h("loading"), [E, D] = h("view"), [O, k] = h(null), [A, Ze] = h(!1), [j, Qe] = h(!0), [M, $e] = h(""), [N, et] = h(""), [tt, nt] = h(!1), [rt, it] = h(0), [at, P] = h(null), [ot, st] = h(!1), [ct, lt] = h(!1), [F, ut] = h(null), [I, L] = h(null), [dt, ft] = h(!1), [R, pt] = h(""), [mt, ht] = h("Clay loam"), [gt, _t] = h("Drip"), [vt, yt] = h("active"), bt = m(null), z = m(null), xt = m(null), St = m(null), Ct = m(null), B = m(null), V = m(null), H = m(null), U = m([]), W = m(null), G = m([]), K = m(null), wt = m([]), q = m("view"), Tt = m(!1);
60
+ f(() => {
61
+ q.current = E;
62
+ }, [E]);
63
+ let Et = p(() => c.filter((e) => x(e) !== null).length, [c]), Dt = p(() => c.reduce((e, t) => e + We(t), 0), [c]), Ot = p(() => ce(c.map((e) => e.soilType)), [c]), J = p(() => c.find((e) => e.id === O) ?? null, [c, O]), kt = p(() => {
64
+ let e = M.trim().toLowerCase();
65
+ return e ? c.filter((t) => t.name.toLowerCase().includes(e) || (t.soilType ?? "").toLowerCase().includes(e)) : c;
66
+ }, [c, M]), At = d((e) => {
67
67
  if (!e) return "";
68
- let t = Te.find((t) => t.field === e.id || t.fieldName === e.name);
68
+ let t = Oe.find((t) => t.field === e.id || t.fieldName === e.name);
69
69
  return t ? t.name : (e.crops ?? []).join(", ");
70
- }, [Te]), At = p((e) => {
70
+ }, [Oe]), jt = d((e) => {
71
71
  let t = z.current;
72
72
  if (!t) return;
73
- let n = w(e);
73
+ let n = x(e);
74
74
  if (n) try {
75
- let e = C.default.geoJSON(n).getBounds();
75
+ let e = b.default.geoJSON(n).getBounds();
76
76
  if (e.isValid()) {
77
77
  t.fitBounds(e, {
78
78
  padding: [40, 40],
@@ -81,25 +81,29 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
81
81
  return;
82
82
  }
83
83
  } catch {}
84
- ze(e.location) && t.flyTo([e.location.lat, e.location.lng], Ne, { duration: .6 });
85
- }, []), jt = p((e) => {
86
- q.current === "draw" || q.current === "measure" || (M(e.id), At(e));
87
- }, [At]), Y = p(() => {
88
- let t = z.current, n = St.current;
84
+ He(e.location) && t.flyTo([e.location.lat, e.location.lng], Ie, { duration: .6 });
85
+ }, []), Mt = d((e) => {
86
+ q.current === "draw" || q.current === "measure" || (k(e.id), jt(e));
87
+ }, [jt]);
88
+ f(() => {
89
+ O && document.querySelector(`[data-field-id="${O}"]`)?.scrollIntoView({ block: "nearest" });
90
+ }, [O]);
91
+ let Y = d(() => {
92
+ let t = z.current, n = Ct.current;
89
93
  if (!t || !n) return;
90
94
  n.clearLayers();
91
95
  let r = [];
92
- for (let t of u) {
93
- if (k === "edit" && t.id === j) continue;
94
- let i = t.id === j, a = P ? ae(t.soilType) : Fe, o = `${t.name} — ${Be(t).toFixed(1)} ac`, s = w(t);
95
- if (s) {
96
- let e = C.default.geoJSON(s, { style: () => ({
96
+ for (let t of c) {
97
+ if (E === "edit" && t.id === O) continue;
98
+ let i = t.id === O, a = j ? se(t.soilType) : Re, o = `${t.name} — ${Ge(t)}`, ee = x(t);
99
+ if (ee) {
100
+ let e = b.default.geoJSON(ee, { style: () => ({
97
101
  color: i ? "#ffffff" : a,
98
102
  weight: i ? 4 : 2,
99
103
  fillColor: a,
100
104
  fillOpacity: i ? .5 : .3
101
105
  }) });
102
- e.on("click", () => M(t.id)), e.bindTooltip(o, {
106
+ e.on("click", () => k(t.id)), e.bindTooltip(o, {
103
107
  permanent: !0,
104
108
  direction: "center",
105
109
  className: "hb-field-label"
@@ -108,90 +112,90 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
108
112
  let t = e.getBounds();
109
113
  t.isValid() && r.push(t);
110
114
  } catch {}
111
- } else if (ze(t.location)) {
112
- let o = C.default.circleMarker([t.location.lat, t.location.lng], {
115
+ } else if (He(t.location)) {
116
+ let o = b.default.circleMarker([t.location.lat, t.location.lng], {
113
117
  radius: i ? 9 : 7,
114
118
  color: i ? "#ffffff" : "#fff",
115
119
  weight: i ? 3 : 2,
116
120
  fillColor: a,
117
121
  fillOpacity: 1
118
122
  });
119
- o.on("click", () => M(t.id)), o.bindTooltip(`${t.name} (${e("healthybowl.fieldMapPage.unmapped", "no boundary")})`, {
123
+ o.on("click", () => k(t.id)), o.bindTooltip(`${t.name} (${e("healthybowl.fieldMapPage.unmapped", "no boundary")})`, {
120
124
  permanent: !1,
121
125
  direction: "top"
122
- }), o.addTo(n), r.push(C.default.latLngBounds([t.location.lat, t.location.lng], [t.location.lat, t.location.lng]));
126
+ }), o.addTo(n), r.push(b.default.latLngBounds([t.location.lat, t.location.lng], [t.location.lat, t.location.lng]));
123
127
  }
124
128
  }
125
- if (!wt.current && r.length > 0) {
126
- let e = r.reduce((e, t) => e.extend(t), C.default.latLngBounds(r[0].getSouthWest(), r[0].getNorthEast()));
129
+ if (!Tt.current && r.length > 0) {
130
+ let e = r.reduce((e, t) => e.extend(t), b.default.latLngBounds(r[0].getSouthWest(), r[0].getNorthEast()));
127
131
  try {
128
132
  t.fitBounds(e, {
129
133
  padding: [40, 40],
130
134
  maxZoom: 17
131
- }), wt.current = !0;
135
+ }), Tt.current = !0;
132
136
  } catch {}
133
137
  }
134
138
  }, [
135
- u,
136
- k,
139
+ c,
140
+ E,
141
+ O,
137
142
  j,
138
- P,
139
143
  e
140
144
  ]);
141
- m(() => {
142
- O === "ready" && Y();
143
- }, [Y, O]);
144
- let X = p(() => {
145
- B.current?.clearLayers(), W.current = null, U.current = [], nt(0);
146
- }, []), Mt = p(() => {
145
+ f(() => {
146
+ T === "ready" && Y();
147
+ }, [Y, T]);
148
+ let X = d(() => {
149
+ B.current?.clearLayers(), W.current = null, U.current = [], it(0);
150
+ }, []), Nt = d(() => {
147
151
  let e = B.current;
148
152
  if (!e) return;
149
153
  W.current &&= (e.removeLayer(W.current), null);
150
154
  let t = U.current;
151
- t.length >= 2 && (W.current = C.default.polygon(t, Ie).addTo(e));
152
- }, []), Nt = p(() => {
155
+ t.length >= 2 && (W.current = b.default.polygon(t, ze).addTo(e));
156
+ }, []), Pt = d(() => {
153
157
  let t = U.current;
154
158
  if (t.length < 3) {
155
- E({
159
+ C({
156
160
  title: e("healthybowl.fieldMapPage.toast.needPoints.title", "Need at least 3 points"),
157
161
  description: e("healthybowl.fieldMapPage.toast.needPoints.description", "Click the map to add more corners."),
158
162
  variant: "warning"
159
163
  });
160
164
  return;
161
165
  }
162
- let n = f(t.map((e) => ({
166
+ let n = u(t.map((e) => ({
163
167
  lat: e.lat,
164
168
  lng: e.lng
165
169
  })));
166
- X(), q.current = "view", A("view"), n && (L({
170
+ X(), q.current = "view", D("view"), n && (L({
167
171
  boundary: n,
168
- area: d(n, "acres"),
169
- centroid: re(n) ?? [0, 0]
170
- }), ft(""), mt("Clay loam"), gt("Drip"), vt("active"));
172
+ area: l(n, "acres"),
173
+ centroid: ae(n) ?? [0, 0]
174
+ }), pt(""), ht("Clay loam"), _t("Drip"), yt("active"));
171
175
  }, [
172
176
  X,
173
177
  e,
174
- E
175
- ]), Pt = p(() => {
176
- M(null), X(), q.current = "draw", A("draw");
177
- }, [X]), Ft = p(() => {
178
- X(), q.current = "view", A("view");
179
- }, [X]), Z = p(() => {
180
- V.current?.clearLayers(), K.current = null, G.current = [], it(null), ot(!1);
181
- }, []), It = p(() => {
178
+ C
179
+ ]), Ft = d(() => {
180
+ k(null), X(), q.current = "draw", D("draw");
181
+ }, [X]), It = d(() => {
182
+ X(), q.current = "view", D("view");
183
+ }, [X]), Z = d(() => {
184
+ V.current?.clearLayers(), K.current = null, G.current = [], P(null), st(!1);
185
+ }, []), Lt = d(() => {
182
186
  if (!V.current || !K.current) return;
183
187
  K.current.setLatLngs(G.current);
184
- let e = f(G.current.map((e) => ({
188
+ let e = u(G.current.map((e) => ({
185
189
  lat: e.lat,
186
190
  lng: e.lng
187
191
  })));
188
- e && it(d(e, J?.unit ?? "acres"));
189
- }, [J]), Lt = p(() => {
192
+ e && P(l(e, J?.unit ?? "acres"));
193
+ }, [J]), Rt = d(() => {
190
194
  let t = z.current, n = V.current;
191
195
  if (!t || !n || !J) return;
192
- let r = w(J);
196
+ let r = x(J);
193
197
  if (!r) {
194
- E({
198
+ C({
195
199
  title: e("healthybowl.fieldMapPage.toast.noBoundary.title", "No boundary to edit"),
196
200
  description: e("healthybowl.fieldMapPage.toast.noBoundary.description", "Draw a boundary for this field first."),
197
201
  variant: "warning"
@@ -199,38 +203,38 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
199
203
  return;
200
204
  }
201
205
  n.clearLayers();
202
- let i = r.coordinates[0].slice(0, -1).map(([e, t]) => C.default.latLng(t, e));
203
- G.current = i, K.current = C.default.polygon(i, Le).addTo(n), i.forEach((e, t) => {
204
- C.default.marker(i[t], {
205
- icon: Ve,
206
+ let i = r.coordinates[0].slice(0, -1).map(([e, t]) => b.default.latLng(t, e));
207
+ G.current = i, K.current = b.default.polygon(i, Be).addTo(n), i.forEach((e, t) => {
208
+ b.default.marker(i[t], {
209
+ icon: Ke,
206
210
  draggable: !0
207
211
  }).addTo(n).on("drag", (e) => {
208
- G.current[t] = e.target.getLatLng(), It(), ot(!0);
212
+ G.current[t] = e.target.getLatLng(), Lt(), st(!0);
209
213
  });
210
- }), q.current = "edit", A("edit"), ot(!1), it(d(r, J.unit));
214
+ }), q.current = "edit", D("edit"), st(!1), P(l(r, J.unit));
211
215
  }, [
212
- It,
216
+ Lt,
213
217
  J,
214
218
  e,
215
- E
216
- ]), Rt = p(() => {
217
- Z(), q.current = "view", A("view"), Y();
218
- }, [Z, Y]), zt = p(async () => {
219
+ C
220
+ ]), zt = d(() => {
221
+ Z(), q.current = "view", D("view"), Y();
222
+ }, [Z, Y]), Bt = d(async () => {
219
223
  if (!J) return;
220
- let t = f(G.current.map((e) => ({
224
+ let t = u(G.current.map((e) => ({
221
225
  lat: e.lat,
222
226
  lng: e.lng
223
227
  })));
224
228
  if (t) {
225
- ct(!0);
229
+ lt(!0);
226
230
  try {
227
- let n = d(t, J.unit);
228
- await D({ variables: { input: {
231
+ let n = l(t, J.unit);
232
+ await w({ variables: { input: {
229
233
  id: J.id,
230
234
  boundary: t,
231
235
  area: n,
232
- context: { workspaceId: c }
233
- } } }), await T(), Z(), q.current = "view", A("view"), E({
236
+ context: { workspaceId: s }
237
+ } } }), await S(), Z(), q.current = "view", D("view"), C({
234
238
  title: e("healthybowl.fieldMapPage.toast.saved.title", "Boundary saved"),
235
239
  description: e("healthybowl.fieldMapPage.toast.saved.description", "Area updated to {{area}} {{unit}}.", {
236
240
  area: String(n),
@@ -239,49 +243,49 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
239
243
  variant: "success"
240
244
  });
241
245
  } catch (t) {
242
- E({
246
+ C({
243
247
  title: e("healthybowl.fieldMapPage.toast.saveFailed.title", "Save failed"),
244
248
  description: String(t),
245
249
  variant: "error"
246
250
  });
247
251
  } finally {
248
- ct(!1);
252
+ lt(!1);
249
253
  }
250
254
  }
251
255
  }, [
252
256
  Z,
253
- T,
257
+ S,
254
258
  J,
255
259
  e,
256
- E,
257
- D,
258
- c
259
- ]), Bt = p(async () => {
260
+ C,
261
+ w,
262
+ s
263
+ ]), Vt = d(async () => {
260
264
  if (J) {
261
- if (!w(J)) {
262
- E({
265
+ if (!x(J)) {
266
+ C({
263
267
  title: e("healthybowl.fieldMapPage.toast.noBoundary.title", "No boundary to edit"),
264
268
  description: e("healthybowl.fieldMapPage.toast.deleteNone.description", "This field has no boundary to delete."),
265
269
  variant: "warning"
266
270
  });
267
271
  return;
268
272
  }
269
- if (await l({
273
+ if (await re({
270
274
  title: e("healthybowl.fieldMapPage.confirmDelete.title", "Delete boundary?"),
271
275
  message: e("healthybowl.fieldMapPage.confirmDelete.description", "This removes the drawn shape from {{name}}. The field record is kept.", { name: J.name }),
272
276
  okButtonTitle: e("healthybowl.common.delete", "Delete")
273
277
  })) try {
274
- await D({ variables: { input: {
278
+ await w({ variables: { input: {
275
279
  id: J.id,
276
280
  boundary: null,
277
- context: { workspaceId: c }
278
- } } }), await T(), E({
281
+ context: { workspaceId: s }
282
+ } } }), await S(), C({
279
283
  title: e("healthybowl.fieldMapPage.toast.boundaryDeleted.title", "Boundary removed"),
280
284
  description: e("healthybowl.fieldMapPage.toast.boundaryDeleted.description", "The drawn shape was cleared."),
281
285
  variant: "success"
282
286
  });
283
287
  } catch (t) {
284
- E({
288
+ C({
285
289
  title: e("healthybowl.fieldMapPage.toast.saveFailed.title", "Save failed"),
286
290
  description: String(t),
287
291
  variant: "error"
@@ -289,54 +293,54 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
289
293
  }
290
294
  }
291
295
  }, [
292
- l,
293
- T,
296
+ re,
297
+ S,
294
298
  J,
295
299
  e,
296
- E,
297
- D,
298
- c
299
- ]), Q = p(() => {
300
- H.current?.clearLayers(), Ct.current = [], lt(null);
301
- }, []), Vt = p(() => {
300
+ C,
301
+ w,
302
+ s
303
+ ]), Q = d(() => {
304
+ H.current?.clearLayers(), wt.current = [], ut(null);
305
+ }, []), Ht = d(() => {
302
306
  let e = H.current;
303
307
  if (!e) return;
304
308
  e.clearLayers();
305
- let t = Ct.current;
309
+ let t = wt.current;
306
310
  t.forEach((t) => {
307
- C.default.circleMarker(t, {
311
+ b.default.circleMarker(t, {
308
312
  radius: 4,
309
313
  color: "#38bdf8",
310
314
  weight: 2,
311
315
  fillColor: "#fff",
312
316
  fillOpacity: 1
313
317
  }).addTo(e);
314
- }), t.length >= 2 && C.default.polyline(t, Re).addTo(e);
318
+ }), t.length >= 2 && b.default.polyline(t, Ve).addTo(e);
315
319
  let n = 0;
316
320
  for (let e = 1; e < t.length; e++) n += t[e - 1].distanceTo(t[e]);
317
321
  let r = null;
318
322
  if (t.length >= 3) {
319
- let e = f(t.map((e) => ({
323
+ let e = u(t.map((e) => ({
320
324
  lat: e.lat,
321
325
  lng: e.lng
322
326
  })));
323
- e && (r = ne(e));
327
+ e && (r = ie(e));
324
328
  }
325
- lt({
329
+ ut({
326
330
  distance: n,
327
331
  area: r
328
332
  });
329
- }, []), Ht = p(() => {
330
- M(null), Q(), q.current = "measure", A("measure"), lt({
333
+ }, []), Ut = d(() => {
334
+ k(null), Q(), q.current = "measure", D("measure"), ut({
331
335
  distance: 0,
332
336
  area: null
333
337
  });
334
- }, [Q]), Ut = p(() => {
335
- Q(), q.current = "view", A("view");
336
- }, [Q]), Wt = p((e) => {
338
+ }, [Q]), Wt = d(() => {
339
+ Q(), q.current = "view", D("view");
340
+ }, [Q]), Gt = d((e) => {
337
341
  if (z.current) if (q.current === "draw") {
338
342
  U.current.push(e.latlng);
339
- let t = U.current.length === 1, n = C.default.circleMarker(e.latlng, {
343
+ let t = U.current.length === 1, n = b.default.circleMarker(e.latlng, {
340
344
  radius: t ? 7 : 5,
341
345
  color: "#fff",
342
346
  weight: 2,
@@ -344,79 +348,79 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
344
348
  fillOpacity: 1
345
349
  }).addTo(B.current);
346
350
  t && n.on("click", (e) => {
347
- C.default.DomEvent.stopPropagation(e), Nt();
348
- }), nt(U.current.length), Mt();
349
- } else q.current === "measure" && (Ct.current.push(e.latlng), Vt());
351
+ b.default.DomEvent.stopPropagation(e), Pt();
352
+ }), it(U.current.length), Nt();
353
+ } else q.current === "measure" && (wt.current.push(e.latlng), Ht());
350
354
  }, [
351
- Nt,
352
- Vt,
353
- Mt
354
- ]), Gt = p(async (n) => {
355
+ Pt,
356
+ Ht,
357
+ Nt
358
+ ]), Kt = d(async (n) => {
355
359
  n.preventDefault();
356
- let r = z.current, i = Ze.trim();
360
+ let r = z.current, i = N.trim();
357
361
  if (!r || !i) return;
358
362
  let a = i.match(/^(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)$/);
359
363
  if (a) {
360
- r.flyTo([Number(a[1]), Number(a[2])], Ne, { duration: .6 });
364
+ r.flyTo([Number(a[1]), Number(a[2])], Ie, { duration: .6 });
361
365
  return;
362
366
  }
363
- et(!0);
367
+ nt(!0);
364
368
  try {
365
369
  let n = await t(i);
366
370
  if (!n) {
367
- E({
371
+ C({
368
372
  title: e("healthybowl.fieldMapPage.toast.placeNotFound.title", "Place not found"),
369
373
  description: e("healthybowl.fieldMapPage.toast.placeNotFound.description", "Try a more specific place name."),
370
374
  variant: "warning"
371
375
  });
372
376
  return;
373
377
  }
374
- r.flyTo([n.latitude, n.longitude], Ne, { duration: .6 });
378
+ r.flyTo([n.latitude, n.longitude], Ie, { duration: .6 });
375
379
  } catch (t) {
376
- E({
380
+ C({
377
381
  title: e("healthybowl.fieldMapPage.toast.searchFailed.title", "Search failed"),
378
382
  description: t instanceof Error ? t.message : String(t),
379
383
  variant: "error"
380
384
  });
381
385
  } finally {
382
- et(!1);
386
+ nt(!1);
383
387
  }
384
388
  }, [
385
- Ze,
389
+ N,
386
390
  e,
387
- E
388
- ]), Kt = p(async () => {
391
+ C
392
+ ]), qt = d(async () => {
389
393
  if (I) {
390
394
  if (!R.trim()) {
391
- E({
395
+ C({
392
396
  title: e("healthybowl.fieldMapPage.toast.nameRequired.title", "Name required"),
393
397
  description: e("healthybowl.fieldMapPage.toast.nameRequired.description", "Give the new field a name."),
394
398
  variant: "warning"
395
399
  });
396
400
  return;
397
401
  }
398
- dt(!0);
402
+ ft(!0);
399
403
  try {
400
- let [t, n] = I.centroid, r = await Ue({
404
+ let [t, n] = I.centroid, r = await qe({
401
405
  name: R.trim(),
402
406
  area: I.area,
403
407
  unit: "acres",
404
- soilType: pt,
405
- irrigationType: ht,
408
+ soilType: mt,
409
+ irrigationType: gt,
406
410
  organicCertified: !1,
407
- status: _t,
411
+ status: vt,
408
412
  crops: [],
409
413
  location: {
410
414
  lat: t,
411
415
  lng: n
412
416
  }
413
417
  });
414
- r?.id && await D({ variables: { input: {
418
+ r?.id && await w({ variables: { input: {
415
419
  id: r.id,
416
420
  boundary: I.boundary,
417
421
  area: I.area,
418
- context: { workspaceId: c }
419
- } } }), await T(), L(null), r?.id && M(r.id), E({
422
+ context: { workspaceId: s }
423
+ } } }), await S(), L(null), r?.id && k(r.id), C({
420
424
  title: e("healthybowl.fieldMapPage.toast.fieldCreated.title", "Field created"),
421
425
  description: e("healthybowl.fieldMapPage.toast.fieldCreated.description", "{{name}} saved at {{area}} acres.", {
422
426
  name: R.trim(),
@@ -425,279 +429,279 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
425
429
  variant: "success"
426
430
  });
427
431
  } catch (t) {
428
- E({
432
+ C({
429
433
  title: e("healthybowl.fieldMapPage.toast.createFailed.title", "Create failed"),
430
434
  description: String(t),
431
435
  variant: "error"
432
436
  });
433
437
  } finally {
434
- dt(!1);
438
+ ft(!1);
435
439
  }
436
440
  }
437
441
  }, [
438
- Ue,
439
- ht,
442
+ qe,
443
+ gt,
440
444
  R,
441
- pt,
442
- _t,
445
+ mt,
446
+ vt,
443
447
  I,
444
- T,
448
+ S,
445
449
  e,
446
- E,
447
- D,
448
- c
450
+ C,
451
+ w,
452
+ s
449
453
  ]);
450
- m(() => {
451
- let e = yt.current;
454
+ f(() => {
455
+ let e = bt.current;
452
456
  if (!e) return;
453
- te();
454
- let t = C.default.tileLayer(Oe, {
455
- attribution: ke,
456
- maxZoom: Me,
457
+ ne();
458
+ let t = b.default.tileLayer(je, {
459
+ attribution: Me,
460
+ maxZoom: Fe,
457
461
  maxNativeZoom: 18
458
- }), n = C.default.tileLayer(Ae, {
459
- attribution: je,
460
- maxZoom: Me,
462
+ }), n = b.default.tileLayer(Ne, {
463
+ attribution: Pe,
464
+ maxZoom: Fe,
461
465
  maxNativeZoom: 17,
462
466
  opacity: .65
463
467
  });
464
- bt.current = t, xt.current = n;
465
- let r = C.default.map(e, {
468
+ xt.current = t, St.current = n;
469
+ let r = b.default.map(e, {
466
470
  center: [20, 78],
467
471
  zoom: 4,
468
472
  scrollWheelZoom: !0,
469
- maxZoom: Me,
473
+ maxZoom: Fe,
470
474
  layers: [t]
471
475
  });
472
- return z.current = r, St.current = C.default.layerGroup().addTo(r), B.current = C.default.layerGroup().addTo(r), V.current = C.default.layerGroup().addTo(r), H.current = C.default.layerGroup().addTo(r), r.on("click", Wt), Ke("ready"), window.setTimeout(() => r.invalidateSize(), 80), () => {
473
- r.off("click", Wt), r.remove(), z.current = null, bt.current = null, xt.current = null, St.current = null, B.current = null, V.current = null, H.current = null;
476
+ return z.current = r, Ct.current = b.default.layerGroup().addTo(r), B.current = b.default.layerGroup().addTo(r), V.current = b.default.layerGroup().addTo(r), H.current = b.default.layerGroup().addTo(r), r.on("click", Gt), Xe("ready"), window.setTimeout(() => r.invalidateSize(), 80), () => {
477
+ r.off("click", Gt), r.remove(), z.current = null, xt.current = null, St.current = null, Ct.current = null, B.current = null, V.current = null, H.current = null;
474
478
  };
475
- }, []), m(() => {
476
- let e = z.current, t = xt.current;
477
- !e || !t || (N ? t.addTo(e) : e.removeLayer(t));
478
- }, [N]);
479
- let qt = !Pe.crops && u.length === 0, Jt = F ? F.distance >= 1e3 ? `${(F.distance / 1e3).toFixed(2)} km` : `${F.distance.toFixed(0)} m` : "";
480
- if (He.crops && u.length === 0) return /* @__PURE__ */ v(r, {
479
+ }, []), f(() => {
480
+ let e = z.current, t = St.current;
481
+ !e || !t || (A ? t.addTo(e) : e.removeLayer(t));
482
+ }, [A]);
483
+ let Jt = !Le.crops && c.length === 0, Yt = F ? F.distance >= 1e3 ? `${(F.distance / 1e3).toFixed(2)} km` : `${F.distance.toFixed(0)} m` : "";
484
+ if (Ue.crops && c.length === 0) return /* @__PURE__ */ g(r, {
481
485
  title: e("healthybowl.fieldMapPage.title", "Field Map"),
482
486
  titleAccent: e("healthybowl.fieldMapPage.titleAccent", "Map"),
483
487
  description: e("healthybowl.fieldMapPage.description", "Draw and manage your field boundaries on satellite imagery."),
484
- children: /* @__PURE__ */ v(i, { onRetry: T })
488
+ children: /* @__PURE__ */ g(i, { onRetry: S })
485
489
  });
486
- let $ = (e, t, n, r) => /* @__PURE__ */ y("button", {
490
+ let $ = (e, t, n, r) => /* @__PURE__ */ _("button", {
487
491
  type: "button",
488
492
  onClick: t,
489
493
  "aria-pressed": e,
490
494
  className: `flex flex-col items-center gap-1 rounded-md px-3 py-1.5 text-[11px] font-medium transition-colors ${e ? "bg-success text-white" : "text-text-primary hover:bg-bg-sunken"}`,
491
495
  children: [n, r]
492
496
  });
493
- return /* @__PURE__ */ y(r, {
497
+ return /* @__PURE__ */ _(r, {
494
498
  title: e("healthybowl.fieldMapPage.title", "Field Map"),
495
499
  titleAccent: e("healthybowl.fieldMapPage.titleAccent", "Map"),
496
500
  hero: !0,
497
501
  description: e("healthybowl.fieldMapPage.description", "Draw and manage your field boundaries on satellite imagery."),
498
502
  purpose: "Trace each plot on the aerial view to auto-calculate its acreage, shade fields by soil type, overlay terrain, and see your whole holding at a glance. Click any field in the list to fly straight to it.",
499
503
  children: [
500
- /* @__PURE__ */ y("div", {
504
+ /* @__PURE__ */ _("div", {
501
505
  className: "flex flex-col gap-4 lg:flex-row",
502
- children: [/* @__PURE__ */ y("div", {
506
+ children: [/* @__PURE__ */ _("div", {
503
507
  className: "min-w-0 flex-1 space-y-3",
504
508
  children: [
505
- /* @__PURE__ */ y("form", {
509
+ /* @__PURE__ */ _("form", {
506
510
  className: "flex gap-2",
507
- onSubmit: Gt,
508
- children: [/* @__PURE__ */ y("div", {
511
+ onSubmit: Kt,
512
+ children: [/* @__PURE__ */ _("div", {
509
513
  className: "relative min-w-0 flex-1",
510
- children: [/* @__PURE__ */ v(_e, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
514
+ children: [/* @__PURE__ */ g(ye, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ g("input", {
511
515
  type: "search",
512
- value: Ze,
513
- onChange: (e) => Qe(e.target.value),
516
+ value: N,
517
+ onChange: (e) => et(e.target.value),
514
518
  placeholder: e("healthybowl.fieldMapPage.placeSearch.placeholder", "Find your farm — village, city, or lat,lng…"),
515
519
  "aria-label": e("healthybowl.fieldMapPage.placeSearch.label", "Locate a place on the map"),
516
520
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
517
521
  })]
518
- }), /* @__PURE__ */ y(b, {
522
+ }), /* @__PURE__ */ _(v, {
519
523
  type: "submit",
520
524
  variant: "outline",
521
525
  size: "sm",
522
- disabled: O !== "ready" || $e,
526
+ disabled: T !== "ready" || tt,
523
527
  children: [
524
- /* @__PURE__ */ v(de, { className: "h-4 w-4" }),
528
+ /* @__PURE__ */ g(pe, { className: "h-4 w-4" }),
525
529
  " ",
526
- $e ? e("healthybowl.fieldMapPage.placeSearch.searching", "Locating…") : e("healthybowl.fieldMapPage.placeSearch.action", "Locate")
530
+ tt ? e("healthybowl.fieldMapPage.placeSearch.searching", "Locating…") : e("healthybowl.fieldMapPage.placeSearch.action", "Locate")
527
531
  ]
528
532
  })]
529
533
  }),
530
- /* @__PURE__ */ y("div", {
534
+ /* @__PURE__ */ _("div", {
531
535
  className: "relative",
532
536
  children: [
533
- /* @__PURE__ */ v("div", {
534
- ref: yt,
537
+ /* @__PURE__ */ g("div", {
538
+ ref: bt,
535
539
  className: "h-[70vh] max-h-[640px] w-full overflow-hidden rounded-lg border border-border-subtle bg-bg-sunken"
536
540
  }),
537
- O === "ready" && /* @__PURE__ */ y("div", {
541
+ T === "ready" && /* @__PURE__ */ _("div", {
538
542
  className: "absolute right-3 top-3 z-[1000] flex items-center gap-1 rounded-lg border border-border-subtle bg-bg-surface/95 p-1 shadow-md",
539
543
  children: [
540
- $(k === "draw", () => k === "draw" ? Ft() : Pt(), /* @__PURE__ */ v(pe, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.polygon", "Polygon")),
541
- $(k === "edit", () => k === "edit" ? Rt() : Lt(), /* @__PURE__ */ v(ve, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.vertices", "Vertices")),
542
- $(!1, Bt, /* @__PURE__ */ v(ye, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.delete", "Delete")),
543
- $(k === "measure", () => k === "measure" ? Ut() : Ht(), /* @__PURE__ */ v(he, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.measure", "Measure"))
544
+ $(E === "draw", () => E === "draw" ? It() : Ft(), /* @__PURE__ */ g(he, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.polygon", "Polygon")),
545
+ $(E === "edit", () => E === "edit" ? zt() : Rt(), /* @__PURE__ */ g(be, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.vertices", "Vertices")),
546
+ $(!1, Vt, /* @__PURE__ */ g(xe, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.delete", "Delete")),
547
+ $(E === "measure", () => E === "measure" ? Wt() : Ut(), /* @__PURE__ */ g(_e, { className: "h-4 w-4" }), e("healthybowl.fieldMapPage.tools.measure", "Measure"))
544
548
  ]
545
549
  }),
546
- k === "draw" && /* @__PURE__ */ y("div", {
550
+ E === "draw" && /* @__PURE__ */ _("div", {
547
551
  className: "absolute left-1/2 top-3 z-[1000] flex -translate-x-1/2 items-center gap-2 rounded-full bg-bg-surface/95 px-3 py-1.5 text-xs text-text-primary shadow-md",
548
552
  children: [
549
- /* @__PURE__ */ v("span", { children: e("healthybowl.fieldMapPage.drawHint", "Click the map to add corners ({{count}}) — click the first point or Finish.", { count: String(tt) }) }),
550
- /* @__PURE__ */ y(b, {
553
+ /* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.drawHint", "Click the map to add corners ({{count}}) — click the first point or Finish.", { count: String(rt) }) }),
554
+ /* @__PURE__ */ _(v, {
551
555
  size: "sm",
552
556
  variant: "default",
553
- onClick: Nt,
557
+ onClick: Pt,
554
558
  children: [
555
- /* @__PURE__ */ v(le, { className: "h-3.5 w-3.5" }),
559
+ /* @__PURE__ */ g(de, { className: "h-3.5 w-3.5" }),
556
560
  " ",
557
561
  e("healthybowl.fieldMapPage.finish", "Finish")
558
562
  ]
559
563
  }),
560
- /* @__PURE__ */ v(b, {
564
+ /* @__PURE__ */ g(v, {
561
565
  size: "sm",
562
566
  variant: "outline",
563
- onClick: Ft,
564
- children: /* @__PURE__ */ v(be, { className: "h-3.5 w-3.5" })
567
+ onClick: It,
568
+ children: /* @__PURE__ */ g(Se, { className: "h-3.5 w-3.5" })
565
569
  })
566
570
  ]
567
571
  }),
568
- k === "edit" && /* @__PURE__ */ y("div", {
572
+ E === "edit" && /* @__PURE__ */ _("div", {
569
573
  className: "absolute left-1/2 top-3 z-[1000] flex -translate-x-1/2 items-center gap-2 rounded-full bg-bg-surface/95 px-3 py-1.5 text-xs text-text-primary shadow-md",
570
574
  children: [
571
- /* @__PURE__ */ v("span", { children: e("healthybowl.fieldMapPage.editHint", "Drag handles to reshape · {{area}} {{unit}}", {
572
- area: String(rt ?? ""),
575
+ /* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.editHint", "Drag handles to reshape · {{area}} {{unit}}", {
576
+ area: String(at ?? ""),
573
577
  unit: J?.unit ?? "acres"
574
578
  }) }),
575
- /* @__PURE__ */ y(b, {
579
+ /* @__PURE__ */ _(v, {
576
580
  size: "sm",
577
581
  variant: "default",
578
- onClick: zt,
579
- disabled: !at || st,
582
+ onClick: Bt,
583
+ disabled: !ot || ct,
580
584
  children: [
581
- /* @__PURE__ */ v(ge, { className: "h-3.5 w-3.5" }),
585
+ /* @__PURE__ */ g(ve, { className: "h-3.5 w-3.5" }),
582
586
  " ",
583
- st ? e("healthybowl.fieldMapPage.saving", "Saving…") : e("healthybowl.fieldMapPage.save", "Save")
587
+ ct ? e("healthybowl.fieldMapPage.saving", "Saving…") : e("healthybowl.fieldMapPage.save", "Save")
584
588
  ]
585
589
  }),
586
- /* @__PURE__ */ v(b, {
590
+ /* @__PURE__ */ g(v, {
587
591
  size: "sm",
588
592
  variant: "outline",
589
- onClick: Rt,
590
- children: /* @__PURE__ */ v(be, { className: "h-3.5 w-3.5" })
593
+ onClick: zt,
594
+ children: /* @__PURE__ */ g(Se, { className: "h-3.5 w-3.5" })
591
595
  })
592
596
  ]
593
597
  }),
594
- k === "measure" && F && /* @__PURE__ */ y("div", {
598
+ E === "measure" && F && /* @__PURE__ */ _("div", {
595
599
  className: "absolute left-1/2 top-3 z-[1000] flex -translate-x-1/2 items-center gap-3 rounded-full bg-bg-surface/95 px-3 py-1.5 text-xs text-text-primary shadow-md",
596
600
  children: [
597
- /* @__PURE__ */ y("span", { children: [e("healthybowl.fieldMapPage.measure.distance", "Distance: {{d}}", { d: Jt }), F.area != null && ` · ${e("healthybowl.fieldMapPage.measure.area", "Area: {{a}} ac", { a: (F.area / 4046.8564224).toFixed(2) })}`] }),
598
- /* @__PURE__ */ v(b, {
601
+ /* @__PURE__ */ _("span", { children: [e("healthybowl.fieldMapPage.measure.distance", "Distance: {{d}}", { d: Yt }), F.area != null && ` · ${e("healthybowl.fieldMapPage.measure.area", "Area: {{a}} ac", { a: (F.area / 4046.8564224).toFixed(2) })}`] }),
602
+ /* @__PURE__ */ g(v, {
599
603
  size: "sm",
600
604
  variant: "outline",
601
605
  onClick: Q,
602
606
  children: e("healthybowl.fieldMapPage.measure.reset", "Reset")
603
607
  }),
604
- /* @__PURE__ */ v(b, {
608
+ /* @__PURE__ */ g(v, {
605
609
  size: "sm",
606
610
  variant: "outline",
607
- onClick: Ut,
608
- children: /* @__PURE__ */ v(be, { className: "h-3.5 w-3.5" })
611
+ onClick: Wt,
612
+ children: /* @__PURE__ */ g(Se, { className: "h-3.5 w-3.5" })
609
613
  })
610
614
  ]
611
615
  }),
612
- O === "ready" && /* @__PURE__ */ y("div", {
616
+ T === "ready" && /* @__PURE__ */ _("div", {
613
617
  className: "absolute bottom-3 left-3 z-[1000] rounded-lg border border-border-subtle bg-bg-surface/95 p-3 text-xs shadow-md",
614
618
  children: [
615
- /* @__PURE__ */ y("div", {
619
+ /* @__PURE__ */ _("div", {
616
620
  className: "mb-1.5 flex items-center gap-1.5 font-semibold text-text-primary",
617
621
  children: [
618
- /* @__PURE__ */ v(ue, { className: "h-3.5 w-3.5" }),
622
+ /* @__PURE__ */ g(fe, { className: "h-3.5 w-3.5" }),
619
623
  " ",
620
624
  e("healthybowl.fieldMapPage.layers.title", "Layers")
621
625
  ]
622
626
  }),
623
- /* @__PURE__ */ y("label", {
627
+ /* @__PURE__ */ _("label", {
624
628
  className: "flex items-center gap-2 py-0.5 text-text-secondary",
625
- children: [/* @__PURE__ */ v("input", {
629
+ children: [/* @__PURE__ */ g("input", {
626
630
  type: "checkbox",
627
631
  checked: !0,
628
632
  readOnly: !0,
629
633
  className: "h-3.5 w-3.5 accent-[var(--color-success)]"
630
634
  }), e("healthybowl.fieldMapPage.layers.satellite", "Satellite")]
631
635
  }),
632
- /* @__PURE__ */ y("label", {
636
+ /* @__PURE__ */ _("label", {
633
637
  className: "flex cursor-pointer items-center gap-2 py-0.5 text-text-primary",
634
- children: [/* @__PURE__ */ v("input", {
638
+ children: [/* @__PURE__ */ g("input", {
635
639
  type: "checkbox",
636
- checked: N,
637
- onChange: (e) => qe(e.target.checked),
640
+ checked: A,
641
+ onChange: (e) => Ze(e.target.checked),
638
642
  className: "h-3.5 w-3.5 accent-[var(--color-success)]"
639
643
  }), e("healthybowl.fieldMapPage.layers.terrain", "Terrain")]
640
644
  }),
641
- /* @__PURE__ */ y("label", {
645
+ /* @__PURE__ */ _("label", {
642
646
  className: "flex cursor-pointer items-center gap-2 py-0.5 text-text-primary",
643
- children: [/* @__PURE__ */ v("input", {
647
+ children: [/* @__PURE__ */ g("input", {
644
648
  type: "checkbox",
645
- checked: P,
646
- onChange: (e) => Je(e.target.checked),
649
+ checked: j,
650
+ onChange: (e) => Qe(e.target.checked),
647
651
  className: "h-3.5 w-3.5 accent-[var(--color-success)]"
648
652
  }), e("healthybowl.fieldMapPage.layers.soil", "Soil type")]
649
653
  })
650
654
  ]
651
655
  }),
652
- O === "ready" && P && Dt.length > 0 && /* @__PURE__ */ y("div", {
656
+ T === "ready" && j && Ot.length > 0 && /* @__PURE__ */ _("div", {
653
657
  className: "absolute bottom-3 right-3 z-[1000] rounded-lg border border-border-subtle bg-bg-surface/95 p-3 text-xs shadow-md",
654
- children: [/* @__PURE__ */ v("div", {
658
+ children: [/* @__PURE__ */ g("div", {
655
659
  className: "mb-1.5 font-semibold text-text-primary",
656
660
  children: e("healthybowl.fieldMapPage.soilLegend.title", "Soil Legend")
657
- }), Dt.map((t) => /* @__PURE__ */ y("div", {
661
+ }), Ot.map((t) => /* @__PURE__ */ _("div", {
658
662
  className: "flex items-center gap-2 py-0.5 text-text-secondary",
659
- children: [/* @__PURE__ */ v("span", {
663
+ children: [/* @__PURE__ */ g("span", {
660
664
  className: "inline-block h-3 w-3 rounded-sm",
661
665
  style: { backgroundColor: t.color }
662
666
  }), e(`healthybowl.fieldMapPage.soil.${t.key}`, t.label)]
663
667
  }, t.key))]
664
668
  }),
665
- O === "ready" && N && /* @__PURE__ */ y("div", {
669
+ T === "ready" && A && /* @__PURE__ */ _("div", {
666
670
  className: "absolute left-3 top-3 z-[1000] rounded-lg border border-border-subtle bg-bg-surface/95 px-3 py-2 text-[11px] text-text-secondary shadow-md",
667
- children: [/* @__PURE__ */ v("div", {
671
+ children: [/* @__PURE__ */ g("div", {
668
672
  className: "font-semibold text-text-primary",
669
673
  children: e("healthybowl.fieldMapPage.terrainLegend.title", "Terrain / Elevation")
670
- }), /* @__PURE__ */ y("div", {
674
+ }), /* @__PURE__ */ _("div", {
671
675
  className: "mt-1 flex items-center gap-2",
672
- children: [/* @__PURE__ */ v("span", { className: "inline-block h-2 w-16 rounded-full bg-gradient-to-r from-green-600 via-yellow-400 to-orange-500" }), /* @__PURE__ */ v("span", { children: e("healthybowl.fieldMapPage.terrainLegend.scale", "low → high (contours)") })]
676
+ children: [/* @__PURE__ */ g("span", { className: "inline-block h-2 w-16 rounded-full bg-gradient-to-r from-green-600 via-yellow-400 to-orange-500" }), /* @__PURE__ */ g("span", { children: e("healthybowl.fieldMapPage.terrainLegend.scale", "low → high (contours)") })]
673
677
  })]
674
678
  }),
675
- (O === "loading" || Pe.crops && u.length === 0) && /* @__PURE__ */ v("div", {
679
+ (T === "loading" || Le.crops && c.length === 0) && /* @__PURE__ */ g("div", {
676
680
  className: "pointer-events-none absolute inset-0 z-[900] flex items-center justify-center rounded-lg bg-bg-surface/60 text-sm text-text-secondary",
677
681
  children: e("healthybowl.fieldMapPage.loading", "Loading map…")
678
682
  }),
679
- qt && O === "ready" && k === "view" && /* @__PURE__ */ v("div", {
683
+ Jt && T === "ready" && E === "view" && /* @__PURE__ */ g("div", {
680
684
  className: "absolute inset-0 z-[950] flex items-center justify-center p-6",
681
- children: /* @__PURE__ */ y("div", {
685
+ children: /* @__PURE__ */ _("div", {
682
686
  className: "max-w-sm rounded-xl border border-border-subtle bg-bg-surface/95 p-6 text-center shadow-lg",
683
687
  children: [
684
- /* @__PURE__ */ v("div", {
688
+ /* @__PURE__ */ g("div", {
685
689
  className: "mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-success/15",
686
- children: /* @__PURE__ */ v(fe, { className: "h-6 w-6 text-success" })
690
+ children: /* @__PURE__ */ g(me, { className: "h-6 w-6 text-success" })
687
691
  }),
688
- /* @__PURE__ */ v("h3", {
692
+ /* @__PURE__ */ g("h3", {
689
693
  className: "text-lg font-semibold text-text-primary",
690
694
  children: e("healthybowl.fieldMapPage.empty.title", "No field boundaries yet")
691
695
  }),
692
- /* @__PURE__ */ v("p", {
696
+ /* @__PURE__ */ g("p", {
693
697
  className: "mt-1 text-sm text-text-secondary",
694
698
  children: e("healthybowl.fieldMapPage.empty.description", "Draw the shape of each field on the satellite view to auto-calculate its area and unlock soil & terrain overlays.")
695
699
  }),
696
- /* @__PURE__ */ y(b, {
700
+ /* @__PURE__ */ _(v, {
697
701
  className: "mt-4",
698
- onClick: Pt,
702
+ onClick: Ft,
699
703
  children: [
700
- /* @__PURE__ */ v(me, { className: "h-4 w-4" }),
704
+ /* @__PURE__ */ g(ge, { className: "h-4 w-4" }),
701
705
  " ",
702
706
  e("healthybowl.fieldMapPage.empty.action", "Draw Your First Field")
703
707
  ]
@@ -707,104 +711,105 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
707
711
  })
708
712
  ]
709
713
  }),
710
- /* @__PURE__ */ v("p", {
714
+ /* @__PURE__ */ g("p", {
711
715
  className: "text-xs text-text-secondary",
712
716
  children: e("healthybowl.fieldMapPage.attribution", "Imagery © Esri, Maxar, Earthstar Geographics · terrain © OpenTopoMap / OpenStreetMap")
713
717
  })
714
718
  ]
715
- }), /* @__PURE__ */ y("aside", {
719
+ }), /* @__PURE__ */ _("aside", {
716
720
  className: "shrink-0 space-y-4 lg:w-80",
717
- children: [/* @__PURE__ */ y("div", {
721
+ children: [/* @__PURE__ */ _("div", {
718
722
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
719
723
  children: [
720
- /* @__PURE__ */ v("h2", {
724
+ /* @__PURE__ */ g("h2", {
721
725
  className: "text-base font-semibold text-text-primary",
722
726
  children: e("healthybowl.fieldMapPage.panel.title", "Fields")
723
727
  }),
724
- /* @__PURE__ */ v("p", {
728
+ /* @__PURE__ */ g("p", {
725
729
  className: "mt-0.5 text-xs text-text-secondary",
726
730
  children: e("healthybowl.fieldMapPage.panel.summary", "{{acres}} acres · {{count}} fields · {{mapped}} mapped", {
727
- acres: Et.toFixed(1),
728
- count: String(u.length),
729
- mapped: String(Tt)
731
+ acres: Dt.toFixed(1),
732
+ count: String(c.length),
733
+ mapped: String(Et)
730
734
  })
731
735
  }),
732
- /* @__PURE__ */ y("div", {
736
+ /* @__PURE__ */ _("div", {
733
737
  className: "relative mt-3",
734
- children: [/* @__PURE__ */ v(_e, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
738
+ children: [/* @__PURE__ */ g(ye, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ g("input", {
735
739
  type: "search",
736
- value: Ye,
737
- onChange: (e) => Xe(e.target.value),
740
+ value: M,
741
+ onChange: (e) => $e(e.target.value),
738
742
  placeholder: e("healthybowl.fieldMapPage.panel.search", "Search fields…"),
739
743
  className: "h-9 w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
740
744
  })]
741
745
  }),
742
- /* @__PURE__ */ y("div", {
746
+ /* @__PURE__ */ _("div", {
743
747
  className: "mt-3 max-h-[38vh] space-y-1 overflow-y-auto",
744
- children: [Ot.map((t) => {
745
- let n = w(t) !== null;
746
- return /* @__PURE__ */ y("button", {
748
+ children: [kt.map((t) => {
749
+ let n = x(t) !== null;
750
+ return /* @__PURE__ */ _("button", {
747
751
  type: "button",
748
- onClick: () => jt(t),
749
- className: `flex w-full items-center gap-3 rounded-md border px-2.5 py-2 text-left transition-colors ${t.id === j ? "border-success bg-success/10" : "border-transparent hover:bg-bg-sunken"}`,
752
+ "data-field-id": t.id,
753
+ onClick: () => Mt(t),
754
+ className: `flex w-full items-center gap-3 rounded-md border px-2.5 py-2 text-left transition-colors ${t.id === O ? "border-success bg-success/10" : "border-transparent hover:bg-bg-sunken"}`,
750
755
  children: [
751
- /* @__PURE__ */ v("span", {
756
+ /* @__PURE__ */ g("span", {
752
757
  className: "mt-0.5 inline-block h-4 w-4 shrink-0 rounded",
753
- style: { backgroundColor: ae(t.soilType) }
758
+ style: { backgroundColor: se(t.soilType) }
754
759
  }),
755
- /* @__PURE__ */ y("span", {
760
+ /* @__PURE__ */ _("span", {
756
761
  className: "min-w-0 flex-1",
757
- children: [/* @__PURE__ */ v("span", {
762
+ children: [/* @__PURE__ */ g("span", {
758
763
  className: "block truncate text-sm font-medium text-text-primary",
759
764
  children: t.name
760
- }), /* @__PURE__ */ y("span", {
765
+ }), /* @__PURE__ */ _("span", {
761
766
  className: "block truncate text-xs text-text-secondary",
762
767
  children: [
763
- Be(t).toFixed(1),
764
- " ac ·",
768
+ Ge(t),
769
+ " ·",
765
770
  " ",
766
771
  t.soilType || e("healthybowl.fieldMapPage.unknownSoil", "Unknown soil")
767
772
  ]
768
773
  })]
769
774
  }),
770
- !n && /* @__PURE__ */ v("span", {
775
+ !n && /* @__PURE__ */ g("span", {
771
776
  className: "shrink-0 rounded-full bg-warning/20 px-1.5 py-0.5 text-[10px] font-medium text-warning",
772
777
  children: e("healthybowl.fieldMapPage.unmapped", "no boundary")
773
778
  })
774
779
  ]
775
780
  }, t.id);
776
- }), Ot.length === 0 && /* @__PURE__ */ v("p", {
781
+ }), kt.length === 0 && /* @__PURE__ */ g("p", {
777
782
  className: "px-2 py-4 text-center text-xs text-text-secondary",
778
783
  children: e("healthybowl.fieldMapPage.panel.none", "No fields match your search.")
779
784
  })]
780
785
  }),
781
- /* @__PURE__ */ y(b, {
786
+ /* @__PURE__ */ _(v, {
782
787
  className: "mt-3 w-full",
783
- onClick: Pt,
784
- disabled: k === "draw",
788
+ onClick: Ft,
789
+ disabled: E === "draw",
785
790
  children: [
786
- /* @__PURE__ */ v(me, { className: "h-4 w-4" }),
791
+ /* @__PURE__ */ g(ge, { className: "h-4 w-4" }),
787
792
  " ",
788
793
  e("healthybowl.fieldMapPage.panel.drawNew", "Draw New Field")
789
794
  ]
790
795
  })
791
796
  ]
792
- }), J && /* @__PURE__ */ y("div", {
797
+ }), J && /* @__PURE__ */ _("div", {
793
798
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
794
799
  children: [
795
- /* @__PURE__ */ v("h3", {
800
+ /* @__PURE__ */ g("h3", {
796
801
  className: "text-sm font-semibold text-text-primary",
797
802
  children: e("healthybowl.fieldMapPage.detail.selected", "Selected: {{name}}", { name: J.name })
798
803
  }),
799
- /* @__PURE__ */ y("dl", {
804
+ /* @__PURE__ */ _("dl", {
800
805
  className: "mt-3 space-y-2 text-sm",
801
806
  children: [
802
- /* @__PURE__ */ y("div", {
807
+ /* @__PURE__ */ _("div", {
803
808
  className: "flex justify-between gap-3",
804
- children: [/* @__PURE__ */ v("dt", {
809
+ children: [/* @__PURE__ */ g("dt", {
805
810
  className: "text-text-secondary",
806
811
  children: e("healthybowl.fieldMapPage.detail.area", "Area")
807
- }), /* @__PURE__ */ y("dd", {
812
+ }), /* @__PURE__ */ _("dd", {
808
813
  className: "font-medium text-text-primary",
809
814
  children: [
810
815
  J.area,
@@ -813,68 +818,68 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
813
818
  ]
814
819
  })]
815
820
  }),
816
- /* @__PURE__ */ y("div", {
821
+ /* @__PURE__ */ _("div", {
817
822
  className: "flex justify-between gap-3",
818
- children: [/* @__PURE__ */ v("dt", {
823
+ children: [/* @__PURE__ */ g("dt", {
819
824
  className: "text-text-secondary",
820
825
  children: e("healthybowl.fieldMapPage.detail.soil", "Soil")
821
- }), /* @__PURE__ */ v("dd", {
826
+ }), /* @__PURE__ */ g("dd", {
822
827
  className: "font-medium text-text-primary",
823
828
  children: J.soilType || e("healthybowl.fieldMapPage.unknownSoil", "Unknown soil")
824
829
  })]
825
830
  }),
826
- /* @__PURE__ */ y("div", {
831
+ /* @__PURE__ */ _("div", {
827
832
  className: "flex justify-between gap-3",
828
- children: [/* @__PURE__ */ v("dt", {
833
+ children: [/* @__PURE__ */ g("dt", {
829
834
  className: "text-text-secondary",
830
835
  children: e("healthybowl.fieldMapPage.detail.irrigation", "Irrigation")
831
- }), /* @__PURE__ */ v("dd", {
836
+ }), /* @__PURE__ */ g("dd", {
832
837
  className: "font-medium text-text-primary",
833
838
  children: J.irrigationType || "—"
834
839
  })]
835
840
  }),
836
- /* @__PURE__ */ y("div", {
841
+ /* @__PURE__ */ _("div", {
837
842
  className: "flex justify-between gap-3",
838
- children: [/* @__PURE__ */ v("dt", {
843
+ children: [/* @__PURE__ */ g("dt", {
839
844
  className: "text-text-secondary",
840
845
  children: e("healthybowl.fieldMapPage.detail.crop", "Crop")
841
- }), /* @__PURE__ */ v("dd", {
846
+ }), /* @__PURE__ */ g("dd", {
842
847
  className: "font-medium text-text-primary",
843
- children: kt(J) || e("healthybowl.fieldMapPage.detail.noCrop", "None")
848
+ children: At(J) || e("healthybowl.fieldMapPage.detail.noCrop", "None")
844
849
  })]
845
850
  }),
846
- /* @__PURE__ */ y("div", {
851
+ /* @__PURE__ */ _("div", {
847
852
  className: "flex justify-between gap-3",
848
- children: [/* @__PURE__ */ v("dt", {
853
+ children: [/* @__PURE__ */ g("dt", {
849
854
  className: "text-text-secondary",
850
855
  children: e("healthybowl.fieldMapPage.detail.status", "Status")
851
- }), /* @__PURE__ */ v("dd", {
856
+ }), /* @__PURE__ */ g("dd", {
852
857
  className: "font-medium capitalize text-text-primary",
853
858
  children: J.status
854
859
  })]
855
860
  })
856
861
  ]
857
862
  }),
858
- /* @__PURE__ */ y("div", {
863
+ /* @__PURE__ */ _("div", {
859
864
  className: "mt-3 flex gap-2",
860
- children: [/* @__PURE__ */ y(b, {
865
+ children: [/* @__PURE__ */ _(v, {
861
866
  variant: "outline",
862
867
  size: "sm",
863
868
  className: "flex-1",
864
- onClick: () => At(J),
869
+ onClick: () => jt(J),
865
870
  children: [
866
- /* @__PURE__ */ v(fe, { className: "h-4 w-4" }),
871
+ /* @__PURE__ */ g(me, { className: "h-4 w-4" }),
867
872
  " ",
868
873
  e("healthybowl.fieldMapPage.detail.flyTo", "Fly to")
869
874
  ]
870
- }), w(J) && /* @__PURE__ */ y(b, {
875
+ }), x(J) && /* @__PURE__ */ _(v, {
871
876
  variant: "outline",
872
877
  size: "sm",
873
878
  className: "flex-1",
874
- onClick: Lt,
875
- disabled: k === "edit",
879
+ onClick: Rt,
880
+ disabled: E === "edit",
876
881
  children: [
877
- /* @__PURE__ */ v(ve, { className: "h-4 w-4" }),
882
+ /* @__PURE__ */ g(be, { className: "h-4 w-4" }),
878
883
  " ",
879
884
  e("healthybowl.fieldMapPage.detail.edit", "Edit")
880
885
  ]
@@ -884,105 +889,105 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
884
889
  })]
885
890
  })]
886
891
  }),
887
- /* @__PURE__ */ v(s, {
892
+ /* @__PURE__ */ g(ee, {
888
893
  open: I !== null,
889
894
  onClose: () => L(null),
890
895
  title: e("healthybowl.fieldMapPage.create.title", "Save New Field"),
891
896
  description: e("healthybowl.fieldMapPage.create.description", "Name the field you just drew. Its area is auto-calculated."),
892
- footer: /* @__PURE__ */ y(xe, { children: [/* @__PURE__ */ v(b, {
897
+ footer: /* @__PURE__ */ _(Ce, { children: [/* @__PURE__ */ g(v, {
893
898
  variant: "outline",
894
899
  onClick: () => L(null),
895
900
  className: "text-text-secondary",
896
901
  children: e("healthybowl.common.cancel", "Cancel")
897
- }), /* @__PURE__ */ v(b, {
898
- onClick: Kt,
899
- disabled: ut,
900
- children: ut ? e("healthybowl.fieldMapPage.create.saving", "Saving…") : e("healthybowl.fieldMapPage.create.action", "Save Field")
902
+ }), /* @__PURE__ */ g(v, {
903
+ onClick: qt,
904
+ disabled: dt,
905
+ children: dt ? e("healthybowl.fieldMapPage.create.saving", "Saving…") : e("healthybowl.fieldMapPage.create.action", "Save Field")
901
906
  })] }),
902
- children: /* @__PURE__ */ y("div", {
907
+ children: /* @__PURE__ */ _("div", {
903
908
  className: "space-y-4",
904
909
  children: [
905
- /* @__PURE__ */ v("div", {
910
+ /* @__PURE__ */ g("div", {
906
911
  className: "rounded-md bg-success/10 px-3 py-2 text-sm text-text-primary",
907
912
  children: e("healthybowl.fieldMapPage.create.areaLine", "Auto-calculated area: {{area}} acres", { area: String(I?.area ?? 0) })
908
913
  }),
909
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
914
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
910
915
  className: "text-sm font-medium text-text-primary",
911
916
  children: e("healthybowl.fieldMapPage.create.name", "Field name *")
912
- }), /* @__PURE__ */ v("input", {
917
+ }), /* @__PURE__ */ g("input", {
913
918
  type: "text",
914
919
  value: R,
915
- onChange: (e) => ft(e.target.value),
920
+ onChange: (e) => pt(e.target.value),
916
921
  placeholder: e("healthybowl.fieldMapPage.create.namePlaceholder", "e.g., North Paddy"),
917
922
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
918
923
  })] }),
919
- /* @__PURE__ */ y("div", {
924
+ /* @__PURE__ */ _("div", {
920
925
  className: "grid grid-cols-2 gap-3",
921
- children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
926
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
922
927
  className: "text-sm font-medium text-text-primary",
923
928
  children: e("healthybowl.fieldMapPage.create.soil", "Soil type")
924
- }), /* @__PURE__ */ y(x, {
925
- value: pt,
926
- onValueChange: mt,
927
- children: [/* @__PURE__ */ v(Ce, {
929
+ }), /* @__PURE__ */ _(we, {
930
+ value: mt,
931
+ onValueChange: ht,
932
+ children: [/* @__PURE__ */ g(Ee, {
928
933
  className: "mt-1 w-full",
929
- children: /* @__PURE__ */ v(we, {})
930
- }), /* @__PURE__ */ v(Se, { children: ie.map((t) => /* @__PURE__ */ v(S, {
934
+ children: /* @__PURE__ */ g(De, {})
935
+ }), /* @__PURE__ */ g(Te, { children: oe.map((t) => /* @__PURE__ */ g(y, {
931
936
  value: t.label,
932
937
  children: e(`healthybowl.fieldMapPage.soil.${t.key}`, t.label)
933
938
  }, t.key)) })]
934
- })] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
939
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
935
940
  className: "text-sm font-medium text-text-primary",
936
941
  children: e("healthybowl.fieldMapPage.create.irrigation", "Irrigation")
937
- }), /* @__PURE__ */ y(x, {
938
- value: ht,
939
- onValueChange: gt,
940
- children: [/* @__PURE__ */ v(Ce, {
942
+ }), /* @__PURE__ */ _(we, {
943
+ value: gt,
944
+ onValueChange: _t,
945
+ children: [/* @__PURE__ */ g(Ee, {
941
946
  className: "mt-1 w-full",
942
- children: /* @__PURE__ */ v(we, {})
943
- }), /* @__PURE__ */ y(Se, { children: [
944
- /* @__PURE__ */ v(S, {
947
+ children: /* @__PURE__ */ g(De, {})
948
+ }), /* @__PURE__ */ _(Te, { children: [
949
+ /* @__PURE__ */ g(y, {
945
950
  value: "Drip",
946
951
  children: e("healthybowl.fieldMapPage.irrigation.drip", "Drip")
947
952
  }),
948
- /* @__PURE__ */ v(S, {
953
+ /* @__PURE__ */ g(y, {
949
954
  value: "Sprinkler",
950
955
  children: e("healthybowl.fieldMapPage.irrigation.sprinkler", "Sprinkler")
951
956
  }),
952
- /* @__PURE__ */ v(S, {
957
+ /* @__PURE__ */ g(y, {
953
958
  value: "Flood",
954
959
  children: e("healthybowl.fieldMapPage.irrigation.flood", "Flood")
955
960
  }),
956
- /* @__PURE__ */ v(S, {
961
+ /* @__PURE__ */ g(y, {
957
962
  value: "Rainfed",
958
963
  children: e("healthybowl.fieldMapPage.irrigation.rainfed", "Rainfed")
959
964
  }),
960
- /* @__PURE__ */ v(S, {
965
+ /* @__PURE__ */ g(y, {
961
966
  value: "None",
962
967
  children: e("healthybowl.fieldMapPage.irrigation.none", "None")
963
968
  })
964
969
  ] })]
965
970
  })] })]
966
971
  }),
967
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
972
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
968
973
  className: "text-sm font-medium text-text-primary",
969
974
  children: e("healthybowl.fieldMapPage.create.status", "Status")
970
- }), /* @__PURE__ */ y(x, {
971
- value: _t,
972
- onValueChange: vt,
973
- children: [/* @__PURE__ */ v(Ce, {
975
+ }), /* @__PURE__ */ _(we, {
976
+ value: vt,
977
+ onValueChange: yt,
978
+ children: [/* @__PURE__ */ g(Ee, {
974
979
  className: "mt-1 w-full",
975
- children: /* @__PURE__ */ v(we, {})
976
- }), /* @__PURE__ */ y(Se, { children: [
977
- /* @__PURE__ */ v(S, {
980
+ children: /* @__PURE__ */ g(De, {})
981
+ }), /* @__PURE__ */ _(Te, { children: [
982
+ /* @__PURE__ */ g(y, {
978
983
  value: "active",
979
984
  children: e("healthybowl.fieldMapPage.status.active", "Active")
980
985
  }),
981
- /* @__PURE__ */ v(S, {
986
+ /* @__PURE__ */ g(y, {
982
987
  value: "preparation",
983
988
  children: e("healthybowl.fieldMapPage.status.preparation", "Preparation")
984
989
  }),
985
- /* @__PURE__ */ v(S, {
990
+ /* @__PURE__ */ g(y, {
986
991
  value: "fallow",
987
992
  children: e("healthybowl.fieldMapPage.status.fallow", "Fallow")
988
993
  })
@@ -991,14 +996,14 @@ var C = /* @__PURE__ */ e(c(), 1), De = Te`
991
996
  ]
992
997
  })
993
998
  }),
994
- /* @__PURE__ */ v(a, {
995
- toasts: We,
996
- onDismiss: Ge
999
+ /* @__PURE__ */ g(a, {
1000
+ toasts: Je,
1001
+ onDismiss: Ye
997
1002
  })
998
1003
  ]
999
1004
  });
1000
1005
  };
1001
1006
  //#endregion
1002
- export { He as FieldMapPage };
1007
+ export { S as FieldMapPage };
1003
1008
 
1004
1009
  //# sourceMappingURL=FieldMapPage.js.map