@burdenoff/microfe-theglobalfuel 2026.705.5 → 2026.709.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 (241) hide show
  1. package/README.md +3 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/generated/global-operations.d.ts +2 -0
  5. package/dist/generated/global-operations.d.ts.map +1 -0
  6. package/dist/generated/global-types.d.ts +18199 -0
  7. package/dist/generated/global-types.d.ts.map +1 -0
  8. package/dist/generated/wspace-operations.d.ts +2 -0
  9. package/dist/generated/wspace-operations.d.ts.map +1 -0
  10. package/dist/generated/wspace-types.d.ts +43046 -0
  11. package/dist/generated/wspace-types.d.ts.map +1 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +3 -1
  15. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts +5 -0
  16. package/dist/theglobalfuel/TheGlobalFuelRoot.d.ts.map +1 -0
  17. package/dist/theglobalfuel/TheGlobalFuelRoot.js +106 -104
  18. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  19. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts +4 -0
  20. package/dist/theglobalfuel/TheGlobalFuelRoutes.d.ts.map +1 -0
  21. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +60 -38
  22. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  23. package/dist/theglobalfuel/components/DataTable.d.ts +30 -0
  24. package/dist/theglobalfuel/components/DataTable.d.ts.map +1 -0
  25. package/dist/theglobalfuel/components/DataTable.js.map +1 -1
  26. package/dist/theglobalfuel/components/EmptyState.d.ts +18 -0
  27. package/dist/theglobalfuel/components/EmptyState.d.ts.map +1 -0
  28. package/dist/theglobalfuel/components/EvidenceUpload.d.ts +14 -0
  29. package/dist/theglobalfuel/components/EvidenceUpload.d.ts.map +1 -0
  30. package/dist/theglobalfuel/components/FileLink.d.ts +15 -0
  31. package/dist/theglobalfuel/components/FileLink.d.ts.map +1 -0
  32. package/dist/theglobalfuel/components/FilterTabs.d.ts +18 -0
  33. package/dist/theglobalfuel/components/FilterTabs.d.ts.map +1 -0
  34. package/dist/theglobalfuel/components/MetricsCard.d.ts +23 -0
  35. package/dist/theglobalfuel/components/MetricsCard.d.ts.map +1 -0
  36. package/dist/theglobalfuel/components/MiniBar.d.ts +16 -0
  37. package/dist/theglobalfuel/components/MiniBar.d.ts.map +1 -0
  38. package/dist/theglobalfuel/components/PageLayout.d.ts +18 -0
  39. package/dist/theglobalfuel/components/PageLayout.d.ts.map +1 -0
  40. package/dist/theglobalfuel/components/PageLayout.js +2 -1
  41. package/dist/theglobalfuel/components/PageLayout.js.map +1 -1
  42. package/dist/theglobalfuel/components/Pagination.d.ts +22 -0
  43. package/dist/theglobalfuel/components/Pagination.d.ts.map +1 -0
  44. package/dist/theglobalfuel/components/StateViews.d.ts +24 -0
  45. package/dist/theglobalfuel/components/StateViews.d.ts.map +1 -0
  46. package/dist/theglobalfuel/components/StatusBadge.d.ts +9 -0
  47. package/dist/theglobalfuel/components/StatusBadge.d.ts.map +1 -0
  48. package/dist/theglobalfuel/components/Tabs.d.ts +17 -0
  49. package/dist/theglobalfuel/components/Tabs.d.ts.map +1 -0
  50. package/dist/theglobalfuel/components/TheDiscussion.d.ts +18 -0
  51. package/dist/theglobalfuel/components/TheDiscussion.d.ts.map +1 -0
  52. package/dist/theglobalfuel/components/TheTags.d.ts +17 -0
  53. package/dist/theglobalfuel/components/TheTags.d.ts.map +1 -0
  54. package/dist/theglobalfuel/components/WorldMap.d.ts +18 -0
  55. package/dist/theglobalfuel/components/WorldMap.d.ts.map +1 -0
  56. package/dist/theglobalfuel/components/WorldMap.js.map +1 -1
  57. package/dist/theglobalfuel/components/index.d.ts +21 -0
  58. package/dist/theglobalfuel/components/index.d.ts.map +1 -0
  59. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts +21 -0
  60. package/dist/theglobalfuel/components/viz/AllocationBar.d.ts.map +1 -0
  61. package/dist/theglobalfuel/components/viz/AreaChart.d.ts +18 -0
  62. package/dist/theglobalfuel/components/viz/AreaChart.d.ts.map +1 -0
  63. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts +13 -0
  64. package/dist/theglobalfuel/components/viz/AvatarStack.d.ts.map +1 -0
  65. package/dist/theglobalfuel/components/viz/BarChart.d.ts +17 -0
  66. package/dist/theglobalfuel/components/viz/BarChart.d.ts.map +1 -0
  67. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts +14 -0
  68. package/dist/theglobalfuel/components/viz/CertificateCard.d.ts.map +1 -0
  69. package/dist/theglobalfuel/components/viz/DonutChart.d.ts +20 -0
  70. package/dist/theglobalfuel/components/viz/DonutChart.d.ts.map +1 -0
  71. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts +17 -0
  72. package/dist/theglobalfuel/components/viz/HBarFunnel.d.ts.map +1 -0
  73. package/dist/theglobalfuel/components/viz/Heatmap.d.ts +26 -0
  74. package/dist/theglobalfuel/components/viz/Heatmap.d.ts.map +1 -0
  75. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts +17 -0
  76. package/dist/theglobalfuel/components/viz/KanbanBoard.d.ts.map +1 -0
  77. package/dist/theglobalfuel/components/viz/LineChart.d.ts +20 -0
  78. package/dist/theglobalfuel/components/viz/LineChart.d.ts.map +1 -0
  79. package/dist/theglobalfuel/components/viz/OrgTree.d.ts +14 -0
  80. package/dist/theglobalfuel/components/viz/OrgTree.d.ts.map +1 -0
  81. package/dist/theglobalfuel/components/viz/PathSteps.d.ts +17 -0
  82. package/dist/theglobalfuel/components/viz/PathSteps.d.ts.map +1 -0
  83. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts +20 -0
  84. package/dist/theglobalfuel/components/viz/ProgressRing.d.ts.map +1 -0
  85. package/dist/theglobalfuel/components/viz/RatingStars.d.ts +14 -0
  86. package/dist/theglobalfuel/components/viz/RatingStars.d.ts.map +1 -0
  87. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts +26 -0
  88. package/dist/theglobalfuel/components/viz/SegmentedTabs.d.ts.map +1 -0
  89. package/dist/theglobalfuel/components/viz/SkillBar.d.ts +17 -0
  90. package/dist/theglobalfuel/components/viz/SkillBar.d.ts.map +1 -0
  91. package/dist/theglobalfuel/components/viz/Sparkline.d.ts +16 -0
  92. package/dist/theglobalfuel/components/viz/Sparkline.d.ts.map +1 -0
  93. package/dist/theglobalfuel/components/viz/StatCard.d.ts +22 -0
  94. package/dist/theglobalfuel/components/viz/StatCard.d.ts.map +1 -0
  95. package/dist/theglobalfuel/components/viz/StepProgress.d.ts +17 -0
  96. package/dist/theglobalfuel/components/viz/StepProgress.d.ts.map +1 -0
  97. package/dist/theglobalfuel/components/viz/Timeline.d.ts +21 -0
  98. package/dist/theglobalfuel/components/viz/Timeline.d.ts.map +1 -0
  99. package/dist/theglobalfuel/components/viz/index.d.ts +35 -0
  100. package/dist/theglobalfuel/components/viz/index.d.ts.map +1 -0
  101. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts +15 -0
  102. package/dist/theglobalfuel/components/viz/lib/Avatar.d.ts.map +1 -0
  103. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts +44 -0
  104. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.d.ts.map +1 -0
  105. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts +27 -0
  106. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.d.ts.map +1 -0
  107. package/dist/theglobalfuel/components/viz/lib/format.d.ts +10 -0
  108. package/dist/theglobalfuel/components/viz/lib/format.d.ts.map +1 -0
  109. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts +41 -0
  110. package/dist/theglobalfuel/components/viz/lib/geometry.d.ts.map +1 -0
  111. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts +18 -0
  112. package/dist/theglobalfuel/components/viz/lib/hooks.d.ts.map +1 -0
  113. package/dist/theglobalfuel/components/viz/lib/palette.d.ts +31 -0
  114. package/dist/theglobalfuel/components/viz/lib/palette.d.ts.map +1 -0
  115. package/dist/theglobalfuel/components/viz/lib/types.d.ts +27 -0
  116. package/dist/theglobalfuel/components/viz/lib/types.d.ts.map +1 -0
  117. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts +16 -0
  118. package/dist/theglobalfuel/context/TheGlobalFuelContext.d.ts.map +1 -0
  119. package/dist/theglobalfuel/context/index.d.ts +6 -0
  120. package/dist/theglobalfuel/context/index.d.ts.map +1 -0
  121. package/dist/theglobalfuel/hooks/index.d.ts +15 -0
  122. package/dist/theglobalfuel/hooks/index.d.ts.map +1 -0
  123. package/dist/theglobalfuel/hooks/index.js +4 -0
  124. package/dist/theglobalfuel/hooks/useCursorPager.d.ts +26 -0
  125. package/dist/theglobalfuel/hooks/useCursorPager.d.ts.map +1 -0
  126. package/dist/theglobalfuel/hooks/useNotify.d.ts +23 -0
  127. package/dist/theglobalfuel/hooks/useNotify.d.ts.map +1 -0
  128. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts +38 -0
  129. package/dist/theglobalfuel/hooks/useTheAnalytics.d.ts.map +1 -0
  130. package/dist/theglobalfuel/hooks/useTheAnalytics.js +46 -0
  131. package/dist/theglobalfuel/hooks/useTheAnalytics.js.map +1 -0
  132. package/dist/theglobalfuel/hooks/useTheComments.d.ts +36 -0
  133. package/dist/theglobalfuel/hooks/useTheComments.d.ts.map +1 -0
  134. package/dist/theglobalfuel/hooks/useTheFiles.d.ts +47 -0
  135. package/dist/theglobalfuel/hooks/useTheFiles.d.ts.map +1 -0
  136. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts +79 -0
  137. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.d.ts.map +1 -0
  138. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js +2 -9
  139. package/dist/theglobalfuel/hooks/useTheGlobalFuelApi.js.map +1 -1
  140. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts +20 -0
  141. package/dist/theglobalfuel/hooks/useTheNativeControls.d.ts.map +1 -0
  142. package/dist/theglobalfuel/hooks/useTheNativeControls.js +22 -0
  143. package/dist/theglobalfuel/hooks/useTheNativeControls.js.map +1 -0
  144. package/dist/theglobalfuel/hooks/useThePageView.d.ts +10 -0
  145. package/dist/theglobalfuel/hooks/useThePageView.d.ts.map +1 -0
  146. package/dist/theglobalfuel/hooks/useThePageView.js +13 -0
  147. package/dist/theglobalfuel/hooks/useThePageView.js.map +1 -0
  148. package/dist/theglobalfuel/hooks/useTheTags.d.ts +44 -0
  149. package/dist/theglobalfuel/hooks/useTheTags.d.ts.map +1 -0
  150. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts +4 -0
  151. package/dist/theglobalfuel/hooks/useTheTranslation.d.ts.map +1 -0
  152. package/dist/theglobalfuel/hooks/useTheTranslation.js +12 -0
  153. package/dist/theglobalfuel/hooks/useTheTranslation.js.map +1 -0
  154. package/dist/theglobalfuel/index.d.ts +11 -0
  155. package/dist/theglobalfuel/index.d.ts.map +1 -0
  156. package/dist/theglobalfuel/index.js +2 -0
  157. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts +13 -0
  158. package/dist/theglobalfuel/pages/assets/AssetDetailPage.d.ts.map +1 -0
  159. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +395 -353
  160. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  161. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts +10 -0
  162. package/dist/theglobalfuel/pages/assets/AssetsPage.d.ts.map +1 -0
  163. package/dist/theglobalfuel/pages/assets/AssetsPage.js +152 -146
  164. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  165. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts +11 -0
  166. package/dist/theglobalfuel/pages/compliance/CompliancePage.d.ts.map +1 -0
  167. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +233 -229
  168. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  169. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts +9 -0
  170. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.d.ts.map +1 -0
  171. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js +410 -389
  172. package/dist/theglobalfuel/pages/contracts/ContractDetailPage.js.map +1 -1
  173. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts +8 -0
  174. package/dist/theglobalfuel/pages/contracts/ContractsPage.d.ts.map +1 -0
  175. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +237 -231
  176. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  177. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts +17 -0
  178. package/dist/theglobalfuel/pages/dashboard/DashboardPage.d.ts.map +1 -0
  179. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +255 -250
  180. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
  181. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts +13 -0
  182. package/dist/theglobalfuel/pages/emissions/EmissionsPage.d.ts.map +1 -0
  183. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +154 -150
  184. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
  185. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts +11 -0
  186. package/dist/theglobalfuel/pages/inventory/InventoryPage.d.ts.map +1 -0
  187. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +151 -147
  188. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  189. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts +11 -0
  190. package/dist/theglobalfuel/pages/production/ProductionPage.d.ts.map +1 -0
  191. package/dist/theglobalfuel/pages/production/ProductionPage.js +175 -171
  192. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  193. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts +23 -0
  194. package/dist/theglobalfuel/pages/provenance/ProvenancePage.d.ts.map +1 -0
  195. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +153 -146
  196. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -1
  197. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts +10 -0
  198. package/dist/theglobalfuel/pages/reserves/ReservesPage.d.ts.map +1 -0
  199. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +168 -164
  200. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  201. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts +11 -0
  202. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.d.ts.map +1 -0
  203. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +179 -175
  204. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  205. package/dist/theglobalfuel/services/assistantApi.d.ts +25 -0
  206. package/dist/theglobalfuel/services/assistantApi.d.ts.map +1 -0
  207. package/dist/theglobalfuel/services/assistantApi.js +225 -0
  208. package/dist/theglobalfuel/services/assistantApi.js.map +1 -0
  209. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts +38 -0
  210. package/dist/theglobalfuel/services/createSandboxAssistantTransport.d.ts.map +1 -0
  211. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js +120 -0
  212. package/dist/theglobalfuel/services/createSandboxAssistantTransport.js.map +1 -0
  213. package/dist/theglobalfuel/services/index.d.ts +7 -0
  214. package/dist/theglobalfuel/services/index.d.ts.map +1 -0
  215. package/dist/theglobalfuel/types/assistant.d.ts +65 -0
  216. package/dist/theglobalfuel/types/assistant.d.ts.map +1 -0
  217. package/dist/theglobalfuel/types/index.d.ts +376 -0
  218. package/dist/theglobalfuel/types/index.d.ts.map +1 -0
  219. package/dist/theglobalfuel/utils/cn.d.ts +4 -0
  220. package/dist/theglobalfuel/utils/cn.d.ts.map +1 -0
  221. package/dist/theglobalfuel/utils/formatters.d.ts +44 -0
  222. package/dist/theglobalfuel/utils/formatters.d.ts.map +1 -0
  223. package/dist/theglobalfuel/utils/i18n.d.ts +5 -0
  224. package/dist/theglobalfuel/utils/i18n.d.ts.map +1 -0
  225. package/dist/theglobalfuel/utils/i18n.js +15 -0
  226. package/dist/theglobalfuel/utils/i18n.js.map +1 -0
  227. package/dist/theglobalfuel/utils/index.d.ts +10 -0
  228. package/dist/theglobalfuel/utils/index.d.ts.map +1 -0
  229. package/dist/theglobalfuel/utils/navigation.d.ts +14 -0
  230. package/dist/theglobalfuel/utils/navigation.d.ts.map +1 -0
  231. package/dist/theglobalfuel/utils/pageContext.d.ts +26 -0
  232. package/dist/theglobalfuel/utils/pageContext.d.ts.map +1 -0
  233. package/dist/theglobalfuel/utils/pageContext.js +65 -0
  234. package/dist/theglobalfuel/utils/pageContext.js.map +1 -0
  235. package/dist/theglobalfuel/utils/transitions.d.ts +17 -0
  236. package/dist/theglobalfuel/utils/transitions.d.ts.map +1 -0
  237. package/package.json +5 -1
  238. package/dist/node_modules/clsx/dist/clsx.js +0 -18
  239. package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
  240. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1716
  241. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
