@corva/ui 3.78.0-1 → 3.78.0-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.
Files changed (584) hide show
  1. package/cjs-bundle/clients/index.js +1 -1
  2. package/cjs-bundle/clients/index.js.map +1 -1
  3. package/cjs-bundle/clients/subscriptions/constants.js +1 -1
  4. package/cjs-bundle/clients/subscriptions/constants.js.map +1 -1
  5. package/cjs-bundle/clients/subscriptions.js +1 -1
  6. package/cjs-bundle/clients/subscriptions.js.map +1 -1
  7. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  8. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  9. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  10. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  11. package/cjs-bundle/components/AssetEditor/effects/index.js +1 -1
  12. package/cjs-bundle/components/AssetEditor/effects/index.js.map +1 -1
  13. package/cjs-bundle/components/AssetEditorV2/effects/index.js +1 -1
  14. package/cjs-bundle/components/AssetEditorV2/effects/index.js.map +1 -1
  15. package/cjs-bundle/components/AssetEditorV2/effects/usePrimaryAssetSelectData.js +1 -1
  16. package/cjs-bundle/components/AssetEditorV2/effects/usePrimaryAssetSelectData.js.map +1 -1
  17. package/cjs-bundle/components/Attachment/index.js +1 -1
  18. package/cjs-bundle/components/Attachment/index.js.map +1 -1
  19. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  20. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  21. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  22. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  23. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  24. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  25. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  26. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  27. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  28. package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
  29. package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
  30. package/cjs-bundle/components/CommentComposer/CommentComposer.js.map +1 -1
  31. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  32. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  33. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  34. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  35. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  36. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  37. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  38. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  39. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  40. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  41. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  42. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -1
  43. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  44. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  45. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  46. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  47. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  48. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  49. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  50. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  51. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  52. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  53. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  54. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  55. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  56. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  57. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  58. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  59. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  60. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  61. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  62. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  63. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  64. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  65. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  66. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  67. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  68. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  69. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  70. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  71. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  72. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  73. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  74. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  75. package/cjs-bundle/components/GradientManager/GradientManager.js +1 -1
  76. package/cjs-bundle/components/GradientManager/GradientManager.js.map +1 -1
  77. package/cjs-bundle/components/GradientManager/GradientSelect.js +1 -1
  78. package/cjs-bundle/components/GradientManager/GradientSelect.js.map +1 -1
  79. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  80. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  81. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  82. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  83. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  84. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  85. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  86. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  87. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  88. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  89. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  90. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  91. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  92. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  93. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  94. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  95. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  96. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  97. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  98. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  99. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  100. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  101. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  102. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  103. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  104. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  105. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  106. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  107. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  108. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  109. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  110. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  111. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  112. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  113. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  114. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  115. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  116. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  117. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  118. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  123. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  124. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  125. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  126. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  127. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  128. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  129. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  130. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  131. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  132. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  133. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  134. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  135. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  136. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  137. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsData.utils.js +1 -1
  138. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsData.utils.js.map +1 -1
  139. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.js +1 -1
  140. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.js.map +1 -1
  141. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  142. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  143. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  144. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  145. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  146. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  147. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  148. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  149. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  150. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  151. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  152. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  153. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/MetricCell/MetricCell.js +1 -1
  154. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/MetricCell/MetricCell.js.map +1 -1
  155. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  156. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  157. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  158. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  159. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  160. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  161. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  162. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  163. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  164. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  165. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  166. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  167. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.js +1 -1
  168. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.js.map +1 -1
  169. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  170. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  171. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.js +1 -1
  172. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.js.map +1 -1
  173. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js +1 -1
  174. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js.map +1 -1
  175. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.js +1 -1
  176. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.js.map +1 -1
  177. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  178. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  179. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js +1 -1
  180. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js.map +1 -1
  181. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useCompanies.js +1 -1
  182. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useCompanies.js.map +1 -1
  183. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useExternalOffsets.js +1 -1
  184. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useExternalOffsets.js.map +1 -1
  185. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  186. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  187. package/cjs-bundle/components/OffsetWellPickerV5/hooks/usePinnedWells.js +1 -1
  188. package/cjs-bundle/components/OffsetWellPickerV5/hooks/usePinnedWells.js.map +1 -1
  189. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  190. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  191. package/cjs-bundle/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
  192. package/cjs-bundle/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js.map +1 -1
  193. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  194. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  195. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  196. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  197. package/cjs-bundle/components/PinnableFilters/effects/index.js +1 -1
  198. package/cjs-bundle/components/PinnableFilters/effects/index.js.map +1 -1
  199. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  200. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  201. package/cjs-bundle/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
  202. package/cjs-bundle/components/StatusBadge/components/DQAlertsTooltip.js.map +1 -1
  203. package/cjs-bundle/components/index.js +1 -1
  204. package/cjs-bundle/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js +1 -1
  205. package/cjs-bundle/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js.map +1 -1
  206. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  207. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  208. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  209. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  210. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  211. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  212. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  213. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  214. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  215. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  216. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  217. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  218. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  219. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  220. package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js +1 -1
  221. package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
  222. package/cjs-bundle/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.js +1 -1
  223. package/cjs-bundle/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.js.map +1 -1
  224. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  225. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  226. package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +1 -1
  227. package/cjs-bundle/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -1
  228. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  229. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  230. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  231. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  232. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  233. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  234. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  235. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  236. package/cjs-bundle/componentsV2/TemplatesControl/Store/utils.js +1 -1
  237. package/cjs-bundle/componentsV2/TemplatesControl/Store/utils.js.map +1 -1
  238. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  239. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  240. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js +1 -1
  241. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  242. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
  243. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  244. package/cjs-bundle/config/theme/palette.mjs.js +1 -1
  245. package/cjs-bundle/config/theme/palette.mjs.js.map +1 -1
  246. package/cjs-bundle/effects/index.js +1 -1
  247. package/cjs-bundle/effects/subscriptions/fetchInitialSubscriptionsData.js +2 -0
  248. package/cjs-bundle/effects/subscriptions/fetchInitialSubscriptionsData.js.map +1 -0
  249. package/cjs-bundle/effects/subscriptions/useSubscriptions.v2.js +1 -1
  250. package/cjs-bundle/effects/subscriptions/useSubscriptions.v2.js.map +1 -1
  251. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js +1 -1
  252. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js.map +1 -1
  253. package/cjs-bundle/effects/useSubscriptions.js +1 -1
  254. package/cjs-bundle/effects/useSubscriptions.js.map +1 -1
  255. package/cjs-bundle/effects/useWellnessAlerts.js +1 -1
  256. package/cjs-bundle/effects/useWellnessAlerts.js.map +1 -1
  257. package/cjs-bundle/icons/customIcons/icons/Search.js.map +1 -1
  258. package/cjs-bundle/permissions/constants/index.js +1 -1
  259. package/cjs-bundle/permissions/constants/index.js.map +1 -1
  260. package/cjs-bundle/styles/generatedThemesVariables.global.css.js +1 -1
  261. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  262. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  263. package/cjs-bundle/utils/index.js +1 -1
  264. package/cjs-bundle/utils/index.js.map +1 -1
  265. package/cjs-bundle/utils/safeTemplate.js +2 -0
  266. package/cjs-bundle/utils/safeTemplate.js.map +1 -0
  267. package/clients/index.d.ts +1 -9
  268. package/clients/index.d.ts.map +1 -1
  269. package/clients/index.js +1 -1
  270. package/clients/index.js.map +1 -1
  271. package/clients/subscriptions/constants.d.ts +0 -1
  272. package/clients/subscriptions/constants.d.ts.map +1 -1
  273. package/clients/subscriptions/constants.js +1 -1
  274. package/clients/subscriptions/constants.js.map +1 -1
  275. package/clients/subscriptions.d.ts.map +1 -1
  276. package/clients/subscriptions.js +1 -1
  277. package/clients/subscriptions.js.map +1 -1
  278. package/components/AddComment/Popover.js +1 -1
  279. package/components/AddComment/Popover.js.map +1 -1
  280. package/components/AddComment/components/Content.js +1 -1
  281. package/components/AddComment/components/Content.js.map +1 -1
  282. package/components/AssetEditor/effects/index.js +1 -1
  283. package/components/AssetEditor/effects/index.js.map +1 -1
  284. package/components/AssetEditorV2/effects/index.js +1 -1
  285. package/components/AssetEditorV2/effects/index.js.map +1 -1
  286. package/components/AssetEditorV2/effects/usePrimaryAssetSelectData.js +1 -1
  287. package/components/AssetEditorV2/effects/usePrimaryAssetSelectData.js.map +1 -1
  288. package/components/Attachment/index.js +1 -1
  289. package/components/Attachment/index.js.map +1 -1
  290. package/components/BICOffsetPickerDialog/index.js +1 -1
  291. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  292. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  293. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  294. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  295. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  296. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  297. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  298. package/components/CollapsableSidebar.js +1 -1
  299. package/components/CollapsableSidebar.js.map +1 -1
  300. package/components/CommentComposer/CommentComposer.js +1 -1
  301. package/components/CommentComposer/CommentComposer.js.map +1 -1
  302. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  303. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  304. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  305. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  306. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  307. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  308. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  309. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  310. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  311. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  312. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js +1 -1
  313. package/components/DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js.map +1 -1
  314. package/components/DocumentViewer/DocumentViewer.js +1 -1
  315. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  316. package/components/Drillstring/BHAComponentDetail/constants.d.ts +2 -2
  317. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  318. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  319. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  320. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  321. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  322. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  323. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  324. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  325. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  326. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  327. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  328. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  329. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  330. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  331. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  332. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  333. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  334. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  335. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  336. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  337. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  338. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  339. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  340. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  341. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  342. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  343. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  344. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  345. package/components/FeedItem/FeedItem.js +1 -1
  346. package/components/FeedItem/FeedItem.js.map +1 -1
  347. package/components/GradientManager/GradientManager.js +1 -1
  348. package/components/GradientManager/GradientManager.js.map +1 -1
  349. package/components/GradientManager/GradientSelect.js +1 -1
  350. package/components/GradientManager/GradientSelect.js.map +1 -1
  351. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  352. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  353. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  354. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  355. package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  356. package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  357. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  358. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  359. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  360. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  361. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  362. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  363. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  364. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  365. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  366. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  367. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  368. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  369. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  370. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  371. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  372. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  373. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  374. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  375. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  376. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  377. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  378. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  379. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  380. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  381. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  382. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  383. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  384. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  385. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  386. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  387. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  388. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  389. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  390. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  391. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  392. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  393. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  394. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  395. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  396. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  397. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  398. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  399. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  400. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  401. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  402. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  403. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  404. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  405. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  406. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  407. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  408. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  409. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsData.utils.js +1 -1
  410. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsData.utils.js.map +1 -1
  411. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.js +1 -1
  412. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/hooks/useAssetsFetch.js.map +1 -1
  413. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  414. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  415. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  416. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  417. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  418. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  419. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  420. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  421. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  422. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  423. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  424. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  425. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/MetricCell/MetricCell.js +1 -1
  426. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/MetricCell/MetricCell.js.map +1 -1
  427. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  428. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  429. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  430. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  431. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  432. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  433. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  434. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  435. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  436. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  437. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  438. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  439. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.js +1 -1
  440. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.js.map +1 -1
  441. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  442. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  443. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.js +1 -1
  444. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.js.map +1 -1
  445. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js +1 -1
  446. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.js.map +1 -1
  447. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.js +1 -1
  448. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.js.map +1 -1
  449. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  450. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  451. package/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js +1 -1
  452. package/components/OffsetWellPickerV5/hooks/useAllWells/useLoadAllWellsCallback.js.map +1 -1
  453. package/components/OffsetWellPickerV5/hooks/useCompanies.js +1 -1
  454. package/components/OffsetWellPickerV5/hooks/useCompanies.js.map +1 -1
  455. package/components/OffsetWellPickerV5/hooks/useExternalOffsets.js +1 -1
  456. package/components/OffsetWellPickerV5/hooks/useExternalOffsets.js.map +1 -1
  457. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  458. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  459. package/components/OffsetWellPickerV5/hooks/usePinnedWells.js +1 -1
  460. package/components/OffsetWellPickerV5/hooks/usePinnedWells.js.map +1 -1
  461. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  462. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  463. package/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js +1 -1
  464. package/components/PadModeSelect/effects/useWellStreamActivityTypeSubscription.js.map +1 -1
  465. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  466. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  467. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  468. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  469. package/components/PinnableFilters/effects/index.js +1 -1
  470. package/components/PinnableFilters/effects/index.js.map +1 -1
  471. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  472. package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  473. package/components/StatusBadge/components/DQAlertsTooltip.d.ts.map +1 -1
  474. package/components/StatusBadge/components/DQAlertsTooltip.js +1 -1
  475. package/components/StatusBadge/components/DQAlertsTooltip.js.map +1 -1
  476. package/components/index.js +1 -1
  477. package/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.d.ts.map +1 -1
  478. package/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js +1 -1
  479. package/componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.js.map +1 -1
  480. package/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  481. package/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  482. package/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  483. package/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  484. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  485. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  486. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  487. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  488. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  489. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  490. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  491. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  492. package/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  493. package/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  494. package/componentsV2/Autocomplete/Autocomplete.d.ts.map +1 -1
  495. package/componentsV2/Autocomplete/Autocomplete.js +1 -1
  496. package/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
  497. package/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.d.ts.map +1 -1
  498. package/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.js +1 -1
  499. package/componentsV2/Autocomplete/AutocompleteInput/AutocompleteInput.js.map +1 -1
  500. package/componentsV2/Autocomplete/AutocompleteNext.stories.d.ts +1 -0
  501. package/componentsV2/Autocomplete/AutocompleteNext.stories.d.ts.map +1 -1
  502. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  503. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  504. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js +1 -1
  505. package/componentsV2/InterventionEventSelector/useInterventionUnitEvents.js.map +1 -1
  506. package/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  507. package/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  508. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  509. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  510. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  511. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  512. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.d.ts.map +1 -1
  513. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  514. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  515. package/componentsV2/TemplatesControl/Store/utils.d.ts +7 -0
  516. package/componentsV2/TemplatesControl/Store/utils.d.ts.map +1 -1
  517. package/componentsV2/TemplatesControl/Store/utils.js +1 -1
  518. package/componentsV2/TemplatesControl/Store/utils.js.map +1 -1
  519. package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  520. package/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  521. package/componentsV2/TextInputBase/TextInputBase.js +1 -1
  522. package/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  523. package/componentsV2/TextInputNext/TextInputNext.js +1 -1
  524. package/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  525. package/config/theme/lightThemePalette.d.mts +4 -0
  526. package/config/theme/lightThemePalette.d.mts.map +1 -1
  527. package/config/theme/palette.d.mts +4 -0
  528. package/config/theme/palette.d.mts.map +1 -1
  529. package/config/theme/palette.mjs.js +1 -1
  530. package/config/theme/palette.mjs.js.map +1 -1
  531. package/config/theme/themeVariables.d.mts +12 -0
  532. package/config/theme/themeVariables.d.mts.map +1 -1
  533. package/effects/index.js +1 -1
  534. package/effects/subscriptions/fetchInitialSubscriptionsData.d.ts +23 -0
  535. package/effects/subscriptions/fetchInitialSubscriptionsData.d.ts.map +1 -0
  536. package/effects/subscriptions/fetchInitialSubscriptionsData.js +2 -0
  537. package/effects/subscriptions/fetchInitialSubscriptionsData.js.map +1 -0
  538. package/effects/subscriptions/useSubscriptions.v2.d.ts.map +1 -1
  539. package/effects/subscriptions/useSubscriptions.v2.js +1 -1
  540. package/effects/subscriptions/useSubscriptions.v2.js.map +1 -1
  541. package/effects/useGlobalOffsetWellsSync.js +1 -1
  542. package/effects/useGlobalOffsetWellsSync.js.map +1 -1
  543. package/effects/useSubscriptions.d.ts +1 -2
  544. package/effects/useSubscriptions.d.ts.map +1 -1
  545. package/effects/useSubscriptions.js +1 -1
  546. package/effects/useSubscriptions.js.map +1 -1
  547. package/effects/useWellnessAlerts.js +1 -1
  548. package/effects/useWellnessAlerts.js.map +1 -1
  549. package/icons/customIcons/icons/Search.d.ts +1 -1
  550. package/icons/customIcons/icons/Search.js.map +1 -1
  551. package/mcp-server/server.mjs +14079 -29649
  552. package/package.json +1 -1
  553. package/permissions/constants/index.d.ts +1 -0
  554. package/permissions/constants/index.d.ts.map +1 -1
  555. package/permissions/constants/index.js +1 -1
  556. package/permissions/constants/index.js.map +1 -1
  557. package/styles/common.scss +2 -0
  558. package/styles/generatedThemesVariables.global.css +1 -1
  559. package/styles/generatedThemesVariables.global.css.js +1 -1
  560. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  561. package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  562. package/tsconfig.tsbuildinfo +1 -1
  563. package/utils/__tests__/safeTemplate.test.d.ts +2 -0
  564. package/utils/__tests__/safeTemplate.test.d.ts.map +1 -0
  565. package/utils/index.d.ts +1 -0
  566. package/utils/index.d.ts.map +1 -1
  567. package/utils/index.js +1 -1
  568. package/utils/index.js.map +1 -1
  569. package/utils/safeTemplate.d.ts +24 -0
  570. package/utils/safeTemplate.d.ts.map +1 -0
  571. package/utils/safeTemplate.js +2 -0
  572. package/utils/safeTemplate.js.map +1 -0
  573. package/cjs-bundle/clients/subscriptions.v1.js +0 -2
  574. package/cjs-bundle/clients/subscriptions.v1.js.map +0 -1
  575. package/cjs-bundle/effects/subscriptions/useSubscriptions.v1.js +0 -2
  576. package/cjs-bundle/effects/subscriptions/useSubscriptions.v1.js.map +0 -1
  577. package/clients/subscriptions.v1.d.ts +0 -9
  578. package/clients/subscriptions.v1.d.ts.map +0 -1
  579. package/clients/subscriptions.v1.js +0 -2
  580. package/clients/subscriptions.v1.js.map +0 -1
  581. package/effects/subscriptions/useSubscriptions.v1.d.ts +0 -24
  582. package/effects/subscriptions/useSubscriptions.v1.d.ts.map +0 -1
  583. package/effects/subscriptions/useSubscriptions.v1.js +0 -2
  584. package/effects/subscriptions/useSubscriptions.v1.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import o from"classnames";import"../../stores/idas-resync-store/IdasResyncStoreContext.js";import"../../stores/idas-resync-store/IdasResyncStoreProvider.js";import"zustand";import{useIdasResyncStore as s}from"../../stores/idas-resync-store/useIdasResyncStore.js";import"react";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";import"@babel/runtime/helpers/slicedToArray";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"file-saver";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/drillstring/conversion.js";import"lodash/cloneDeep";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";import n from"../../OffsetWellPickerV5.module.css.js";import{UndoIcon as i}from"../../../../icons/iconParkIcons.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/DragOne.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/SearchOne.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/InfoRounded.js";import"../../../../icons/customIcons/icons/FlameFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/PinOne.js";import"../../../../icons/customIcons/icons/PinOneCrossed.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import"../../../../icons/customIcons/icons/CloudDelete.js";import"../../../../icons/customIcons/icons/Lasso.js";import"../../../../icons/customIcons/icons/Radius.js";import"../../../../icons/customIcons/icons/ErrorOps.js";import"../../../../icons/customIcons/icons/DataTypeOps.js";import"../../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../../icons/customIcons/icons/CalibrationOps.js";import"../../../../icons/customIcons/icons/CriticalOps.js";import"../../../../icons/customIcons/icons/Company.js";import"../../../../icons/customIcons/icons/ArchiveOne.js";import"../../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../../icons/customIcons/icons/Connect.js";import"../../../../icons/customIcons/icons/PuzzleOne.js";import"../../../../icons/customIcons/icons/Feed.js";import"../../../../icons/customIcons/icons/Prompt.js";import"../../../../icons/customIcons/icons/Companies.js";import"../../../../icons/customIcons/icons/ClipboardAi.js";import"../../../../icons/customIcons/icons/Key.js";import"../../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../../icons/customIcons/icons/MappingManual.js";import"../../../../icons/customIcons/icons/Mapping.js";import"../../../../icons/customIcons/icons/Metrics.js";import"../../../../icons/customIcons/icons/Drops.js";import"../../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../../icons/customIcons/icons/Template.js";import"../../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../../icons/customIcons/icons/UnitConversion.js";import"../../../../icons/customIcons/icons/NPT.js";import"../../../../icons/customIcons/icons/GuidedFrac.js";import"../../../../componentsV2/Text/Text.js";import"../../../../componentsV2/Grid/Grid.js";import"../../../../componentsV2/Grid/Cell.js";import"../../../../componentsV2/Header/Header.scss.js";import{Button as r}from"../../../../componentsV2/Button/Button.js";import"../../../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as c}from"../../../../componentsV2/Tooltip/Tooltip.js";import"../../../../componentsV2/Popover/Popover.js";import"../../../../componentsV2/PopoverPanel/PopoverPanel.js";import"../../../../componentsV2/Radio/Radio.js";import"@material-ui/core";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/TextInputNext/TextInputNext.js";import"../../../../componentsV2/TextArea/TextArea.js";import"../../../../componentsV2/Label/Label.js";import"../../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../../componentsV2/TextLink/TextLink.js";import"../../../../componentsV2/Chip/Chip.js";import"../../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../../componentsV2/Avatar/Avatar.js";import"../../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/ModalWindow/ModalWindow.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/utils.js";import"../../../../componentsV2/Hint/Hint.scss.js";import"../../../../componentsV2/Counter/Counter.js";import"../../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../../componentsV2/TemplatesControl/TemplatesControl.js";import"../../../../componentsV2/TemplatesControl/utils.js";import"../../../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../../../componentsV2/TemplatesControl/Store/utils.js";import"../../../../componentsV2/TemplatesControl/types.js";import"../../../../permissions/PermissionsContext.js";import"../../../../permissions/constants/index.js";import"../../../../permissions/withPermissionsHOC.js";import"../../../../permissions/ProvidePermissions.js";import"../../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"../../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../../componentsV2/Stepper/Stepper.scss.js";import"../../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../../componentsV2/ButtonText/ButtonText.js";import"../../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../../componentsV2/Accordion/Accordion.scss.js";import"../../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../../componentsV2/AppContainer/AppContainer.js";import"../../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../../componentsV2/AppFooter/AppFooter.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router-dom";import"../../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../AppIcon/AppIcon.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"querystring";import"uuid/v1";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppPanel/AppPanelsContext.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../../componentsV2/AppHeader/V3/constants.scss.js";import"../../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js";import"highcharts";import"../../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js";import"../../../../componentsV2/Autocomplete/Autocomplete.js";import"../../../../componentsV2/Select/Select.js";import"../../../../componentsV2/AppPanel/AppPanel.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../../componentsV2/DatePicker/DatePicker.js";import"../../../../componentsV2/DragHandle/DragHandle.js";import"../../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../../../../componentsV2/Slider/constants.js";import"../../../../componentsV2/Slider/components/SliderThumb.js";import"../../../../componentsV2/Slider/Slider.scss.js";import"../../../../componentsV2/SliderAdvanced/SliderAdvanced.js";import"react-color";import"../../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js";import"../../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js";import"../../../../componentsV2/ColorPicker/ColorPicker.scss.js";import"../../../../componentsV2/ChartHelper/ChartHelper.scss.js";import"../../../../componentsV2/Hotkey/Hotkey.js";import"@tanstack/react-query";import"../../../../componentsV2/InterventionEventSelector/useInterventionUnitEvents.js";import"../../../../componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js";import p from"../../../../styles/typography/index.js";import"../../../../styles/counter/counter.module.scss.js";var m=p,a="OffsetWellPickerV5",l=function(p){var l=p.isLoading,j=p.isResetVisible,d=p.isOffsetSourceKnown,u=p.hasOffsetSource,V=p.isSynced,A=p.isMobile,C=p.hasValidAssetId,I=p.syncedOffsetLabel,h=p.resetTooltipLabel,v=p.selectedWellsCount,S=p.handleCancel,P=p.handleSave,g=p.handleReset,b=s((function(o){return o.isResyncInFlight})),D=!l&&C&&d,x=D&&j,T=D&&!j&&V&&u,f=b;return t("div",{className:n.actionsWrapper,children:[x&&e(c,{placement:"bottom-start",title:h,children:e("div",{children:e(r,A?{testId:"".concat(a,"_reset"),onClick:g,disabled:b,className:n.resetButtonMobile,children:e(i,{})}:{testId:"".concat(a,"_reset"),onClick:g,disabled:b,prefix:e(i,{}),children:"Reset to Defaults"})})}),T&&t("div",{children:[e("span",{className:o(m.regular12,m.colors.t6),children:"The offset list is being automatically populated by "}),e("span",{className:o(m.medium12,m.colors.t6),children:I})]}),t("div",{className:n.buttonGap,children:[e(r,{testId:"".concat(a,"_cancel"),onClick:S,children:"Cancel"}),t(r,{testId:"".concat(a,"_selectedWells"),type:"primary",onClick:P,disabled:f,children:["Select (",v,")"]})]})]})};export{l as PickerModalActions};
1
+ import o from"classnames";import"../../stores/idas-resync-store/IdasResyncStoreContext.js";import"../../stores/idas-resync-store/IdasResyncStoreProvider.js";import"zustand";import{useIdasResyncStore as s}from"../../stores/idas-resync-store/useIdasResyncStore.js";import"react";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/objectWithoutProperties";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import{jsxs as t,jsx as e}from"react/jsx-runtime";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";import"@babel/runtime/helpers/slicedToArray";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"file-saver";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/drillstring/conversion.js";import"lodash/cloneDeep";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";import n from"../../OffsetWellPickerV5.module.css.js";import{UndoIcon as i}from"../../../../icons/iconParkIcons.js";import"../../../../icons/customIcons/icons/AddMessage.js";import"../../../../icons/customIcons/icons/DragOne.js";import"../../../../icons/customIcons/icons/Attention.js";import"../../../../icons/customIcons/icons/Collapse.js";import"../../../../icons/customIcons/icons/Dashboard.js";import"../../../../icons/customIcons/icons/Expand.js";import"../../../../icons/customIcons/icons/FolderClosed.js";import"../../../../icons/customIcons/icons/FolderClosedFilled.js";import"../../../../icons/customIcons/icons/FolderOpened.js";import"../../../../icons/customIcons/icons/GreaterOrEqual.js";import"../../../../icons/customIcons/icons/LessOrEqual.js";import"../../../../icons/customIcons/icons/Search.js";import"../../../../icons/customIcons/icons/SearchOne.js";import"../../../../icons/customIcons/icons/Wellhub.js";import"../../../../icons/customIcons/icons/MultiRuler.js";import"../../../../icons/customIcons/icons/Checkbox.js";import"../../../../icons/customIcons/icons/CheckboxChecked.js";import"../../../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../../../icons/customIcons/icons/Radio.js";import"../../../../icons/customIcons/icons/RadioChecked.js";import"../../../../icons/customIcons/icons/SimulFrac.js";import"../../../../icons/customIcons/icons/ZipperFrac.js";import"../../../../icons/customIcons/icons/CautionFilled.js";import"../../../../icons/customIcons/icons/InfoRounded.js";import"../../../../icons/customIcons/icons/FlameFilled.js";import"../../../../icons/customIcons/icons/MoreApp.js";import"../../../../icons/customIcons/icons/Pad.js";import"../../../../icons/customIcons/icons/DrilloutUnit.js";import"../../../../icons/customIcons/icons/FracFleet.js";import"../../../../icons/customIcons/icons/Global.js";import"../../../../icons/customIcons/icons/Program.js";import"../../../../icons/customIcons/icons/Rig.js";import"../../../../icons/customIcons/icons/Well.js";import"../../../../icons/customIcons/icons/Gap.js";import"../../../../icons/customIcons/icons/Pin.js";import"../../../../icons/customIcons/icons/PinOne.js";import"../../../../icons/customIcons/icons/PinOneCrossed.js";import"../../../../icons/customIcons/icons/CloseOneFilled.js";import"../../../../icons/customIcons/icons/AttentionFilled.js";import"../../../../icons/customIcons/icons/CheckOneFilled.js";import"../../../../icons/customIcons/icons/Archive.js";import"../../../../icons/customIcons/icons/ArchiveCancel.js";import"../../../../icons/customIcons/icons/Unarchive.js";import"../../../../icons/customIcons/icons/Archived.js";import"../../../../icons/customIcons/icons/InterventionUnit.js";import"../../../../icons/customIcons/icons/CloudDelete.js";import"../../../../icons/customIcons/icons/Lasso.js";import"../../../../icons/customIcons/icons/Radius.js";import"../../../../icons/customIcons/icons/ErrorOps.js";import"../../../../icons/customIcons/icons/DataTypeOps.js";import"../../../../icons/customIcons/icons/FalsePositiveOps.js";import"../../../../icons/customIcons/icons/CalibrationOps.js";import"../../../../icons/customIcons/icons/CriticalOps.js";import"../../../../icons/customIcons/icons/Company.js";import"../../../../icons/customIcons/icons/ArchiveOne.js";import"../../../../icons/customIcons/icons/ParseBotFusion.js";import"../../../../icons/customIcons/icons/Connect.js";import"../../../../icons/customIcons/icons/PuzzleOne.js";import"../../../../icons/customIcons/icons/Feed.js";import"../../../../icons/customIcons/icons/Prompt.js";import"../../../../icons/customIcons/icons/Companies.js";import"../../../../icons/customIcons/icons/ClipboardAi.js";import"../../../../icons/customIcons/icons/Key.js";import"../../../../icons/customIcons/icons/AtSignCrossed.js";import"../../../../icons/customIcons/icons/MappingManual.js";import"../../../../icons/customIcons/icons/Mapping.js";import"../../../../icons/customIcons/icons/Metrics.js";import"../../../../icons/customIcons/icons/Drops.js";import"../../../../icons/customIcons/icons/ClipboardSearch.js";import"../../../../icons/customIcons/icons/Template.js";import"../../../../icons/customIcons/icons/ClipboardMetrics.js";import"../../../../icons/customIcons/icons/ClipboardBuilder.js";import"../../../../icons/customIcons/icons/UnitConversion.js";import"../../../../icons/customIcons/icons/NPT.js";import"../../../../icons/customIcons/icons/GuidedFrac.js";import"../../../../componentsV2/Text/Text.js";import"../../../../componentsV2/Grid/Grid.js";import"../../../../componentsV2/Grid/Cell.js";import"../../../../componentsV2/Header/Header.scss.js";import{Button as r}from"../../../../componentsV2/Button/Button.js";import"../../../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as c}from"../../../../componentsV2/Tooltip/Tooltip.js";import"../../../../componentsV2/Popover/Popover.js";import"../../../../componentsV2/PopoverPanel/PopoverPanel.js";import"../../../../componentsV2/Radio/Radio.js";import"@material-ui/core";import"../../../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../../../componentsV2/Checkbox/Checkbox.js";import"../../../../componentsV2/TextInput/TextInput.js";import"../../../../componentsV2/TextInputNext/TextInputNext.js";import"../../../../componentsV2/TextArea/TextArea.js";import"../../../../componentsV2/Label/Label.js";import"../../../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../../../componentsV2/TextLink/TextLink.js";import"../../../../componentsV2/Chip/Chip.js";import"../../../../componentsV2/ChipAlert/ChipAlert.js";import"../../../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../../../componentsV2/Avatar/Avatar.js";import"../../../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../../../componentsV2/Paper/Paper.js";import"../../../../componentsV2/ModalWindow/ModalWindow.js";import"uuid";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"../../../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider.js";import"../../../../componentsV2/Modal/Modal.scss.js";import"../../../../componentsV2/Menu/Menu.js";import"../../../../componentsV2/utils.js";import"../../../../componentsV2/Hint/Hint.scss.js";import"../../../../componentsV2/Counter/Counter.js";import"../../../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../../../componentsV2/TemplatesControl/TemplatesControl.js";import"../../../../componentsV2/TemplatesControl/utils.js";import"../../../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../../../componentsV2/TemplatesControl/Store/utils.js";import"../../../../componentsV2/TemplatesControl/types.js";import"../../../../permissions/PermissionsContext.js";import"../../../../permissions/constants/index.js";import"../../../../permissions/withPermissionsHOC.js";import"../../../../permissions/ProvidePermissions.js";import"../../../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../../../componentsV2/Switch/Switch.js";import"../../../../componentsV2/Tabs/Tabs.js";import"../../../../componentsV2/EmptyState/EmptyState.scss.js";import"../../../../componentsV2/FileIcon/FileIcon.js";import"../../../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../../../componentsV2/Skeleton/Skeleton.scss.js";import"../../../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../../../componentsV2/Stepper/Step/Step.scss.js";import"../../../../componentsV2/Stepper/Stepper.scss.js";import"../../../../componentsV2/ButtonLive/ButtonLive.js";import"../../../../componentsV2/ButtonText/ButtonText.js";import"../../../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../../../componentsV2/Accordion/Accordion.scss.js";import"../../../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../../../componentsV2/BadgeComment/BadgeComment.js";import"../../../../componentsV2/AppContainer/AppContainer.js";import"../../../../componentsV2/AppContainer/AppContainer.constants.js";import"../../../../componentsV2/AppFooter/AppFooter.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppHeader/AppHeader.constants.js";import"../../../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../../../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"react-router-dom";import"../../../../componentsV2/AppHeader/AppAssets/utils.js";import"../../../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../../../PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.js";import"../../../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../../AppIcon/AppIcon.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"querystring";import"../../../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppPanel/AppPanelsContext.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../../../componentsV2/AppHeader/V3/constants.scss.js";import"../../../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../../../componentsV2/AppHeader/AppHeader.scss.js";import"../../../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../../../componentsV2/ChartAxisExtreme/ChartAxisExtreme.scss.js";import"highcharts";import"../../../../componentsV2/ChartAxisExtreme/ChartAxisExtremeDragTracker.js";import"../../../../componentsV2/Autocomplete/Autocomplete.js";import"../../../../componentsV2/Select/Select.js";import"../../../../componentsV2/AppPanel/AppPanel.js";import"../../../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../../../componentsV2/DatePicker/DatePicker.js";import"../../../../componentsV2/DragHandle/DragHandle.js";import"../../../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../../../../componentsV2/Slider/constants.js";import"../../../../componentsV2/Slider/components/SliderThumb.js";import"../../../../componentsV2/Slider/Slider.scss.js";import"../../../../componentsV2/SliderAdvanced/SliderAdvanced.js";import"react-color";import"../../../../componentsV2/ColorPicker/Swatches/Swatches.scss.js";import"../../../../componentsV2/ColorPicker/OpacityDragtracker/OpacityDragTracker.scss.js";import"../../../../componentsV2/ColorPicker/ColorPicker.scss.js";import"../../../../componentsV2/ChartHelper/ChartHelper.scss.js";import"../../../../componentsV2/Hotkey/Hotkey.js";import"@tanstack/react-query";import"../../../../componentsV2/InterventionEventSelector/useInterventionUnitEvents.js";import"../../../../componentsV2/InterventionEventSelector/InterventionEventSelector.scss.js";import p from"../../../../styles/typography/index.js";import"../../../../styles/counter/counter.module.scss.js";var m=p,a="OffsetWellPickerV5",l=function(p){var l=p.isLoading,j=p.isResetVisible,d=p.isOffsetSourceKnown,u=p.hasOffsetSource,V=p.isSynced,A=p.isMobile,C=p.hasValidAssetId,I=p.syncedOffsetLabel,h=p.resetTooltipLabel,v=p.selectedWellsCount,S=p.handleCancel,P=p.handleSave,g=p.handleReset,b=s((function(o){return o.isResyncInFlight})),D=!l&&C&&d,x=D&&j,T=D&&!j&&V&&u,f=b;return t("div",{className:n.actionsWrapper,children:[x&&e(c,{placement:"bottom-start",title:h,children:e("div",{children:e(r,A?{testId:"".concat(a,"_reset"),onClick:g,disabled:b,className:n.resetButtonMobile,children:e(i,{})}:{testId:"".concat(a,"_reset"),onClick:g,disabled:b,prefix:e(i,{}),children:"Reset to Defaults"})})}),T&&t("div",{children:[e("span",{className:o(m.regular12,m.colors.t6),children:"The offset list is being automatically populated by "}),e("span",{className:o(m.medium12,m.colors.t6),children:I})]}),t("div",{className:n.buttonGap,children:[e(r,{testId:"".concat(a,"_cancel"),onClick:S,children:"Cancel"}),t(r,{testId:"".concat(a,"_selectedWells"),type:"primary",onClick:P,disabled:f,children:["Select (",v,")"]})]})]})};export{l as PickerModalActions};
2
2
  //# sourceMappingURL=PickerModalActions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PickerModalActions.js","sources":["../../../../../src/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport { useIdasResyncStore } from '../../stores/idas-resync-store';\n\nimport styles from '../../OffsetWellPickerV5.module.css';\n\nimport { UndoIcon } from '~/icons';\nimport { Button, Tooltip } from '~/componentsV2';\nimport { typography as typographyBase } from '~/styles';\n\nconst typography = typographyBase as Record<string, string> & typeof typographyBase;\n\nconst PAGE_NAME = 'OffsetWellPickerV5';\n\nexport type PickerModalActionsProps = {\n isLoading: boolean;\n isResetVisible: boolean;\n isOffsetSourceKnown: boolean;\n hasOffsetSource: boolean;\n isSynced: boolean;\n isMobile: boolean;\n hasValidAssetId: boolean;\n syncedOffsetLabel: string;\n resetTooltipLabel: string;\n selectedWellsCount: number;\n handleCancel: () => void;\n handleSave: () => void;\n handleReset: () => Promise<void>;\n};\n\nexport const PickerModalActions = ({\n isLoading,\n isResetVisible,\n isOffsetSourceKnown,\n hasOffsetSource,\n isSynced,\n isMobile,\n hasValidAssetId,\n syncedOffsetLabel,\n resetTooltipLabel,\n selectedWellsCount,\n handleCancel,\n handleSave,\n handleReset,\n}: PickerModalActionsProps) => {\n const isResyncInFlight = useIdasResyncStore(state => state.isResyncInFlight);\n const isStatusVisible = !isLoading && hasValidAssetId && isOffsetSourceKnown;\n const showResetButton = isStatusVisible && isResetVisible;\n const showSourceLabel = isStatusVisible && !isResetVisible && isSynced && hasOffsetSource;\n const isSaveDisabled = isResyncInFlight;\n\n return (\n <div className={styles.actionsWrapper}>\n {showResetButton && (\n <Tooltip placement=\"bottom-start\" title={resetTooltipLabel}>\n <div>\n {isMobile ? (\n <Button\n testId={`${PAGE_NAME}_reset`}\n onClick={handleReset}\n disabled={isResyncInFlight}\n className={styles.resetButtonMobile}\n >\n <UndoIcon />\n </Button>\n ) : (\n <Button\n testId={`${PAGE_NAME}_reset`}\n onClick={handleReset}\n disabled={isResyncInFlight}\n prefix={<UndoIcon />}\n >\n Reset to Defaults\n </Button>\n )}\n </div>\n </Tooltip>\n )}\n {showSourceLabel && (\n <div>\n <span className={classNames(typography.regular12, typography.colors.t6)}>\n The offset list is being automatically populated by&nbsp;\n </span>\n <span className={classNames(typography.medium12, typography.colors.t6)}>\n {syncedOffsetLabel}\n </span>\n </div>\n )}\n <div className={styles.buttonGap}>\n <Button testId={`${PAGE_NAME}_cancel`} onClick={handleCancel}>\n Cancel\n </Button>\n <Button\n testId={`${PAGE_NAME}_selectedWells`}\n type=\"primary\"\n onClick={handleSave}\n disabled={isSaveDisabled}\n >\n Select ({selectedWellsCount})\n </Button>\n </div>\n </div>\n );\n};\n"],"names":["typography","typographyBase","PAGE_NAME","PickerModalActions","_ref","isLoading","isResetVisible","isOffsetSourceKnown","hasOffsetSource","isSynced","isMobile","hasValidAssetId","syncedOffsetLabel","resetTooltipLabel","selectedWellsCount","handleCancel","handleSave","handleReset","isResyncInFlight","useIdasResyncStore","state","isStatusVisible","showResetButton","showSourceLabel","isSaveDisabled","_jsxs","className","styles","actionsWrapper","children","_jsx","Tooltip","placement","title","Button","testId","concat","onClick","disabled","resetButtonMobile","UndoIcon","prefix","classNames","regular12","colors","t6","medium12","buttonGap","type"],"mappings":"ipgBAUA,IAAMA,EAAaC,EAEbC,EAAY,qBAkBLC,EAAqB,SAcHC,GAAA,IAb7BC,IAAAA,UACAC,IAAAA,eACAC,IAAAA,oBACAC,IAAAA,gBACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,gBACAC,IAAAA,kBACAC,IAAAA,kBACAC,IAAAA,mBACAC,IAAAA,aACAC,IAAAA,WACAC,IAAAA,YAEMC,EAAmBC,GAAmB,SAAAC,GAAK,OAAIA,EAAMF,oBACrDG,GAAmBhB,GAAaM,GAAmBJ,EACnDe,EAAkBD,GAAmBf,EACrCiB,EAAkBF,IAAoBf,GAAkBG,GAAYD,EACpEgB,EAAiBN,EAEvB,OACEO,EAAA,MAAA,CAAKC,UAAWC,EAAOC,eAAeC,SACnCP,CAAAA,GACCQ,EAACC,EAAO,CAACC,UAAU,eAAeC,MAAOpB,EAAkBgB,SACzDC,EAAA,MAAA,CAAAD,SAEIC,EAACI,EADFxB,EACQ,CACLyB,OAAM,GAAAC,OAAKlC,EAAkB,UAC7BmC,QAASpB,EACTqB,SAAUpB,EACVQ,UAAWC,EAAOY,kBAAkBV,SAEpCC,EAACU,EAAQ,KAGJ,CACLL,OAAM,GAAAC,OAAKlC,EAAkB,UAC7BmC,QAASpB,EACTqB,SAAUpB,EACVuB,OAAQX,EAACU,EAAY,IAAAX,SAAA,0BAQ9BN,GACCE,EAAA,MAAA,CAAAI,SACE,CAAAC,EAAA,OAAA,CAAMJ,UAAWgB,EAAW1C,EAAW2C,UAAW3C,EAAW4C,OAAOC,IAAIhB,SAAA,yDAGxEC,EAAA,OAAA,CAAMJ,UAAWgB,EAAW1C,EAAW8C,SAAU9C,EAAW4C,OAAOC,IAAIhB,SACpEjB,OAIPa,EAAA,MAAA,CAAKC,UAAWC,EAAOoB,UAAUlB,SAAA,CAC/BC,EAACI,EAAM,CAACC,OAAM,GAAAC,OAAKlC,EAAmB,WAACmC,QAAStB,EAAac,SAAA,WAG7DJ,EAACS,EAAM,CACLC,OAAM,GAAAC,OAAKlC,EAA0B,kBACrC8C,KAAK,UACLX,QAASrB,EACTsB,SAAUd,EAAeK,SAAA,CAAA,WAEhBf,EAAkB,YAKrC"}