@@ -1,28 +1,33 @@
1
1
  import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { MetricsCard as n } from "../../components/MetricsCard.js";
4
- import { formatCoords as ee, formatDate as r, formatEnumLabel as i, formatNumber as a, formatPercent as o, formatRelativeTime as s, formatTonnesCo2e as te, formatVolume as c, toBackendDate as l } from "../../utils/formatters.js";
5
- import { StatusBadge as u } from "../../components/StatusBadge.js";
6
- import { DataTable as d } from "../../components/DataTable.js";
7
- import { ErrorView as ne, LoadingView as f, Section as p } from "../../components/StateViews.js";
4
+ import { formatCoords as ee, formatDate as r, formatEnumLabel as i, formatNumber as te, formatPercent as a, formatRelativeTime as o, formatTonnesCo2e as ne, formatVolume as s, toBackendDate as c } from "../../utils/formatters.js";
5
+ import { StatusBadge as l } from "../../components/StatusBadge.js";
6
+ import { DataTable as u } from "../../components/DataTable.js";
7
+ import { ErrorView as d, LoadingView as f, Section as p } from "../../components/StateViews.js";
8
8
  import { EmptyState as m } from "../../components/EmptyState.js";
9
9
  import "../../context/index.js";
10
- import { useTheAsset as re, useTheCreateReserveEstimate as ie, useTheEmissionRecords as ae, useTheRecordProduction as oe, useTheRetireAsset as se, useTheTransitionAsset as ce } from "../../hooks/useTheGlobalFuelApi.js";
11
- import { useNotify as le } from "../../hooks/useNotify.js";
10
+ import { useTheAsset as re, useTheCreateReserveEstimate as ie, useTheEmissionRecords as ae, useTheProductionRecords as oe, useTheRecordProduction as se, useTheReserveEstimates as ce, useTheRetireAsset as le, useTheTransitionAsset as ue } from "../../hooks/useTheGlobalFuelApi.js";
11
+ import { useCursorPager as de } from "../../hooks/useCursorPager.js";
12
+ import { useNotify as fe } from "../../hooks/useNotify.js";
13
+ import { useTheAnalytics as pe } from "../../hooks/useTheAnalytics.js";
14
+ import { useThePageView as me } from "../../hooks/useThePageView.js";
15
+ import { useTheNativeControls as he } from "../../hooks/useTheNativeControls.js";
12
16
  import "../../hooks/index.js";
13
- import { ASSET_TRANSITIONS as ue, nextStatuses as de } from "../../utils/transitions.js";
14
- import { Tabs as fe } from "../../components/Tabs.js";
15
- import { TheDiscussion as pe } from "../../components/TheDiscussion.js";
16
- import { TheTags as me } from "../../components/TheTags.js";
17
- import { WorldMap as he } from "../../components/WorldMap.js";
17
+ import { ASSET_TRANSITIONS as ge, nextStatuses as _e } from "../../utils/transitions.js";
18
+ import { Tabs as ve } from "../../components/Tabs.js";
19
+ import { Pagination as ye } from "../../components/Pagination.js";
20
+ import { TheDiscussion as be } from "../../components/TheDiscussion.js";
21
+ import { TheTags as xe } from "../../components/TheTags.js";
22
+ import { WorldMap as Se } from "../../components/WorldMap.js";
18
23
  import "../../components/index.js";
19
24
  import { useState as h } from "react";