1
+ {"version":3,"file":"PickerModalActions.js","sources":["../../../../../src/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport { useIdasResyncStore } from '../../stores/idas-resync-store';\n\nimport styles from '../../OffsetWellPickerV5.module.css';\n\nimport { UndoIcon } from '~/icons';\nimport { Button, Tooltip } from '~/componentsV2';\nimport { typography as typographyBase } from '~/styles';\n\nconst typography = typographyBase as Record<string, string> & typeof typographyBase;\n\nconst PAGE_NAME = 'OffsetWellPickerV5';\n\nexport type PickerModalActionsProps = {\n isLoading: boolean;\n isResetVisible: boolean;\n isOffsetSourceKnown: boolean;\n hasOffsetSource: boolean;\n isSynced: boolean;\n isMobile: boolean;\n hasValidAssetId: boolean;\n syncedOffsetLabel: string;\n resetTooltipLabel: string;\n selectedWellsCount: number;\n handleCancel: () => void;\n handleSave: () => void;\n handleReset: () => Promise<void>;\n};\n\nexport const PickerModalActions = ({\n isLoading,\n isResetVisible,\n isOffsetSourceKnown,\n hasOffsetSource,\n isSynced,\n isMobile,\n hasValidAssetId,\n syncedOffsetLabel,\n resetTooltipLabel,\n selectedWellsCount,\n handleCancel,\n handleSave,\n handleReset,\n}: PickerModalActionsProps) => {\n const isResyncInFlight = useIdasResyncStore(state => state.isResyncInFlight);\n const isStatusVisible = !isLoading && hasValidAssetId && isOffsetSourceKnown;\n const showResetButton = isStatusVisible && isResetVisible;\n const showSourceLabel = isStatusVisible && !isResetVisible && isSynced && hasOffsetSource;\n const isSaveDisabled = isResyncInFlight;\n\n return (\n <div className={styles.actionsWrapper}>\n {showResetButton && (\n <Tooltip placement=\"bottom-start\" title={resetTooltipLabel}>\n <div>\n {isMobile ? (\n <Button\n testId={`${PAGE_NAME}_reset`}\n onClick={handleReset}\n disabled={isResyncInFlight}\n className={styles.resetButtonMobile}\n >\n <UndoIcon />\n </Button>\n ) : (\n <Button\n testId={`${PAGE_NAME}_reset`}\n onClick={handleReset}\n disabled={isResyncInFlight}\n prefix={<UndoIcon />}\n >\n Reset to Defaults\n </Button>\n )}\n </div>\n </Tooltip>\n )}\n {showSourceLabel && (\n <div>\n <span className={classNames(typography.regular12, typography.colors.t6)}>\n The offset list is being automatically populated by&nbsp;\n </span>\n <span className={classNames(typography.medium12, typography.colors.t6)}>\n {syncedOffsetLabel}\n </span>\n </div>\n )}\n <div className={styles.buttonGap}>\n <Button testId={`${PAGE_NAME}_cancel`} onClick={handleCancel}>\n Cancel\n </Button>\n <Button\n testId={`${PAGE_NAME}_selectedWells`}\n type=\"primary\"\n onClick={handleSave}\n disabled={isSaveDisabled}\n >\n Select ({selectedWellsCount})\n </Button>\n </div>\n </div>\n );\n};\n"],"names":["typography","typographyBase","PAGE_NAME","PickerModalActions","_ref","isLoading","isResetVisible","isOffsetSourceKnown","hasOffsetSource","isSynced","isMobile","hasValidAssetId","syncedOffsetLabel","resetTooltipLabel","selectedWellsCount","handleCancel","handleSave","handleReset","isResyncInFlight","useIdasResyncStore","state","isStatusVisible","showResetButton","showSourceLabel","isSaveDisabled","_jsxs","className","styles","actionsWrapper","children","_jsx","Tooltip","placement","title","Button","testId","concat","onClick","disabled","resetButtonMobile","UndoIcon","prefix","classNames","regular12","colors","t6","medium12","buttonGap","type"],"mappings":"0hgBAUA,IAAMA,EAAaC,EAEbC,EAAY,qBAkBLC,EAAqB,SAcHC,GAAA,IAb7BC,IAAAA,UACAC,IAAAA,eACAC,IAAAA,oBACAC,IAAAA,gBACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,gBACAC,IAAAA,kBACAC,IAAAA,kBACAC,IAAAA,mBACAC,IAAAA,aACAC,IAAAA,WACAC,IAAAA,YAEMC,EAAmBC,GAAmB,SAAAC,GAAK,OAAIA,EAAMF,oBACrDG,GAAmBhB,GAAaM,GAAmBJ,EACnDe,EAAkBD,GAAmBf,EACrCiB,EAAkBF,IAAoBf,GAAkBG,GAAYD,EACpEgB,EAAiBN,EAEvB,OACEO,EAAA,MAAA,CAAKC,UAAWC,EAAOC,eAAeC,SACnCP,CAAAA,GACCQ,EAACC,EAAO,CAACC,UAAU,eAAeC,MAAOpB,EAAkBgB,SACzDC,EAAA,MAAA,CAAAD,SAEIC,EAACI,EADFxB,EACQ,CACLyB,OAAM,GAAAC,OAAKlC,EAAkB,UAC7BmC,QAASpB,EACTqB,SAAUpB,EACVQ,UAAWC,EAAOY,kBAAkBV,SAEpCC,EAACU,EAAQ,KAGJ,CACLL,OAAM,GAAAC,OAAKlC,EAAkB,UAC7BmC,QAASpB,EACTqB,SAAUpB,EACVuB,OAAQX,EAACU,EAAY,IAAAX,SAAA,0BAQ9BN,GACCE,EAAA,MAAA,CAAAI,SACE,CAAAC,EAAA,OAAA,CAAMJ,UAAWgB,EAAW1C,EAAW2C,UAAW3C,EAAW4C,OAAOC,IAAIhB,SAAA,yDAGxEC,EAAA,OAAA,CAAMJ,UAAWgB,EAAW1C,EAAW8C,SAAU9C,EAAW4C,OAAOC,IAAIhB,SACpEjB,OAIPa,EAAA,MAAA,CAAKC,UAAWC,EAAOoB,UAAUlB,SAAA,CAC/BC,EAACI,EAAM,CAACC,OAAM,GAAAC,OAAKlC,EAAmB,WAACmC,QAAStB,EAAac,SAAA,WAG7DJ,EAACS,EAAM,CACLC,OAAM,GAAAC,OAAKlC,EAA0B,kBACrC8C,KAAK,UACLX,QAASrB,EACTsB,SAAUd,EAAeK,SAAA,CAAA,WAEhBf,EAAkB,YAKrC"}
@@ -1,2 +1,2 @@
1
- import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as i,useRef as o,useMemo as c,useEffect as u}from"react";import{isEqual as s,groupBy as a,get as p}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{WELL_ATTRIBUTE_METRICS as l,NonConvertableMetrics as m}from"../../constants.js";import"../../api/shared/dataFormatter.js";import{fetchMetricsData as f}from"../../api/metrics/fetchMetricsData.js";import{usePickerPropsStore as b}from"../../stores/picker-props-store/usePickerPropsStore.js";import{getSegmentConfig as d}from"../../segment-config/index.js";import{transformWells as j}from"./wellTransformations.js";function h(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function v(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){t(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}var y=function(r){return Number.isFinite(r)?parseFloat(r.toFixed(2)):null},g=function(h,g,w,O,P,x){var k=b((function(r){return r.segment})),S=d(k).metricsCollection,A=i(null),D=e(A,2),C=D[0],E=D[1],F=i(!1),T=e(F,2),I=T[0],M=T[1],N=i(new Set),G=e(N,2),L=G[0],_=G[1],q=o({}),z=P.filter((function(r){return!l.includes(r)})).join(),B=c((function(){return z?z.split(","):[]}),[z]),H=o(B),J=o(S),K=o(null),Q=c((function(){return x&&h?j(h,O,g,w):null}),[h,O,g,w,x]);return u((function(){if(!Q||!x)return M(!1),void _(new Set);var i=Q.map((function(r){return v(v({},r),q.current[r.id]||{})}));E(i),M(!0),K.current&&K.current.abort();var o=new AbortController;K.current=o;var c=function(){var i=r(n.mark((function i(){var c,u,l,b,d,j,h,g,w,O,P;return n.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(i.prev=0,c=[],u=!s(H.current,B),l=J.current!==S,u||l?(c=Q.map((function(r){return r.id})),q.current={},H.current=B,J.current=S):c=Q.filter((function(r){return!q.current[r.id]})).map((function(r){return r.id})),c.length>0&&_(new Set(c)),!(c.length>0&&B.length>0)){i.next=20;break}return b=new Map(Q.filter((function(r){return c.includes(r.id)})).map((function(r){return[r.id,r]}))),d=a(Array.from(b.values()).filter((function(r){return r.companyId})),"companyId"),j=Object.entries(d).map(function(){var t=r(n.mark((function r(t){var i,c,u,s;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return i=e(t,2),c=i[0],u=i[1],s=u.map((function(r){return r.id})),r.abrupt("return",f(Number(c),s,B,o.signal,S));case 3:case"end":return r.stop()}}),r)})));return function(r){return t.apply(this,arguments)}}()),i.next=12,Promise.all(j);case 12:if(h=i.sent,!o.signal.aborted){i.next=15;break}return i.abrupt("return");case 15:g=h.flat(),w={},O=a(g,"asset_id"),c.forEach((function(r){var e,n=null===(e=O[r])||void 0===e?void 0:e.reduce((function(r,e){var n=p(e,"data.value"),i=p(e,"data.key");return v(v({},r),{},t({},i,m.includes(i)?n:y(n)))}),{});w[r]=n||{}})),q.current=v(v({},q.current),w);case 20:P=Q.map((function(r){return v(v({},r),q.current[r.id]||{})})),E((function(r){return s(P,r)?r:P})),M(!1),_(new Set),i.next=29;break;case 26:i.prev=26,i.t0=i.catch(0),o.signal.aborted||(console.error("Error fetching metrics data:",i.t0),E(Q),M(!1),_(new Set));case 29:case"end":return i.stop()}}),i,null,[[0,26]])})));return function(){return i.apply(this,arguments)}}();return c(),function(){K.current&&(K.current.abort(),K.current=null)}}),[Q,B,x,S]),[C,I,Q,L]};export{g as useAdvancedWells};
1
+ import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as o,useRef as i,useMemo as u,useEffect as c}from"react";import{isEqual as a,groupBy as s,get as p}from"lodash";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{WELL_ATTRIBUTE_METRICS as l,NonConvertableMetrics as f}from"../../constants.js";import"../../api/shared/dataFormatter.js";import{fetchMetricsData as m}from"../../api/metrics/fetchMetricsData.js";import{usePickerPropsStore as b}from"../../stores/picker-props-store/usePickerPropsStore.js";import{getSegmentConfig as d}from"../../segment-config/index.js";import{transformWells as j}from"./wellTransformations.js";function h(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function v(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){t(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}var y=function(r){return Number.isFinite(r)?parseFloat(r.toFixed(2)):null},g=function(h,g,w,O,P,x){var k=b((function(r){return r.segment})),S=d(k).metricsCollection,A=o(null),D=e(A,2),C=D[0],E=D[1],F=o(!1),T=e(F,2),I=T[0],M=T[1],N=o(new Set),G=e(N,2),L=G[0],_=G[1],q=i({}),z=P.filter((function(r){return!l.includes(r)})).join(),B=u((function(){return z?z.split(","):[]}),[z]),H=i(B),J=i(S),K=i(null),Q=u((function(){return x&&h?j(h,O,g,w):null}),[h,O,g,w,x]);return c((function(){if(!Q||!x)return M(!1),void _(new Set);var o=Q.map((function(r){return v(v({},r),q.current[r.id]||{})}));E(o),M(!0),K.current&&K.current.abort();var i=new AbortController;K.current=i;var u=function(){var o=r(n.mark((function o(){var u,c,l,b,d,j,h,g,w,O,P;return n.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,u=[],c=!a(H.current,B),l=J.current!==S,c||l?(u=Q.map((function(r){return r.id})),q.current={},H.current=B,J.current=S):u=Q.filter((function(r){return!q.current[r.id]})).map((function(r){return r.id})),u.length>0&&_(new Set(u)),!(u.length>0&&B.length>0)){o.next=20;break}return b=new Map(Q.filter((function(r){return u.includes(r.id)})).map((function(r){return[r.id,r]}))),d=s(Array.from(b.values()).filter((function(r){return r.companyId})),"companyId"),j=Object.entries(d).map(function(){var t=r(n.mark((function r(t){var o,u,c,a;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e(t,2),u=o[0],c=o[1],a=c.map((function(r){return r.id})),r.abrupt("return",m(Number(u),a,B,i.signal,S));case 3:case"end":return r.stop()}}),r)})));return function(r){return t.apply(this,arguments)}}()),o.next=12,Promise.all(j);case 12:if(h=o.sent,!i.signal.aborted){o.next=15;break}return o.abrupt("return");case 15:g=h.flat(),w={},O=s(g,"asset_id"),u.forEach((function(r){var e,n=null===(e=O[r])||void 0===e?void 0:e.reduce((function(r,e){var n=p(e,"data.value"),o=p(e,"data.key");return v(v({},r),{},t({},o,f.includes(o)?n:y(n)))}),{});w[r]=n||{}})),q.current=v(v({},q.current),w);case 20:P=Q.map((function(r){return v(v({},r),q.current[r.id]||{})})),E((function(r){return a(P,r)?r:P})),M(!1),_(new Set),o.next=29;break;case 26:o.prev=26,o.t0=o.catch(0),i.signal.aborted||(console.error("Error fetching metrics data:",o.t0),E(Q),M(!1),_(new Set));case 29:case"end":return o.stop()}}),o,null,[[0,26]])})));return function(){return o.apply(this,arguments)}}();return u(),function(){K.current&&(K.current.abort(),K.current=null)}}),[Q,B,x,S]),[C,I,Q,L]};export{g as useAdvancedWells};
2
2
  //# sourceMappingURL=useAdvancedWells.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAdvancedWells.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.ts"],"sourcesContent":["import { useState, useEffect, useRef, useMemo } from 'react';\nimport { get, groupBy, isEqual } from 'lodash';\n\nimport { fetchMetricsData } from '../../api';\nimport type { FetchedOffsetWell } from '../../api/shared/types';\nimport { NonConvertableMetrics, WELL_ATTRIBUTE_METRICS } from '../../constants';\nimport { usePickerPropsStore } from '../../stores/picker-props-store/usePickerPropsStore';\nimport { getSegmentConfig } from '../../segment-config';\nimport type { WellSection, OffsetWellsBySection } from '../useExternalOffsets';\n\nimport { transformWells } from './wellTransformations';\n\nexport type TransformedWell = FetchedOffsetWell & {\n distance?: number;\n wellSection?: string[];\n};\n\ntype MetricsCache = Record<number, Record<string, unknown>>;\n\nconst parseMetricValue = (value: number): number | null =>\n Number.isFinite(value) ? parseFloat(value.toFixed(2)) : null;\n\nexport const useAdvancedWells = (\n rawWells: FetchedOffsetWell[] | null,\n wellSections: WellSection[] | null,\n offsetWellsBySection: OffsetWellsBySection | null,\n subjectWellId: number | null,\n metricsKeys: string[],\n open: boolean | undefined\n): [TransformedWell[] | null, boolean, TransformedWell[] | null, Set<number>] => {\n const segment = usePickerPropsStore(state => state.segment);\n const { metricsCollection } = getSegmentConfig(segment);\n\n const [wells, setWells] = useState<TransformedWell[] | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n const [loadingWellIds, setLoadingWellIds] = useState<Set<number>>(new Set());\n const fetchedDataCache = useRef<MetricsCache>({});\n\n // Only these keys exist in the metrics collection. Keyed by content, so toggling a\n // well-attribute metric neither refetches nor drops the cached metrics.\n const apiMetricsKeysSignature = metricsKeys\n .filter(key => !WELL_ATTRIBUTE_METRICS.includes(key))\n .join();\n const apiMetricsKeys = useMemo(\n () => (apiMetricsKeysSignature ? apiMetricsKeysSignature.split(',') : []),\n [apiMetricsKeysSignature]\n );\n\n const previousMetricsKeys = useRef(apiMetricsKeys);\n const previousCollection = useRef(metricsCollection);\n const abortControllerRef = useRef<AbortController | null>(null);\n\n const transformedWells = useMemo((): TransformedWell[] | null => {\n if (!open || !rawWells) return null;\n\n return transformWells(rawWells, subjectWellId, wellSections, offsetWellsBySection);\n }, [rawWells, subjectWellId, wellSections, offsetWellsBySection, open]);\n\n useEffect(() => {\n if (!transformedWells || !open) {\n setIsLoading(false);\n setLoadingWellIds(new Set());\n return undefined;\n }\n\n // Immediately set wells with transformed data AND cached metrics\n // This preserves existing metric values while new wells load\n const wellsWithCachedMetrics = transformedWells.map(well => ({\n ...well,\n ...(fetchedDataCache.current[well.id] || {}),\n }));\n setWells(wellsWithCachedMetrics);\n setIsLoading(true);\n\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n }\n\n const abortController = new AbortController();\n\n abortControllerRef.current = abortController;\n\n const fetchAndUpdateMetrics = async () => {\n try {\n let wellIdsToFetch: number[] = [];\n const metricsKeysChanged = !isEqual(previousMetricsKeys.current, apiMetricsKeys);\n const collectionChanged = previousCollection.current !== metricsCollection;\n\n if (metricsKeysChanged || collectionChanged) {\n wellIdsToFetch = transformedWells.map(well => well.id);\n fetchedDataCache.current = {};\n previousMetricsKeys.current = apiMetricsKeys;\n previousCollection.current = metricsCollection;\n } else {\n // Only fetch metrics for wells not in cache\n wellIdsToFetch = transformedWells\n .filter(well => !fetchedDataCache.current[well.id])\n .map(well => well.id);\n }\n\n // Track which wells are loading\n if (wellIdsToFetch.length > 0) {\n setLoadingWellIds(new Set(wellIdsToFetch));\n }\n\n if (wellIdsToFetch.length > 0 && apiMetricsKeys.length > 0) {\n // Group wells to fetch by their company ID\n const wellsToFetchById = new Map(\n transformedWells\n .filter(well => wellIdsToFetch.includes(well.id))\n .map(well => [well.id, well] as const)\n );\n const wellsByCompany = groupBy(\n Array.from(wellsToFetchById.values()).filter(well => well.companyId),\n 'companyId'\n );\n\n // Fetch metrics for each company in parallel\n const metricsPromises = Object.entries(wellsByCompany).map(\n async ([compId, companyWells]) => {\n const companyWellIds = companyWells.map(w => w.id);\n\n return fetchMetricsData(\n Number(compId),\n companyWellIds,\n apiMetricsKeys,\n abortController.signal,\n metricsCollection\n );\n }\n );\n\n const allRecords = await Promise.all(metricsPromises);\n\n if (abortController.signal.aborted) {\n return;\n }\n\n const records = allRecords.flat();\n const wellsMetrics: MetricsCache = {};\n const recordsPerAsset = groupBy(records, 'asset_id');\n\n wellIdsToFetch.forEach(wellId => {\n const wellMetrics = recordsPerAsset[wellId]?.reduce<Record<string, unknown>>(\n (acc, record) => {\n const value = get(record, 'data.value') as number;\n const key = get(record, 'data.key') as string;\n\n return {\n ...acc,\n [key]: NonConvertableMetrics.includes(key) ? value : parseMetricValue(value),\n };\n },\n {}\n );\n\n wellsMetrics[wellId] = wellMetrics || {};\n });\n\n fetchedDataCache.current = {\n ...fetchedDataCache.current,\n ...wellsMetrics,\n };\n }\n\n const result = transformedWells.map(well => ({\n ...well,\n ...(fetchedDataCache.current[well.id] || {}),\n }));\n\n setWells(prevWells => (isEqual(result, prevWells) ? prevWells : result));\n setIsLoading(false);\n setLoadingWellIds(new Set());\n } catch (error) {\n if (!abortController.signal.aborted) {\n console.error('Error fetching metrics data:', error);\n setWells(transformedWells);\n setIsLoading(false);\n setLoadingWellIds(new Set());\n }\n }\n };\n\n fetchAndUpdateMetrics();\n\n return () => {\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n abortControllerRef.current = null;\n }\n };\n }, [transformedWells, apiMetricsKeys, open, metricsCollection]);\n\n return [wells, isLoading, transformedWells, loadingWellIds];\n};\n"],"names":["parseMetricValue","value","Number","isFinite","parseFloat","toFixed","useAdvancedWells","rawWells","wellSections","offsetWellsBySection","subjectWellId","metricsKeys","open","segment","usePickerPropsStore","state","metricsCollection","getSegmentConfig","useState","_useState2","_slicedToArray","_useState","wells","setWells","_useState4","_useState3","isLoading","setIsLoading","_useState5","Set","_useState6","loadingWellIds","setLoadingWellIds","fetchedDataCache","useRef","apiMetricsKeysSignature","filter","key","WELL_ATTRIBUTE_METRICS","includes","join","apiMetricsKeys","useMemo","split","previousMetricsKeys","previousCollection","abortControllerRef","transformedWells","transformWells","useEffect","wellsWithCachedMetrics","map","well","_objectSpread","current","id","abort","abortController","AbortController","fetchAndUpdateMetrics","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","wellIdsToFetch","metricsKeysChanged","collectionChanged","wellsToFetchById","wellsByCompany","metricsPromises","allRecords","records","wellsMetrics","recordsPerAsset","result","wrap","_context2","prev","next","isEqual","length","Map","groupBy","Array","from","values","companyId","Object","entries","_ref3","_callee","_ref2","_ref4","compId","companyWells","companyWellIds","_context","w","abrupt","fetchMetricsData","signal","stop","_x","apply","this","arguments","Promise","all","sent","aborted","flat","forEach","wellId","_recordsPerAsset$well","wellMetrics","reduce","acc","record","get","NonConvertableMetrics","prevWells","t0","console","error"],"mappings":"u2DAmBA,IAAMA,EAAmB,SAACC,GAAa,OACrCC,OAAOC,SAASF,GAASG,WAAWH,EAAMI,QAAQ,IAAM,IAAI,EAEjDC,EAAmB,SAC9BC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,IAAMC,EAAUC,GAAoB,SAAAC,GAAK,OAAIA,EAAMF,WAC3CG,EAAsBC,EAAiBJ,GAAvCG,kBAEkBE,EAAAA,EAAmC,MAAKC,EAAAC,EAAAC,EAAA,GAA3DC,EAAKH,EAAA,GAAEI,EAAQJ,EAAA,GACYD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAC9BI,EAA4CV,EAAsB,IAAIW,KAAMC,EAAAV,EAAAQ,EAAA,GAArEG,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAClCG,EAAmBC,EAAqB,CAAA,GAIxCC,EAA0BxB,EAC7ByB,QAAO,SAAAC,GAAG,OAAKC,EAAuBC,SAASF,MAC/CG,OACGC,EAAiBC,GACrB,WAAA,OAAOP,EAA0BA,EAAwBQ,MAAM,KAAO,EAAE,GACxE,CAACR,IAGGS,EAAsBV,EAAOO,GAC7BI,EAAqBX,EAAOlB,GAC5B8B,EAAqBZ,EAA+B,MAEpDa,EAAmBL,GAAQ,WAC/B,OAAK9B,GAASL,EAEPyC,EAAezC,EAAUG,EAAeF,EAAcC,GAF9B,IAGjC,GAAG,CAACF,EAAUG,EAAeF,EAAcC,EAAsBG,IAyIjE,OAvIAqC,GAAU,WACR,IAAKF,IAAqBnC,EAGxB,OAFAe,GAAa,QACbK,EAAkB,IAAIH,KAMxB,IAAMqB,EAAyBH,EAAiBI,KAAI,SAAAC,GAAI,OAAAC,EAAAA,EAAA,CAAA,EACnDD,GACCnB,EAAiBqB,QAAQF,EAAKG,KAAO,CAAE,EAAA,IAE7ChC,EAAS2B,GACTvB,GAAa,GAETmB,EAAmBQ,SACrBR,EAAmBQ,QAAQE,QAG7B,IAAMC,EAAkB,IAAIC,gBAE5BZ,EAAmBQ,QAAUG,EAE7B,IAAME,EAAqB,WAAA,IAAGC,EAAAC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAb,EAAAc,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAqBzB,GArByBF,EAAAC,KAAA,EAEtBb,EAA2B,GACzBC,GAAsBc,EAAQpC,EAAoBU,QAASb,GAC3D0B,EAAoBtB,EAAmBS,UAAYtC,EAErDkD,GAAsBC,GACxBF,EAAiBlB,EAAiBI,KAAI,SAAAC,GAAI,OAAIA,EAAKG,MACnDtB,EAAiBqB,QAAU,GAC3BV,EAAoBU,QAAUb,EAC9BI,EAAmBS,QAAUtC,GAG7BiD,EAAiBlB,EACdX,QAAO,SAAAgB,GAAI,OAAKnB,EAAiBqB,QAAQF,EAAKG,GAAG,IACjDJ,KAAI,SAAAC,GAAI,OAAIA,EAAKG,MAIlBU,EAAegB,OAAS,GAC1BjD,EAAkB,IAAIH,IAAIoC,MAGxBA,EAAegB,OAAS,GAAKxC,EAAewC,OAAS,GAAC,CAAAJ,EAAAE,KAAA,GAAA,KAAA,CAyBvD,OAvBKX,EAAmB,IAAIc,IAC3BnC,EACGX,QAAO,SAAAgB,GAAI,OAAIa,EAAe1B,SAASa,EAAKG,GAAG,IAC/CJ,KAAI,SAAAC,GAAI,MAAI,CAACA,EAAKG,GAAIH,EAAc,KAEnCiB,EAAiBc,EACrBC,MAAMC,KAAKjB,EAAiBkB,UAAUlD,QAAO,SAAAgB,GAAI,OAAIA,EAAKmC,aAC1D,aAIIjB,EAAkBkB,OAAOC,QAAQpB,GAAgBlB,IAAG,WAAA,IACxDuC,EAAA7B,EAAAC,EAAAC,MAAA,SAAA4B,EAAAC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAlC,EAAAc,MAAA,SAAAqB,GAAA,OAAA,OAAAA,EAAAnB,KAAAmB,EAAAlB,MAAA,KAAA,EACoD,OADpDc,EAAQC,EAAAA,EAAAA,GAAAA,OAAQC,EAAYF,EAAA,GACpBG,EAAiBD,EAAa5C,KAAI,SAAA+C,GAAC,OAAIA,EAAE3C,MAAG0C,EAAAE,OAAA,SAE3CC,EACLlG,OAAO4F,GACPE,EACAvD,EACAgB,EAAgB4C,OAChBrF,IACD,KAAA,EAAA,IAAA,MAAA,OAAAiF,EAAAK,OAAA,GAAAX,EACF,KAAA,OAAA,SAAAY,GAAA,OAAAb,EAAAc,MAAAC,KAAAC,UAAA,CACF,CAZyD,IAYzD7B,EAAAE,KAAA,GAEwB4B,QAAQC,IAAItC,GAAgB,KAAA,GAArC,GAAVC,EAAUM,EAAAgC,MAEZpD,EAAgB4C,OAAOS,QAAO,CAAAjC,EAAAE,KAAA,GAAA,KAAA,CAAA,OAAAF,EAAAsB,OAAA,UAAA,KAAA,GAI5B3B,EAAUD,EAAWwC,OACrBtC,EAA6B,CAAA,EAC7BC,EAAkBS,EAAQX,EAAS,YAEzCP,EAAe+C,SAAQ,SAAAC,GAAU,IAAAC,EACzBC,EAAqC,QAA1BD,EAAGxC,EAAgBuC,UAAO,IAAAC,OAAA,EAAvBA,EAAyBE,QAC3C,SAACC,EAAKC,GACJ,IAAMrH,EAAQsH,EAAID,EAAQ,cACpBjF,EAAMkF,EAAID,EAAQ,YAExB,OAAAjE,EAAAA,EAAA,CAAA,EACKgE,GACFhF,CAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAMmF,EAAsBjF,SAASF,GAAOpC,EAAQD,EAAiBC,IAEzE,GACD,CAAE,GAGJwE,EAAawC,GAAUE,GAAe,EACxC,IAEAlF,EAAiBqB,QACZrB,EAAAA,EAAAA,CAAAA,EAAAA,EAAiBqB,SACjBmB,GACH,KAAA,GAGEE,EAAS5B,EAAiBI,KAAI,SAAAC,GAAI,OAAAC,EAAAA,EAAA,CAAA,EACnCD,GACCnB,EAAiBqB,QAAQF,EAAKG,KAAO,CAAE,EAAA,IAG7ChC,GAAS,SAAAkG,GAAS,OAAKzC,EAAQL,EAAQ8C,GAAaA,EAAY9C,CAAM,IACtEhD,GAAa,GACbK,EAAkB,IAAIH,KAAOgD,EAAAE,KAAA,GAAA,MAAA,KAAA,GAAAF,EAAAC,KAAA,GAAAD,EAAA6C,GAAA7C,EAAA,MAAA,GAExBpB,EAAgB4C,OAAOS,UAC1Ba,QAAQC,MAAM,+BAAsC/C,EAAA6C,IACpDnG,EAASwB,GACTpB,GAAa,GACbK,EAAkB,IAAIH,MACvB,KAAA,GAAA,IAAA,MAAA,OAAAgD,EAAAyB,OAAA,GAAAtC,EAAA,KAAA,CAAA,CAAA,EAAA,KAEJ,KAAA,OAAA,WAnG0B,OAAAJ,EAAA4C,MAAAC,KAAAC,UAAA,EAAA,GAuG3B,OAFA/C,IAEO,WACDb,EAAmBQ,UACrBR,EAAmBQ,QAAQE,QAC3BV,EAAmBQ,QAAU,MAGlC,GAAE,CAACP,EAAkBN,EAAgB7B,EAAMI,IAErC,CAACM,EAAOI,EAAWqB,EAAkBhB,EAC9C"}
1
+ {"version":3,"file":"useAdvancedWells.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useAdvancedWells.ts"],"sourcesContent":["import { useState, useEffect, useRef, useMemo } from 'react';\nimport { get, groupBy, isEqual } from 'lodash';\n\nimport { fetchMetricsData } from '../../api';\nimport type { FetchedOffsetWell } from '../../api/shared/types';\nimport { NonConvertableMetrics, WELL_ATTRIBUTE_METRICS } from '../../constants';\nimport { usePickerPropsStore } from '../../stores/picker-props-store/usePickerPropsStore';\nimport { getSegmentConfig } from '../../segment-config';\nimport type { WellSection, OffsetWellsBySection } from '../useExternalOffsets';\n\nimport { transformWells } from './wellTransformations';\n\nexport type TransformedWell = FetchedOffsetWell & {\n distance?: number;\n wellSection?: string[];\n};\n\ntype MetricsCache = Record<number, Record<string, unknown>>;\n\nconst parseMetricValue = (value: number): number | null =>\n Number.isFinite(value) ? parseFloat(value.toFixed(2)) : null;\n\nexport const useAdvancedWells = (\n rawWells: FetchedOffsetWell[] | null,\n wellSections: WellSection[] | null,\n offsetWellsBySection: OffsetWellsBySection | null,\n subjectWellId: number | null,\n metricsKeys: string[],\n open: boolean | undefined\n): [TransformedWell[] | null, boolean, TransformedWell[] | null, Set<number>] => {\n const segment = usePickerPropsStore(state => state.segment);\n const { metricsCollection } = getSegmentConfig(segment);\n\n const [wells, setWells] = useState<TransformedWell[] | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n const [loadingWellIds, setLoadingWellIds] = useState<Set<number>>(new Set());\n const fetchedDataCache = useRef<MetricsCache>({});\n\n // Only these keys exist in the metrics collection. Keyed by content, so toggling a\n // well-attribute metric neither refetches nor drops the cached metrics.\n const apiMetricsKeysSignature = metricsKeys\n .filter(key => !WELL_ATTRIBUTE_METRICS.includes(key))\n .join();\n const apiMetricsKeys = useMemo(\n () => (apiMetricsKeysSignature ? apiMetricsKeysSignature.split(',') : []),\n [apiMetricsKeysSignature]\n );\n\n const previousMetricsKeys = useRef(apiMetricsKeys);\n const previousCollection = useRef(metricsCollection);\n const abortControllerRef = useRef<AbortController | null>(null);\n\n const transformedWells = useMemo((): TransformedWell[] | null => {\n if (!open || !rawWells) return null;\n\n return transformWells(rawWells, subjectWellId, wellSections, offsetWellsBySection);\n }, [rawWells, subjectWellId, wellSections, offsetWellsBySection, open]);\n\n useEffect(() => {\n if (!transformedWells || !open) {\n setIsLoading(false);\n setLoadingWellIds(new Set());\n return undefined;\n }\n\n // Immediately set wells with transformed data AND cached metrics\n // This preserves existing metric values while new wells load\n const wellsWithCachedMetrics = transformedWells.map(well => ({\n ...well,\n ...(fetchedDataCache.current[well.id] || {}),\n }));\n setWells(wellsWithCachedMetrics);\n setIsLoading(true);\n\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n }\n\n const abortController = new AbortController();\n\n abortControllerRef.current = abortController;\n\n const fetchAndUpdateMetrics = async () => {\n try {\n let wellIdsToFetch: number[] = [];\n const metricsKeysChanged = !isEqual(previousMetricsKeys.current, apiMetricsKeys);\n const collectionChanged = previousCollection.current !== metricsCollection;\n\n if (metricsKeysChanged || collectionChanged) {\n wellIdsToFetch = transformedWells.map(well => well.id);\n fetchedDataCache.current = {};\n previousMetricsKeys.current = apiMetricsKeys;\n previousCollection.current = metricsCollection;\n } else {\n // Only fetch metrics for wells not in cache\n wellIdsToFetch = transformedWells\n .filter(well => !fetchedDataCache.current[well.id])\n .map(well => well.id);\n }\n\n // Track which wells are loading\n if (wellIdsToFetch.length > 0) {\n setLoadingWellIds(new Set(wellIdsToFetch));\n }\n\n if (wellIdsToFetch.length > 0 && apiMetricsKeys.length > 0) {\n // Group wells to fetch by their company ID\n const wellsToFetchById = new Map(\n transformedWells\n .filter(well => wellIdsToFetch.includes(well.id))\n .map(well => [well.id, well] as const)\n );\n const wellsByCompany = groupBy(\n Array.from(wellsToFetchById.values()).filter(well => well.companyId),\n 'companyId'\n );\n\n // Fetch metrics for each company in parallel\n const metricsPromises = Object.entries(wellsByCompany).map(\n async ([compId, companyWells]) => {\n const companyWellIds = companyWells.map(w => w.id);\n\n return fetchMetricsData(\n Number(compId),\n companyWellIds,\n apiMetricsKeys,\n abortController.signal,\n metricsCollection\n );\n }\n );\n\n const allRecords = await Promise.all(metricsPromises);\n\n if (abortController.signal.aborted) {\n return;\n }\n\n const records = allRecords.flat();\n const wellsMetrics: MetricsCache = {};\n const recordsPerAsset = groupBy(records, 'asset_id');\n\n wellIdsToFetch.forEach(wellId => {\n const wellMetrics = recordsPerAsset[wellId]?.reduce<Record<string, unknown>>(\n (acc, record) => {\n const value = get(record, 'data.value') as number;\n const key = get(record, 'data.key') as string;\n\n return {\n ...acc,\n [key]: NonConvertableMetrics.includes(key) ? value : parseMetricValue(value),\n };\n },\n {}\n );\n\n wellsMetrics[wellId] = wellMetrics || {};\n });\n\n fetchedDataCache.current = {\n ...fetchedDataCache.current,\n ...wellsMetrics,\n };\n }\n\n const result = transformedWells.map(well => ({\n ...well,\n ...(fetchedDataCache.current[well.id] || {}),\n }));\n\n setWells(prevWells => (isEqual(result, prevWells) ? prevWells : result));\n setIsLoading(false);\n setLoadingWellIds(new Set());\n } catch (error) {\n if (!abortController.signal.aborted) {\n console.error('Error fetching metrics data:', error);\n setWells(transformedWells);\n setIsLoading(false);\n setLoadingWellIds(new Set());\n }\n }\n };\n\n fetchAndUpdateMetrics();\n\n return () => {\n if (abortControllerRef.current) {\n abortControllerRef.current.abort();\n abortControllerRef.current = null;\n }\n };\n }, [transformedWells, apiMetricsKeys, open, metricsCollection]);\n\n return [wells, isLoading, transformedWells, loadingWellIds];\n};\n"],"names":["parseMetricValue","value","Number","isFinite","parseFloat","toFixed","useAdvancedWells","rawWells","wellSections","offsetWellsBySection","subjectWellId","metricsKeys","open","segment","usePickerPropsStore","state","metricsCollection","getSegmentConfig","useState","_useState2","_slicedToArray","_useState","wells","setWells","_useState4","_useState3","isLoading","setIsLoading","_useState5","Set","_useState6","loadingWellIds","setLoadingWellIds","fetchedDataCache","useRef","apiMetricsKeysSignature","filter","key","WELL_ATTRIBUTE_METRICS","includes","join","apiMetricsKeys","useMemo","split","previousMetricsKeys","previousCollection","abortControllerRef","transformedWells","transformWells","useEffect","wellsWithCachedMetrics","map","well","_objectSpread","current","id","abort","abortController","AbortController","fetchAndUpdateMetrics","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","wellIdsToFetch","metricsKeysChanged","collectionChanged","wellsToFetchById","wellsByCompany","metricsPromises","allRecords","records","wellsMetrics","recordsPerAsset","result","wrap","_context2","prev","next","isEqual","length","Map","groupBy","Array","from","values","companyId","Object","entries","_ref3","_callee","_ref2","_ref4","compId","companyWells","companyWellIds","_context","w","abrupt","fetchMetricsData","signal","stop","_x","apply","this","arguments","Promise","all","sent","aborted","flat","forEach","wellId","_recordsPerAsset$well","wellMetrics","reduce","acc","record","get","NonConvertableMetrics","prevWells","t0","console","error"],"mappings":"mvDAmBA,IAAMA,EAAmB,SAACC,GAAa,OACrCC,OAAOC,SAASF,GAASG,WAAWH,EAAMI,QAAQ,IAAM,IAAI,EAEjDC,EAAmB,SAC9BC,EACAC,EACAC,EACAC,EACAC,EACAC,GAEA,IAAMC,EAAUC,GAAoB,SAAAC,GAAK,OAAIA,EAAMF,WAC3CG,EAAsBC,EAAiBJ,GAAvCG,kBAEkBE,EAAAA,EAAmC,MAAKC,EAAAC,EAAAC,EAAA,GAA3DC,EAAKH,EAAA,GAAEI,EAAQJ,EAAA,GACYD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAC9BI,EAA4CV,EAAsB,IAAIW,KAAMC,EAAAV,EAAAQ,EAAA,GAArEG,EAAcD,EAAA,GAAEE,EAAiBF,EAAA,GAClCG,EAAmBC,EAAqB,CAAA,GAIxCC,EAA0BxB,EAC7ByB,QAAO,SAAAC,GAAG,OAAKC,EAAuBC,SAASF,MAC/CG,OACGC,EAAiBC,GACrB,WAAA,OAAOP,EAA0BA,EAAwBQ,MAAM,KAAO,EAAE,GACxE,CAACR,IAGGS,EAAsBV,EAAOO,GAC7BI,EAAqBX,EAAOlB,GAC5B8B,EAAqBZ,EAA+B,MAEpDa,EAAmBL,GAAQ,WAC/B,OAAK9B,GAASL,EAEPyC,EAAezC,EAAUG,EAAeF,EAAcC,GAF9B,IAGjC,GAAG,CAACF,EAAUG,EAAeF,EAAcC,EAAsBG,IAyIjE,OAvIAqC,GAAU,WACR,IAAKF,IAAqBnC,EAGxB,OAFAe,GAAa,QACbK,EAAkB,IAAIH,KAMxB,IAAMqB,EAAyBH,EAAiBI,KAAI,SAAAC,GAAI,OAAAC,EAAAA,EAAA,CAAA,EACnDD,GACCnB,EAAiBqB,QAAQF,EAAKG,KAAO,CAAE,EAAA,IAE7ChC,EAAS2B,GACTvB,GAAa,GAETmB,EAAmBQ,SACrBR,EAAmBQ,QAAQE,QAG7B,IAAMC,EAAkB,IAAIC,gBAE5BZ,EAAmBQ,QAAUG,EAE7B,IAAME,EAAqB,WAAA,IAAGC,EAAAC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAb,EAAAc,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAqBzB,GArByBF,EAAAC,KAAA,EAEtBb,EAA2B,GACzBC,GAAsBc,EAAQpC,EAAoBU,QAASb,GAC3D0B,EAAoBtB,EAAmBS,UAAYtC,EAErDkD,GAAsBC,GACxBF,EAAiBlB,EAAiBI,KAAI,SAAAC,GAAI,OAAIA,EAAKG,MACnDtB,EAAiBqB,QAAU,GAC3BV,EAAoBU,QAAUb,EAC9BI,EAAmBS,QAAUtC,GAG7BiD,EAAiBlB,EACdX,QAAO,SAAAgB,GAAI,OAAKnB,EAAiBqB,QAAQF,EAAKG,GAAG,IACjDJ,KAAI,SAAAC,GAAI,OAAIA,EAAKG,MAIlBU,EAAegB,OAAS,GAC1BjD,EAAkB,IAAIH,IAAIoC,MAGxBA,EAAegB,OAAS,GAAKxC,EAAewC,OAAS,GAAC,CAAAJ,EAAAE,KAAA,GAAA,KAAA,CAyBvD,OAvBKX,EAAmB,IAAIc,IAC3BnC,EACGX,QAAO,SAAAgB,GAAI,OAAIa,EAAe1B,SAASa,EAAKG,GAAG,IAC/CJ,KAAI,SAAAC,GAAI,MAAI,CAACA,EAAKG,GAAIH,EAAc,KAEnCiB,EAAiBc,EACrBC,MAAMC,KAAKjB,EAAiBkB,UAAUlD,QAAO,SAAAgB,GAAI,OAAIA,EAAKmC,aAC1D,aAIIjB,EAAkBkB,OAAOC,QAAQpB,GAAgBlB,IAAG,WAAA,IACxDuC,EAAA7B,EAAAC,EAAAC,MAAA,SAAA4B,EAAAC,GAAA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,OAAAlC,EAAAc,MAAA,SAAAqB,GAAA,OAAA,OAAAA,EAAAnB,KAAAmB,EAAAlB,MAAA,KAAA,EACoD,OADpDc,EAAQC,EAAAA,EAAAA,GAAAA,OAAQC,EAAYF,EAAA,GACpBG,EAAiBD,EAAa5C,KAAI,SAAA+C,GAAC,OAAIA,EAAE3C,MAAG0C,EAAAE,OAAA,SAE3CC,EACLlG,OAAO4F,GACPE,EACAvD,EACAgB,EAAgB4C,OAChBrF,IACD,KAAA,EAAA,IAAA,MAAA,OAAAiF,EAAAK,OAAA,GAAAX,EACF,KAAA,OAAA,SAAAY,GAAA,OAAAb,EAAAc,MAAAC,KAAAC,UAAA,CACF,CAZyD,IAYzD7B,EAAAE,KAAA,GAEwB4B,QAAQC,IAAItC,GAAgB,KAAA,GAArC,GAAVC,EAAUM,EAAAgC,MAEZpD,EAAgB4C,OAAOS,QAAO,CAAAjC,EAAAE,KAAA,GAAA,KAAA,CAAA,OAAAF,EAAAsB,OAAA,UAAA,KAAA,GAI5B3B,EAAUD,EAAWwC,OACrBtC,EAA6B,CAAA,EAC7BC,EAAkBS,EAAQX,EAAS,YAEzCP,EAAe+C,SAAQ,SAAAC,GAAU,IAAAC,EACzBC,EAAqC,QAA1BD,EAAGxC,EAAgBuC,UAAO,IAAAC,OAAA,EAAvBA,EAAyBE,QAC3C,SAACC,EAAKC,GACJ,IAAMrH,EAAQsH,EAAID,EAAQ,cACpBjF,EAAMkF,EAAID,EAAQ,YAExB,OAAAjE,EAAAA,EAAA,CAAA,EACKgE,GACFhF,CAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAMmF,EAAsBjF,SAASF,GAAOpC,EAAQD,EAAiBC,IAEzE,GACD,CAAE,GAGJwE,EAAawC,GAAUE,GAAe,EACxC,IAEAlF,EAAiBqB,QACZrB,EAAAA,EAAAA,CAAAA,EAAAA,EAAiBqB,SACjBmB,GACH,KAAA,GAGEE,EAAS5B,EAAiBI,KAAI,SAAAC,GAAI,OAAAC,EAAAA,EAAA,CAAA,EACnCD,GACCnB,EAAiBqB,QAAQF,EAAKG,KAAO,CAAE,EAAA,IAG7ChC,GAAS,SAAAkG,GAAS,OAAKzC,EAAQL,EAAQ8C,GAAaA,EAAY9C,CAAM,IACtEhD,GAAa,GACbK,EAAkB,IAAIH,KAAOgD,EAAAE,KAAA,GAAA,MAAA,KAAA,GAAAF,EAAAC,KAAA,GAAAD,EAAA6C,GAAA7C,EAAA,MAAA,GAExBpB,EAAgB4C,OAAOS,UAC1Ba,QAAQC,MAAM,+BAAsC/C,EAAA6C,IACpDnG,EAASwB,GACTpB,GAAa,GACbK,EAAkB,IAAIH,MACvB,KAAA,GAAA,IAAA,MAAA,OAAAgD,EAAAyB,OAAA,GAAAtC,EAAA,KAAA,CAAA,CAAA,EAAA,KAEJ,KAAA,OAAA,WAnG0B,OAAAJ,EAAA4C,MAAAC,KAAAC,UAAA,EAAA,GAuG3B,OAFA/C,IAEO,WACDb,EAAmBQ,UACrBR,EAAmBQ,QAAQE,QAC3BV,EAAmBQ,QAAU,MAGlC,GAAE,CAACP,EAAkBN,EAAgB7B,EAAMI,IAErC,CAACM,EAAOI,EAAWqB,EAAkBhB,EAC9C"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/asyncToGenerator";import i from"@babel/runtime/helpers/slicedToArray";import o from"@babel/runtime/regenerator";import{useState as r,useEffect as e}from"react";import"lodash";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{fetchCompanyGoals as n}from"../../api/companies/fetchCompanyGoals.js";import{METRICS_LIST as m,MAX_MANUAL_METRICS_COUNT as p}from"../../constants.js";import"../../api/shared/dataFormatter.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"file-saver";import"query-string";import{BENCHMARK_METRIC_GOAL as a}from"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/drillstring/conversion.js";import"lodash/cloneDeep";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import{getCompanyGoalSetting as l}from"../../../../utils/goals.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";var c=new Set(m.map((function(t){return t.key}))),u=function(t){return t.filter((function(t){return c.has(t)}))},j=function(m,c){var j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hole_depth_change",f=r([]),h=i(f,2),d=h[0],b=h[1];return e((function(){function t(){return(t=s(o.mark((function t(){var s,i;return o.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n(m);case 2:s=t.sent,i=l(s,a),b(i?u([i]):[]);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}null!==j?c?b(u(c)):m&&function(){t.apply(this,arguments)}():b([])}),[m,c,j]),j&&!d.includes(j)&&b((function(s){return[j].concat(t(s)).slice(0,p+1)})),[d,b]};export{j as useCompanyMetricKey};
1
+ import t from"@babel/runtime/helpers/toConsumableArray";import s from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/helpers/slicedToArray";import i from"@babel/runtime/regenerator";import{useState as r,useEffect as e}from"react";import"lodash";import"@babel/runtime/helpers/defineProperty";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{fetchCompanyGoals as n}from"../../api/companies/fetchCompanyGoals.js";import{METRICS_LIST as a,MAX_MANUAL_METRICS_COUNT as m}from"../../constants.js";import"../../api/shared/dataFormatter.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"../../../../constants/completion.js";import"../../../../constants/alerts.js";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"file-saver";import"query-string";import{BENCHMARK_METRIC_GOAL as p}from"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../../utils/drillstring/conversion.js";import"lodash/cloneDeep";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import{getCompanyGoalSetting as l}from"../../../../utils/goals.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"@babel/runtime/helpers/objectWithoutProperties";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";var c=new Set(a.map((function(t){return t.key}))),u=function(t){return t.filter((function(t){return c.has(t)}))},j=function(a,c){var j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"hole_depth_change",f=r([]),h=o(f,2),d=h[0],b=h[1];return e((function(){function t(){return(t=s(i.mark((function t(){var s,o;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n(a);case 2:s=t.sent,o=l(s,p),b(o?u([o]):[]);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}null!==j?c?b(u(c)):a&&function(){t.apply(this,arguments)}():b([])}),[a,c,j]),j&&!d.includes(j)&&b((function(s){return[j].concat(t(s)).slice(0,m+1)})),[d,b]};export{j as useCompanyMetricKey};
2
2
  //# sourceMappingURL=useCompanyMetricKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCompanyMetricKey.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.ts"],"sourcesContent":["import { useState, useEffect, type Dispatch, type SetStateAction } from 'react';\n\nimport { fetchCompanyGoals } from '../../api';\nimport { METRICS_LIST, MAX_MANUAL_METRICS_COUNT } from '../../constants';\n\nimport { goals } from '~/utils';\nimport { goals as goalsConstants } from '~/constants';\n\nconst validMetricKeys = new Set(METRICS_LIST.map(m => m.key));\nconst filterValidMetrics = (keys: string[]) => keys.filter(key => validMetricKeys.has(key));\n\nexport const useCompanyMetricKey = (\n companyId: number | undefined,\n savedMetricsKeys: string[] | undefined,\n defaultMetricKey: string | null = 'hole_depth_change'\n): [string[], Dispatch<SetStateAction<string[]>>] => {\n const [metricKeys, setMetricKeys] = useState<string[]>([]);\n\n useEffect(() => {\n if (defaultMetricKey === null) {\n setMetricKeys([]);\n return;\n }\n\n async function handleFetchCompanyMetric() {\n const companyGoals = await fetchCompanyGoals(companyId);\n const companyMetricKey = goals.getCompanyGoalSetting(\n companyGoals,\n goalsConstants.BENCHMARK_METRIC_GOAL\n );\n\n if (companyMetricKey) {\n setMetricKeys(filterValidMetrics([companyMetricKey]));\n } else {\n setMetricKeys([]);\n }\n }\n\n if (savedMetricsKeys) {\n setMetricKeys(filterValidMetrics(savedMetricsKeys));\n } else if (companyId) {\n handleFetchCompanyMetric();\n }\n }, [companyId, savedMetricsKeys, defaultMetricKey]);\n\n if (defaultMetricKey && !metricKeys.includes(defaultMetricKey)) {\n // Total = the always-present default metric + the user's manual picks.\n setMetricKeys(prev => [defaultMetricKey, ...prev].slice(0, MAX_MANUAL_METRICS_COUNT + 1));\n }\n return [metricKeys, setMetricKeys];\n};\n"],"names":["validMetricKeys","Set","METRICS_LIST","map","m","key","filterValidMetrics","keys","filter","has","useCompanyMetricKey","companyId","savedMetricsKeys","defaultMetricKey","useState","_useState2","_slicedToArray","_useState","metricKeys","setMetricKeys","useEffect","_handleFetchCompanyMetric","_asyncToGenerator","_regeneratorRuntime","mark","_callee","companyGoals","companyMetricKey","wrap","_context","prev","next","fetchCompanyGoals","sent","goals","goalsConstants","stop","apply","this","arguments","handleFetchCompanyMetric","includes","slice","MAX_MANUAL_METRICS_COUNT"],"mappings":"4vFAQA,IAAMA,EAAkB,IAAIC,IAAIC,EAAaC,KAAI,SAAAC,GAAC,OAAIA,EAAEC,GAAG,KACrDC,EAAqB,SAACC,GAAc,OAAKA,EAAKC,QAAO,SAAAH,GAAG,OAAIL,EAAgBS,IAAIJ,KAAK,EAE9EK,EAAsB,SACjCC,EACAC,GAEmD,IADnDC,yDAAkC,oBAEEC,EAAAA,EAAmB,IAAGC,EAAAC,EAAAC,EAAA,GAAnDC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAiChC,OA/BAK,GAAU,WAM+B,SAAAC,IAYtC,OAZsCA,EAAvCC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAA,OAAAJ,EAAAK,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EAC6BC,EAAkBrB,GAAU,KAAA,EAAjDe,EAAYG,EAAAI,KACZN,EAAmBO,EACvBR,EACAS,GAIAhB,EADEQ,EACYrB,EAAmB,CAACqB,IAEpB,IACf,KAAA,EAAA,IAAA,MAAA,OAAAE,EAAAO,OAAA,GAAAX,EACF,MAAAY,MAAAC,KAAAC,UAAA,CAjBwB,OAArB1B,EAmBAD,EACFO,EAAcb,EAAmBM,IACxBD,GAlBV,WAEsCU,EAAAgB,MAAAC,KAAAC,UAAA,CAiBrCC,GArBArB,EAAc,GAuBjB,GAAE,CAACR,EAAWC,EAAkBC,IAE7BA,IAAqBK,EAAWuB,SAAS5B,IAE3CM,GAAc,SAAAW,GAAI,MAAI,CAACjB,GAAqBiB,OAAAA,EAAAA,IAAMY,MAAM,EAAGC,EAA2B,MAEjF,CAACzB,EAAYC,EACtB"}
1
+ {"version":3,"file":"useCompanyMetricKey.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.ts"],"sourcesContent":["import { useState, useEffect, type Dispatch, type SetStateAction } from 'react';\n\nimport { fetchCompanyGoals } from '../../api';\nimport { METRICS_LIST, MAX_MANUAL_METRICS_COUNT } from '../../constants';\n\nimport { goals } from '~/utils';\nimport { goals as goalsConstants } from '~/constants';\n\nconst validMetricKeys = new Set(METRICS_LIST.map(m => m.key));\nconst filterValidMetrics = (keys: string[]) => keys.filter(key => validMetricKeys.has(key));\n\nexport const useCompanyMetricKey = (\n companyId: number | undefined,\n savedMetricsKeys: string[] | undefined,\n defaultMetricKey: string | null = 'hole_depth_change'\n): [string[], Dispatch<SetStateAction<string[]>>] => {\n const [metricKeys, setMetricKeys] = useState<string[]>([]);\n\n useEffect(() => {\n if (defaultMetricKey === null) {\n setMetricKeys([]);\n return;\n }\n\n async function handleFetchCompanyMetric() {\n const companyGoals = await fetchCompanyGoals(companyId);\n const companyMetricKey = goals.getCompanyGoalSetting(\n companyGoals,\n goalsConstants.BENCHMARK_METRIC_GOAL\n );\n\n if (companyMetricKey) {\n setMetricKeys(filterValidMetrics([companyMetricKey]));\n } else {\n setMetricKeys([]);\n }\n }\n\n if (savedMetricsKeys) {\n setMetricKeys(filterValidMetrics(savedMetricsKeys));\n } else if (companyId) {\n handleFetchCompanyMetric();\n }\n }, [companyId, savedMetricsKeys, defaultMetricKey]);\n\n if (defaultMetricKey && !metricKeys.includes(defaultMetricKey)) {\n // Total = the always-present default metric + the user's manual picks.\n setMetricKeys(prev => [defaultMetricKey, ...prev].slice(0, MAX_MANUAL_METRICS_COUNT + 1));\n }\n return [metricKeys, setMetricKeys];\n};\n"],"names":["validMetricKeys","Set","METRICS_LIST","map","m","key","filterValidMetrics","keys","filter","has","useCompanyMetricKey","companyId","savedMetricsKeys","defaultMetricKey","useState","_useState2","_slicedToArray","_useState","metricKeys","setMetricKeys","useEffect","_handleFetchCompanyMetric","_asyncToGenerator","_regeneratorRuntime","mark","_callee","companyGoals","companyMetricKey","wrap","_context","prev","next","fetchCompanyGoals","sent","goals","goalsConstants","stop","apply","this","arguments","handleFetchCompanyMetric","includes","slice","MAX_MANUAL_METRICS_COUNT"],"mappings":"woFAQA,IAAMA,EAAkB,IAAIC,IAAIC,EAAaC,KAAI,SAAAC,GAAC,OAAIA,EAAEC,GAAG,KACrDC,EAAqB,SAACC,GAAc,OAAKA,EAAKC,QAAO,SAAAH,GAAG,OAAIL,EAAgBS,IAAIJ,KAAK,EAE9EK,EAAsB,SACjCC,EACAC,GAEmD,IADnDC,yDAAkC,oBAEEC,EAAAA,EAAmB,IAAGC,EAAAC,EAAAC,EAAA,GAAnDC,EAAUH,EAAA,GAAEI,EAAaJ,EAAA,GAiChC,OA/BAK,GAAU,WAM+B,SAAAC,IAYtC,OAZsCA,EAAvCC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAA,OAAAJ,EAAAK,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,OAAAF,EAAAE,KAAA,EAC6BC,EAAkBrB,GAAU,KAAA,EAAjDe,EAAYG,EAAAI,KACZN,EAAmBO,EACvBR,EACAS,GAIAhB,EADEQ,EACYrB,EAAmB,CAACqB,IAEpB,IACf,KAAA,EAAA,IAAA,MAAA,OAAAE,EAAAO,OAAA,GAAAX,EACF,MAAAY,MAAAC,KAAAC,UAAA,CAjBwB,OAArB1B,EAmBAD,EACFO,EAAcb,EAAmBM,IACxBD,GAlBV,WAEsCU,EAAAgB,MAAAC,KAAAC,UAAA,CAiBrCC,GArBArB,EAAc,GAuBjB,GAAE,CAACR,EAAWC,EAAkBC,IAE7BA,IAAqBK,EAAWuB,SAAS5B,IAE3CM,GAAc,SAAAW,GAAI,MAAI,CAACjB,GAAqBiB,OAAAA,EAAAA,IAAMY,MAAM,EAAGC,EAA2B,MAEjF,CAACzB,EAAYC,EACtB"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/slicedToArray";import i from"@babel/runtime/regenerator";import{useState as e,useEffect as s}from"react";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{fetchCompanies as o}from"../../api/companies/fetchCompanies.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";var n=function(n){var p=e(null),a=r(p,2),m=a[0],c=a[1];return s((function(){function r(){return(r=t(i.mark((function t(){var r,e,s;return i.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n){t.next=6;break}return t.next=3,o();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=[];case 7:e=t.t0,s=(null===(r=e.find((function(t){return t.id===n})))||void 0===r?void 0:r.provider)||null,c(s);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}c(null),function(){r.apply(this,arguments)}()}),[n]),[m]};export{n as useCompanyProvider};
1
+ import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import{useState as i,useEffect as o}from"react";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import{fetchCompanies as n}from"../../api/companies/fetchCompanies.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";var s=function(s){var a=i(null),p=r(a,2),m=p[0],l=p[1];return o((function(){function r(){return(r=t(e.mark((function t(){var r,i,o;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!s){t.next=6;break}return t.next=3,n();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=[];case 7:i=t.t0,o=(null===(r=i.find((function(t){return t.id===s})))||void 0===r?void 0:r.provider)||null,l(o);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}l(null),function(){r.apply(this,arguments)}()}),[s]),[m]};export{s as useCompanyProvider};
2
2
  //# sourceMappingURL=useCompanyProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCompanyProvider.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { fetchCompanies } from '../../api';\n\ntype FetchedCompany = {\n id: number;\n name: string;\n provider?: string;\n};\n\nexport const useCompanyProvider = (companyId: number | undefined): [string | null] => {\n const [companyProivder, setCompanyProvider] = useState<string | null>(null);\n\n useEffect(() => {\n async function fetchCompanyProvider() {\n const companies: FetchedCompany[] = companyId ? await fetchCompanies() : [];\n const companyProvider = companies.find(company => company.id === companyId)?.provider || null;\n setCompanyProvider(companyProvider);\n }\n\n setCompanyProvider(null);\n fetchCompanyProvider();\n }, [companyId]);\n\n return [companyProivder];\n};\n"],"names":["useCompanyProvider","companyId","useState","_useState2","_slicedToArray","_useState","companyProivder","setCompanyProvider","useEffect","_fetchCompanyProvider","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_companies$find","companies","companyProvider","wrap","_context","prev","next","fetchCompanies","t0","sent","find","company","id","provider","stop","apply","this","arguments","fetchCompanyProvider"],"mappings":"88BAUaA,EAAqB,SAACC,GACjC,IAA8CC,EAAAA,EAAwB,MAAKC,EAAAC,EAAAC,EAAA,GAApEC,EAAeH,EAAA,GAAEI,EAAkBJ,EAAA,GAa1C,OAXAK,GAAU,WAC2B,SAAAC,IAIlC,OAJkCA,EAAnCC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAAC,EAAA,OAAAL,EAAAM,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,IACsCnB,EAAS,CAAAiB,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAE,KAAA,EAASC,IAAgB,KAAA,EAAAH,EAAAI,GAAAJ,EAAAK,KAAAL,EAAAE,KAAA,EAAA,MAAA,KAAA,EAAAF,EAAAI,GAAG,GAAE,KAAA,EAArEP,EAA2BG,EAAAI,GAC3BN,GAAkB,QAAAD,EAAAA,EAAUS,MAAK,SAAAC,GAAO,OAAIA,EAAQC,KAAOzB,CAAS,WAAlD,IAAAa,OAAA,EAAAA,EAAqDa,WAAY,KACzFpB,EAAmBS,GAAiB,KAAA,GAAA,IAAA,MAAA,OAAAE,EAAAU,OAAA,GAAAf,EACrC,MAAAgB,MAAAC,KAAAC,UAAA,CAEDxB,EAAmB,MAPL,WACqBE,EAAAoB,MAAAC,KAAAC,UAAA,CAOnCC,EACF,GAAG,CAAC/B,IAEG,CAACK,EACV"}
1
+ {"version":3,"file":"useCompanyProvider.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyProvider.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { fetchCompanies } from '../../api';\n\ntype FetchedCompany = {\n id: number;\n name: string;\n provider?: string;\n};\n\nexport const useCompanyProvider = (companyId: number | undefined): [string | null] => {\n const [companyProivder, setCompanyProvider] = useState<string | null>(null);\n\n useEffect(() => {\n async function fetchCompanyProvider() {\n const companies: FetchedCompany[] = companyId ? await fetchCompanies() : [];\n const companyProvider = companies.find(company => company.id === companyId)?.provider || null;\n setCompanyProvider(companyProvider);\n }\n\n setCompanyProvider(null);\n fetchCompanyProvider();\n }, [companyId]);\n\n return [companyProivder];\n};\n"],"names":["useCompanyProvider","companyId","useState","_useState2","_slicedToArray","_useState","companyProivder","setCompanyProvider","useEffect","_fetchCompanyProvider","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_companies$find","companies","companyProvider","wrap","_context","prev","next","fetchCompanies","t0","sent","find","company","id","provider","stop","apply","this","arguments","fetchCompanyProvider"],"mappings":"01BAUaA,EAAqB,SAACC,GACjC,IAA8CC,EAAAA,EAAwB,MAAKC,EAAAC,EAAAC,EAAA,GAApEC,EAAeH,EAAA,GAAEI,EAAkBJ,EAAA,GAa1C,OAXAK,GAAU,WAC2B,SAAAC,IAIlC,OAJkCA,EAAnCC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAAC,EAAAC,EAAA,OAAAL,EAAAM,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,IACsCnB,EAAS,CAAAiB,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAE,KAAA,EAASC,IAAgB,KAAA,EAAAH,EAAAI,GAAAJ,EAAAK,KAAAL,EAAAE,KAAA,EAAA,MAAA,KAAA,EAAAF,EAAAI,GAAG,GAAE,KAAA,EAArEP,EAA2BG,EAAAI,GAC3BN,GAAkB,QAAAD,EAAAA,EAAUS,MAAK,SAAAC,GAAO,OAAIA,EAAQC,KAAOzB,CAAS,WAAlD,IAAAa,OAAA,EAAAA,EAAqDa,WAAY,KACzFpB,EAAmBS,GAAiB,KAAA,GAAA,IAAA,MAAA,OAAAE,EAAAU,OAAA,GAAAf,EACrC,MAAAgB,MAAAC,KAAAC,UAAA,CAEDxB,EAAmB,MAPL,WACqBE,EAAAoB,MAAAC,KAAAC,UAAA,CAOnCC,EACF,GAAG,CAAC/B,IAEG,CAACK,EACV"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/asyncToGenerator";import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import{useState as s,useEffect as i}from"react";import{fetchWellsByIds as o}from"../../api/wells/fetchWellsByIds.js";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";var n=function(n){var p=s(null),a=r(p,2),l=a[0],c=a[1],m=s(!1),u=r(m,2),f=u[0],h=u[1];return i((function(){if(!n||n<=0)return c(null),void h(!1);var r=!1,s=n;function i(){return(i=t(e.mark((function t(){var i;return e.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h(!0),t.prev=1,t.next=4,o([s]);case 4:i=t.sent,!r&&i&&i.length>0&&c(i[0]),t.next=12;break;case 8:t.prev=8,t.t0=t.catch(1),console.error("Error fetching subject well:",t.t0),r||c(null);case 12:return t.prev=12,r||h(!1),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[1,8,12,15]])})))).apply(this,arguments)}return function(){i.apply(this,arguments)}(),function(){r=!0}}),[n]),[l,f]};export{n as useFetchSubjectWell};
1
+ import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import{useState as i,useEffect as o}from"react";import{fetchWellsByIds as n}from"../../api/wells/fetchWellsByIds.js";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";var s=function(s){var a=i(null),p=t(a,2),l=p[0],m=p[1],c=i(!1),u=t(c,2),f=u[0],h=u[1];return o((function(){if(!s||s<=0)return m(null),void h(!1);var t=!1,i=s;function o(){return(o=r(e.mark((function r(){var o;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return h(!0),r.prev=1,r.next=4,n([i]);case 4:o=r.sent,!t&&o&&o.length>0&&m(o[0]),r.next=12;break;case 8:r.prev=8,r.t0=r.catch(1),console.error("Error fetching subject well:",r.t0),t||m(null);case 12:return r.prev=12,t||h(!1),r.finish(12);case 15:case"end":return r.stop()}}),r,null,[[1,8,12,15]])})))).apply(this,arguments)}return function(){o.apply(this,arguments)}(),function(){t=!0}}),[s]),[l,f]};export{s as useFetchSubjectWell};
2
2
  //# sourceMappingURL=useFetchSubjectWell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchSubjectWell.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { fetchWellsByIds } from '../../api';\nimport type { FetchedOffsetWell } from '../../api/shared/types';\n\n/**\n * Hook to fetch complete subject well data including coordinates\n * @param subjectWellId - The ID of the subject well\n * @returns The subject well data and loading state\n */\nexport const useFetchSubjectWell = (\n subjectWellId: number | null\n): [FetchedOffsetWell | null, boolean] => {\n const [subjectWellData, setSubjectWellData] = useState<FetchedOffsetWell | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n if (!subjectWellId || subjectWellId <= 0) {\n setSubjectWellData(null);\n setIsLoading(false);\n return undefined;\n }\n\n let isCancelled = false;\n const wellId = subjectWellId;\n\n async function fetchSubjectWell() {\n setIsLoading(true);\n try {\n const wells = await fetchWellsByIds([wellId]);\n if (!isCancelled && wells && wells.length > 0) {\n setSubjectWellData(wells[0] as unknown as FetchedOffsetWell);\n }\n } catch (error) {\n console.error('Error fetching subject well:', error);\n if (!isCancelled) {\n setSubjectWellData(null);\n }\n } finally {\n if (!isCancelled) {\n setIsLoading(false);\n }\n }\n }\n\n fetchSubjectWell();\n\n return () => {\n isCancelled = true;\n };\n }, [subjectWellId]);\n\n return [subjectWellData, isLoading];\n};\n"],"names":["useFetchSubjectWell","subjectWellId","useState","_useState2","_slicedToArray","_useState","subjectWellData","setSubjectWellData","_useState4","_useState3","isLoading","setIsLoading","useEffect","isCancelled","wellId","_fetchSubjectWell","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wells","wrap","_context","prev","next","fetchWellsByIds","sent","length","t0","console","error","finish","stop","apply","this","arguments","fetchSubjectWell"],"mappings":"48BAUaA,EAAsB,SACjCC,GAEA,IAA8CC,EAAAA,EAAmC,MAAKC,EAAAC,EAAAC,EAAA,GAA/EC,EAAeH,EAAA,GAAEI,EAAkBJ,EAAA,GACRD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAsC9B,OApCAI,GAAU,WACR,IAAKX,GAAiBA,GAAiB,EAGrC,OAFAM,EAAmB,WACnBI,GAAa,GAIf,IAAIE,GAAc,EACZC,EAASb,EAEgB,SAAAc,IAiB9B,OAjB8BA,EAA/BC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAA,OAAAH,EAAAI,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EACqB,OAAnBb,GAAa,GAAMW,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAEGC,EAAgB,CAACX,IAAQ,KAAA,EAAvCM,EAAKE,EAAAI,MACNb,GAAeO,GAASA,EAAMO,OAAS,GAC1CpB,EAAmBa,EAAM,IAC1BE,EAAAE,KAAA,GAAA,MAAA,KAAA,EAAAF,EAAAC,KAAA,EAAAD,EAAAM,GAAAN,EAAA,MAAA,GAEDO,QAAQC,MAAM,+BAAsCR,EAAAM,IAC/Cf,GACHN,EAAmB,MACpB,KAAA,GAIA,OAJAe,EAAAC,KAAA,GAEIV,GACHF,GAAa,GACdW,EAAAS,OAAA,IAAA,KAAA,GAAA,IAAA,MAAA,OAAAT,EAAAU,OAAA,GAAAb,EAAA,KAAA,CAAA,CAAA,EAAA,EAAA,GAAA,KAEJ,MAAAc,MAAAC,KAAAC,UAAA,CAID,OAvB6B,WAEEpB,EAAAkB,MAAAC,KAAAC,UAAA,CAmB/BC,GAEO,WACLvB,GAAc,EAElB,GAAG,CAACZ,IAEG,CAACK,EAAiBI,EAC3B"}
1
+ {"version":3,"file":"useFetchSubjectWell.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useFetchSubjectWell.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { fetchWellsByIds } from '../../api';\nimport type { FetchedOffsetWell } from '../../api/shared/types';\n\n/**\n * Hook to fetch complete subject well data including coordinates\n * @param subjectWellId - The ID of the subject well\n * @returns The subject well data and loading state\n */\nexport const useFetchSubjectWell = (\n subjectWellId: number | null\n): [FetchedOffsetWell | null, boolean] => {\n const [subjectWellData, setSubjectWellData] = useState<FetchedOffsetWell | null>(null);\n const [isLoading, setIsLoading] = useState(false);\n\n useEffect(() => {\n if (!subjectWellId || subjectWellId <= 0) {\n setSubjectWellData(null);\n setIsLoading(false);\n return undefined;\n }\n\n let isCancelled = false;\n const wellId = subjectWellId;\n\n async function fetchSubjectWell() {\n setIsLoading(true);\n try {\n const wells = await fetchWellsByIds([wellId]);\n if (!isCancelled && wells && wells.length > 0) {\n setSubjectWellData(wells[0] as unknown as FetchedOffsetWell);\n }\n } catch (error) {\n console.error('Error fetching subject well:', error);\n if (!isCancelled) {\n setSubjectWellData(null);\n }\n } finally {\n if (!isCancelled) {\n setIsLoading(false);\n }\n }\n }\n\n fetchSubjectWell();\n\n return () => {\n isCancelled = true;\n };\n }, [subjectWellId]);\n\n return [subjectWellData, isLoading];\n};\n"],"names":["useFetchSubjectWell","subjectWellId","useState","_useState2","_slicedToArray","_useState","subjectWellData","setSubjectWellData","_useState4","_useState3","isLoading","setIsLoading","useEffect","isCancelled","wellId","_fetchSubjectWell","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wells","wrap","_context","prev","next","fetchWellsByIds","sent","length","t0","console","error","finish","stop","apply","this","arguments","fetchSubjectWell"],"mappings":"w1BAUaA,EAAsB,SACjCC,GAEA,IAA8CC,EAAAA,EAAmC,MAAKC,EAAAC,EAAAC,EAAA,GAA/EC,EAAeH,EAAA,GAAEI,EAAkBJ,EAAA,GACRD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAsC9B,OApCAI,GAAU,WACR,IAAKX,GAAiBA,GAAiB,EAGrC,OAFAM,EAAmB,WACnBI,GAAa,GAIf,IAAIE,GAAc,EACZC,EAASb,EAEgB,SAAAc,IAiB9B,OAjB8BA,EAA/BC,EAAAC,EAAAC,MAAA,SAAAC,IAAA,IAAAC,EAAA,OAAAH,EAAAI,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EACqB,OAAnBb,GAAa,GAAMW,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAEGC,EAAgB,CAACX,IAAQ,KAAA,EAAvCM,EAAKE,EAAAI,MACNb,GAAeO,GAASA,EAAMO,OAAS,GAC1CpB,EAAmBa,EAAM,IAC1BE,EAAAE,KAAA,GAAA,MAAA,KAAA,EAAAF,EAAAC,KAAA,EAAAD,EAAAM,GAAAN,EAAA,MAAA,GAEDO,QAAQC,MAAM,+BAAsCR,EAAAM,IAC/Cf,GACHN,EAAmB,MACpB,KAAA,GAIA,OAJAe,EAAAC,KAAA,GAEIV,GACHF,GAAa,GACdW,EAAAS,OAAA,IAAA,KAAA,GAAA,IAAA,MAAA,OAAAT,EAAAU,OAAA,GAAAb,EAAA,KAAA,CAAA,CAAA,EAAA,EAAA,GAAA,KAEJ,MAAAc,MAAAC,KAAAC,UAAA,CAID,OAvB6B,WAEEpB,EAAAkB,MAAAC,KAAAC,UAAA,CAmB/BC,GAEO,WACLvB,GAAc,EAElB,GAAG,CAACZ,IAEG,CAACK,EAAiBI,EAC3B"}
@@ -1,2 +1,2 @@
1
- import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import{useState as n,useRef as i,useCallback as s}from"react";import{fetchWellsByIds as o}from"../../api/wells/fetchWellsByIds.js";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/constants.js";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";import{usePickerPropsStore as a}from"../../stores/picker-props-store/usePickerPropsStore.js";var u=function(){var u=a((function(r){return r.addWellsUsabilityInfo})),c=n([]),p=t(c,2),l=p[0],m=p[1],f=n(!1),b=t(f,2),h=b[0],d=b[1],j=i(new Map),v=s(function(){var t=r(e.mark((function r(t){var n,i,s;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(0!==t.length){r.next=2;break}return r.abrupt("return",[]);case 2:if(0!==(n=t.filter((function(r){return!j.current.has(r)}))).length){r.next=5;break}return r.abrupt("return",t.map((function(r){return j.current.get(r)})).filter((function(r){return void 0!==r})));case 5:return d(!0),r.prev=6,r.next=9,o(n);case 9:if(i=r.sent,"function"!=typeof u){r.next=16;break}return r.next=13,u(i);case 13:r.t0=r.sent,r.next=17;break;case 16:r.t0=i;case 17:return r.t0.forEach((function(r){j.current.set(r.id,r)})),s=t.map((function(r){return j.current.get(r)})).filter((function(r){return void 0!==r})),m((function(r){var t=new Set(r.map((function(r){return r.id}))),e=s.filter((function(r){return!t.has(r.id)}));return e.length>0?(null!=r?r:[]).concat(e):r})),r.abrupt("return",s);case 24:return r.prev=24,r.t1=r.catch(6),console.error("Error fetching searched wells:",r.t1),r.abrupt("return",[]);case 28:return r.prev=28,d(!1),r.finish(28);case 31:case"end":return r.stop()}}),r,null,[[6,24,28,31]])})));return function(r){return t.apply(this,arguments)}}(),[u]);return[l,h,v]};export{u as useSearchedWells};
1
+ import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/regenerator";import{useState as n,useRef as i,useCallback as o}from"react";import{fetchWellsByIds as s}from"../../api/wells/fetchWellsByIds.js";import"lodash";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/defineProperty";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"../../constants.js";import"../../api/shared/dataFormatter.js";import{usePickerPropsStore as a}from"../../stores/picker-props-store/usePickerPropsStore.js";var u=function(){var u=a((function(r){return r.addWellsUsabilityInfo})),c=n([]),p=t(c,2),l=p[0],m=p[1],f=n(!1),h=t(f,2),b=h[0],d=h[1],j=i(new Map),v=o(function(){var t=r(e.mark((function r(t){var n,i,o;return e.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(0!==t.length){r.next=2;break}return r.abrupt("return",[]);case 2:if(0!==(n=t.filter((function(r){return!j.current.has(r)}))).length){r.next=5;break}return r.abrupt("return",t.map((function(r){return j.current.get(r)})).filter((function(r){return void 0!==r})));case 5:return d(!0),r.prev=6,r.next=9,s(n);case 9:if(i=r.sent,"function"!=typeof u){r.next=16;break}return r.next=13,u(i);case 13:r.t0=r.sent,r.next=17;break;case 16:r.t0=i;case 17:return r.t0.forEach((function(r){j.current.set(r.id,r)})),o=t.map((function(r){return j.current.get(r)})).filter((function(r){return void 0!==r})),m((function(r){var t=new Set(r.map((function(r){return r.id}))),e=o.filter((function(r){return!t.has(r.id)}));return e.length>0?(null!=r?r:[]).concat(e):r})),r.abrupt("return",o);case 24:return r.prev=24,r.t1=r.catch(6),console.error("Error fetching searched wells:",r.t1),r.abrupt("return",[]);case 28:return r.prev=28,d(!1),r.finish(28);case 31:case"end":return r.stop()}}),r,null,[[6,24,28,31]])})));return function(r){return t.apply(this,arguments)}}(),[u]);return[l,b,v]};export{u as useSearchedWells};
2
2
  //# sourceMappingURL=useSearchedWells.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSearchedWells.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.ts"],"sourcesContent":["import { useState, useRef, useCallback } from 'react';\n\nimport { fetchWellsByIds } from '../../api';\nimport type { OffsetWell } from '../../OffsetWellPickerV5.types';\nimport { usePickerPropsStore } from '../../stores/picker-props-store/usePickerPropsStore';\n\ntype UseSearchedWellsReturn = [OffsetWell[], boolean, (wellIds: number[]) => Promise<OffsetWell[]>];\n\n/**\n * Hook to fetch and cache wells selected via search that are outside current bounds.\n * Similar to usePinnedWells but triggered imperatively when user selects wells via search.\n *\n * @returns Tuple of [searchedWells, isLoading, fetchWells]\n */\nexport const useSearchedWells = (): UseSearchedWellsReturn => {\n const addWellsUsabilityInfo = usePickerPropsStore(state => state.addWellsUsabilityInfo);\n\n const [searchedWells, setSearchedWells] = useState<OffsetWell[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n\n // Cache of already fetched wells to avoid re-fetching\n const wellsCacheRef = useRef<Map<number, OffsetWell>>(new Map());\n\n const fetchWells = useCallback(\n async (wellIds: number[]): Promise<OffsetWell[]> => {\n if (wellIds.length === 0) {\n return [];\n }\n\n const missingIds = wellIds.filter(id => !wellsCacheRef.current.has(id));\n\n // Return cached wells if all are already fetched\n if (missingIds.length === 0) {\n return wellIds\n .map(id => wellsCacheRef.current.get(id))\n .filter((w): w is OffsetWell => w !== undefined);\n }\n\n setIsLoading(true);\n\n try {\n const fetched = await fetchWellsByIds(missingIds);\n\n const processed =\n typeof addWellsUsabilityInfo === 'function'\n ? await addWellsUsabilityInfo(fetched as unknown as OffsetWell[])\n : (fetched as unknown as OffsetWell[]);\n\n processed.forEach(well => {\n wellsCacheRef.current.set(well.id, well);\n });\n\n const result = wellIds\n .map(id => wellsCacheRef.current.get(id))\n .filter((w): w is OffsetWell => w !== undefined);\n\n setSearchedWells(prev => {\n const existingIds = new Set(prev.map(w => w.id));\n const newWells = result.filter(w => !existingIds.has(w.id));\n\n return newWells.length > 0 ? (prev ?? []).concat(newWells) : prev;\n });\n\n return result;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error fetching searched wells:', error);\n\n return [];\n } finally {\n setIsLoading(false);\n }\n },\n [addWellsUsabilityInfo]\n );\n\n return [searchedWells, isLoading, fetchWells];\n};\n"],"names":["useSearchedWells","addWellsUsabilityInfo","usePickerPropsStore","state","useState","_useState2","_slicedToArray","_useState","searchedWells","setSearchedWells","_useState4","_useState3","isLoading","setIsLoading","wellsCacheRef","useRef","Map","fetchWells","useCallback","_ref","_asyncToGenerator","_regeneratorRuntime","mark","wellIds","missingIds","fetched","result","wrap","_context","prev","next","length","abrupt","filter","id","current","has","map","get","w","undefined","fetchWellsByIds","sent","t0","forEach","well","set","existingIds","Set","newWells","concat","t1","console","error","finish","stop","_callee","_x","apply","this","arguments"],"mappings":"mjCAcaA,IAAAA,EAAmB,WAC9B,IAAMC,EAAwBC,GAAoB,SAAAC,GAAK,OAAIA,EAAMF,yBAEvBG,EAAAA,EAAuB,IAAGC,EAAAC,EAAAC,EAAA,GAA7DC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GACJD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAGxBI,EAAgBC,EAAgC,IAAIC,KAEpDC,EAAaC,EAAW,WAAA,IAAAC,EAAAC,EAAAC,EAAAC,MAC5B,WAAOC,GAAiB,IAAAC,EAAAC,EAAAC,EAAA,OAAAL,EAAAM,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,GACC,IAAnBP,EAAQQ,OAAY,CAAAH,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAI,OAAA,SACf,IAAE,KAAA,EAKX,GAC0B,KAHpBR,EAAaD,EAAQU,QAAO,SAAAC,GAAE,OAAKpB,EAAcqB,QAAQC,IAAIF,EAAG,KAGvDH,OAAY,CAAAH,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAI,OAAA,SAClBT,EACJc,KAAI,SAAAH,GAAE,OAAIpB,EAAcqB,QAAQG,IAAIJ,EAAG,IACvCD,QAAO,SAACM,GAAC,YAA4BC,IAAND,CAAgB,KAAA,KAAA,EAGjC,OAAnB1B,GAAa,GAAMe,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAGKW,EAAgBjB,GAAW,KAAA,EAApC,GAAPC,EAAOG,EAAAc,KAGsB,mBAA1BzC,EAAoC,CAAA2B,EAAAE,KAAA,GAAA,KAAA,CAAA,OAAAF,EAAAE,KAAA,GACjC7B,EAAsBwB,GAAmC,KAAA,GAAAG,EAAAe,GAAAf,EAAAc,KAAAd,EAAAE,KAAA,GAAA,MAAA,KAAA,GAAAF,EAAAe,GAC9DlB,EAAO,KAAA,GAeX,OAlBYG,EAAAe,GAKLC,SAAQ,SAAAC,GAChB/B,EAAcqB,QAAQW,IAAID,EAAKX,GAAIW,EACrC,IAEMnB,EAASH,EACZc,KAAI,SAAAH,GAAE,OAAIpB,EAAcqB,QAAQG,IAAIJ,EAAG,IACvCD,QAAO,SAACM,GAAC,YAA4BC,IAAND,KAElC9B,GAAiB,SAAAoB,GACf,IAAMkB,EAAc,IAAIC,IAAInB,EAAKQ,KAAI,SAAAE,GAAC,OAAIA,EAAEL,EAAE,KACxCe,EAAWvB,EAAOO,QAAO,SAAAM,GAAC,OAAKQ,EAAYX,IAAIG,EAAEL,OAEvD,OAAOe,EAASlB,OAAS,GAAKF,QAAAA,EAAQ,IAAIqB,OAAOD,GAAYpB,CAC/D,IAAGD,EAAAI,OAAA,SAEIN,GAAM,KAAA,GAG0C,OAH1CE,EAAAC,KAAA,GAAAD,EAAAuB,GAAAvB,EAAA,MAAA,GAGbwB,QAAQC,MAAM,iCAAwCzB,EAAAuB,IAACvB,EAAAI,OAAA,SAEhD,IAAE,KAAA,GAEW,OAFXJ,EAAAC,KAAA,GAEThB,GAAa,GAAOe,EAAA0B,OAAA,IAAA,KAAA,GAAA,IAAA,MAAA,OAAA1B,EAAA2B,OAAA,GAAAC,EAAA,KAAA,CAAA,CAAA,EAAA,GAAA,GAAA,KAEvB,KAAA,OAAA,SAAAC,GAAA,OAAAtC,EAAAuC,MAAAC,KAAAC,UAAA,EAjD2B,GAkD5B,CAAC3D,IAGH,MAAO,CAACO,EAAeI,EAAWK,EACpC"}