20
- import { Activity as ge, Archive as _e, ArrowLeft as ve, CalendarClock as ye, Factory as be, Fuel as xe, Gauge as Se, Layers as Ce, MapPin as we, MessageSquare as Te, Percent as Ee, Plus as g, Tag as De } from "lucide-react";
21
- import { useParams as Oe } from "react-router-dom";
22
- import { Fragment as ke, jsx as _, jsxs as v } from "react/jsx-runtime";
23
- import { Button as y, GlassCard as b, Input as x, Label as S, ResponsiveDialog as C, ResponsiveDialogContent as w, ResponsiveDialogDescription as Ae, ResponsiveDialogFooter as je, ResponsiveDialogHeader as Me, ResponsiveDialogTitle as Ne, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k, Textarea as Pe } from "@burdenoff/fe-libs/ui";
25
+ import { Activity as Ce, Archive as we, ArrowLeft as Te, CalendarClock as Ee, Factory as De, Fuel as Oe, Gauge as ke, Layers as Ae, MapPin as je, MessageSquare as Me, Percent as Ne, Plus as g, Tag as Pe } from "lucide-react";
26
+ import { useParams as Fe } from "react-router-dom";
27
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
28
+ import { Button as b, GlassCard as x, Input as S, Label as C, ResponsiveDialog as Ie, ResponsiveDialogContent as Le, ResponsiveDialogDescription as Re, ResponsiveDialogFooter as ze, ResponsiveDialogHeader as Be, ResponsiveDialogTitle as Ve, Select as w, SelectContent as T, SelectItem as E, SelectTrigger as D, SelectValue as O, Textarea as He } from "@burdenoff/fe-libs/ui";
24
29
  //#region src/theglobalfuel/pages/assets/AssetDetailPage.tsx