1
+ {"version":3,"file":"useSearchedWells.js","sources":["../../../../../src/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useSearchedWells.ts"],"sourcesContent":["import { useState, useRef, useCallback } from 'react';\n\nimport { fetchWellsByIds } from '../../api';\nimport type { OffsetWell } from '../../OffsetWellPickerV5.types';\nimport { usePickerPropsStore } from '../../stores/picker-props-store/usePickerPropsStore';\n\ntype UseSearchedWellsReturn = [OffsetWell[], boolean, (wellIds: number[]) => Promise<OffsetWell[]>];\n\n/**\n * Hook to fetch and cache wells selected via search that are outside current bounds.\n * Similar to usePinnedWells but triggered imperatively when user selects wells via search.\n *\n * @returns Tuple of [searchedWells, isLoading, fetchWells]\n */\nexport const useSearchedWells = (): UseSearchedWellsReturn => {\n const addWellsUsabilityInfo = usePickerPropsStore(state => state.addWellsUsabilityInfo);\n\n const [searchedWells, setSearchedWells] = useState<OffsetWell[]>([]);\n const [isLoading, setIsLoading] = useState(false);\n\n // Cache of already fetched wells to avoid re-fetching\n const wellsCacheRef = useRef<Map<number, OffsetWell>>(new Map());\n\n const fetchWells = useCallback(\n async (wellIds: number[]): Promise<OffsetWell[]> => {\n if (wellIds.length === 0) {\n return [];\n }\n\n const missingIds = wellIds.filter(id => !wellsCacheRef.current.has(id));\n\n // Return cached wells if all are already fetched\n if (missingIds.length === 0) {\n return wellIds\n .map(id => wellsCacheRef.current.get(id))\n .filter((w): w is OffsetWell => w !== undefined);\n }\n\n setIsLoading(true);\n\n try {\n const fetched = await fetchWellsByIds(missingIds);\n\n const processed =\n typeof addWellsUsabilityInfo === 'function'\n ? await addWellsUsabilityInfo(fetched as unknown as OffsetWell[])\n : (fetched as unknown as OffsetWell[]);\n\n processed.forEach(well => {\n wellsCacheRef.current.set(well.id, well);\n });\n\n const result = wellIds\n .map(id => wellsCacheRef.current.get(id))\n .filter((w): w is OffsetWell => w !== undefined);\n\n setSearchedWells(prev => {\n const existingIds = new Set(prev.map(w => w.id));\n const newWells = result.filter(w => !existingIds.has(w.id));\n\n return newWells.length > 0 ? (prev ?? []).concat(newWells) : prev;\n });\n\n return result;\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('Error fetching searched wells:', error);\n\n return [];\n } finally {\n setIsLoading(false);\n }\n },\n [addWellsUsabilityInfo]\n );\n\n return [searchedWells, isLoading, fetchWells];\n};\n"],"names":["useSearchedWells","addWellsUsabilityInfo","usePickerPropsStore","state","useState","_useState2","_slicedToArray","_useState","searchedWells","setSearchedWells","_useState4","_useState3","isLoading","setIsLoading","wellsCacheRef","useRef","Map","fetchWells","useCallback","_ref","_asyncToGenerator","_regeneratorRuntime","mark","wellIds","missingIds","fetched","result","wrap","_context","prev","next","length","abrupt","filter","id","current","has","map","get","w","undefined","fetchWellsByIds","sent","t0","forEach","well","set","existingIds","Set","newWells","concat","t1","console","error","finish","stop","_callee","_x","apply","this","arguments"],"mappings":"+7BAcaA,IAAAA,EAAmB,WAC9B,IAAMC,EAAwBC,GAAoB,SAAAC,GAAK,OAAIA,EAAMF,yBAEvBG,EAAAA,EAAuB,IAAGC,EAAAC,EAAAC,EAAA,GAA7DC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GACJD,EAAAA,GAAS,GAAMM,EAAAJ,EAAAK,EAAA,GAA1CC,EAASF,EAAA,GAAEG,EAAYH,EAAA,GAGxBI,EAAgBC,EAAgC,IAAIC,KAEpDC,EAAaC,EAAW,WAAA,IAAAC,EAAAC,EAAAC,EAAAC,MAC5B,WAAOC,GAAiB,IAAAC,EAAAC,EAAAC,EAAA,OAAAL,EAAAM,MAAA,SAAAC,GAAA,OAAA,OAAAA,EAAAC,KAAAD,EAAAE,MAAA,KAAA,EAAA,GACC,IAAnBP,EAAQQ,OAAY,CAAAH,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAI,OAAA,SACf,IAAE,KAAA,EAKX,GAC0B,KAHpBR,EAAaD,EAAQU,QAAO,SAAAC,GAAE,OAAKpB,EAAcqB,QAAQC,IAAIF,EAAG,KAGvDH,OAAY,CAAAH,EAAAE,KAAA,EAAA,KAAA,CAAA,OAAAF,EAAAI,OAAA,SAClBT,EACJc,KAAI,SAAAH,GAAE,OAAIpB,EAAcqB,QAAQG,IAAIJ,EAAG,IACvCD,QAAO,SAACM,GAAC,YAA4BC,IAAND,CAAgB,KAAA,KAAA,EAGjC,OAAnB1B,GAAa,GAAMe,EAAAC,KAAA,EAAAD,EAAAE,KAAA,EAGKW,EAAgBjB,GAAW,KAAA,EAApC,GAAPC,EAAOG,EAAAc,KAGsB,mBAA1BzC,EAAoC,CAAA2B,EAAAE,KAAA,GAAA,KAAA,CAAA,OAAAF,EAAAE,KAAA,GACjC7B,EAAsBwB,GAAmC,KAAA,GAAAG,EAAAe,GAAAf,EAAAc,KAAAd,EAAAE,KAAA,GAAA,MAAA,KAAA,GAAAF,EAAAe,GAC9DlB,EAAO,KAAA,GAeX,OAlBYG,EAAAe,GAKLC,SAAQ,SAAAC,GAChB/B,EAAcqB,QAAQW,IAAID,EAAKX,GAAIW,EACrC,IAEMnB,EAASH,EACZc,KAAI,SAAAH,GAAE,OAAIpB,EAAcqB,QAAQG,IAAIJ,EAAG,IACvCD,QAAO,SAACM,GAAC,YAA4BC,IAAND,KAElC9B,GAAiB,SAAAoB,GACf,IAAMkB,EAAc,IAAIC,IAAInB,EAAKQ,KAAI,SAAAE,GAAC,OAAIA,EAAEL,EAAE,KACxCe,EAAWvB,EAAOO,QAAO,SAAAM,GAAC,OAAKQ,EAAYX,IAAIG,EAAEL,OAEvD,OAAOe,EAASlB,OAAS,GAAKF,QAAAA,EAAQ,IAAIqB,OAAOD,GAAYpB,CAC/D,IAAGD,EAAAI,OAAA,SAEIN,GAAM,KAAA,GAG0C,OAH1CE,EAAAC,KAAA,GAAAD,EAAAuB,GAAAvB,EAAA,MAAA,GAGbwB,QAAQC,MAAM,iCAAwCzB,EAAAuB,IAACvB,EAAAI,OAAA,SAEhD,IAAE,KAAA,GAEW,OAFXJ,EAAAC,KAAA,GAEThB,GAAa,GAAOe,EAAA0B,OAAA,IAAA,KAAA,GAAA,IAAA,MAAA,OAAA1B,EAAA2B,OAAA,GAAAC,EAAA,KAAA,CAAA,CAAA,EAAA,GAAA,GAAA,KAEvB,KAAA,OAAA,SAAAC,GAAA,OAAAtC,EAAAuC,MAAAC,KAAAC,UAAA,EAjD2B,GAkD5B,CAAC3D,IAGH,MAAO,CAACO,EAAeI,EAAWK,EACpC"}
@@ -1,2 +1,2 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import{useMemo as r,useEffect as o}from"react";import"../../stores/viewport-store/ViewportStoreContext.js";import"../../stores/viewport-store/ViewportStoreProvider.js";import"zustand";import"lodash/isEqual";import{useViewportStore as s}from"../../stores/viewport-store/useViewportStore.js";import{areWellMapsEqual as i}from"../../stores/viewport-store/utils/areWellMapsEqual.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as n}from"../../stores/company-safeguard/useCompanySafeguard.js";import{useFilterStore as l}from"../../stores/filter-store/useFilterStore.js";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import"react/jsx-runtime";import{usePickerPropsStore as a}from"../../stores/picker-props-store/usePickerPropsStore.js";import{ALL_SECTION_KEY as m}from"../../constants.js";import{isDrillingOnlyWell as p}from"../../utils/isDrillingOnlyWell.js";import{isInterventionOnlyWell as u}from"../../utils/isInterventionOnlyWell.js";import{useViewportWells as c}from"../useViewportWells/useViewportWells.js";import{useTileLoading as d}from"../useTileLoading.js";import{usePinnedWells as f}from"../usePinnedWells.js";import{useExternalOffsets as j}from"../useExternalOffsets.js";import"../../stores/idas-resync-store/IdasResyncStoreContext.js";import"../../stores/idas-resync-store/IdasResyncStoreProvider.js";import{useIdasResyncSync as v}from"../../stores/idas-resync-store/useIdasResyncSync.js";import{getSegmentConfig as g}from"../../segment-config/index.js";import{useSearchedWells as h}from"./useSearchedWells.js";import{useCompanyProvider as y}from"./useCompanyProvider.js";import{useFetchSubjectWell as b}from"./useFetchSubjectWell.js";import{useCompanyMetricKey as W}from"./useCompanyMetricKey.js";import{useAdvancedWells as w}from"./useAdvancedWells.js";import{computeIsAllWellsLoaded as S}from"./utils/computeIsAllWellsLoaded.js";import{useInterventionEnrichment as C,enrichWellsWithInterventionData as P}from"./useInterventionEnrichment.js";import{usePadEnrichment as I,enrichWellsWithPadData as O}from"./usePadEnrichment.js";import"../../../../clients/subscriptions/constants.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"querystring";import"uuid/v1";import"../../../../clients/subscriptions.v1.js";import"../../../../clients/jsonApi/index.js";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"moment";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"../../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";import"uuid";import"../../../StatusBadge/constants.js";import"lodash/unset";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppPanel/AppPanelsContext.js";import{useGlobalOffsetWellsSync as x}from"../../../../effects/useGlobalOffsetWellsSync.js";function A(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function L(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?A(Object(o),!0).forEach((function(r){t(e,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):A(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var E=function(t){var A,E,V=t.subjectWellId,D=t.assetCompanyId,N=t.offsetSettings,k=t.maxOffsetWellNumber,M=t.isLoadAllWells,R=t.open,T=t.onSave,K=a((function(t){return t.segment})),q="intervention"===K,B=s((function(t){return t.wells}),i),z=s((function(t){return t.bounds})),F=l((function(t){var e;return null===(e=t.filters.drillingWells)||void 0===e||e})),G=l((function(t){var e;return null===(e=t.filters.interventionWells)||void 0===e||e})),H=b(V),U=e(H,1)[0],J=r((function(){var t,r=null==U||null===(t=U.topHole)||void 0===t?void 0:t.coordinates;if(!r)return null;var o=e(r,2);return{latitude:o[0],longitude:o[1]}}),[U]);x(N,T,k);var Q=n(),X=Q.companies,Y=Q.canViewCompanies,Z=Q.resetSafeguard;c(!M);var $=d(),_=r((function(){return Array.from(B.values())}),[B]),tt=$||0===_.length&&null===z,et=f(null==N?void 0:N.selectedWellIds),rt=e(et,2),ot=rt[0],st=rt[1],it=h(),nt=e(it,3),lt=nt[0],at=nt[1],mt=nt[2],pt=r((function(){if(!_)return null;var t=function(t,e){if(null==e||!e.length)return t;var r=new Set(t.map((function(t){return t.id}))),o=e.filter((function(t){return!r.has(t.id)}));return o.length>0?t.concat(o):t},e=_;return e=t(e,ot),e=t(e,lt),"drilling"===K&&F&&(e=e.filter((function(t){return p(t)}))),"intervention"===K&&G&&(e=e.filter((function(t){return u(t)}))),U&&!e.some((function(t){return t.id===U.id}))&&(e=[U].concat(e)),e}),[_,U,ot,lt,F,G,K]),ut=y(D),ct=e(ut,1)[0],dt=j(V,pt),ft=dt.offsets,jt=dt.setOffsets,vt=dt.loadExternalOffsets;v({assetId:V,loadExternalOffsets:vt});var gt=ft.wellSections,ht=ft.offsetWellsBySection,yt=ft.taScores,bt=ft.idasWellIds,Wt=ft.owsWellIds,wt=ft.wellhubWellIds,St=ft.loadedAssetId,Ct=r((function(){return!!gt&&gt.some((function(t){return t.value!==m}))}),[gt]);o((function(){jt((function(t){return L(L({},t),{},{wellSections:null,offsetWellsBySection:null})}))}),[jt,V]),o((function(){var t;if(ht){var e=new Set(null!==(t=null==pt?void 0:pt.map((function(t){return t.id})))&&void 0!==t?t:[]),r=new Set;Object.values(ht).forEach((function(t){(null!=t?t:[]).forEach((function(t){null==t||t===V||e.has(t)||r.add(t)}))})),r.size>0&&mt(Array.from(r))}}),[ht,pt,V,mt]);var Pt=g(K).defaultMetricKey,It=W(D,null==N?void 0:N.metricsKeys,Pt),Ot=e(It,2),xt=Ot[0],At=Ot[1],Lt=w(pt,gt,ht,V,xt,R),Et=e(Lt,4),Vt=Et[0],Dt=Et[1],Nt=Et[2],kt=Et[3],Mt=C(q),Rt=Mt.wellIdToInterventionNames,Tt=Mt.activeInterventionWellIds,Kt=Mt.isLoading,qt=I(q),Bt=qt.assetIdToPadName,zt=qt.isLoading,Ft=Vt||Nt,Gt=r((function(){if(!Ft||null==X||!X.length)return Ft;var t={};X.forEach((function(e){t[e.id]=e.name}));var e=Ft.map((function(e){return L(L({},e),{},{companyName:t[Number(e.companyId)]||"Null"})}));return q&&(e=P(e,Rt),e=O(e,Bt)),e}),[Ft,X,q,Rt,Bt]),Ht=r((function(){return U?Gt&&Gt.find((function(t){return t.id===U.id}))||U:null}),[U,Gt]),Ut=a((function(t){return t.allWellsLoadProgress})),Jt=S({isLoadAllWells:M,allWellsLoadProgress:Ut,wellsLength:null!==(A=null==Gt?void 0:Gt.length)&&void 0!==A?A:0,rawWellsCount:null!==(E=null==pt?void 0:pt.length)&&void 0!==E?E:0,areRawWellsLoading:tt,areAdvancedWellsLoading:Dt||Kt||zt,arePinnedWellsLoading:st,areSearchedWellsLoading:at});return{wells:Gt,subjectWell:Ht,subjectWellCoords:J,rawWellsWithSubject:pt,wellSections:gt,externalOffsets:ht,taScores:yt,idasWellIds:bt,owsWellIds:Wt,wellhubWellIds:wt,loadedAssetId:St,isWellSectionColumnVisible:Ct,metricsKeys:xt,setMetricsKeys:At,loadingWellIds:kt,isAllWellsLoaded:Jt,areRawWellsLoading:tt,companies:X,canViewCompanies:Y,companyProvider:ct,pinnedWells:ot,fetchSearchedWells:mt,resetSafeguard:Z,activeInterventionWellIds:Tt}};export{E as useWellDataPipeline};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import{useMemo as r,useEffect as o}from"react";import"../../stores/viewport-store/ViewportStoreContext.js";import"../../stores/viewport-store/ViewportStoreProvider.js";import"zustand";import"lodash/isEqual";import{useViewportStore as s}from"../../stores/viewport-store/useViewportStore.js";import{areWellMapsEqual as i}from"../../stores/viewport-store/utils/areWellMapsEqual.js";import"../../stores/company-safeguard/CompanySafeguardContext.js";import{useCompanySafeguard as n}from"../../stores/company-safeguard/useCompanySafeguard.js";import{useFilterStore as l}from"../../stores/filter-store/useFilterStore.js";import"lodash";import"../../stores/picker-props-store/PickerPropsStoreContext.js";import"@babel/runtime/helpers/objectWithoutProperties";import"../../viewport/ViewportProvider.js";import"../../viewport/ViewportContext.js";import"react/jsx-runtime";import{usePickerPropsStore as a}from"../../stores/picker-props-store/usePickerPropsStore.js";import{ALL_SECTION_KEY as m}from"../../constants.js";import{isDrillingOnlyWell as p}from"../../utils/isDrillingOnlyWell.js";import{isInterventionOnlyWell as u}from"../../utils/isInterventionOnlyWell.js";import{useViewportWells as c}from"../useViewportWells/useViewportWells.js";import{useTileLoading as d}from"../useTileLoading.js";import{usePinnedWells as f}from"../usePinnedWells.js";import{useExternalOffsets as j}from"../useExternalOffsets.js";import"../../stores/idas-resync-store/IdasResyncStoreContext.js";import"../../stores/idas-resync-store/IdasResyncStoreProvider.js";import{useIdasResyncSync as v}from"../../stores/idas-resync-store/useIdasResyncSync.js";import{getSegmentConfig as g}from"../../segment-config/index.js";import{useSearchedWells as h}from"./useSearchedWells.js";import{useCompanyProvider as y}from"./useCompanyProvider.js";import{useFetchSubjectWell as b}from"./useFetchSubjectWell.js";import{useCompanyMetricKey as W}from"./useCompanyMetricKey.js";import{useAdvancedWells as w}from"./useAdvancedWells.js";import{computeIsAllWellsLoaded as S}from"./utils/computeIsAllWellsLoaded.js";import{useInterventionEnrichment as C,enrichWellsWithInterventionData as P}from"./useInterventionEnrichment.js";import{usePadEnrichment as I,enrichWellsWithPadData as O}from"./usePadEnrichment.js";import"querystring";import"../../../../clients/subscriptions/subscriptions-client.factory.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"../../../../clients/jsonApi/index.js";import"query-string";import"../../../../constants/goals.js";import"../../../../constants/segment.js";import"../../../../constants/alerts.js";import"../../../../constants/apps.js";import"../../../../constants/drillstring.js";import"../../../../constants/completion.js";import"../../../../constants/appPackages.js";import"../../../../constants/notifications.js";import"../../../../constants/feed.js";import"../../../../constants/bha.js";import"../../../../constants/corvaCompanyId.js";import"../../../GradientManager/configuration/constants.js";import"../../../UserMention/utils/index.js";import"../../../../utils/convert.js";import"moment";import"../../../../utils/casing/validation.js";import"lodash/mean";import"../../../../constants/streamSourceType.js";import"lodash/get";import"file-saver";import"../../../../utils/drillstring/conversion.js";import"lodash/set";import"lodash/cloneDeep";import"@babel/runtime/helpers/toConsumableArray";import"lodash/isNumber";import"lodash/has";import"../../../../utils/ga.js";import"../../../../utils/goalsConfig/goalsConfig.js";import"../../../../utils/lasParser.js";import"../../../../utils/main.js";import"../../../../utils/metrics/metricsConfig.js";import"../../../../utils/mobileDetect.js";import"../../../../utils/feed.js";import"../../../../utils/reports.js";import"moment-timezone";import"@babel/runtime/helpers/typeof";import"../../../../utils/dashboardReports.js";import"../../../../utils/env.js";import"file-extension";import"image-extensions";import"video-extensions";import"../../../../utils/jsonaDataFormatter.js";import"../../../../utils/bha.js";import"jsona";import"classnames";import"../../../../utils/charts/Styles.scss.js";import"../../../../utils/getSingleAsset.js";import"uuid";import"../../../StatusBadge/constants.js";import"lodash/unset";import"../../../../clients/api/apiCore.js";import"../../../../clients/constants.js";import"../../../../clients/sso/auth0.js";import"../../../../clients/sso/oauth2.js";import"../../../../clients/api/rateLimiter.js";import"lodash/isEmpty";import"lodash/sortBy";import"../../../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsProvider.js";import"../../../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../../../componentsV2/AppPanel/AppPanelsContext.js";import{useGlobalOffsetWellsSync as x}from"../../../../effects/useGlobalOffsetWellsSync.js";function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function L(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?A(Object(o),!0).forEach((function(r){e(t,r,o[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):A(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var E=function(e){var A,E,V=e.subjectWellId,D=e.assetCompanyId,N=e.offsetSettings,k=e.maxOffsetWellNumber,M=e.isLoadAllWells,R=e.open,T=e.onSave,K=a((function(e){return e.segment})),q="intervention"===K,B=s((function(e){return e.wells}),i),z=s((function(e){return e.bounds})),F=l((function(e){var t;return null===(t=e.filters.drillingWells)||void 0===t||t})),G=l((function(e){var t;return null===(t=e.filters.interventionWells)||void 0===t||t})),H=b(V),U=t(H,1)[0],J=r((function(){var e,r=null==U||null===(e=U.topHole)||void 0===e?void 0:e.coordinates;if(!r)return null;var o=t(r,2);return{latitude:o[0],longitude:o[1]}}),[U]);x(N,T,k);var Q=n(),X=Q.companies,Y=Q.canViewCompanies,Z=Q.resetSafeguard;c(!M);var $=d(),_=r((function(){return Array.from(B.values())}),[B]),ee=$||0===_.length&&null===z,te=f(null==N?void 0:N.selectedWellIds),re=t(te,2),oe=re[0],se=re[1],ie=h(),ne=t(ie,3),le=ne[0],ae=ne[1],me=ne[2],pe=r((function(){if(!_)return null;var e=function(e,t){if(null==t||!t.length)return e;var r=new Set(e.map((function(e){return e.id}))),o=t.filter((function(e){return!r.has(e.id)}));return o.length>0?e.concat(o):e},t=_;return t=e(t,oe),t=e(t,le),"drilling"===K&&F&&(t=t.filter((function(e){return p(e)}))),"intervention"===K&&G&&(t=t.filter((function(e){return u(e)}))),U&&!t.some((function(e){return e.id===U.id}))&&(t=[U].concat(t)),t}),[_,U,oe,le,F,G,K]),ue=y(D),ce=t(ue,1)[0],de=j(V,pe),fe=de.offsets,je=de.setOffsets,ve=de.loadExternalOffsets;v({assetId:V,loadExternalOffsets:ve});var ge=fe.wellSections,he=fe.offsetWellsBySection,ye=fe.taScores,be=fe.idasWellIds,We=fe.owsWellIds,we=fe.wellhubWellIds,Se=fe.loadedAssetId,Ce=r((function(){return!!ge&&ge.some((function(e){return e.value!==m}))}),[ge]);o((function(){je((function(e){return L(L({},e),{},{wellSections:null,offsetWellsBySection:null})}))}),[je,V]),o((function(){var e;if(he){var t=new Set(null!==(e=null==pe?void 0:pe.map((function(e){return e.id})))&&void 0!==e?e:[]),r=new Set;Object.values(he).forEach((function(e){(null!=e?e:[]).forEach((function(e){null==e||e===V||t.has(e)||r.add(e)}))})),r.size>0&&me(Array.from(r))}}),[he,pe,V,me]);var Pe=g(K).defaultMetricKey,Ie=W(D,null==N?void 0:N.metricsKeys,Pe),Oe=t(Ie,2),xe=Oe[0],Ae=Oe[1],Le=w(pe,ge,he,V,xe,R),Ee=t(Le,4),Ve=Ee[0],De=Ee[1],Ne=Ee[2],ke=Ee[3],Me=C(q),Re=Me.wellIdToInterventionNames,Te=Me.activeInterventionWellIds,Ke=Me.isLoading,qe=I(q),Be=qe.assetIdToPadName,ze=qe.isLoading,Fe=Ve||Ne,Ge=r((function(){if(!Fe||null==X||!X.length)return Fe;var e={};X.forEach((function(t){e[t.id]=t.name}));var t=Fe.map((function(t){return L(L({},t),{},{companyName:e[Number(t.companyId)]||"Null"})}));return q&&(t=P(t,Re),t=O(t,Be)),t}),[Fe,X,q,Re,Be]),He=r((function(){return U?Ge&&Ge.find((function(e){return e.id===U.id}))||U:null}),[U,Ge]),Ue=a((function(e){return e.allWellsLoadProgress})),Je=S({isLoadAllWells:M,allWellsLoadProgress:Ue,wellsLength:null!==(A=null==Ge?void 0:Ge.length)&&void 0!==A?A:0,rawWellsCount:null!==(E=null==pe?void 0:pe.length)&&void 0!==E?E:0,areRawWellsLoading:ee,areAdvancedWellsLoading:De||Ke||ze,arePinnedWellsLoading:se,areSearchedWellsLoading:ae});return{wells:Ge,subjectWell:He,subjectWellCoords:J,rawWellsWithSubject:pe,wellSections:ge,externalOffsets:he,taScores:ye,idasWellIds:be,owsWellIds:We,wellhubWellIds:we,loadedAssetId:Se,isWellSectionColumnVisible:Ce,metricsKeys:xe,setMetricsKeys:Ae,loadingWellIds:ke,isAllWellsLoaded:Je,areRawWellsLoading:ee,companies:X,canViewCompanies:Y,companyProvider:ce,pinnedWells:oe,fetchSearchedWells:me,resetSafeguard:Z,activeInterventionWellIds:Te}};export{E as useWellDataPipeline};
2
2
  //# sourceMappingURL=useWellDataPipeline.js.map