25
- var Fe = [
30
+ var k = 25, Ue = [
26
31
  "BARRELS",
27
32
  "CUBIC_METERS",
28
33
  "TONNES",
@@ -30,7 +35,7 @@ var Fe = [
30
35
  "MWH",
31
36
  "GJ",
32
37
  "MCF"
33
- ], Ie = [
38
+ ], We = [
34
39
  "PROVED",
35
40
  "PROBABLE",
36
41
  "POSSIBLE",
@@ -38,19 +43,30 @@ var Fe = [
38
43
  "PROSPECTIVE"
39
44
  ], A = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
40
45
  function j({ label: e, value: t }) {
41
- return /* @__PURE__ */ v("div", {
46
+ return /* @__PURE__ */ y("div", {
42
47
  className: "flex flex-col gap-0.5 border-b border-border-seam/60 py-2.5 last:border-b-0",
43
- children: [/* @__PURE__ */ _("dt", {
48
+ children: [/* @__PURE__ */ v("dt", {
44
49
  className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
45
50
  children: e
46
- }), /* @__PURE__ */ _("dd", {
51
+ }), /* @__PURE__ */ v("dd", {
47
52
  className: "truncate text-sm text-text-primary",
48
53
  children: t
49
54
  })]
50
55
  });
51
56
  }
52
57
  function M() {
53
- let { id: M } = Oe(), { navigateTo: N } = e(), P = le(), { data: F, isLoading: Le, isError: Re, refetch: ze } = re(M), I = ae({ assetId: M }), Be = ce(), Ve = se(), L = oe(), R = ie(), [z, He] = h("production"), [B, V] = h(null), [Ue, H] = h(!1), [U, W] = h({
58
+ let { id: M } = Fe(), { navigateTo: N } = e(), P = fe();
59
+ me("asset-detail");
60
+ let { haptic: Ge, confirm: Ke } = he(), { data: F, isLoading: qe, isError: Je, refetch: Ye } = re(M), I = ae({ assetId: M }), L = de(), R = de(), z = oe({
61
+ assetId: M,
62
+ pagination: {
63
+ limit: k,
64
+ offset: L.page * k
65
+ }
66
+ }), B = ce(M, void 0, {
67
+ limit: k,
68
+ offset: R.page * k
69
+ }), { trackProductionRecordClicked: Xe, trackProductionRecorded: Ze, trackReserveCreateClicked: Qe, trackReserveCreated: $e } = pe(), et = ue(), tt = le(), V = se(), H = ie(), [U, nt] = h("production"), [W, G] = h(null), [rt, K] = h(!1), [q, J] = h({
54
70
  periodStart: "",
55
71
  periodEnd: "",
56
72
  volume: "",
@@ -58,7 +74,7 @@ function M() {
58
74
  grade: "",
59
75
  downtimeHours: "",
60
76
  notes: ""
61
- }), [We, G] = h(!1), [K, q] = h({
77
+ }), [it, at] = h(!1), [Y, X] = h({
62
78
  category: "PROVED",
63
79
  asOfDate: "",
64
80
  recoverable: "",
@@ -67,38 +83,40 @@ function M() {
67
83
  methodology: "",
68
84
  notes: ""
69
85
  });
70
- if (Le) return /* @__PURE__ */ _(t, {
86
+ if (qe) return /* @__PURE__ */ v(t, {
71
87
  title: "Asset",
72
- children: /* @__PURE__ */ _(f, { label: "Loading asset…" })
88
+ dataTour: "theglobalfuel-asset-detail-page",
89
+ children: /* @__PURE__ */ v(f, { label: "Loading asset…" })
73
90
  });
74
- if (Re || !F) return /* @__PURE__ */ _(t, {
91
+ if (Je || !F) return /* @__PURE__ */ v(t, {
75
92
  title: "Asset",
76
- actions: /* @__PURE__ */ v(y, {
93
+ dataTour: "theglobalfuel-asset-detail-page",
94
+ actions: /* @__PURE__ */ y(b, {
77
95
  variant: "ghost",
78
96
  onClick: () => N("assets"),
79
- children: [/* @__PURE__ */ _(ve, { className: "mr-1.5 h-4 w-4" }), " Back"]
97
+ children: [/* @__PURE__ */ v(Te, { className: "mr-1.5 h-4 w-4" }), " Back"]
80
98
  }),
81
- children: Re ? /* @__PURE__ */ _(ne, {
99
+ children: Je ? /* @__PURE__ */ v(d, {
82
100
  message: "This asset could not be loaded.",
83
- onRetry: () => ze()
84
- }) : /* @__PURE__ */ _(m, {
101
+ onRetry: () => Ye()
102
+ }) : /* @__PURE__ */ v(m, {
85
103
  illustration: "empty-search",
86
- icon: /* @__PURE__ */ _(xe, { className: "h-10 w-10" }),
104
+ icon: /* @__PURE__ */ v(Oe, { className: "h-10 w-10" }),
87
105
  title: "Asset not found",
88
106
  description: "This asset may have been retired or you may not have access to it.",
89
- action: /* @__PURE__ */ _(y, {
107
+ action: /* @__PURE__ */ v(b, {
90
108
  onClick: () => N("assets"),
91
109
  children: "Back to assets"
92
110
  })
93
111
  })
94
112
  });
95
- let J = F.productionRecords ?? [], Y = F.reserveEstimates ?? [], X = I.data?.items ?? [], Ge = F.status === "RETIRED", Ke = de(ue, F.status), qe = typeof F.latitude == "number" && typeof F.longitude == "number" ? {
113
+ let Z = z.data?.items ?? [], Q = B.data?.items ?? [], ot = I.data?.items ?? [], st = F.status === "RETIRED", ct = _e(ge, F.status), lt = typeof F.latitude == "number" && typeof F.longitude == "number" ? {
96
114
  lat: F.latitude,
97
115
  lng: F.longitude,
98
116
  label: F.name,
99
117
  primary: !0
100
- } : null, Je = () => {
101
- V(null), W({
118
+ } : null, ut = () => {
119
+ G(null), Ge("light"), Xe(), J({
102
120
  periodStart: A(),
103
121
  periodEnd: A(),
104
122
  volume: "",
@@ -106,9 +124,9 @@ function M() {
106
124
  grade: "",
107
125
  downtimeHours: "",
108
126
  notes: ""
109
- }), H(!0);
110
- }, Z = () => {
111
- V(null), q({
127
+ }), K(!0);
128
+ }, dt = () => {
129
+ G(null), Ge("light"), Qe(), X({
112
130
  category: "PROVED",
113
131
  asOfDate: A(),
114
132
  recoverable: "",
@@ -116,9 +134,9 @@ function M() {
116
134
  unit: F.capacityUnit,
117
135
  methodology: "",
118
136
  notes: ""
119
- }), G(!0);
120
- }, Q = () => {
121
- H(!1), V(null), W({
137
+ }), at(!0);
138
+ }, ft = () => {
139
+ K(!1), G(null), J({
122
140
  periodStart: "",
123
141
  periodEnd: "",
124
142
  volume: "",
@@ -128,7 +146,7 @@ function M() {
128
146
  notes: ""
129
147
  });
130
148
  }, $ = () => {
131
- G(!1), V(null), q({
149
+ at(!1), G(null), X({
132
150
  category: "PROVED",
133
151
  asOfDate: "",
134
152
  recoverable: "",
@@ -137,87 +155,92 @@ function M() {
137
155
  methodology: "",
138
156
  notes: ""
139
157
  });
140
- }, Ye = async (e) => {
158
+ }, pt = async (e) => {
141
159
  if (!(!M || e === F.status)) {
142
- V(null);
160
+ G(null);
143
161
  try {
144
- await Be.mutateAsync({
162
+ await et.mutateAsync({
145
163
  id: M,
146
164
  status: e
147
165
  }), P.success(`Status changed to ${i(e)}`);
148
166
  } catch (e) {
149
- P.fromError(e), V(e instanceof Error ? e.message : "Failed to change asset status.");
167
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to change asset status.");
150
168
  }
151
169
  }
152
- }, Xe = async () => {
153
- if (M && window.confirm(`Retire ${F.name}? This marks the asset as decommissioned.`)) {
154
- V(null);
170
+ }, mt = async () => {
171
+ if (M && await Ke({
172
+ title: `Retire ${F.name}?`,
173
+ message: "This marks the asset as decommissioned.",
174
+ okButtonTitle: "Retire",
175
+ cancelButtonTitle: "Cancel"
176
+ })) {
177
+ G(null);
155
178
  try {
156
- await Ve.mutateAsync(M), P.success("Asset retired"), N("assets");
179
+ await tt.mutateAsync(M), P.success("Asset retired"), N("assets");
157
180
  } catch (e) {
158
- P.fromError(e), V(e instanceof Error ? e.message : "Failed to retire asset.");
181
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to retire asset.");
159
182
  }
160
183
  }
161
- }, Ze = async () => {
162
- let e = l(U.periodStart), t = l(U.periodEnd);
184
+ }, ht = async () => {
185
+ let e = c(q.periodStart), t = c(q.periodEnd);
163
186
  if (!M || !e || !t) {
164
- V("Period start and period end are required.");
187
+ G("Period start and period end are required.");
165
188
  return;
166
189
  }
167
- let n = Number(U.volume);
168
- if (!U.volume || !Number.isFinite(n) || n <= 0) {
190
+ let n = Number(q.volume);
191
+ if (!q.volume || !Number.isFinite(n) || n <= 0) {
169
192
  let e = "Volume must be greater than zero.";
170
- V(e), P.error(e);
193
+ G(e), P.error(e);
171
194
  return;
172
195
  }
173
- V(null);
196
+ G(null);
174
197
  try {
175
- await L.mutateAsync({
198
+ Ze((await V.mutateAsync({
176
199
  assetId: M,
177
200
  periodStart: e,
178
201
  periodEnd: t,
179
202
  volume: n,
180
- unit: U.unit,
181
- grade: U.grade ? Number(U.grade) : null,
182
- downtimeHours: U.downtimeHours ? Number(U.downtimeHours) : null,
183
- notes: U.notes.trim() || null
184
- }), P.success("Production recorded"), Q();
203
+ unit: q.unit,
204
+ grade: q.grade ? Number(q.grade) : null,
205
+ downtimeHours: q.downtimeHours ? Number(q.downtimeHours) : null,
206
+ notes: q.notes.trim() || null
207
+ })).id), P.success("Production recorded"), ft();
185
208
  } catch (e) {
186
- P.fromError(e), V(e instanceof Error ? e.message : "Failed to record production.");
209
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to record production.");
187
210
  }
188
- }, Qe = async () => {
189
- let e = l(K.asOfDate);
211
+ }, gt = async () => {
212
+ let e = c(Y.asOfDate);
190
213
  if (!M || !e) {
191
- V("As-of date is required.");
214
+ G("As-of date is required.");
192
215
  return;
193
216
  }
194
- let t = Number(K.recoverable);
195
- if (!K.recoverable || !Number.isFinite(t) || t <= 0) {
217
+ let t = Number(Y.recoverable);
218
+ if (!Y.recoverable || !Number.isFinite(t) || t <= 0) {
196
219
  let e = "Recoverable volume must be greater than zero.";
197
- V(e), P.error(e);
220
+ G(e), P.error(e);
198
221
  return;
199
222
  }
200
- V(null);
223
+ G(null);
201
224
  try {
202
- await R.mutateAsync({
225
+ $e((await H.mutateAsync({
203
226
  assetId: M,
204
- category: K.category,
227
+ category: Y.category,
205
228
  asOfDate: e,
206
229
  recoverable: t,
207
- recoveryFactor: K.recoveryFactor ? Number(K.recoveryFactor) : null,
208
- unit: K.unit,
209
- methodology: K.methodology.trim() || null,
210
- notes: K.notes.trim() || null
211
- }), P.success("Reserve estimate added"), $();
230
+ recoveryFactor: Y.recoveryFactor ? Number(Y.recoveryFactor) : null,
231
+ unit: Y.unit,
232
+ methodology: Y.methodology.trim() || null,
233
+ notes: Y.notes.trim() || null
234
+ })).id), P.success("Reserve estimate added"), $();
212
235
  } catch (e) {
213
- P.fromError(e), V(e instanceof Error ? e.message : "Failed to add reserve estimate.");
236
+ P.fromError(e), G(e instanceof Error ? e.message : "Failed to add reserve estimate.");
214
237
  }
215
- }, $e = [
238
+ }, _t = [
216
239
  {
217
240
  key: "period",
218
241
  header: "Period",
219
242
  sortValue: (e) => new Date(e.periodEnd || e.createdAt).getTime(),
220
- render: (e) => /* @__PURE__ */ v("span", {
243
+ render: (e) => /* @__PURE__ */ y("span", {
221
244
  className: "font-medium text-text-primary",
222
245
  children: [
223
246
  r(e.periodStart),
@@ -231,9 +254,9 @@ function M() {
231
254
  header: "Volume",
232
255
  align: "right",
233
256
  sortValue: (e) => e.volume,
234
- render: (e) => /* @__PURE__ */ _("span", {
257
+ render: (e) => /* @__PURE__ */ v("span", {
235
258
  className: "tabular-nums font-medium text-text-primary",
236
- children: c(e.volume, e.unit)
259
+ children: s(e.volume, e.unit)
237
260
  })
238
261
  },
239
262
  {
@@ -241,12 +264,12 @@ function M() {
241
264
  header: "Grade",
242
265
  align: "right",
243
266
  hideOnMobile: !0,
244
- render: (e) => e.grade == null ? /* @__PURE__ */ _("span", {
267
+ render: (e) => e.grade == null ? /* @__PURE__ */ v("span", {
245
268
  className: "text-text-tertiary",
246
269
  children: "—"
247
- }) : /* @__PURE__ */ _("span", {
270
+ }) : /* @__PURE__ */ v("span", {
248
271
  className: "tabular-nums text-text-secondary",
249
- children: a(e.grade)
272
+ children: te(e.grade)
250
273
  })
251
274
  },
252
275
  {
@@ -255,19 +278,19 @@ function M() {
255
278
  align: "right",
256
279
  hideOnMobile: !0,
257
280
  sortValue: (e) => e.downtimeHours,
258
- render: (e) => /* @__PURE__ */ v("span", {
281
+ render: (e) => /* @__PURE__ */ y("span", {
259
282
  className: "tabular-nums text-text-secondary",
260
- children: [a(e.downtimeHours), " h"]
283
+ children: [te(e.downtimeHours), " h"]
261
284
  })
262
285
  },
263
286
  {
264
287
  key: "notes",
265
288
  header: "Notes",
266
289
  hideOnMobile: !0,
267
- render: (e) => e.notes ? /* @__PURE__ */ _("span", {
290
+ render: (e) => e.notes ? /* @__PURE__ */ v("span", {
268
291
  className: "block max-w-[16rem] truncate text-text-secondary",
269
292
  children: e.notes
270
- }) : /* @__PURE__ */ _("span", {
293
+ }) : /* @__PURE__ */ v("span", {
271
294
  className: "text-text-tertiary",
272
295
  children: "—"
273
296
  })
@@ -277,21 +300,21 @@ function M() {
277
300
  header: "Recorded",
278
301
  align: "right",
279
302
  hideOnMobile: !0,
280
- render: (e) => /* @__PURE__ */ _("span", {
303
+ render: (e) => /* @__PURE__ */ v("span", {
281
304
  className: "text-text-tertiary",
282
- children: s(e.createdAt)
305
+ children: o(e.createdAt)
283
306
  })
284
307
  }
285
- ], et = [
308
+ ], vt = [
286
309
  {
287
310
  key: "category",
288
311
  header: "Category",
289
- render: (e) => /* @__PURE__ */ _(u, { status: e.category })
312
+ render: (e) => /* @__PURE__ */ v(l, { status: e.category })
290
313
  },
291
314
  {
292
315
  key: "asOf",
293
316
  header: "As of",
294
- render: (e) => /* @__PURE__ */ _("span", {
317
+ render: (e) => /* @__PURE__ */ v("span", {
295
318
  className: "text-text-secondary",
296
319
  children: r(e.asOfDate)
297
320
  })
@@ -301,9 +324,9 @@ function M() {
301
324
  header: "Recoverable",
302
325
  align: "right",
303
326
  sortValue: (e) => e.recoverable,
304
- render: (e) => /* @__PURE__ */ _("span", {
327
+ render: (e) => /* @__PURE__ */ v("span", {
305
328
  className: "tabular-nums font-medium text-text-primary",
306
- children: c(e.recoverable, e.unit)
329
+ children: s(e.recoverable, e.unit)
307
330
  })
308
331
  },
309
332
  {
@@ -311,22 +334,22 @@ function M() {
311
334
  header: "Recovery factor",
312
335
  align: "right",
313
336
  hideOnMobile: !0,
314
- render: (e) => e.recoveryFactor == null ? /* @__PURE__ */ _("span", {
337
+ render: (e) => e.recoveryFactor == null ? /* @__PURE__ */ v("span", {
315
338
  className: "text-text-tertiary",
316
339
  children: "—"
317
- }) : /* @__PURE__ */ _("span", {
340
+ }) : /* @__PURE__ */ v("span", {
318
341
  className: "tabular-nums text-text-secondary",
319
- children: o(e.recoveryFactor)
342
+ children: a(e.recoveryFactor)
320
343
  })
321
344
  },
322
345
  {
323
346
  key: "methodology",
324
347
  header: "Methodology",
325
348
  hideOnMobile: !0,
326
- render: (e) => e.methodology ? /* @__PURE__ */ _("span", {
349
+ render: (e) => e.methodology ? /* @__PURE__ */ v("span", {
327
350
  className: "block max-w-[14rem] truncate text-text-secondary",
328
351
  children: e.methodology
329
- }) : /* @__PURE__ */ _("span", {
352
+ }) : /* @__PURE__ */ v("span", {
330
353
  className: "text-text-tertiary",
331
354
  children: "—"
332
355
  })
@@ -336,32 +359,32 @@ function M() {
336
359
  header: "Added",
337
360
  align: "right",
338
361
  hideOnMobile: !0,
339
- render: (e) => /* @__PURE__ */ _("span", {
362
+ render: (e) => /* @__PURE__ */ v("span", {
340
363
  className: "text-text-tertiary",
341
- children: s(e.createdAt)
364
+ children: o(e.createdAt)
342
365
  })
343
366
  }
344
- ], tt = [
367
+ ], yt = [
345
368
  {
346
369
  key: "scope",
347
370
  header: "Scope",
348
- render: (e) => /* @__PURE__ */ _(u, { status: e.scope })
371
+ render: (e) => /* @__PURE__ */ v(l, { status: e.scope })
349
372
  },
350
373
  {
351
374
  key: "co2e",
352
375
  header: "CO₂e",
353
376
  align: "right",
354
377
  sortValue: (e) => e.co2eTonnes,
355
- render: (e) => /* @__PURE__ */ _("span", {
378
+ render: (e) => /* @__PURE__ */ v("span", {
356
379
  className: "tabular-nums font-medium text-text-primary",
357
- children: te(e.co2eTonnes)
380
+ children: ne(e.co2eTonnes)
358
381
  })
359
382
  },
360
383
  {
361
384
  key: "period",
362
385
  header: "Period",
363
386
  hideOnMobile: !0,
364
- render: (e) => /* @__PURE__ */ v("span", {
387
+ render: (e) => /* @__PURE__ */ y("span", {
365
388
  className: "text-text-secondary",
366
389
  children: [
367
390
  r(e.periodStart),
@@ -374,7 +397,7 @@ function M() {
374
397
  key: "source",
375
398
  header: "Source",
376
399
  hideOnMobile: !0,
377
- render: (e) => /* @__PURE__ */ _("span", {
400
+ render: (e) => /* @__PURE__ */ v("span", {
378
401
  className: "text-text-secondary",
379
402
  children: e.source ?? "—"
380
403
  })
@@ -382,10 +405,10 @@ function M() {
382
405
  {
383
406
  key: "verified",
384
407
  header: "Verified",
385
- render: (e) => e.verified ? /* @__PURE__ */ _("span", {
408
+ render: (e) => e.verified ? /* @__PURE__ */ v("span", {
386
409
  className: "text-sm font-medium text-status-success-text",
387
410
  children: "Verified"
388
- }) : /* @__PURE__ */ _("span", {
411
+ }) : /* @__PURE__ */ v("span", {
389
412
  className: "text-sm text-text-tertiary",
390
413
  children: "Unverified"
391
414
  })
@@ -395,575 +418,594 @@ function M() {
395
418
  header: "Recorded",
396
419
  align: "right",
397
420
  hideOnMobile: !0,
398
- render: (e) => /* @__PURE__ */ _("span", {
421
+ render: (e) => /* @__PURE__ */ v("span", {
399
422
  className: "text-text-tertiary",
400
- children: s(e.createdAt)
423
+ children: o(e.createdAt)
401
424
  })
402
425
  }
403
- ], nt = [
426
+ ], bt = [
404
427
  {
405
428
  value: "production",
406
429
  label: "Production",
407
- icon: /* @__PURE__ */ _(ge, { className: "h-4 w-4" }),
408
- count: J.length
430
+ icon: /* @__PURE__ */ v(Ce, { className: "h-4 w-4" }),
431
+ count: Z.length
409
432
  },
410
433
  {
411
434
  value: "reserves",
412
435
  label: "Reserves",
413
- icon: /* @__PURE__ */ _(Ce, { className: "h-4 w-4" }),
414
- count: Y.length
436
+ icon: /* @__PURE__ */ v(Ae, { className: "h-4 w-4" }),
437
+ count: Q.length
415
438
  },
416
439
  {
417
440
  value: "emissions",
418
441
  label: "Emissions",
419
- icon: /* @__PURE__ */ _(be, { className: "h-4 w-4" }),
420
- count: X.length
442
+ icon: /* @__PURE__ */ v(De, { className: "h-4 w-4" }),
443
+ count: ot.length
421
444
  },
422
445
  {
423
446
  value: "tags",
424
447
  label: "Tags",
425
- icon: /* @__PURE__ */ _(De, { className: "h-4 w-4" })
448
+ icon: /* @__PURE__ */ v(Pe, { className: "h-4 w-4" })
426
449
  },
427
450
  {
428
451
  value: "discussion",
429
452
  label: "Discussion",
430
- icon: /* @__PURE__ */ _(Te, { className: "h-4 w-4" })
453
+ icon: /* @__PURE__ */ v(Me, { className: "h-4 w-4" })
431
454
  }
432
455
  ];
433
- return /* @__PURE__ */ v(t, {
456
+ return /* @__PURE__ */ y(t, {
434
457
  title: F.name,
435
458
  description: [F.code, i(F.kind)].filter(Boolean).join(" · "),
436
- actions: /* @__PURE__ */ v(ke, { children: [
437
- /* @__PURE__ */ _(u, { status: F.status }),
438
- !Ge && Ke.length > 0 && /* @__PURE__ */ v(T, {
459
+ dataTour: "theglobalfuel-asset-detail-page",
460
+ actions: /* @__PURE__ */ y(_, { children: [
461
+ /* @__PURE__ */ v(l, { status: F.status }),
462
+ !st && ct.length > 0 && /* @__PURE__ */ y(w, {
439
463
  value: F.status,
440
- onValueChange: (e) => Ye(e),
441
- children: [/* @__PURE__ */ _(O, {
464
+ onValueChange: (e) => pt(e),
465
+ children: [/* @__PURE__ */ v(D, {
442
466
  className: "h-9 w-44",
443
467
  "aria-label": "Change asset status",
444
- children: /* @__PURE__ */ _(k, { placeholder: "Change status" })
445
- }), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
468
+ children: /* @__PURE__ */ v(O, { placeholder: "Change status" })
469
+ }), /* @__PURE__ */ y(T, { children: [/* @__PURE__ */ v(E, {
446
470
  value: F.status,
447
471
  disabled: !0,
448
472
  children: i(F.status)
449
- }), Ke.map((e) => /* @__PURE__ */ _(D, {
473
+ }), ct.map((e) => /* @__PURE__ */ v(E, {
450
474
  value: e,
451
475
  children: i(e)
452
476
  }, e))] })]
453
477
  }),
454
- !Ge && /* @__PURE__ */ v(y, {
478
+ !st && /* @__PURE__ */ y(b, {
455
479
  variant: "ghost",
456
- onClick: Xe,
457
- disabled: Ve.isPending,
480
+ onClick: mt,
481
+ disabled: tt.isPending,
458
482
  className: "text-status-error-text hover:text-status-error-text",
459
- children: [/* @__PURE__ */ _(_e, { className: "mr-1.5 h-4 w-4" }), " Retire"]
483
+ children: [/* @__PURE__ */ v(we, { className: "mr-1.5 h-4 w-4" }), " Retire"]
460
484
  }),
461
- /* @__PURE__ */ v(y, {
485
+ /* @__PURE__ */ y(b, {
462
486
  variant: "ghost",
463
487
  onClick: () => N("assets"),
464
- children: [/* @__PURE__ */ _(ve, { className: "mr-1.5 h-4 w-4" }), " Back"]
488
+ children: [/* @__PURE__ */ v(Te, { className: "mr-1.5 h-4 w-4" }), " Back"]
465
489
  })
466
490
  ] }),
467
491
  children: [
468
- /* @__PURE__ */ v("div", {
492
+ /* @__PURE__ */ y("div", {
469
493
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
470
494
  children: [
471
- /* @__PURE__ */ _(n, {
472
- icon: /* @__PURE__ */ _(Se, { className: "h-5 w-5" }),
473
- value: F.capacityPerDay > 0 ? `${c(F.capacityPerDay, F.capacityUnit)}/day` : "—",
495
+ /* @__PURE__ */ v(n, {
496
+ icon: /* @__PURE__ */ v(ke, { className: "h-5 w-5" }),
497
+ value: F.capacityPerDay > 0 ? `${s(F.capacityPerDay, F.capacityUnit)}/day` : "—",
474
498
  label: "Capacity"
475
499
  }),
476
- /* @__PURE__ */ _(n, {
477
- icon: /* @__PURE__ */ _(Ee, { className: "h-5 w-5" }),
478
- value: o(F.workingInterestPct),
500
+ /* @__PURE__ */ v(n, {
501
+ icon: /* @__PURE__ */ v(Ne, { className: "h-5 w-5" }),
502
+ value: a(F.workingInterestPct),
479
503
  label: "Working interest"
480
504
  }),
481
- /* @__PURE__ */ _(n, {
482
- icon: /* @__PURE__ */ _(xe, { className: "h-5 w-5" }),
505
+ /* @__PURE__ */ v(n, {
506
+ icon: /* @__PURE__ */ v(Oe, { className: "h-5 w-5" }),
483
507
  value: i(F.commodity),
484
508
  label: "Commodity"
485
509
  }),
486
- /* @__PURE__ */ _(n, {
487
- icon: /* @__PURE__ */ _(ye, { className: "h-5 w-5" }),
510
+ /* @__PURE__ */ v(n, {
511
+ icon: /* @__PURE__ */ v(Ee, { className: "h-5 w-5" }),
488
512
  value: r(F.commissionedAt),
489
513
  label: "Commissioned"
490
514
  }),
491
- /* @__PURE__ */ _(n, {
492
- icon: /* @__PURE__ */ _(we, { className: "h-5 w-5" }),
515
+ /* @__PURE__ */ v(n, {
516
+ icon: /* @__PURE__ */ v(je, { className: "h-5 w-5" }),
493
517
  value: ee(F.latitude, F.longitude),
494
518
  label: "Location",
495
- footer: F.location ? /* @__PURE__ */ _("p", {
519
+ footer: F.location ? /* @__PURE__ */ v("p", {
496
520
  className: "truncate text-xs text-text-tertiary",
497
521
  children: F.location
498
522
  }) : void 0
499
523
  })
500
524
  ]
501
525
  }),
502
- /* @__PURE__ */ v("div", {
526
+ /* @__PURE__ */ y("div", {
503
527
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
504
- children: [/* @__PURE__ */ v(b, {
528
+ children: [/* @__PURE__ */ y(x, {
505
529
  treatment: "glass",
506
530
  className: "p-6 lg:col-span-2",
507
- children: [/* @__PURE__ */ _("h2", {
531
+ children: [/* @__PURE__ */ v("h2", {
508
532
  className: "mb-2 text-base font-semibold text-text-primary",
509
533
  children: "Asset details"
510
- }), /* @__PURE__ */ v("dl", {
534
+ }), /* @__PURE__ */ y("dl", {
511
535
  className: "grid grid-cols-1 gap-x-8 sm:grid-cols-2",
512
536
  children: [
513
- /* @__PURE__ */ _(j, {
537
+ /* @__PURE__ */ v(j, {
514
538
  label: "Asset code",
515
539
  value: F.code || "—"
516
540
  }),
517
- /* @__PURE__ */ _(j, {
541
+ /* @__PURE__ */ v(j, {
518
542
  label: "Kind",
519
543
  value: i(F.kind)
520
544
  }),
521
- /* @__PURE__ */ _(j, {
545
+ /* @__PURE__ */ v(j, {
522
546
  label: "Commodity",
523
547
  value: i(F.commodity)
524
548
  }),
525
- /* @__PURE__ */ _(j, {
549
+ /* @__PURE__ */ v(j, {
526
550
  label: "Status",
527
- value: /* @__PURE__ */ _(u, { status: F.status })
551
+ value: /* @__PURE__ */ v(l, { status: F.status })
528
552
  }),
529
- /* @__PURE__ */ _(j, {
553
+ /* @__PURE__ */ v(j, {
530
554
  label: "Capacity / day",
531
- value: F.capacityPerDay > 0 ? `${c(F.capacityPerDay, F.capacityUnit)}/day` : "—"
555
+ value: F.capacityPerDay > 0 ? `${s(F.capacityPerDay, F.capacityUnit)}/day` : "—"
532
556
  }),
533
- /* @__PURE__ */ _(j, {
557
+ /* @__PURE__ */ v(j, {
534
558
  label: "Working interest",
535
- value: o(F.workingInterestPct)
559
+ value: a(F.workingInterestPct)
536
560
  }),
537
- /* @__PURE__ */ _(j, {
561
+ /* @__PURE__ */ v(j, {
538
562
  label: "Operator lead",
539
- value: F.operatorLeadId ? /* @__PURE__ */ _("span", {
563
+ value: F.operatorLeadId ? /* @__PURE__ */ v("span", {
540
564
  className: "font-mono text-xs",
541
565
  title: F.operatorLeadId,
542
566
  children: F.operatorLeadId
543
567
  }) : "—"
544
568
  }),
545
- /* @__PURE__ */ _(j, {
569
+ /* @__PURE__ */ v(j, {
546
570
  label: "Location",
547
571
  value: F.location || "—"
548
572
  }),
549
- /* @__PURE__ */ _(j, {
573
+ /* @__PURE__ */ v(j, {
550
574
  label: "Coordinates",
551
575
  value: ee(F.latitude, F.longitude)
552
576
  }),
553
- /* @__PURE__ */ _(j, {
577
+ /* @__PURE__ */ v(j, {
554
578
  label: "Commissioned",
555
579
  value: r(F.commissionedAt)
556
580
  }),
557
- /* @__PURE__ */ _(j, {
581
+ /* @__PURE__ */ v(j, {
558
582
  label: "Decommissioned",
559
583
  value: r(F.decommissionedAt)
560
584
  }),
561
- /* @__PURE__ */ _(j, {
585
+ /* @__PURE__ */ v(j, {
562
586
  label: "Registered",
563
- value: /* @__PURE__ */ _("span", {
587
+ value: /* @__PURE__ */ v("span", {
564
588
  title: r(F.createdAt),
565
- children: s(F.createdAt)
589
+ children: o(F.createdAt)
566
590
  })
567
591
  }),
568
- /* @__PURE__ */ _(j, {
592
+ /* @__PURE__ */ v(j, {
569
593
  label: "Last updated",
570
- value: /* @__PURE__ */ _("span", {
594
+ value: /* @__PURE__ */ v("span", {
571
595
  title: r(F.updatedAt),
572
- children: s(F.updatedAt)
596
+ children: o(F.updatedAt)
573
597
  })
574
598
  })
575
599
  ]
576
600
  })]
577
- }), /* @__PURE__ */ v(b, {
601
+ }), /* @__PURE__ */ y(x, {
578
602
  treatment: "glass",
579
603
  className: "flex flex-col gap-3 p-6",
580
604
  children: [
581
- /* @__PURE__ */ v("div", {
605
+ /* @__PURE__ */ y("div", {
582
606
  className: "flex items-center gap-2",
583
- children: [/* @__PURE__ */ _(we, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ _("h2", {
607
+ children: [/* @__PURE__ */ v(je, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ v("h2", {
584
608
  className: "text-base font-semibold text-text-primary",
585
609
  children: "Location"
586
610
  })]
587
611
  }),
588
- qe ? /* @__PURE__ */ _(he, { points: [qe] }) : /* @__PURE__ */ _("div", {
612
+ lt ? /* @__PURE__ */ v(Se, { points: [lt] }) : /* @__PURE__ */ v("div", {
589
613
  className: "flex flex-1 items-center justify-center rounded-xl border border-dashed border-border-seam py-10 text-center text-sm text-text-secondary",
590
614
  children: "No coordinates recorded for this asset."
591
615
  }),
592
- F.location && /* @__PURE__ */ _("p", {
616
+ F.location && /* @__PURE__ */ v("p", {
593
617
  className: "text-xs text-text-tertiary",
594
618
  children: F.location
595
619
  })
596
620
  ]
597
621
  })]
598
622
  }),
599
- B && /* @__PURE__ */ _("p", {
623
+ W && /* @__PURE__ */ v("p", {
600
624
  className: "mt-4 text-sm text-status-error-text",
601
- children: B
625
+ children: W
602
626
  }),
603
- /* @__PURE__ */ _("div", {
627
+ /* @__PURE__ */ v("div", {
604
628
  className: "mt-6",
605
- children: /* @__PURE__ */ _(fe, {
606
- items: nt,
607
- value: z,
608
- onChange: He
629
+ children: /* @__PURE__ */ v(ve, {
630
+ items: bt,
631
+ value: U,
632
+ onChange: nt
609
633
  })
610
634
  }),
611
- z === "production" && /* @__PURE__ */ _(p, {
635
+ U === "production" && /* @__PURE__ */ v(p, {
612
636
  title: "Production",
613
637
  description: "Volumes produced per reporting period, with grade & downtime.",
614
- action: /* @__PURE__ */ v(y, {
638
+ action: /* @__PURE__ */ y(b, {
615
639
  size: "sm",
616
- onClick: Je,
617
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
640
+ onClick: ut,
641
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
618
642
  }),
619
- children: J.length === 0 ? /* @__PURE__ */ _(m, {
643
+ children: z.isLoading ? /* @__PURE__ */ v(f, { label: "Loading production…" }) : z.isError ? /* @__PURE__ */ v(d, {
644
+ message: "Couldn't load production records.",
645
+ onRetry: () => z.refetch()
646
+ }) : Z.length === 0 ? /* @__PURE__ */ v(m, {
620
647
  illustration: "empty-data",
621
- icon: /* @__PURE__ */ _(ge, { className: "h-10 w-10" }),
648
+ icon: /* @__PURE__ */ v(Ce, { className: "h-10 w-10" }),
622
649
  title: "No production recorded",
623
650
  description: "Record a production period to start tracking volumes for this asset.",
624
- action: /* @__PURE__ */ v(y, {
625
- onClick: Je,
626
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
651
+ action: /* @__PURE__ */ y(b, {
652
+ onClick: ut,
653
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
627
654
  })
628
- }) : /* @__PURE__ */ _(d, {
629
- columns: $e,
630
- rows: J,
655
+ }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(u, {
656
+ columns: _t,
657
+ rows: Z,
631
658
  rowKey: (e) => e.id,
632
659
  defaultSort: {
633
660
  key: "period",
634
661
  dir: "desc"
635
662
  }
636
- })
663
+ }), /* @__PURE__ */ v(ye, {
664
+ page: L.page,
665
+ pageSize: k,
666
+ itemCount: Z.length,
667
+ hasMore: z.data?.pageInfo?.hasMore ?? !1,
668
+ onPageChange: L.onPageChange
669
+ })] })
637
670
  }),
638
- z === "reserves" && /* @__PURE__ */ _(p, {
671
+ U === "reserves" && /* @__PURE__ */ v(p, {
639
672
  title: "Reserve estimates",
640
673
  description: "Recoverable volumes by SPE-PRMS reserve category & as-of date.",
641
- action: /* @__PURE__ */ v(y, {
674
+ action: /* @__PURE__ */ y(b, {
642
675
  size: "sm",
643
- onClick: Z,
644
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
676
+ onClick: dt,
677
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
645
678
  }),
646
- children: Y.length === 0 ? /* @__PURE__ */ _(m, {
679
+ children: B.isLoading ? /* @__PURE__ */ v(f, { label: "Loading reserve estimates…" }) : B.isError ? /* @__PURE__ */ v(d, {
680
+ message: "Couldn't load reserve estimates.",
681
+ onRetry: () => B.refetch()
682
+ }) : Q.length === 0 ? /* @__PURE__ */ v(m, {
647
683
  illustration: "empty-data",
648
- icon: /* @__PURE__ */ _(Ce, { className: "h-10 w-10" }),
684
+ icon: /* @__PURE__ */ v(Ae, { className: "h-10 w-10" }),
649
685
  title: "No reserve estimates",
650
686
  description: "Add a reserve estimate to record recoverable volumes for this asset.",
651
- action: /* @__PURE__ */ v(y, {
652
- onClick: Z,
653
- children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
687
+ action: /* @__PURE__ */ y(b, {
688
+ onClick: dt,
689
+ children: [/* @__PURE__ */ v(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
654
690
  })
655
- }) : /* @__PURE__ */ _(d, {
656
- columns: et,
657
- rows: Y,
691
+ }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(u, {
692
+ columns: vt,
693
+ rows: Q,
658
694
  rowKey: (e) => e.id
659
- })
695
+ }), /* @__PURE__ */ v(ye, {
696
+ page: R.page,
697
+ pageSize: k,
698
+ itemCount: Q.length,
699
+ hasMore: B.data?.pageInfo?.hasMore ?? !1,
700
+ onPageChange: R.onPageChange
701
+ })] })
660
702
  }),
661
- z === "emissions" && /* @__PURE__ */ _(p, {
703
+ U === "emissions" && /* @__PURE__ */ v(p, {
662
704
  title: "Emissions",
663
705
  description: "GHG emission records attributed to this asset (Scope 1 / 2 / 3).",
664
- children: I.isLoading ? /* @__PURE__ */ _(f, { label: "Loading emissions…" }) : I.isError ? /* @__PURE__ */ _(ne, {
706
+ children: I.isLoading ? /* @__PURE__ */ v(f, { label: "Loading emissions…" }) : I.isError ? /* @__PURE__ */ v(d, {
665
707
  message: "Couldn't load emission records.",
666
708
  onRetry: () => I.refetch()
667
- }) : X.length === 0 ? /* @__PURE__ */ _(m, {
709
+ }) : ot.length === 0 ? /* @__PURE__ */ v(m, {
668
710
  illustration: "empty-data",
669
- icon: /* @__PURE__ */ _(be, { className: "h-10 w-10" }),
711
+ icon: /* @__PURE__ */ v(De, { className: "h-10 w-10" }),
670
712
  title: "No emissions recorded",
671
713
  description: "Emission records attributed to this asset will appear here."
672
- }) : /* @__PURE__ */ _(d, {
673
- columns: tt,
674
- rows: X,
714
+ }) : /* @__PURE__ */ v(u, {
715
+ columns: yt,
716
+ rows: ot,
675
717
  rowKey: (e) => e.id
676
718
  })
677
719
  }),
678
- z === "tags" && /* @__PURE__ */ _(p, {
720
+ U === "tags" && /* @__PURE__ */ v(p, {
679
721
  title: "Tags",
680
722
  description: "Label this asset for search, grouping & reporting.",
681
- children: /* @__PURE__ */ _(b, {
723
+ children: /* @__PURE__ */ v(x, {
682
724
  treatment: "glass",
683
725
  className: "p-6",
684
- children: /* @__PURE__ */ _(me, {
726
+ children: /* @__PURE__ */ v(xe, {
685
727
  entityType: "theglobalfuel-asset",
686
728
  entityId: F.id
687
729
  })
688
730
  })
689
731
  }),
690
- z === "discussion" && /* @__PURE__ */ _("div", {
732
+ U === "discussion" && /* @__PURE__ */ v("div", {
691
733
  className: "mt-8",
692
- children: /* @__PURE__ */ _(pe, {
734
+ children: /* @__PURE__ */ v(be, {
693
735
  entityType: "theglobalfuel-asset",
694
736
  entityId: F.id,
695
737
  title: "Discussion",
696
738
  description: "Notes & coordination for this asset."
697
739
  })
698
740
  }),
699
- /* @__PURE__ */ _(C, {
700
- open: Ue,
701
- onOpenChange: (e) => e ? H(!0) : Q(),
702
- children: /* @__PURE__ */ v(w, { children: [
703
- /* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Record production" }), /* @__PURE__ */ v(Ae, { children: [
741
+ /* @__PURE__ */ v(Ie, {
742
+ open: rt,
743
+ onOpenChange: (e) => e ? K(!0) : ft(),
744
+ children: /* @__PURE__ */ y(Le, { children: [
745
+ /* @__PURE__ */ y(Be, { children: [/* @__PURE__ */ v(Ve, { children: "Record production" }), /* @__PURE__ */ y(Re, { children: [
704
746
  "Log a production period for ",
705
747
  F.name,
706
748
  "."
707
749
  ] })] }),
708
- /* @__PURE__ */ v("form", {
750
+ /* @__PURE__ */ y("form", {
709
751
  id: "recordProductionForm",
710
752
  onSubmit: (e) => {
711
- e.preventDefault(), Ze();
753
+ e.preventDefault(), ht();
712
754
  },
713
755
  className: "grid gap-4 py-2",
714
756
  children: [
715
- /* @__PURE__ */ v("div", {
757
+ /* @__PURE__ */ y("div", {
716
758
  className: "grid gap-2 sm:grid-cols-2",
717
- children: [/* @__PURE__ */ v("div", {
759
+ children: [/* @__PURE__ */ y("div", {
718
760
  className: "grid gap-1.5",
719
- children: [/* @__PURE__ */ _(S, {
761
+ children: [/* @__PURE__ */ v(C, {
720
762
  htmlFor: "prodStart",
721
763
  children: "Period start *"
722
- }), /* @__PURE__ */ _(x, {
764
+ }), /* @__PURE__ */ v(S, {
723
765
  id: "prodStart",
724
766
  type: "date",
725
- value: U.periodStart,
726
- onChange: (e) => W({
727
- ...U,
767
+ value: q.periodStart,
768
+ onChange: (e) => J({
769
+ ...q,
728
770
  periodStart: e.target.value
729
771
  })
730
772
  })]
731
- }), /* @__PURE__ */ v("div", {
773
+ }), /* @__PURE__ */ y("div", {
732
774
  className: "grid gap-1.5",
733
- children: [/* @__PURE__ */ _(S, {
775
+ children: [/* @__PURE__ */ v(C, {
734
776
  htmlFor: "prodEnd",
735
777
  children: "Period end *"
736
- }), /* @__PURE__ */ _(x, {
778
+ }), /* @__PURE__ */ v(S, {
737
779
  id: "prodEnd",
738
780
  type: "date",
739
- value: U.periodEnd,
740
- onChange: (e) => W({
741
- ...U,
781
+ value: q.periodEnd,
782
+ onChange: (e) => J({
783
+ ...q,
742
784
  periodEnd: e.target.value
743
785
  })
744
786
  })]
745
787
  })]
746
788
  }),
747
- /* @__PURE__ */ v("div", {
789
+ /* @__PURE__ */ y("div", {
748
790
  className: "grid gap-2 sm:grid-cols-2",
749
- children: [/* @__PURE__ */ v("div", {
791
+ children: [/* @__PURE__ */ y("div", {
750
792
  className: "grid gap-1.5",
751
- children: [/* @__PURE__ */ _(S, {
793
+ children: [/* @__PURE__ */ v(C, {
752
794
  htmlFor: "prodVolume",
753
795
  children: "Volume *"
754
- }), /* @__PURE__ */ _(x, {
796
+ }), /* @__PURE__ */ v(S, {
755
797
  id: "prodVolume",
756
798
  type: "number",
757
799
  min: "0",
758
800
  step: "any",
759
- value: U.volume,
760
- onChange: (e) => W({
761
- ...U,
801
+ value: q.volume,
802
+ onChange: (e) => J({
803
+ ...q,
762
804
  volume: e.target.value
763
805
  }),
764
806
  placeholder: "118500"
765
807
  })]
766
- }), /* @__PURE__ */ v("div", {
808
+ }), /* @__PURE__ */ y("div", {
767
809
  className: "grid gap-1.5",
768
- children: [/* @__PURE__ */ _(S, {
810
+ children: [/* @__PURE__ */ v(C, {
769
811
  htmlFor: "prodUnit",
770
812
  children: "Unit"
771
- }), /* @__PURE__ */ v(T, {
772
- value: U.unit,
773
- onValueChange: (e) => W({
774
- ...U,
813
+ }), /* @__PURE__ */ y(w, {
814
+ value: q.unit,
815
+ onValueChange: (e) => J({
816
+ ...q,
775
817
  unit: e
776
818
  }),
777
- children: [/* @__PURE__ */ _(O, {
819
+ children: [/* @__PURE__ */ v(D, {
778
820
  id: "prodUnit",
779
- children: /* @__PURE__ */ _(k, {})
780
- }), /* @__PURE__ */ _(E, { children: Fe.map((e) => /* @__PURE__ */ _(D, {
821
+ children: /* @__PURE__ */ v(O, {})
822
+ }), /* @__PURE__ */ v(T, { children: Ue.map((e) => /* @__PURE__ */ v(E, {
781
823
  value: e,
782
824
  children: i(e)
783
825
  }, e)) })]
784
826
  })]
785
827
  })]
786
828
  }),
787
- /* @__PURE__ */ v("div", {
829
+ /* @__PURE__ */ y("div", {
788
830
  className: "grid gap-2 sm:grid-cols-2",
789
- children: [/* @__PURE__ */ v("div", {
831
+ children: [/* @__PURE__ */ y("div", {
790
832
  className: "grid gap-1.5",
791
- children: [/* @__PURE__ */ _(S, {
833
+ children: [/* @__PURE__ */ v(C, {
792
834
  htmlFor: "prodGrade",
793
835
  children: "Grade"
794
- }), /* @__PURE__ */ _(x, {
836
+ }), /* @__PURE__ */ v(S, {
795
837
  id: "prodGrade",
796
838
  type: "number",
797
839
  step: "any",
798
- value: U.grade,
799
- onChange: (e) => W({
800
- ...U,
840
+ value: q.grade,
841
+ onChange: (e) => J({
842
+ ...q,
801
843
  grade: e.target.value
802
844
  }),
803
845
  placeholder: "Optional (e.g. API / assay)"
804
846
  })]
805
- }), /* @__PURE__ */ v("div", {
847
+ }), /* @__PURE__ */ y("div", {
806
848
  className: "grid gap-1.5",
807
- children: [/* @__PURE__ */ _(S, {
849
+ children: [/* @__PURE__ */ v(C, {
808
850
  htmlFor: "prodDowntime",
809
851
  children: "Downtime (hours)"
810
- }), /* @__PURE__ */ _(x, {
852
+ }), /* @__PURE__ */ v(S, {
811
853
  id: "prodDowntime",
812
854
  type: "number",
813
855
  min: "0",
814
856
  step: "any",
815
- value: U.downtimeHours,
816
- onChange: (e) => W({
817
- ...U,
857
+ value: q.downtimeHours,
858
+ onChange: (e) => J({
859
+ ...q,
818
860
  downtimeHours: e.target.value
819
861
  }),
820
862
  placeholder: "0"
821
863
  })]
822
864
  })]
823
865
  }),
824
- /* @__PURE__ */ v("div", {
866
+ /* @__PURE__ */ y("div", {
825
867
  className: "grid gap-1.5",
826
- children: [/* @__PURE__ */ _(S, {
868
+ children: [/* @__PURE__ */ v(C, {
827
869
  htmlFor: "prodNotes",
828
870
  children: "Notes"
829
- }), /* @__PURE__ */ _(Pe, {
871
+ }), /* @__PURE__ */ v(He, {
830
872
  id: "prodNotes",
831
873
  rows: 2,
832
- value: U.notes,
833
- onChange: (e) => W({
834
- ...U,
874
+ value: q.notes,
875
+ onChange: (e) => J({
876
+ ...q,
835
877
  notes: e.target.value
836
878
  }),
837
879
  placeholder: "Optional context about this period."
838
880
  })]
839
881
  }),
840
- B && Ue && /* @__PURE__ */ _("p", {
882
+ W && rt && /* @__PURE__ */ v("p", {
841
883
  className: "text-sm text-status-error-text",
842
- children: B
884
+ children: W
843
885
  })
844
886
  ]
845
887
  }),
846
- /* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
888
+ /* @__PURE__ */ y(ze, { children: [/* @__PURE__ */ v(b, {
847
889
  variant: "outline",
848
890
  type: "button",
849
- onClick: Q,
891
+ onClick: ft,
850
892
  children: "Cancel"
851
- }), /* @__PURE__ */ _(y, {
893
+ }), /* @__PURE__ */ v(b, {
852
894
  type: "submit",
853
895
  form: "recordProductionForm",
854
- disabled: L.isPending,
855
- children: L.isPending ? "Recording…" : "Record production"
896
+ disabled: V.isPending,
897
+ children: V.isPending ? "Recording…" : "Record production"
856
898
  })] })
857
899
  ] })
858
900
  }),
859
- /* @__PURE__ */ _(C, {
860
- open: We,
861
- onOpenChange: (e) => e ? G(!0) : $(),
862
- children: /* @__PURE__ */ v(w, { children: [
863
- /* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Add reserve estimate" }), /* @__PURE__ */ v(Ae, { children: [
901
+ /* @__PURE__ */ v(Ie, {
902
+ open: it,
903
+ onOpenChange: (e) => e ? at(!0) : $(),
904
+ children: /* @__PURE__ */ y(Le, { children: [
905
+ /* @__PURE__ */ y(Be, { children: [/* @__PURE__ */ v(Ve, { children: "Add reserve estimate" }), /* @__PURE__ */ y(Re, { children: [
864
906
  "Record a recoverable-volume estimate for ",
865
907
  F.name,
866
908
  "."
867
909
  ] })] }),
868
- /* @__PURE__ */ v("form", {
910
+ /* @__PURE__ */ y("form", {
869
911
  id: "reserveEstimateForm",
870
912
  onSubmit: (e) => {
871
- e.preventDefault(), Qe();
913
+ e.preventDefault(), gt();
872
914
  },
873
915
  className: "grid gap-4 py-2",
874
916
  children: [
875
- /* @__PURE__ */ v("div", {
917
+ /* @__PURE__ */ y("div", {
876
918
  className: "grid gap-2 sm:grid-cols-2",
877
- children: [/* @__PURE__ */ v("div", {
919
+ children: [/* @__PURE__ */ y("div", {
878
920
  className: "grid gap-1.5",
879
- children: [/* @__PURE__ */ _(S, {
921
+ children: [/* @__PURE__ */ v(C, {
880
922
  htmlFor: "resCategory",
881
923
  children: "Category"
882
- }), /* @__PURE__ */ v(T, {
883
- value: K.category,
884
- onValueChange: (e) => q({
885
- ...K,
924
+ }), /* @__PURE__ */ y(w, {
925
+ value: Y.category,
926
+ onValueChange: (e) => X({
927
+ ...Y,
886
928
  category: e
887
929
  }),
888
- children: [/* @__PURE__ */ _(O, {
930
+ children: [/* @__PURE__ */ v(D, {
889
931
  id: "resCategory",
890
- children: /* @__PURE__ */ _(k, {})
891
- }), /* @__PURE__ */ _(E, { children: Ie.map((e) => /* @__PURE__ */ _(D, {
932
+ children: /* @__PURE__ */ v(O, {})
933
+ }), /* @__PURE__ */ v(T, { children: We.map((e) => /* @__PURE__ */ v(E, {
892
934
  value: e,
893
935
  children: i(e)
894
936
  }, e)) })]
895
937
  })]
896
- }), /* @__PURE__ */ v("div", {
938
+ }), /* @__PURE__ */ y("div", {
897
939
  className: "grid gap-1.5",
898
- children: [/* @__PURE__ */ _(S, {
940
+ children: [/* @__PURE__ */ v(C, {
899
941
  htmlFor: "resAsOf",
900
942
  children: "As-of date *"
901
- }), /* @__PURE__ */ _(x, {
943
+ }), /* @__PURE__ */ v(S, {
902
944
  id: "resAsOf",
903
945
  type: "date",
904
- value: K.asOfDate,
905
- onChange: (e) => q({
906
- ...K,
946
+ value: Y.asOfDate,
947
+ onChange: (e) => X({
948
+ ...Y,
907
949
  asOfDate: e.target.value
908
950
  })
909
951
  })]
910
952
  })]
911
953
  }),
912
- /* @__PURE__ */ v("div", {
954
+ /* @__PURE__ */ y("div", {
913
955
  className: "grid gap-2 sm:grid-cols-3",
914
956
  children: [
915
- /* @__PURE__ */ v("div", {
957
+ /* @__PURE__ */ y("div", {
916
958
  className: "grid gap-1.5",
917
- children: [/* @__PURE__ */ _(S, {
959
+ children: [/* @__PURE__ */ v(C, {
918
960
  htmlFor: "resRecoverable",
919
961
  children: "Recoverable *"
920
- }), /* @__PURE__ */ _(x, {
962
+ }), /* @__PURE__ */ v(S, {
921
963
  id: "resRecoverable",
922
964
  type: "number",
923
965
  min: "0",
924
966
  step: "any",
925
- value: K.recoverable,
926
- onChange: (e) => q({
927
- ...K,
967
+ value: Y.recoverable,
968
+ onChange: (e) => X({
969
+ ...Y,
928
970
  recoverable: e.target.value
929
971
  }),
930
972
  placeholder: "2400000"
931
973
  })]
932
974
  }),
933
- /* @__PURE__ */ v("div", {
975
+ /* @__PURE__ */ y("div", {
934
976
  className: "grid gap-1.5",
935
- children: [/* @__PURE__ */ _(S, {
977
+ children: [/* @__PURE__ */ v(C, {
936
978
  htmlFor: "resUnit",
937
979
  children: "Unit"
938
- }), /* @__PURE__ */ v(T, {
939
- value: K.unit,
940
- onValueChange: (e) => q({
941
- ...K,
980
+ }), /* @__PURE__ */ y(w, {
981
+ value: Y.unit,
982
+ onValueChange: (e) => X({
983
+ ...Y,
942
984
  unit: e
943
985
  }),
944
- children: [/* @__PURE__ */ _(O, {
986
+ children: [/* @__PURE__ */ v(D, {
945
987
  id: "resUnit",
946
- children: /* @__PURE__ */ _(k, {})
947
- }), /* @__PURE__ */ _(E, { children: Fe.map((e) => /* @__PURE__ */ _(D, {
988
+ children: /* @__PURE__ */ v(O, {})
989
+ }), /* @__PURE__ */ v(T, { children: Ue.map((e) => /* @__PURE__ */ v(E, {
948
990
  value: e,
949
991
  children: i(e)
950
992
  }, e)) })]
951
993
  })]
952
994
  }),
953
- /* @__PURE__ */ v("div", {
995
+ /* @__PURE__ */ y("div", {
954
996
  className: "grid gap-1.5",
955
- children: [/* @__PURE__ */ _(S, {
997
+ children: [/* @__PURE__ */ v(C, {
956
998
  htmlFor: "resFactor",
957
999
  children: "Recovery factor (%)"
958
- }), /* @__PURE__ */ _(x, {
1000
+ }), /* @__PURE__ */ v(S, {
959
1001
  id: "resFactor",
960
1002
  type: "number",
961
1003
  min: "0",
962
1004
  max: "100",
963
1005
  step: "any",
964
- value: K.recoveryFactor,
965
- onChange: (e) => q({
966
- ...K,
1006
+ value: Y.recoveryFactor,
1007
+ onChange: (e) => X({
1008
+ ...Y,
967
1009
  recoveryFactor: e.target.value
968
1010
  }),
969
1011
  placeholder: "35"
@@ -971,53 +1013,53 @@ function M() {
971
1013
  })
972
1014
  ]
973
1015
  }),
974
- /* @__PURE__ */ v("div", {
1016
+ /* @__PURE__ */ y("div", {
975
1017
  className: "grid gap-1.5",
976
- children: [/* @__PURE__ */ _(S, {
1018
+ children: [/* @__PURE__ */ v(C, {
977
1019
  htmlFor: "resMethodology",
978
1020
  children: "Methodology"
979
- }), /* @__PURE__ */ _(x, {
1021
+ }), /* @__PURE__ */ v(S, {
980
1022
  id: "resMethodology",
981
- value: K.methodology,
982
- onChange: (e) => q({
983
- ...K,
1023
+ value: Y.methodology,
1024
+ onChange: (e) => X({
1025
+ ...Y,
984
1026
  methodology: e.target.value
985
1027
  }),
986
1028
  placeholder: "Volumetric / material balance / decline curve"
987
1029
  })]
988
1030
  }),
989
- /* @__PURE__ */ v("div", {
1031
+ /* @__PURE__ */ y("div", {
990
1032
  className: "grid gap-1.5",
991
- children: [/* @__PURE__ */ _(S, {
1033
+ children: [/* @__PURE__ */ v(C, {
992
1034
  htmlFor: "resNotes",
993
1035
  children: "Notes"
994
- }), /* @__PURE__ */ _(Pe, {
1036
+ }), /* @__PURE__ */ v(He, {
995
1037
  id: "resNotes",
996
1038
  rows: 2,
997
- value: K.notes,
998
- onChange: (e) => q({
999
- ...K,
1039
+ value: Y.notes,
1040
+ onChange: (e) => X({
1041
+ ...Y,
1000
1042
  notes: e.target.value
1001
1043
  }),
1002
1044
  placeholder: "Optional context about this estimate."
1003
1045
  })]
1004
1046
  }),
1005
- B && We && /* @__PURE__ */ _("p", {
1047
+ W && it && /* @__PURE__ */ v("p", {
1006
1048
  className: "text-sm text-status-error-text",
1007
- children: B
1049
+ children: W
1008
1050
  })
1009
1051
  ]
1010
1052
  }),
1011
- /* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
1053
+ /* @__PURE__ */ y(ze, { children: [/* @__PURE__ */ v(b, {
1012
1054
  variant: "outline",
1013
1055
  type: "button",
1014
1056
  onClick: $,
1015
1057
  children: "Cancel"
1016
- }), /* @__PURE__ */ _(y, {
1058
+ }), /* @__PURE__ */ v(b, {
1017
1059
  type: "submit",
1018
1060
  form: "reserveEstimateForm",
1019
- disabled: R.isPending,
1020
- children: R.isPending ? "Adding…" : "Add estimate"
1061
+ disabled: H.isPending,
1062
+ children: H.isPending ? "Adding…" : "Add estimate"
1021
1063
  })] })
1022
1064
  ] })
1023
1065
  })