@corva/ui 3.77.0-0 → 3.77.0-10

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 (829) hide show
  1. package/README.md +2 -2
  2. package/cjs-bundle/clients/jsonApi/index.js +1 -1
  3. package/cjs-bundle/clients/jsonApi/index.js.map +1 -1
  4. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  5. package/cjs-bundle/components/AddComment/Popover.js.map +1 -1
  6. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  7. package/cjs-bundle/components/AddComment/components/Content.js.map +1 -1
  8. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  9. package/cjs-bundle/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  10. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js +1 -1
  11. package/cjs-bundle/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  12. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  13. package/cjs-bundle/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  14. package/cjs-bundle/components/AttachFileButton/AttachFileButton.js +1 -1
  15. package/cjs-bundle/components/AttachFileButton/AttachFileButton.js.map +1 -1
  16. package/cjs-bundle/components/Attachment/index.js +1 -1
  17. package/cjs-bundle/components/Attachment/index.js.map +1 -1
  18. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  19. package/cjs-bundle/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  20. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  21. package/cjs-bundle/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  22. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  23. package/cjs-bundle/components/BICOffsetPickerDialog/index.js.map +1 -1
  24. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  25. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  26. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  27. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  28. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  29. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  30. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  31. package/cjs-bundle/components/CollapsableSidebar.js.map +1 -1
  32. package/cjs-bundle/components/CommentCard/CommentCard.js +1 -1
  33. package/cjs-bundle/components/CommentCard/CommentCard.js.map +1 -1
  34. package/cjs-bundle/components/CommentCard/CommentCard.scss.js +1 -1
  35. package/cjs-bundle/components/CommentComposer/CommentComposer.js +1 -1
  36. package/cjs-bundle/components/CommentComposer/CommentComposer.js.map +1 -1
  37. package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js +1 -1
  38. package/cjs-bundle/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  39. package/cjs-bundle/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  40. package/cjs-bundle/components/DevCenter/AppsDataProvider/effects/utils.js.map +1 -1
  41. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  42. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  43. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  44. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  45. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  46. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  47. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  48. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  49. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  50. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  51. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  52. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  53. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  54. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  55. package/cjs-bundle/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js +1 -1
  56. package/cjs-bundle/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js.map +1 -1
  57. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  58. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  59. package/cjs-bundle/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  60. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  61. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js.map +1 -1
  62. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  63. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  64. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  65. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  66. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  67. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  68. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  69. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  70. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  71. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  72. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  73. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  74. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  75. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  76. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  77. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  78. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  79. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  80. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  81. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  82. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  83. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  84. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  85. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  86. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  87. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  88. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  89. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  90. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js +1 -1
  91. package/cjs-bundle/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  92. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  93. package/cjs-bundle/components/FeedItem/FeedItem.js.map +1 -1
  94. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  95. package/cjs-bundle/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  96. package/cjs-bundle/components/FeedItem/components/Content.js +1 -1
  97. package/cjs-bundle/components/FeedItem/components/Content.js.map +1 -1
  98. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  99. package/cjs-bundle/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  100. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  101. package/cjs-bundle/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  102. package/cjs-bundle/components/FilesLoaderV2/utils.js +1 -1
  103. package/cjs-bundle/components/FilesLoaderV2/utils.js.map +1 -1
  104. package/cjs-bundle/components/GradientManager/GradientManager.js +1 -1
  105. package/cjs-bundle/components/GradientManager/GradientManager.js.map +1 -1
  106. package/cjs-bundle/components/GradientManager/GradientSelect.js +1 -1
  107. package/cjs-bundle/components/GradientManager/GradientSelect.js.map +1 -1
  108. package/cjs-bundle/components/InfiniteList/index.js +1 -1
  109. package/cjs-bundle/components/InfiniteList/index.js.map +1 -1
  110. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js +1 -1
  111. package/cjs-bundle/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  112. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  113. package/cjs-bundle/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  114. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  115. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  116. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  117. package/cjs-bundle/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  118. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  119. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  120. package/cjs-bundle/components/OffsetWellPickerV2/constants.js +1 -1
  121. package/cjs-bundle/components/OffsetWellPickerV2/constants.js.map +1 -1
  122. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js +1 -1
  123. package/cjs-bundle/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  124. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  125. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  126. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  127. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  128. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  129. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  130. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  131. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  132. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  133. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  134. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  135. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  136. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  137. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  138. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  139. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  140. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  141. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  142. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  143. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  144. package/cjs-bundle/components/OffsetWellPickerV3/index.js +1 -1
  145. package/cjs-bundle/components/OffsetWellPickerV3/index.js.map +1 -1
  146. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  147. package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  148. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js +1 -1
  149. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js.map +1 -1
  150. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js +1 -1
  151. package/cjs-bundle/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js.map +1 -1
  152. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +1 -1
  153. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js.map +1 -1
  154. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js +1 -1
  155. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js.map +1 -1
  156. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js +1 -1
  157. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js.map +1 -1
  158. package/cjs-bundle/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js +1 -1
  159. package/cjs-bundle/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js.map +1 -1
  160. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  161. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  162. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  163. package/cjs-bundle/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  164. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  165. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  166. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  167. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  168. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  169. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  170. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  171. package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  172. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  173. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  174. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  175. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  176. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  177. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  178. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  179. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  180. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  181. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  182. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  183. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  184. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  185. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  186. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  187. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  188. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  189. package/cjs-bundle/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  190. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  191. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  192. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  193. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  194. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  195. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  196. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  197. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  198. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  199. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  200. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  201. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  202. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  203. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  204. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  205. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  206. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  207. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  208. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  209. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  210. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  211. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  212. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  213. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  214. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  215. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  216. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  217. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  218. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  219. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  220. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  221. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  222. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  223. package/cjs-bundle/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  224. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  225. package/cjs-bundle/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  226. package/cjs-bundle/components/OffsetWellPickerV5/constants.js +1 -1
  227. package/cjs-bundle/components/OffsetWellPickerV5/constants.js.map +1 -1
  228. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  229. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  230. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  231. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  232. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  233. package/cjs-bundle/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  234. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  235. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  236. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  237. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  238. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  239. package/cjs-bundle/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  240. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  241. package/cjs-bundle/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  242. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  243. package/cjs-bundle/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  244. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  245. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  246. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  247. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  248. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  249. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  250. package/cjs-bundle/components/WellhubFilePicker/WellhubFilePicker.js +2 -0
  251. package/cjs-bundle/components/WellhubFilePicker/WellhubFilePicker.js.map +1 -0
  252. package/cjs-bundle/components/WellhubFilePicker/api/fetchWellhubRecords.js +2 -0
  253. package/cjs-bundle/components/WellhubFilePicker/api/fetchWellhubRecords.js.map +1 -0
  254. package/cjs-bundle/components/WellhubFilePicker/api/postWellhubRecords.js +2 -0
  255. package/cjs-bundle/components/WellhubFilePicker/api/postWellhubRecords.js.map +1 -0
  256. package/cjs-bundle/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js +2 -0
  257. package/cjs-bundle/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js.map +1 -0
  258. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js +2 -0
  259. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js.map +1 -0
  260. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js +2 -0
  261. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js.map +1 -0
  262. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js +2 -0
  263. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js.map +1 -0
  264. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js +2 -0
  265. package/cjs-bundle/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js.map +1 -0
  266. package/cjs-bundle/components/WellhubFilePicker/constants.js +2 -0
  267. package/cjs-bundle/components/WellhubFilePicker/constants.js.map +1 -0
  268. package/cjs-bundle/components/WellhubFilePicker/hooks/useWellhubFiles.js +2 -0
  269. package/cjs-bundle/components/WellhubFilePicker/hooks/useWellhubFiles.js.map +1 -0
  270. package/cjs-bundle/components/WellhubFilePicker/utils/wellhubRecords.js +2 -0
  271. package/cjs-bundle/components/WellhubFilePicker/utils/wellhubRecords.js.map +1 -0
  272. package/cjs-bundle/components/index.js +1 -1
  273. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  274. package/cjs-bundle/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  275. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  276. package/cjs-bundle/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  277. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  278. package/cjs-bundle/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  279. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  280. package/cjs-bundle/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  281. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  282. package/cjs-bundle/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  283. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  284. package/cjs-bundle/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  285. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  286. package/cjs-bundle/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  287. package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js +1 -1
  288. package/cjs-bundle/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
  289. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  290. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  291. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js +1 -1
  292. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js.map +1 -1
  293. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.scss.js +1 -1
  294. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js +1 -1
  295. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js.map +1 -1
  296. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  297. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  298. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  299. package/cjs-bundle/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  300. package/cjs-bundle/componentsV2/FilesDropzone/utils.js +1 -1
  301. package/cjs-bundle/componentsV2/FilesDropzone/utils.js.map +1 -1
  302. package/cjs-bundle/componentsV2/FilesLoader/utils.js +1 -1
  303. package/cjs-bundle/componentsV2/FilesLoader/utils.js.map +1 -1
  304. package/cjs-bundle/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  305. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  306. package/cjs-bundle/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  307. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  308. package/cjs-bundle/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  309. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  310. package/cjs-bundle/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  311. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  312. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  313. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  314. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  315. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  316. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  317. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  318. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  319. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  320. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  321. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  322. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  323. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  324. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  325. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  326. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  327. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  328. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  329. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  330. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  331. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  332. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  333. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  334. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  335. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  336. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  337. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  338. package/cjs-bundle/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  339. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  340. package/cjs-bundle/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  341. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js +1 -1
  342. package/cjs-bundle/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  343. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js +1 -1
  344. package/cjs-bundle/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  345. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  346. package/cjs-bundle/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  347. package/cjs-bundle/constants/notifications.js +1 -1
  348. package/cjs-bundle/constants/notifications.js.map +1 -1
  349. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js +1 -1
  350. package/cjs-bundle/effects/useGlobalOffsetWellsSync.js.map +1 -1
  351. package/cjs-bundle/effects/useSharedDCStore.js +1 -1
  352. package/cjs-bundle/effects/useSharedDCStore.js.map +1 -1
  353. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  354. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  355. package/cjs-bundle/utils/DrillstringUtils.js +1 -1
  356. package/cjs-bundle/utils/DrillstringUtils.js.map +1 -1
  357. package/cjs-bundle/utils/apps.js +1 -1
  358. package/cjs-bundle/utils/apps.js.map +1 -1
  359. package/cjs-bundle/utils/convert.js +1 -1
  360. package/cjs-bundle/utils/convert.js.map +1 -1
  361. package/cjs-bundle/utils/devcenter.js +1 -1
  362. package/cjs-bundle/utils/devcenter.js.map +1 -1
  363. package/cjs-bundle/utils/fetchDataByChunks.js +2 -0
  364. package/cjs-bundle/utils/fetchDataByChunks.js.map +1 -0
  365. package/cjs-bundle/utils/index.js +1 -1
  366. package/cjs-bundle/utils/index.js.map +1 -1
  367. package/cjs-bundle/utils/lasParser.js +1 -1
  368. package/cjs-bundle/utils/lasParser.js.map +1 -1
  369. package/cjs-bundle/utils/time.js.map +1 -1
  370. package/clients/jsonApi/index.js +1 -1
  371. package/clients/jsonApi/index.js.map +1 -1
  372. package/components/AddComment/Popover.js +1 -1
  373. package/components/AddComment/Popover.js.map +1 -1
  374. package/components/AddComment/components/Content.js +1 -1
  375. package/components/AddComment/components/Content.js.map +1 -1
  376. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js +1 -1
  377. package/components/Annotations/components/AnnotationsList/components/AddAnnotationForm/index.js.map +1 -1
  378. package/components/Annotations/components/AnnotationsList/index.js +1 -1
  379. package/components/Annotations/components/AnnotationsList/index.js.map +1 -1
  380. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js +1 -1
  381. package/components/AssetsMultipleSelector/AssetsMultipleSelector.js.map +1 -1
  382. package/components/AttachFileButton/AttachFileButton.d.ts +3 -1
  383. package/components/AttachFileButton/AttachFileButton.d.ts.map +1 -1
  384. package/components/AttachFileButton/AttachFileButton.js +1 -1
  385. package/components/AttachFileButton/AttachFileButton.js.map +1 -1
  386. package/components/AttachFileButton/__tests__/AttachFileButton.test.d.ts +2 -0
  387. package/components/AttachFileButton/__tests__/AttachFileButton.test.d.ts.map +1 -0
  388. package/components/Attachment/index.js +1 -1
  389. package/components/Attachment/index.js.map +1 -1
  390. package/components/BICOffsetPickerDialog/components/Map/Map.js +1 -1
  391. package/components/BICOffsetPickerDialog/components/Map/Map.js.map +1 -1
  392. package/components/BICOffsetPickerDialog/components/WellSection/index.js +1 -1
  393. package/components/BICOffsetPickerDialog/components/WellSection/index.js.map +1 -1
  394. package/components/BICOffsetPickerDialog/index.js +1 -1
  395. package/components/BICOffsetPickerDialog/index.js.map +1 -1
  396. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  397. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js.map +1 -1
  398. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  399. package/components/Casing/CasingTableV2/components/Component.js.map +1 -1
  400. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  401. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js.map +1 -1
  402. package/components/CollapsableSidebar.js +1 -1
  403. package/components/CollapsableSidebar.js.map +1 -1
  404. package/components/CommentCard/CommentCard.d.ts.map +1 -1
  405. package/components/CommentCard/CommentCard.js +1 -1
  406. package/components/CommentCard/CommentCard.js.map +1 -1
  407. package/components/CommentCard/CommentCard.scss.js +1 -1
  408. package/components/CommentCard/CommentCard.types.d.ts +0 -1
  409. package/components/CommentCard/CommentCard.types.d.ts.map +1 -1
  410. package/components/CommentComposer/CommentComposer.d.ts +3 -1
  411. package/components/CommentComposer/CommentComposer.d.ts.map +1 -1
  412. package/components/CommentComposer/CommentComposer.js +1 -1
  413. package/components/CommentComposer/CommentComposer.js.map +1 -1
  414. package/components/CommentComposer/__tests__/useAttachmentUpload.stored.test.d.ts +2 -0
  415. package/components/CommentComposer/__tests__/useAttachmentUpload.stored.test.d.ts.map +1 -0
  416. package/components/CommentComposer/useAttachmentUpload.d.ts +4 -0
  417. package/components/CommentComposer/useAttachmentUpload.d.ts.map +1 -1
  418. package/components/CommentComposer/useAttachmentUpload.js +1 -1
  419. package/components/CommentComposer/useAttachmentUpload.js.map +1 -1
  420. package/components/DevCenter/AppsDataProvider/effects/utils.d.ts.map +1 -1
  421. package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  422. package/components/DevCenter/AppsDataProvider/effects/utils.js.map +1 -1
  423. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  424. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js.map +1 -1
  425. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js +1 -1
  426. package/components/DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js.map +1 -1
  427. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  428. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js.map +1 -1
  429. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js +1 -1
  430. package/components/DevCenter/DevCenterAppContainer/components/LegacyAppActions.js.map +1 -1
  431. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js +1 -1
  432. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus.js.map +1 -1
  433. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js +1 -1
  434. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus.js.map +1 -1
  435. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js +1 -1
  436. package/components/DevCenter/DevCenterAppContainer/effects/useAppMaximized.js.map +1 -1
  437. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.d.ts.map +1 -1
  438. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js +1 -1
  439. package/components/DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js.map +1 -1
  440. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.d.ts.map +1 -1
  441. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js +1 -1
  442. package/components/DevCenter/IsolatedDevCenterAppContainer/IsolatedPage.js.map +1 -1
  443. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.d.ts.map +1 -1
  444. package/components/DevCenter/IsolatedDevCenterAppContainer/effects/useXProps.js.map +1 -1
  445. package/components/DocumentViewer/DocumentViewer.js +1 -1
  446. package/components/DocumentViewer/DocumentViewer.js.map +1 -1
  447. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  448. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js.map +1 -1
  449. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  450. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js.map +1 -1
  451. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  452. package/components/Drillstring/BHAComponentsTable/components/Component.js.map +1 -1
  453. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  454. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js.map +1 -1
  455. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  456. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js.map +1 -1
  457. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  458. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js.map +1 -1
  459. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  460. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js.map +1 -1
  461. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  462. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js.map +1 -1
  463. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  464. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js.map +1 -1
  465. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  466. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js.map +1 -1
  467. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  468. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js.map +1 -1
  469. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  470. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js.map +1 -1
  471. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  472. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js.map +1 -1
  473. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  474. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js.map +1 -1
  475. package/components/EmbeddedApp/EmbeddedApp.d.ts.map +1 -1
  476. package/components/EmbeddedApp/EmbeddedApp.js +1 -1
  477. package/components/EmbeddedApp/EmbeddedApp.js.map +1 -1
  478. package/components/FeedItem/FeedItem.js +1 -1
  479. package/components/FeedItem/FeedItem.js.map +1 -1
  480. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js +1 -1
  481. package/components/FeedItem/FeedItemEditProvider/FeedItemEditProvider.js.map +1 -1
  482. package/components/FeedItem/components/Content.d.ts.map +1 -1
  483. package/components/FeedItem/components/Content.js +1 -1
  484. package/components/FeedItem/components/Content.js.map +1 -1
  485. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.d.ts.map +1 -1
  486. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js +1 -1
  487. package/components/FeedItem/feedItemTypes/AppAnnotationFeedItem/index.js.map +1 -1
  488. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.d.ts.map +1 -1
  489. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js +1 -1
  490. package/components/FeedItem/feedItemTypes/WellPlanFeedItem/index.js.map +1 -1
  491. package/components/FilesLoaderV2/utils.js +1 -1
  492. package/components/FilesLoaderV2/utils.js.map +1 -1
  493. package/components/GradientManager/GradientManager.js +1 -1
  494. package/components/GradientManager/GradientManager.js.map +1 -1
  495. package/components/GradientManager/GradientSelect.js +1 -1
  496. package/components/GradientManager/GradientSelect.js.map +1 -1
  497. package/components/InfiniteList/index.d.ts.map +1 -1
  498. package/components/InfiniteList/index.js +1 -1
  499. package/components/InfiniteList/index.js.map +1 -1
  500. package/components/OffsetWellMap/OffsetWellMap.js +1 -1
  501. package/components/OffsetWellMap/OffsetWellMap.js.map +1 -1
  502. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js +1 -1
  503. package/components/OffsetWellPickerV2/OffsetWellPickerDialog.js.map +1 -1
  504. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  505. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js.map +1 -1
  506. package/components/OffsetWellPickerV2/components/Map/Map.js +1 -1
  507. package/components/OffsetWellPickerV2/components/Map/Map.js.map +1 -1
  508. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  509. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js.map +1 -1
  510. package/components/OffsetWellPickerV2/constants.js +1 -1
  511. package/components/OffsetWellPickerV2/constants.js.map +1 -1
  512. package/components/OffsetWellPickerV2/effects/index.js +1 -1
  513. package/components/OffsetWellPickerV2/effects/index.js.map +1 -1
  514. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js +1 -1
  515. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Map/Map.js.map +1 -1
  516. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  517. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js.map +1 -1
  518. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js +1 -1
  519. package/components/OffsetWellPickerV3/components/CustomSelectionView/constants.js.map +1 -1
  520. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js +1 -1
  521. package/components/OffsetWellPickerV3/components/CustomSelectionView/effects/index.js.map +1 -1
  522. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  523. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js.map +1 -1
  524. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  525. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js.map +1 -1
  526. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  527. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js.map +1 -1
  528. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  529. package/components/OffsetWellPickerV3/components/TabSelection/index.js.map +1 -1
  530. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  531. package/components/OffsetWellPickerV3/components/WellHubView/index.js.map +1 -1
  532. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  533. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js.map +1 -1
  534. package/components/OffsetWellPickerV3/index.js +1 -1
  535. package/components/OffsetWellPickerV3/index.js.map +1 -1
  536. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
  537. package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
  538. package/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js +1 -1
  539. package/components/OffsetWellPickerV5/api/metrics/fetchMetricsAggregate.js.map +1 -1
  540. package/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js +1 -1
  541. package/components/OffsetWellPickerV5/api/metrics/fetchMudAggregate.js.map +1 -1
  542. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js +1 -1
  543. package/components/OffsetWellPickerV5/api/shared/fetchers/getAllAssets.js.map +1 -1
  544. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js +1 -1
  545. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByBounds.js.map +1 -1
  546. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js +1 -1
  547. package/components/OffsetWellPickerV5/api/shared/fetchers/getAssetsByIds.js.map +1 -1
  548. package/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js +1 -1
  549. package/components/OffsetWellPickerV5/api/wells/fetchWellsByRigIds.js.map +1 -1
  550. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js +1 -1
  551. package/components/OffsetWellPickerV5/components/AppHeader/components/HeaderActions/HeaderActions.js.map +1 -1
  552. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js +1 -1
  553. package/components/OffsetWellPickerV5/components/AppHeader/components/LoadAllWellsToggle/LoadAllWellsToggle.js.map +1 -1
  554. package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
  555. package/components/OffsetWellPickerV5/components/Filter/Filter.js.map +1 -1
  556. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js +1 -1
  557. package/components/OffsetWellPickerV5/components/Filter/components/CustomDateFields/CustomDateFields.js.map +1 -1
  558. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js +1 -1
  559. package/components/OffsetWellPickerV5/components/Filter/components/PeriodFilterSelect/PeriodFilterSelect.js.map +1 -1
  560. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js +1 -1
  561. package/components/OffsetWellPickerV5/components/Filter/components/SingleFilterSelect/SingleFilterSelect.js.map +1 -1
  562. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js +1 -1
  563. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/ClusterTooltip/ClusterTooltip.js.map +1 -1
  564. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js +1 -1
  565. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/LayerSwitcher/LayerSwitcher.js.map +1 -1
  566. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js +1 -1
  567. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapControls/MapControls.js.map +1 -1
  568. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js +1 -1
  569. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/MapHints/MapHintsStash.js.map +1 -1
  570. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js +1 -1
  571. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/components/SubjectWellMarker/SubjectWellMarker.js.map +1 -1
  572. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js +1 -1
  573. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useMapTooltipState.js.map +1 -1
  574. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js +1 -1
  575. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useOffsetWellMapState.js.map +1 -1
  576. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js +1 -1
  577. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/useSelectionToolOrchestration.js.map +1 -1
  578. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js +1 -1
  579. package/components/OffsetWellPickerV5/components/Map/OffsetWellMap/hooks/utils/well-markers-utils.js.map +1 -1
  580. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js +1 -1
  581. package/components/OffsetWellPickerV5/components/OffsetWellPickerContent/OffsetWellPickerContent.js.map +1 -1
  582. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js +1 -1
  583. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/OffsetWellPickerV5WithStore.js.map +1 -1
  584. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js +1 -1
  585. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/CompanySafeguardWrapper/CompanySafeguardWrapper.js.map +1 -1
  586. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js +1 -1
  587. package/components/OffsetWellPickerV5/components/OffsetWellPickerV5WithStore/components/UserSettingsWrapper/UserSettingsWrapper.js.map +1 -1
  588. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js +1 -1
  589. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AssetResultSection/AssetResultSection.js.map +1 -1
  590. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js +1 -1
  591. package/components/OffsetWellPickerV5/components/OffsetWellsTable/AdvancedSearch/components/AutoCompleteAssetSearch/AutoCompleteAssetSearch.js.map +1 -1
  592. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js +1 -1
  593. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/CompanyCell/CompanyCell.js.map +1 -1
  594. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js +1 -1
  595. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/FormationCell/FormationCell.js.map +1 -1
  596. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js +1 -1
  597. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/InterventionAssetCell/InterventionAssetCell.js.map +1 -1
  598. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js +1 -1
  599. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/PadNameCell/PadNameCell.js.map +1 -1
  600. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js +1 -1
  601. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/RigCell/RigCell.js.map +1 -1
  602. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js +1 -1
  603. package/components/OffsetWellPickerV5/components/OffsetWellsTable/cells/WellNameCell/WellNameCell.js.map +1 -1
  604. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js +1 -1
  605. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/SettingsMenu.js.map +1 -1
  606. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js +1 -1
  607. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/MetricsSettingsSection/MetricsSettingsSection.js.map +1 -1
  608. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js +1 -1
  609. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/SettingsMenu/components/TableSettingsSection/TableSettingsSection.js.map +1 -1
  610. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js +1 -1
  611. package/components/OffsetWellPickerV5/components/OffsetWellsTable/components/WellNameHeaderCell/WellNameHeaderCell.js.map +1 -1
  612. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js +1 -1
  613. package/components/OffsetWellPickerV5/components/OffsetWellsTable/hooks/useAdvancedSearchHandler.js.map +1 -1
  614. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js +1 -1
  615. package/components/OffsetWellPickerV5/components/PickerModalActions/PickerModalActions.js.map +1 -1
  616. package/components/OffsetWellPickerV5/constants.js +1 -1
  617. package/components/OffsetWellPickerV5/constants.js.map +1 -1
  618. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js +1 -1
  619. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useCompanyMetricKey.js.map +1 -1
  620. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js +1 -1
  621. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/useWellDataPipeline.js.map +1 -1
  622. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js +1 -1
  623. package/components/OffsetWellPickerV5/hooks/use-well-data-pipeline/wellTransformations.js.map +1 -1
  624. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js +1 -1
  625. package/components/OffsetWellPickerV5/hooks/useAutoSyncOffsetWells.js.map +1 -1
  626. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js +1 -1
  627. package/components/OffsetWellPickerV5/hooks/useIsAdmin.js.map +1 -1
  628. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js +1 -1
  629. package/components/OffsetWellPickerV5/hooks/useLimitNotification.js.map +1 -1
  630. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js +1 -1
  631. package/components/OffsetWellPickerV5/stores/idas-resync-store/createIdasResyncController.js.map +1 -1
  632. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.d.ts.map +1 -1
  633. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js +1 -1
  634. package/components/OffsetWellPickerV5/utils/getCoordinatedWells.js.map +1 -1
  635. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  636. package/components/PadOffsetsPicker/StagesSelector.js.map +1 -1
  637. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  638. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js.map +1 -1
  639. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  640. package/components/RealTimeValuesSidebar/SidebarFooter.js.map +1 -1
  641. package/components/WellhubFilePicker/WellhubFilePicker.d.ts +10 -0
  642. package/components/WellhubFilePicker/WellhubFilePicker.d.ts.map +1 -0
  643. package/components/WellhubFilePicker/WellhubFilePicker.js +2 -0
  644. package/components/WellhubFilePicker/WellhubFilePicker.js.map +1 -0
  645. package/components/WellhubFilePicker/WellhubFilePicker.types.d.ts +34 -0
  646. package/components/WellhubFilePicker/WellhubFilePicker.types.d.ts.map +1 -0
  647. package/components/WellhubFilePicker/api/__tests__/registerAttachmentsInWellhub.test.d.ts +2 -0
  648. package/components/WellhubFilePicker/api/__tests__/registerAttachmentsInWellhub.test.d.ts.map +1 -0
  649. package/components/WellhubFilePicker/api/fetchWellhubRecords.d.ts +4 -0
  650. package/components/WellhubFilePicker/api/fetchWellhubRecords.d.ts.map +1 -0
  651. package/components/WellhubFilePicker/api/fetchWellhubRecords.js +2 -0
  652. package/components/WellhubFilePicker/api/fetchWellhubRecords.js.map +1 -0
  653. package/components/WellhubFilePicker/api/index.d.ts +4 -0
  654. package/components/WellhubFilePicker/api/index.d.ts.map +1 -0
  655. package/components/WellhubFilePicker/api/postWellhubRecords.d.ts +10 -0
  656. package/components/WellhubFilePicker/api/postWellhubRecords.d.ts.map +1 -0
  657. package/components/WellhubFilePicker/api/postWellhubRecords.js +2 -0
  658. package/components/WellhubFilePicker/api/postWellhubRecords.js.map +1 -0
  659. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.d.ts +22 -0
  660. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.d.ts.map +1 -0
  661. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js +2 -0
  662. package/components/WellhubFilePicker/api/registerAttachmentsInWellhub.js.map +1 -0
  663. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.d.ts +15 -0
  664. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.d.ts.map +1 -0
  665. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js +2 -0
  666. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.js.map +1 -0
  667. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js +2 -0
  668. package/components/WellhubFilePicker/components/WellhubFileCard/WellhubFileCard.scss.js.map +1 -0
  669. package/components/WellhubFilePicker/components/WellhubFileCard/index.d.ts +3 -0
  670. package/components/WellhubFilePicker/components/WellhubFileCard/index.d.ts.map +1 -0
  671. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.d.ts +17 -0
  672. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.d.ts.map +1 -0
  673. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js +2 -0
  674. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.js.map +1 -0
  675. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js +2 -0
  676. package/components/WellhubFilePicker/components/WellhubFilePickerView/WellhubFilePickerView.scss.js.map +1 -0
  677. package/components/WellhubFilePicker/components/WellhubFilePickerView/__tests__/WellhubFilePickerView.test.d.ts +2 -0
  678. package/components/WellhubFilePicker/components/WellhubFilePickerView/__tests__/WellhubFilePickerView.test.d.ts.map +1 -0
  679. package/components/WellhubFilePicker/components/WellhubFilePickerView/index.d.ts +3 -0
  680. package/components/WellhubFilePicker/components/WellhubFilePickerView/index.d.ts.map +1 -0
  681. package/components/WellhubFilePicker/constants.d.ts +5 -0
  682. package/components/WellhubFilePicker/constants.d.ts.map +1 -0
  683. package/components/WellhubFilePicker/constants.js +2 -0
  684. package/components/WellhubFilePicker/constants.js.map +1 -0
  685. package/components/WellhubFilePicker/hooks/index.d.ts +2 -0
  686. package/components/WellhubFilePicker/hooks/index.d.ts.map +1 -0
  687. package/components/WellhubFilePicker/hooks/useWellhubFiles.d.ts +8 -0
  688. package/components/WellhubFilePicker/hooks/useWellhubFiles.d.ts.map +1 -0
  689. package/components/WellhubFilePicker/hooks/useWellhubFiles.js +2 -0
  690. package/components/WellhubFilePicker/hooks/useWellhubFiles.js.map +1 -0
  691. package/components/WellhubFilePicker/index.d.ts +6 -0
  692. package/components/WellhubFilePicker/index.d.ts.map +1 -0
  693. package/components/WellhubFilePicker/utils/index.d.ts +2 -0
  694. package/components/WellhubFilePicker/utils/index.d.ts.map +1 -0
  695. package/components/WellhubFilePicker/utils/wellhubRecords.d.ts +10 -0
  696. package/components/WellhubFilePicker/utils/wellhubRecords.d.ts.map +1 -0
  697. package/components/WellhubFilePicker/utils/wellhubRecords.js +2 -0
  698. package/components/WellhubFilePicker/utils/wellhubRecords.js.map +1 -0
  699. package/components/index.d.ts +3 -0
  700. package/components/index.d.ts.map +1 -1
  701. package/components/index.js +1 -1
  702. package/componentsV2/AppFooter/DqPopover/DqPopover.js +1 -1
  703. package/componentsV2/AppFooter/DqPopover/DqPopover.js.map +1 -1
  704. package/componentsV2/AppHeader/AppAssets/utils.js +1 -1
  705. package/componentsV2/AppHeader/AppAssets/utils.js.map +1 -1
  706. package/componentsV2/AppHeader/V3/Actions/Actions.js +1 -1
  707. package/componentsV2/AppHeader/V3/Actions/Actions.js.map +1 -1
  708. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js +1 -1
  709. package/componentsV2/AppHeader/V3/AppTitle/AppTitle.js.map +1 -1
  710. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js +1 -1
  711. package/componentsV2/AppHeader/V3/AssetSelector/AssetSelector.js.map +1 -1
  712. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js +1 -1
  713. package/componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js.map +1 -1
  714. package/componentsV2/AppPanel/AppPanelDisplay.js +1 -1
  715. package/componentsV2/AppPanel/AppPanelDisplay.js.map +1 -1
  716. package/componentsV2/Autocomplete/Autocomplete.d.ts +9 -1
  717. package/componentsV2/Autocomplete/Autocomplete.d.ts.map +1 -1
  718. package/componentsV2/Autocomplete/Autocomplete.js +1 -1
  719. package/componentsV2/Autocomplete/Autocomplete.js.map +1 -1
  720. package/componentsV2/Autocomplete/Autocomplete.stories.d.ts.map +1 -1
  721. package/componentsV2/Autocomplete/AutocompleteNext.stories.d.ts.map +1 -1
  722. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js +1 -1
  723. package/componentsV2/CompletionsOffsetWellPicker/Map/Map.js.map +1 -1
  724. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js +1 -1
  725. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.js.map +1 -1
  726. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/PadsTable.scss.js +1 -1
  727. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.d.ts.map +1 -1
  728. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js +1 -1
  729. package/componentsV2/CompletionsOffsetWellPicker/PadsTable/helpers/columns.js.map +1 -1
  730. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js +1 -1
  731. package/componentsV2/CompletionsOffsetWellPicker/hooks/useNonActivePads.js.map +1 -1
  732. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js +1 -1
  733. package/componentsV2/CompletionsOffsetWellPicker/hooks/usePadsByRadius.js.map +1 -1
  734. package/componentsV2/FilesDropzone/utils.js +1 -1
  735. package/componentsV2/FilesDropzone/utils.js.map +1 -1
  736. package/componentsV2/FilesLoader/utils.js +1 -1
  737. package/componentsV2/FilesLoader/utils.js.map +1 -1
  738. package/componentsV2/IndicatorLive/IndicatorLive.d.ts.map +1 -1
  739. package/componentsV2/IndicatorLive/IndicatorLive.js.map +1 -1
  740. package/componentsV2/PadModeSelect/PadModeSelect.js +1 -1
  741. package/componentsV2/PadModeSelect/PadModeSelect.js.map +1 -1
  742. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js +1 -1
  743. package/componentsV2/TemplatesControl/PublishModal/PublishModal.js.map +1 -1
  744. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js +1 -1
  745. package/componentsV2/TemplatesControl/ShareModal/ShareModal.js.map +1 -1
  746. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js +1 -1
  747. package/componentsV2/TemplatesControl/Store/hooks/useCopyTemplate.js.map +1 -1
  748. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js +1 -1
  749. package/componentsV2/TemplatesControl/Store/hooks/useCreateTemplate.js.map +1 -1
  750. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js +1 -1
  751. package/componentsV2/TemplatesControl/Store/hooks/useDeleteFolder.js.map +1 -1
  752. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js +1 -1
  753. package/componentsV2/TemplatesControl/Store/hooks/useDeleteTemplate.js.map +1 -1
  754. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js +1 -1
  755. package/componentsV2/TemplatesControl/Store/hooks/useExportTemplate.js.map +1 -1
  756. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js +1 -1
  757. package/componentsV2/TemplatesControl/Store/hooks/useImportTemplate.js.map +1 -1
  758. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js +1 -1
  759. package/componentsV2/TemplatesControl/Store/hooks/useInitialize.js.map +1 -1
  760. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js +1 -1
  761. package/componentsV2/TemplatesControl/Store/hooks/useMoveToFolder.js.map +1 -1
  762. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js +1 -1
  763. package/componentsV2/TemplatesControl/Store/hooks/usePublishTemplate.js.map +1 -1
  764. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js +1 -1
  765. package/componentsV2/TemplatesControl/Store/hooks/useRevertToOriginal.js.map +1 -1
  766. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js +1 -1
  767. package/componentsV2/TemplatesControl/Store/hooks/useShareTemplate.js.map +1 -1
  768. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js +1 -1
  769. package/componentsV2/TemplatesControl/Store/hooks/useUnfollowTemplate.js.map +1 -1
  770. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js +1 -1
  771. package/componentsV2/TemplatesControl/Store/hooks/useUpdateFolderName.js.map +1 -1
  772. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js +1 -1
  773. package/componentsV2/TemplatesControl/Store/hooks/useUpdateTemplateName.js.map +1 -1
  774. package/componentsV2/TemplatesControl/Toggle/Toggle.js +1 -1
  775. package/componentsV2/TemplatesControl/Toggle/Toggle.js.map +1 -1
  776. package/componentsV2/TextInputBase/TextInputBase.js +1 -1
  777. package/componentsV2/TextInputBase/TextInputBase.js.map +1 -1
  778. package/componentsV2/TextInputNext/TextInputNext.js +1 -1
  779. package/componentsV2/TextInputNext/TextInputNext.js.map +1 -1
  780. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js +1 -1
  781. package/componentsV2/WellArchivedMessage/WellArchivedMessage.js.map +1 -1
  782. package/constants/assets.d.ts +40 -1
  783. package/constants/assets.d.ts.map +1 -1
  784. package/constants/bha.d.ts +4 -4
  785. package/constants/notifications.d.ts +5 -2
  786. package/constants/notifications.d.ts.map +1 -1
  787. package/constants/notifications.js +1 -1
  788. package/constants/notifications.js.map +1 -1
  789. package/effects/useGlobalOffsetWellsSync.js +1 -1
  790. package/effects/useGlobalOffsetWellsSync.js.map +1 -1
  791. package/effects/useSharedDCStore.js +1 -1
  792. package/effects/useSharedDCStore.js.map +1 -1
  793. package/mcp-server/server.mjs +168 -107
  794. package/package.json +1 -2
  795. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  796. package/testing/AppTestWrapper/AppTestWrapper.js.map +1 -1
  797. package/tsconfig.tsbuildinfo +1 -1
  798. package/utils/DrillstringUtils.d.ts.map +1 -1
  799. package/utils/DrillstringUtils.js +1 -1
  800. package/utils/DrillstringUtils.js.map +1 -1
  801. package/utils/apps.js +1 -1
  802. package/utils/apps.js.map +1 -1
  803. package/utils/convert.d.ts +0 -19
  804. package/utils/convert.d.ts.map +1 -1
  805. package/utils/convert.js +1 -1
  806. package/utils/convert.js.map +1 -1
  807. package/utils/devcenter.d.ts.map +1 -1
  808. package/utils/devcenter.js +1 -1
  809. package/utils/devcenter.js.map +1 -1
  810. package/utils/fetchDataByChunks.d.ts.map +1 -0
  811. package/utils/fetchDataByChunks.js +2 -0
  812. package/utils/fetchDataByChunks.js.map +1 -0
  813. package/utils/index.d.ts +4 -4
  814. package/utils/index.d.ts.map +1 -1
  815. package/utils/index.js +1 -1
  816. package/utils/index.js.map +1 -1
  817. package/utils/lasParser.d.ts.map +1 -1
  818. package/utils/lasParser.js +1 -1
  819. package/utils/lasParser.js.map +1 -1
  820. package/utils/time.d.ts.map +1 -1
  821. package/utils/time.js.map +1 -1
  822. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js +0 -2
  823. package/cjs-bundle/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js.map +0 -1
  824. package/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.d.ts.map +0 -1
  825. package/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js +0 -2
  826. package/components/OffsetWellPickerV5/api/shared/fetchers/fetchDataByChunks.js.map +0 -1
  827. package/utils/HeatmapUtils.d.ts +0 -1
  828. package/utils/HeatmapUtils.d.ts.map +0 -1
  829. /package/{components/OffsetWellPickerV5/api/shared/fetchers → utils}/fetchDataByChunks.d.ts +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("lodash/set"),r=require("lodash/get"),i=require("moment"),o=require("./convert.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(e),a=n(t),l=n(r),_=n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){s.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i.isMinInclusive,n=void 0===o||o,s=parseFloat(e);return!Number.isNaN(s)&&(!(n&&s<t||!n&&s<=t)&&!(r&&s>r))}function c(e,t,r){var i=o.getUnitPreference("shortLength"),n=e,s=t;"in"!==i&&(n=o.convertValue(e,"shortLength",i,"in"),s=o.convertValue(t,"shortLength",i,"in"));var a=2.673*(s*s-n*n),l="in"!==i?o.convertValue(a,"massPerLength","lb-ft"):a;return r>=.5*l&&r<=1.5*l}function d(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return null==e?null:t&&r?parseFloat(o.convertValue(e,t,o.getUnitPreference(t),r,i)):parseFloat(e)}function m(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return 0===e||e?t&&r?o.convertValue(e,t,r,null,i):e:null}exports.convertRecordBackToImperialUnit=function(e){var t=l.default(e,["data","components"]);"bit"===l.default(t,[0,"family"])&&(t=t.reverse().map((function(e,t){return h(h({},e),{},{order:t})})),e=a.default(e,["data","components"],t));var r=e.toJS().data,i=r.start_timestamp_str&&_.default(new Date(r.start_timestamp_str));return i&&i.isValid()&&(r.start_timestamp=i.unix()),delete r.start_timestamp_str,r.start_depth=d(r.start_depth,"length","ft"),r.components=r.components.map((function(e){var t=Object.assign({},e);if(t.inner_diameter=d(t.inner_diameter,"shortLength","in"),t.outer_diameter=d(t.outer_diameter,"shortLength","in",4),t.linear_weight=d(t.linear_weight,"massPerLength","lb-ft"),t.weight=d(t.weight,"mass","lb"),t.length=d(t.length,"length","ft"),t.component_length=d(t.component_length,"length","ft"),t.outer_diameter_tooljoint=d(t.outer_diameter_tooljoint,"shortLength","in"),t.inner_diameter_tooljoint=d(t.inner_diameter_tooljoint,"shortLength","in"),t.length_tooljoint=d(t.length_tooljoint,"length","ft"),"bit"===t.family||"ur"===t.family){var r=d(1,"shortLength","in");if(t.size=d(t.size,"shortLength","in",3),t.nozzle_sizes&&t.nozzle_sizes.length>0)for(var i=0;i<t.nozzle_sizes.length;i+=1){var o=t.nozzle_sizes[i];o.size=1!==r?32*d(o.size,"shortLength","in"):o.size}t.tfa=1!==r?t.tfa*(r*r):t.tfa}if("pdm"===t.family){if(t.max_weight_on_bit=d(t.max_weight_on_bit,"force","klbf"),t.min_standard_flowrate=d(t.min_standard_flowrate,"volumeFlowRate","gal/min"),t.max_standard_flowrate=d(t.max_standard_flowrate,"volumeFlowRate","gal/min"),t.max_operating_differential_pressure=d(t.max_operating_differential_pressure,"pressure","psi"),t.torque_at_max_operating_differential_pressure=d(t.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),t.rpg=d(t.rpg,"revolutionPerVolume","rpg"),t.off_bottom_pressure_loss&&t.off_bottom_pressure_loss.length>0)for(var n=0;n<t.off_bottom_pressure_loss.length;n+=1){var s=t.off_bottom_pressure_loss[n];s.flow_rate=d(s.flow_rate,"volumeFlowRate","gal/min"),s.pressure_loss=d(s.pressure_loss,"pressure","psi")}t.has_stabilizer||delete t.stabilizer,t.stabilizer&&(t.stabilizer.inner_diameter=t.stabilizer.inner_diameter&&d(t.stabilizer.inner_diameter,"shortLength","in"),t.stabilizer.outer_diameter=t.stabilizer.outer_diameter&&d(t.stabilizer.outer_diameter,"shortLength","in"),t.stabilizer.linear_weight=t.stabilizer.linear_weight&&d(t.stabilizer.linear_weight,"massPerLength","lb-ft"),t.stabilizer.weight=t.stabilizer.weight&&d(t.stabilizer.weight,"mass","lb"),t.stabilizer.length=t.length&&d(t.stabilizer.length,"length","ft"),t.stabilizer.gauge_od=t.stabilizer.gauge_od&&d(t.stabilizer.gauge_od,"shortLength","in"),t.stabilizer.gauge_length=t.stabilizer.gauge_length&&d(t.stabilizer.gauge_length,"shortLength","in"),t.stabilizer.blade_width=t.stabilizer.blade_width&&d(t.stabilizer.blade_width,"shortLength","in"),t.stabilizer.stab_centerpoint_to_bit=t.stabilizer.stab_centerpoint_to_bit&&d(t.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==t.family&&"ags"!==t.family||(t.gauge_od=d(t.gauge_od,"shortLength","in"),t.gauge_length=d(t.gauge_length,"shortLength","in"),t.blade_width=d(t.blade_width,"shortLength","in")),("mwd"===t.family||"rss"===t.family||"agitator"===t.family)&&t.pressure_loss&&t.pressure_loss.length>0)for(var a=0;a<t.pressure_loss.length;a+=1){var l=t.pressure_loss[a];l.flow_rate=d(l.flow_rate,"volumeFlowRate","gal/min"),l.pressure_loss=d(l.pressure_loss,"pressure","psi")}return"bit"!==t.family&&delete t.bit_type,!t.has_gamma_sensor&&Number.isFinite(t.gamma_sensor_to_bit_distance)&&delete t.gamma_sensor_to_bit_distance,!t.has_survey_sensor&&Number.isFinite(t.bit_to_survey_distance)&&delete t.bit_to_survey_distance,!t.has_directional_sensor&&Number.isFinite(t.directional_sensor_to_bit_distance)&&delete t.directional_sensor_to_bit_distance,delete t.c_length,t})),h(h({},e),{},{data:r})},exports.convertRecordtoPrefUnit=function(e){var t=e.toJS().data,r=t.components;if(t.start_depth=m(t.start_depth,"length","ft"),r.length>0)if("bit"===r[0].family){r[0].c_length=r[0].length||0;for(var i=1;i<r.length;i+=1)r[i].c_length=parseFloat(r[i-1].c_length)+parseFloat(r[i].length||0)}else{var o=r.length-1;r[o].c_length=r[o].length||0;for(var n=o-1;n>=0;n-=1)r[n].c_length=parseFloat(r[n+1].c_length)+parseFloat(r[n].length||0)}for(var s=0;s<r.length;s+=1){var a=r[s];if(a.inner_diameter=m(a.inner_diameter,"shortLength","in"),a.outer_diameter=m(a.outer_diameter,"shortLength","in",4),a.linear_weight=m(a.linear_weight,"massPerLength","lb-ft"),a.weight=m(a.weight,"mass","lb"),a.length=m(a.length,"length","ft"),a.component_length=m(a.component_length,"length","ft"),a.outer_diameter_tooljoint=m(a.outer_diameter_tooljoint,"shortLength","in"),a.inner_diameter_tooljoint=m(a.inner_diameter_tooljoint,"shortLength","in"),a.length_tooljoint=m(a.length_tooljoint,"length","ft"),a.c_length=m(a.c_length,"length","ft"),a.gamma_sensor_to_bit_distance=m(a.gamma_sensor_to_bit_distance,"length","ft"),"bit"===a.family||"ur"===a.family){var l=m(1,"shortLength","in");if(a.size=m(a.size,"shortLength","in"),a.nozzle_sizes&&a.nozzle_sizes.length>0)for(var _=0;_<a.nozzle_sizes.length;_+=1){var u=a.nozzle_sizes[_];u.size=1!==l?m(u.size,"shortLength","in")/32:u.size}a.tfa=1!==l?a.tfa*(l*l):a.tfa}if("pdm"===a.family){if(a.max_weight_on_bit=m(a.max_weight_on_bit,"force","klbf"),a.min_standard_flowrate=m(a.min_standard_flowrate,"volumeFlowRate","gal/min"),a.max_standard_flowrate=m(a.max_standard_flowrate,"volumeFlowRate","gal/min"),a.max_operating_differential_pressure=m(a.max_operating_differential_pressure,"pressure","psi"),a.torque_at_max_operating_differential_pressure=m(a.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),a.off_bottom_pressure_loss&&a.off_bottom_pressure_loss.length>0)for(var g=0;g<a.off_bottom_pressure_loss.length;g+=1){var c=a.off_bottom_pressure_loss[g];c.flow_rate=m(c.flow_rate,"volumeFlowRate","gal/min"),c.pressure_loss=m(c.pressure_loss,"pressure","psi")}a.rpg=m(a.rpg,"revolutionPerVolume","rpg"),a.has_stabilizer&&a.stabilizer&&(a.stabilizer.inner_diameter=m(a.stabilizer.inner_diameter,"shortLength","in"),a.stabilizer.outer_diameter=m(a.stabilizer.outer_diameter,"shortLength","in"),a.stabilizer.linear_weight=m(a.stabilizer.linear_weight,"massPerLength","lb-ft"),a.stabilizer.weight=m(a.stabilizer.weight,"mass","lb"),a.stabilizer.length=m(a.stabilizer.length,"length","ft"),a.stabilizer.gauge_od=m(a.stabilizer.gauge_od,"shortLength","in"),a.stabilizer.gauge_length=m(a.stabilizer.gauge_length,"shortLength","in"),a.stabilizer.blade_width=m(a.stabilizer.blade_width,"shortLength","in"),a.stabilizer.stab_centerpoint_to_bit=m(a.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==a.family&&"ags"!==a.family||(a.gauge_od=m(a.gauge_od,"shortLength","in"),a.gauge_length=m(a.gauge_length,"shortLength","in"),a.blade_width=m(a.blade_width,"shortLength","in")),("mwd"===a.family||"rss"===a.family||"agitator"===a.family)&&a.pressure_loss&&a.pressure_loss.length>0)for(var d=0;d<a.pressure_loss.length;d+=1){var f=a.pressure_loss[d];f.flow_rate=m(f.flow_rate,"volumeFlowRate","gal/min"),f.pressure_loss=m(f.pressure_loss,"pressure","psi")}}return h(h({},e),{},{data:t})},exports.ctoi=d,exports.ctop=m,exports.isValidLinearWeight=c,exports.isValidNumber=g,exports.sValueEmpty=function(e){return null==e||""===e},exports.validate=function(e){var t=e.toJS().data,r=t.id,i=t.start_timestamp_str,n=t.start_depth,s=t.components,a=o.getUnitDisplay("shortLength"),l=o.getUnitDisplay("length"),u={general:{},components:{},specificErrors:{}},h=s.filter((function(e){return"bit"===e.family})),d=h.length>0?h[0].size:null,f=s.filter((function(e){return"mwd"===e.family&&e.has_gamma_sensor})),b=!1;if(isValueEmpty(r)&&(u.id="It should not be empty.",b=!0),i&&!_.default(new Date(i)).isValid()&&(b=!0,u.start_timestamp="Invalid Date."),Number.isFinite(n)){var p=o.convertValue(0,"length","ft"),v=o.convertValue(55e3,"length","ft"),z=o.convertValue(1,"length","ft");(n<=p||n>v)&&(b=!0,u.start_depth="Should be a positive number ".concat(p.toFixed(2),"~").concat(v.toFixed(2)," (").concat(l,")")),n===z&&(b=!0,u.start_depth="Should not be equal to ".concat(z," (").concat(l,")"))}else b=!0,u.start_depth="It should not be empty.";for(var w=0;w<s.length;w+=1){var V=void 0,y=void 0,L=void 0,x=void 0,F=void 0,j=void 0,I=void 0,O=void 0,q=void 0,E=void 0,P=void 0,D=void 0,k=void 0,S=void 0,N=void 0,R=s[w],T={};switch(R.family){case"ct":V=o.convertValue(0,"shortLength","in"),L=o.convertValue(100,"shortLength","in"),y=o.convertValue(1,"shortLength","in"),x=o.convertValue(100,"shortLength","in"),S=o.convertValue(0,"shortLength","in"),N=o.convertValue(500,"shortLength","in"),I=o.convertValue(0,"length","ft");break;case"dp":case"hwdp":V=o.convertValue(1,"shortLength","in"),L=o.convertValue(7,"shortLength","in"),y=o.convertValue(2,"shortLength","in"),x=o.convertValue(8,"shortLength","in"),O=o.convertValue(1,"shortLength","in"),q=o.convertValue(7,"shortLength","in"),E=o.convertValue(2,"shortLength","in"),P=o.convertValue(10,"shortLength","in"),I=o.convertValue(0,"length","ft");break;case"dc":V=o.convertValue(.5,"shortLength","in"),L=o.convertValue(7,"shortLength","in"),y=o.convertValue(2,"shortLength","in"),x=o.convertValue(13,"shortLength","in"),I=o.convertValue(0,"length","ft");break;case"stabilizer":case"ags":default:V=o.convertValue(0,"shortLength","in"),L=o.convertValue(100,"shortLength","in"),y=o.convertValue(1,"shortLength","in"),x=o.convertValue(100,"shortLength","in"),I=o.convertValue(0,"length","ft");break;case"pdm":y=o.convertValue(2,"shortLength","in"),x=o.convertValue(15,"shortLength","in"),V=o.convertValue(0,"shortLength","in"),L=o.convertValue(12,"shortLength","in"),I=o.convertValue(4,"length","ft"),k=0;break;case"mwd":case"agitator":case"rss":y=o.convertValue(2,"shortLength","in"),x=o.convertValue(13,"shortLength","in"),V=o.convertValue(0,"shortLength","in"),L=o.convertValue(12,"shortLength","in"),I=o.convertValue(1,"length","ft"),D=0;break;case"ur":V=o.convertValue(0,"shortLength","in"),L=o.convertValue(50,"shortLength","in"),y=o.convertValue(1,"shortLength","in"),x=o.convertValue(50,"shortLength","in"),F=o.convertValue(1,"shortLength","in"),j=o.convertValue(50,"shortLength","in");case"bit":}if(isValueEmpty(V)||isValueEmpty(y)||(g(R.inner_diameter,V,L)||(T.inner_diameter="".concat(V.toFixed(1),"~").concat(L.toFixed(1)," (").concat(a,")"),b=!0),g(R.outer_diameter,y,x)||(T.outer_diameter="".concat(y.toFixed(1),"~").concat(x.toFixed(1)," (").concat(a,")"),b=!0),g(R.inner_diameter,V,L)&&g(R.outer_diameter,y,x)&&!g(R.inner_diameter,V,R.outer_diameter)&&(T.outer_diameter="O.D > I.D",b=!0),!T.outer_diameter&&d&&+R.outer_diameter+o.convertValue(.1,"shortLength","in")>d&&(T.outer_diameter=" O.D + 0.1 < Bit Size",b=!0),g(R.linear_weight,0)||(T.linear_weight="Invalid value",b=!0),"dp"!==R.family&&"hwdp"!==R.family&&"dc"!==R.family&&"ct"!==R.family&&"ur"!==R.family||T.inner_diameter||T.outer_diameter||T.linear_weight||c(R.inner_diameter,R.outer_diameter,R.linear_weight)||(T.linear_weight="Invalid range",b=!0)),"ur"===R.family&&(g(R.ur_opened_od,F,j)?R.ur_opened_od<d&&(T.ur_opened_od="Max O.D (Opened) >= Bit Size",b=!0):(T.ur_opened_od="".concat(F.toFixed(1),"~").concat(j.toFixed(1)," (").concat(a,")"),b=!0)),isValueEmpty(O)||isValueEmpty(E)||(g(R.inner_diameter_tooljoint,O,q)||(T.inner_diameter_tooljoint="".concat(O.toFixed(1),"~").concat(q.toFixed(1)," (").concat(a,")"),b=!0),g(R.outer_diameter_tooljoint,E,P)||(T.outer_diameter_tooljoint="".concat(E.toFixed(1),"~").concat(P.toFixed(1)," (").concat(a,")"),b=!0),g(R.outer_diameter_tooljoint,R.outer_diameter,P)||(T.outer_diameter_tooljoint="Tool Joint O.D >= O.D",b=!0)),isValueEmpty(I)||g(R.length,I)||(T.length="Invalid value",b=!0),isValueEmpty(R.length_tooljoint)||isValueEmpty(R.component_length)||+R.length_tooljoint>+R.component_length&&(T.length_tooljoint="Tool Joint Length < Component Length",b=!0),R.off_bottom_pressure_loss&&R.off_bottom_pressure_loss.length>0){T.off_bottom_pressure_loss={};for(var B=0;B<R.off_bottom_pressure_loss.length;B+=1){var U=R.off_bottom_pressure_loss[B];T.off_bottom_pressure_loss[B]={},isValueEmpty(U.flow_rate)&&(T.off_bottom_pressure_loss[B].flow_rate="flow rate is required.",b=!0),isValueEmpty(U.pressure_loss)&&(T.off_bottom_pressure_loss[B].pressure_loss="pressure loss is required.",b=!0),isValueEmpty(k)||g(U.pressure_loss,k,null,{isMinInclusive:!1})||(T.off_bottom_pressure_loss[B].pressure_loss="Invalid range",b=!0)}}if(R.pressure_loss&&R.pressure_loss.length>0){T.pressure_loss={};for(var J=0;J<R.pressure_loss.length;J+=1){var M=R.pressure_loss[J];T.pressure_loss[J]={},isValueEmpty(M.flow_rate)&&(T.pressure_loss[J].flow_rate="flow rate is required.",b=!0),isValueEmpty(M.pressure_loss)&&(T.pressure_loss[J].pressure_loss="pressure loss is required.",b=!0),isValueEmpty(D)||g(M.pressure_loss,D,null,{isMinInclusive:!1})||(T.pressure_loss[J].pressure_loss="Invalid range",b=!0)}}if(R.has_stabilizer&&R.stabilizer){var C=o.convertValue(0,"shortLength","in"),A=o.convertValue(100,"shortLength","in"),W=o.convertValue(1,"shortLength","in"),G=o.convertValue(100,"shortLength","in"),H=o.convertValue(0,"length","ft");g(R.stabilizer.inner_diameter,C,A)&&g(R.stabilizer.outer_diameter,W,G)&&!g(R.stabilizer.inner_diameter,V,R.stabilizer.outer_diameter)&&(T.stabilizer_outer_diameter="O.D > I.D",b=!0),g(R.stabilizer.inner_diameter,C,A)||(T.stabilizer_inner_diameter="".concat(C.toFixed(1),"~").concat(A.toFixed(1)," (").concat(a,")"),b=!0),g(R.stabilizer.outer_diameter,W,G)||(T.stabilizer_outer_diameter="".concat(W.toFixed(1),"~").concat(G.toFixed(1)," (").concat(a,")"),b=!0),isValueEmpty(H)||g(R.stabilizer.length,H)||(T.stabilizer_length="Invalid value",b=!0),isValueEmpty(R.stabilizer.linear_weight)&&(T.stabilizer_linear_weight="Invalid value",b=!0),!T.stabilizer_outer_diameter&&d&&+R.stabilizer.outer_diameter+o.convertValue(.1,"shortLength","in")>d&&(T.stabilizer_outer_diameter=" O.D + 0.1 < Bit Size",b=!0)}if("ct"===R.family&&(g(R.reel_diameter,S,N)||(T.reel_diameter="".concat(S.toFixed(1),"~").concat(N.toFixed(1)," (").concat(a,")"),b=!0)),"bit"===R.family){var K=m(1,"shortLength","in"),Q=K*K*0,X=K*K*20;g(R.tfa,Q,X)||(T.tfa="TFA must be ".concat(Q.toFixed(2),"~").concat(20..toFixed(2)),b=!0)}if("rss"===R.family&&(g(R.flow_loss_percentage,0,10)||(T.flow_loss_percentage="It must be ".concat(0,"~").concat(10),b=!0)),"mwd"===R.family&&(f.length>1?(T.gamma_sensor_to_bit_distance="Only 1 gamma sensor allowed. Currently ".concat(f.length),b=!0):R.has_gamma_sensor&&!Number.isFinite(R.gamma_sensor_to_bit_distance)&&(T.gamma_sensor_to_bit_distance="This field is required.",b=!0),R.has_survey_sensor&&!Number.isFinite(R.bit_to_survey_distance)?(T.bit_to_survey_distance="This field is required.",b=!0):R.has_survey_sensor&&R.bit_to_survey_distance<=0?(T.bit_to_survey_distance="Should be a positive number.",b=!0):R.has_survey_sensor&&R.bit_to_survey_distance>150&&(T.bit_to_survey_distance="Should be less then 150.",b=!0),R.has_directional_sensor&&!Number.isFinite(R.directional_sensor_to_bit_distance)?(T.directional_sensor_to_bit_distance="This field is required.",b=!0):R.has_directional_sensor&&R.directional_sensor_to_bit_distance<=0?(T.directional_sensor_to_bit_distance="Should be a positive number.",b=!0):R.has_directional_sensor&&R.directional_sensor_to_bit_distance>150&&(T.directional_sensor_to_bit_distance="Should be less then 150.",b=!0)),"pdm"===R.family){var Y=void 0,Z=void 0;g(R.number_rotor_lobes,1,10)||(T.number_rotor_lobes="It must be ".concat(1,"~").concat(10),b=!0),g(R.number_stator_lobes,2,10)||(T.number_stator_lobes="It must be ".concat(2,"~").concat(10),b=!0),g(R.rpg,0,10)||(T.rpg="It must be ".concat(0,"~").concat(10),b=!0),Y=o.convertValue(0,"force","klbf"),Z=o.convertValue(200,"force","klbf"),isValueEmpty(R.max_weight_on_bit)||g(R.max_weight_on_bit,Y,Z)||(T.max_weight_on_bit="It must be ".concat(Z.toFixed(2),"~").concat(Z.toFixed(2)),b=!0),Y=o.convertValue(0,"volumeFlowRate","gal/min"),Z=o.convertValue(2500,"volumeFlowRate","gal/min"),g(R.min_standard_flowrate,Y,Z)||(T.min_standard_flowrate="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),b=!0),g(R.max_standard_flowrate,Y,Z)||(T.max_standard_flowrate="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),b=!0),Y=o.convertValue(0,"pressure","psi"),Z=o.convertValue(3e3,"pressure","psi"),g(R.max_operating_differential_pressure,Y,Z)||(T.max_operating_differential_pressure="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),b=!0),Y=o.convertValue(0,"torque","ft-klbf"),Z=o.convertValue(40,"torque","ft-klbf"),g(R.torque_at_max_operating_differential_pressure,Y,Z)||(T.torque_at_max_operating_differential_pressure="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),b=!0),g(R.flow_loss_percentage,0,20)||(T.flow_loss_percentage="It must be ".concat(0,"~").concat(20),b=!0)}u.components[R.id]=T}return 1!==h.length&&(u.general.bit_count='Number of "BIT" components is invalid.',b=!0),1===h.length&&"bit"!==s[s.length-1].family&&"bit"!==s[0].family&&(u.general.bit_position='"BIT" category should be on the bottom of the list.',b=!0),b?u:null};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/defineProperty"),t=require("lodash/set"),r=require("lodash/get"),i=require("lodash/cloneDeep"),o=require("moment"),n=require("./convert.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(e),l=a(t),_=a(r),u=a(i),h=a(o);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){s.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i.isMinInclusive,n=void 0===o||o,a=parseFloat(e);return!Number.isNaN(a)&&(!(n&&a<t||!n&&a<=t)&&!(r&&a>r))}function m(e,t,r){var i=n.getUnitPreference("shortLength"),o=e,a=t;"in"!==i&&(o=n.convertValue(e,"shortLength",i,"in"),a=n.convertValue(t,"shortLength",i,"in"));var s=2.673*(a*a-o*o),l="in"!==i?n.convertValue(s,"massPerLength","lb-ft"):s;return r>=.5*l&&r<=1.5*l}function f(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return null==e?null:t&&r?parseFloat(n.convertValue(e,t,n.getUnitPreference(t),r,i)):parseFloat(e)}function b(e,t,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2;return 0===e||e?t&&r?n.convertValue(e,t,r,null,i):e:null}exports.convertRecordBackToImperialUnit=function(e){var t=_.default(e,["data","components"]);"bit"===_.default(t,[0,"family"])&&(t=t.reverse().map((function(e,t){return d(d({},e),{},{order:t})})),e=l.default(e,["data","components"],t));var r=u.default(e).data,i=r.start_timestamp_str&&h.default(new Date(r.start_timestamp_str));return i&&i.isValid()&&(r.start_timestamp=i.unix()),delete r.start_timestamp_str,r.start_depth=f(r.start_depth,"length","ft"),r.components=r.components.map((function(e){var t=Object.assign({},e);if(t.inner_diameter=f(t.inner_diameter,"shortLength","in"),t.outer_diameter=f(t.outer_diameter,"shortLength","in",4),t.linear_weight=f(t.linear_weight,"massPerLength","lb-ft"),t.weight=f(t.weight,"mass","lb"),t.length=f(t.length,"length","ft"),t.component_length=f(t.component_length,"length","ft"),t.outer_diameter_tooljoint=f(t.outer_diameter_tooljoint,"shortLength","in"),t.inner_diameter_tooljoint=f(t.inner_diameter_tooljoint,"shortLength","in"),t.length_tooljoint=f(t.length_tooljoint,"length","ft"),"bit"===t.family||"ur"===t.family){var r=f(1,"shortLength","in");if(t.size=f(t.size,"shortLength","in",3),t.nozzle_sizes&&t.nozzle_sizes.length>0)for(var i=0;i<t.nozzle_sizes.length;i+=1){var o=t.nozzle_sizes[i];o.size=1!==r?32*f(o.size,"shortLength","in"):o.size}t.tfa=1!==r?t.tfa*(r*r):t.tfa}if("pdm"===t.family){if(t.max_weight_on_bit=f(t.max_weight_on_bit,"force","klbf"),t.min_standard_flowrate=f(t.min_standard_flowrate,"volumeFlowRate","gal/min"),t.max_standard_flowrate=f(t.max_standard_flowrate,"volumeFlowRate","gal/min"),t.max_operating_differential_pressure=f(t.max_operating_differential_pressure,"pressure","psi"),t.torque_at_max_operating_differential_pressure=f(t.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),t.rpg=f(t.rpg,"revolutionPerVolume","rpg"),t.off_bottom_pressure_loss&&t.off_bottom_pressure_loss.length>0)for(var n=0;n<t.off_bottom_pressure_loss.length;n+=1){var a=t.off_bottom_pressure_loss[n];a.flow_rate=f(a.flow_rate,"volumeFlowRate","gal/min"),a.pressure_loss=f(a.pressure_loss,"pressure","psi")}t.has_stabilizer||delete t.stabilizer,t.stabilizer&&(t.stabilizer.inner_diameter=t.stabilizer.inner_diameter&&f(t.stabilizer.inner_diameter,"shortLength","in"),t.stabilizer.outer_diameter=t.stabilizer.outer_diameter&&f(t.stabilizer.outer_diameter,"shortLength","in"),t.stabilizer.linear_weight=t.stabilizer.linear_weight&&f(t.stabilizer.linear_weight,"massPerLength","lb-ft"),t.stabilizer.weight=t.stabilizer.weight&&f(t.stabilizer.weight,"mass","lb"),t.stabilizer.length=t.length&&f(t.stabilizer.length,"length","ft"),t.stabilizer.gauge_od=t.stabilizer.gauge_od&&f(t.stabilizer.gauge_od,"shortLength","in"),t.stabilizer.gauge_length=t.stabilizer.gauge_length&&f(t.stabilizer.gauge_length,"shortLength","in"),t.stabilizer.blade_width=t.stabilizer.blade_width&&f(t.stabilizer.blade_width,"shortLength","in"),t.stabilizer.stab_centerpoint_to_bit=t.stabilizer.stab_centerpoint_to_bit&&f(t.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==t.family&&"ags"!==t.family||(t.gauge_od=f(t.gauge_od,"shortLength","in"),t.gauge_length=f(t.gauge_length,"shortLength","in"),t.blade_width=f(t.blade_width,"shortLength","in")),("mwd"===t.family||"rss"===t.family||"agitator"===t.family)&&t.pressure_loss&&t.pressure_loss.length>0)for(var s=0;s<t.pressure_loss.length;s+=1){var l=t.pressure_loss[s];l.flow_rate=f(l.flow_rate,"volumeFlowRate","gal/min"),l.pressure_loss=f(l.pressure_loss,"pressure","psi")}return"bit"!==t.family&&delete t.bit_type,!t.has_gamma_sensor&&Number.isFinite(t.gamma_sensor_to_bit_distance)&&delete t.gamma_sensor_to_bit_distance,!t.has_survey_sensor&&Number.isFinite(t.bit_to_survey_distance)&&delete t.bit_to_survey_distance,!t.has_directional_sensor&&Number.isFinite(t.directional_sensor_to_bit_distance)&&delete t.directional_sensor_to_bit_distance,delete t.c_length,t})),d(d({},e),{},{data:r})},exports.convertRecordtoPrefUnit=function(e){var t=u.default(e).data,r=t.components;if(t.start_depth=b(t.start_depth,"length","ft"),r.length>0)if("bit"===r[0].family){r[0].c_length=r[0].length||0;for(var i=1;i<r.length;i+=1)r[i].c_length=parseFloat(r[i-1].c_length)+parseFloat(r[i].length||0)}else{var o=r.length-1;r[o].c_length=r[o].length||0;for(var n=o-1;n>=0;n-=1)r[n].c_length=parseFloat(r[n+1].c_length)+parseFloat(r[n].length||0)}for(var a=0;a<r.length;a+=1){var s=r[a];if(s.inner_diameter=b(s.inner_diameter,"shortLength","in"),s.outer_diameter=b(s.outer_diameter,"shortLength","in",4),s.linear_weight=b(s.linear_weight,"massPerLength","lb-ft"),s.weight=b(s.weight,"mass","lb"),s.length=b(s.length,"length","ft"),s.component_length=b(s.component_length,"length","ft"),s.outer_diameter_tooljoint=b(s.outer_diameter_tooljoint,"shortLength","in"),s.inner_diameter_tooljoint=b(s.inner_diameter_tooljoint,"shortLength","in"),s.length_tooljoint=b(s.length_tooljoint,"length","ft"),s.c_length=b(s.c_length,"length","ft"),s.gamma_sensor_to_bit_distance=b(s.gamma_sensor_to_bit_distance,"length","ft"),"bit"===s.family||"ur"===s.family){var l=b(1,"shortLength","in");if(s.size=b(s.size,"shortLength","in"),s.nozzle_sizes&&s.nozzle_sizes.length>0)for(var _=0;_<s.nozzle_sizes.length;_+=1){var h=s.nozzle_sizes[_];h.size=1!==l?b(h.size,"shortLength","in")/32:h.size}s.tfa=1!==l?s.tfa*(l*l):s.tfa}if("pdm"===s.family){if(s.max_weight_on_bit=b(s.max_weight_on_bit,"force","klbf"),s.min_standard_flowrate=b(s.min_standard_flowrate,"volumeFlowRate","gal/min"),s.max_standard_flowrate=b(s.max_standard_flowrate,"volumeFlowRate","gal/min"),s.max_operating_differential_pressure=b(s.max_operating_differential_pressure,"pressure","psi"),s.torque_at_max_operating_differential_pressure=b(s.torque_at_max_operating_differential_pressure,"torque","ft-klbf",3),s.off_bottom_pressure_loss&&s.off_bottom_pressure_loss.length>0)for(var g=0;g<s.off_bottom_pressure_loss.length;g+=1){var c=s.off_bottom_pressure_loss[g];c.flow_rate=b(c.flow_rate,"volumeFlowRate","gal/min"),c.pressure_loss=b(c.pressure_loss,"pressure","psi")}s.rpg=b(s.rpg,"revolutionPerVolume","rpg"),s.has_stabilizer&&s.stabilizer&&(s.stabilizer.inner_diameter=b(s.stabilizer.inner_diameter,"shortLength","in"),s.stabilizer.outer_diameter=b(s.stabilizer.outer_diameter,"shortLength","in"),s.stabilizer.linear_weight=b(s.stabilizer.linear_weight,"massPerLength","lb-ft"),s.stabilizer.weight=b(s.stabilizer.weight,"mass","lb"),s.stabilizer.length=b(s.stabilizer.length,"length","ft"),s.stabilizer.gauge_od=b(s.stabilizer.gauge_od,"shortLength","in"),s.stabilizer.gauge_length=b(s.stabilizer.gauge_length,"shortLength","in"),s.stabilizer.blade_width=b(s.stabilizer.blade_width,"shortLength","in"),s.stabilizer.stab_centerpoint_to_bit=b(s.stabilizer.stab_centerpoint_to_bit,"length","ft"))}if("stabilizer"!==s.family&&"ags"!==s.family||(s.gauge_od=b(s.gauge_od,"shortLength","in"),s.gauge_length=b(s.gauge_length,"shortLength","in"),s.blade_width=b(s.blade_width,"shortLength","in")),("mwd"===s.family||"rss"===s.family||"agitator"===s.family)&&s.pressure_loss&&s.pressure_loss.length>0)for(var m=0;m<s.pressure_loss.length;m+=1){var f=s.pressure_loss[m];f.flow_rate=b(f.flow_rate,"volumeFlowRate","gal/min"),f.pressure_loss=b(f.pressure_loss,"pressure","psi")}}return d(d({},e),{},{data:t})},exports.ctoi=f,exports.ctop=b,exports.isValidLinearWeight=m,exports.isValidNumber=c,exports.sValueEmpty=function(e){return null==e||""===e},exports.validate=function(e){var t=e.data,r=t.id,i=t.start_timestamp_str,o=t.start_depth,a=t.components,s=n.getUnitDisplay("shortLength"),l=n.getUnitDisplay("length"),_={general:{},components:{},specificErrors:{}},u=a.filter((function(e){return"bit"===e.family})),g=u.length>0?u[0].size:null,d=a.filter((function(e){return"mwd"===e.family&&e.has_gamma_sensor})),f=!1;if(isValueEmpty(r)&&(_.id="It should not be empty.",f=!0),i&&!h.default(new Date(i)).isValid()&&(f=!0,_.start_timestamp="Invalid Date."),Number.isFinite(o)){var p=n.convertValue(0,"length","ft"),v=n.convertValue(55e3,"length","ft"),z=n.convertValue(1,"length","ft");(o<=p||o>v)&&(f=!0,_.start_depth="Should be a positive number ".concat(p.toFixed(2),"~").concat(v.toFixed(2)," (").concat(l,")")),o===z&&(f=!0,_.start_depth="Should not be equal to ".concat(z," (").concat(l,")"))}else f=!0,_.start_depth="It should not be empty.";for(var w=0;w<a.length;w+=1){var V=void 0,y=void 0,L=void 0,x=void 0,F=void 0,j=void 0,I=void 0,O=void 0,q=void 0,E=void 0,P=void 0,D=void 0,k=void 0,N=void 0,R=void 0,S=a[w],T={};switch(S.family){case"ct":V=n.convertValue(0,"shortLength","in"),L=n.convertValue(100,"shortLength","in"),y=n.convertValue(1,"shortLength","in"),x=n.convertValue(100,"shortLength","in"),N=n.convertValue(0,"shortLength","in"),R=n.convertValue(500,"shortLength","in"),I=n.convertValue(0,"length","ft");break;case"dp":case"hwdp":V=n.convertValue(1,"shortLength","in"),L=n.convertValue(7,"shortLength","in"),y=n.convertValue(2,"shortLength","in"),x=n.convertValue(8,"shortLength","in"),O=n.convertValue(1,"shortLength","in"),q=n.convertValue(7,"shortLength","in"),E=n.convertValue(2,"shortLength","in"),P=n.convertValue(10,"shortLength","in"),I=n.convertValue(0,"length","ft");break;case"dc":V=n.convertValue(.5,"shortLength","in"),L=n.convertValue(7,"shortLength","in"),y=n.convertValue(2,"shortLength","in"),x=n.convertValue(13,"shortLength","in"),I=n.convertValue(0,"length","ft");break;case"stabilizer":case"ags":default:V=n.convertValue(0,"shortLength","in"),L=n.convertValue(100,"shortLength","in"),y=n.convertValue(1,"shortLength","in"),x=n.convertValue(100,"shortLength","in"),I=n.convertValue(0,"length","ft");break;case"pdm":y=n.convertValue(2,"shortLength","in"),x=n.convertValue(15,"shortLength","in"),V=n.convertValue(0,"shortLength","in"),L=n.convertValue(12,"shortLength","in"),I=n.convertValue(4,"length","ft"),k=0;break;case"mwd":case"agitator":case"rss":y=n.convertValue(2,"shortLength","in"),x=n.convertValue(13,"shortLength","in"),V=n.convertValue(0,"shortLength","in"),L=n.convertValue(12,"shortLength","in"),I=n.convertValue(1,"length","ft"),D=0;break;case"ur":V=n.convertValue(0,"shortLength","in"),L=n.convertValue(50,"shortLength","in"),y=n.convertValue(1,"shortLength","in"),x=n.convertValue(50,"shortLength","in"),F=n.convertValue(1,"shortLength","in"),j=n.convertValue(50,"shortLength","in");case"bit":}if(isValueEmpty(V)||isValueEmpty(y)||(c(S.inner_diameter,V,L)||(T.inner_diameter="".concat(V.toFixed(1),"~").concat(L.toFixed(1)," (").concat(s,")"),f=!0),c(S.outer_diameter,y,x)||(T.outer_diameter="".concat(y.toFixed(1),"~").concat(x.toFixed(1)," (").concat(s,")"),f=!0),c(S.inner_diameter,V,L)&&c(S.outer_diameter,y,x)&&!c(S.inner_diameter,V,S.outer_diameter)&&(T.outer_diameter="O.D > I.D",f=!0),!T.outer_diameter&&g&&+S.outer_diameter+n.convertValue(.1,"shortLength","in")>g&&(T.outer_diameter=" O.D + 0.1 < Bit Size",f=!0),c(S.linear_weight,0)||(T.linear_weight="Invalid value",f=!0),"dp"!==S.family&&"hwdp"!==S.family&&"dc"!==S.family&&"ct"!==S.family&&"ur"!==S.family||T.inner_diameter||T.outer_diameter||T.linear_weight||m(S.inner_diameter,S.outer_diameter,S.linear_weight)||(T.linear_weight="Invalid range",f=!0)),"ur"===S.family&&(c(S.ur_opened_od,F,j)?S.ur_opened_od<g&&(T.ur_opened_od="Max O.D (Opened) >= Bit Size",f=!0):(T.ur_opened_od="".concat(F.toFixed(1),"~").concat(j.toFixed(1)," (").concat(s,")"),f=!0)),isValueEmpty(O)||isValueEmpty(E)||(c(S.inner_diameter_tooljoint,O,q)||(T.inner_diameter_tooljoint="".concat(O.toFixed(1),"~").concat(q.toFixed(1)," (").concat(s,")"),f=!0),c(S.outer_diameter_tooljoint,E,P)||(T.outer_diameter_tooljoint="".concat(E.toFixed(1),"~").concat(P.toFixed(1)," (").concat(s,")"),f=!0),c(S.outer_diameter_tooljoint,S.outer_diameter,P)||(T.outer_diameter_tooljoint="Tool Joint O.D >= O.D",f=!0)),isValueEmpty(I)||c(S.length,I)||(T.length="Invalid value",f=!0),isValueEmpty(S.length_tooljoint)||isValueEmpty(S.component_length)||+S.length_tooljoint>+S.component_length&&(T.length_tooljoint="Tool Joint Length < Component Length",f=!0),S.off_bottom_pressure_loss&&S.off_bottom_pressure_loss.length>0){T.off_bottom_pressure_loss={};for(var B=0;B<S.off_bottom_pressure_loss.length;B+=1){var U=S.off_bottom_pressure_loss[B];T.off_bottom_pressure_loss[B]={},isValueEmpty(U.flow_rate)&&(T.off_bottom_pressure_loss[B].flow_rate="flow rate is required.",f=!0),isValueEmpty(U.pressure_loss)&&(T.off_bottom_pressure_loss[B].pressure_loss="pressure loss is required.",f=!0),isValueEmpty(k)||c(U.pressure_loss,k,null,{isMinInclusive:!1})||(T.off_bottom_pressure_loss[B].pressure_loss="Invalid range",f=!0)}}if(S.pressure_loss&&S.pressure_loss.length>0){T.pressure_loss={};for(var M=0;M<S.pressure_loss.length;M+=1){var C=S.pressure_loss[M];T.pressure_loss[M]={},isValueEmpty(C.flow_rate)&&(T.pressure_loss[M].flow_rate="flow rate is required.",f=!0),isValueEmpty(C.pressure_loss)&&(T.pressure_loss[M].pressure_loss="pressure loss is required.",f=!0),isValueEmpty(D)||c(C.pressure_loss,D,null,{isMinInclusive:!1})||(T.pressure_loss[M].pressure_loss="Invalid range",f=!0)}}if(S.has_stabilizer&&S.stabilizer){var J=n.convertValue(0,"shortLength","in"),A=n.convertValue(100,"shortLength","in"),W=n.convertValue(1,"shortLength","in"),G=n.convertValue(100,"shortLength","in"),H=n.convertValue(0,"length","ft");c(S.stabilizer.inner_diameter,J,A)&&c(S.stabilizer.outer_diameter,W,G)&&!c(S.stabilizer.inner_diameter,V,S.stabilizer.outer_diameter)&&(T.stabilizer_outer_diameter="O.D > I.D",f=!0),c(S.stabilizer.inner_diameter,J,A)||(T.stabilizer_inner_diameter="".concat(J.toFixed(1),"~").concat(A.toFixed(1)," (").concat(s,")"),f=!0),c(S.stabilizer.outer_diameter,W,G)||(T.stabilizer_outer_diameter="".concat(W.toFixed(1),"~").concat(G.toFixed(1)," (").concat(s,")"),f=!0),isValueEmpty(H)||c(S.stabilizer.length,H)||(T.stabilizer_length="Invalid value",f=!0),isValueEmpty(S.stabilizer.linear_weight)&&(T.stabilizer_linear_weight="Invalid value",f=!0),!T.stabilizer_outer_diameter&&g&&+S.stabilizer.outer_diameter+n.convertValue(.1,"shortLength","in")>g&&(T.stabilizer_outer_diameter=" O.D + 0.1 < Bit Size",f=!0)}if("ct"===S.family&&(c(S.reel_diameter,N,R)||(T.reel_diameter="".concat(N.toFixed(1),"~").concat(R.toFixed(1)," (").concat(s,")"),f=!0)),"bit"===S.family){var K=b(1,"shortLength","in"),Q=K*K*0,X=K*K*20;c(S.tfa,Q,X)||(T.tfa="TFA must be ".concat(Q.toFixed(2),"~").concat(20..toFixed(2)),f=!0)}if("rss"===S.family&&(c(S.flow_loss_percentage,0,10)||(T.flow_loss_percentage="It must be ".concat(0,"~").concat(10),f=!0)),"mwd"===S.family&&(d.length>1?(T.gamma_sensor_to_bit_distance="Only 1 gamma sensor allowed. Currently ".concat(d.length),f=!0):S.has_gamma_sensor&&!Number.isFinite(S.gamma_sensor_to_bit_distance)&&(T.gamma_sensor_to_bit_distance="This field is required.",f=!0),S.has_survey_sensor&&!Number.isFinite(S.bit_to_survey_distance)?(T.bit_to_survey_distance="This field is required.",f=!0):S.has_survey_sensor&&S.bit_to_survey_distance<=0?(T.bit_to_survey_distance="Should be a positive number.",f=!0):S.has_survey_sensor&&S.bit_to_survey_distance>150&&(T.bit_to_survey_distance="Should be less then 150.",f=!0),S.has_directional_sensor&&!Number.isFinite(S.directional_sensor_to_bit_distance)?(T.directional_sensor_to_bit_distance="This field is required.",f=!0):S.has_directional_sensor&&S.directional_sensor_to_bit_distance<=0?(T.directional_sensor_to_bit_distance="Should be a positive number.",f=!0):S.has_directional_sensor&&S.directional_sensor_to_bit_distance>150&&(T.directional_sensor_to_bit_distance="Should be less then 150.",f=!0)),"pdm"===S.family){var Y=void 0,Z=void 0;c(S.number_rotor_lobes,1,10)||(T.number_rotor_lobes="It must be ".concat(1,"~").concat(10),f=!0),c(S.number_stator_lobes,2,10)||(T.number_stator_lobes="It must be ".concat(2,"~").concat(10),f=!0),c(S.rpg,0,10)||(T.rpg="It must be ".concat(0,"~").concat(10),f=!0),Y=n.convertValue(0,"force","klbf"),Z=n.convertValue(200,"force","klbf"),isValueEmpty(S.max_weight_on_bit)||c(S.max_weight_on_bit,Y,Z)||(T.max_weight_on_bit="It must be ".concat(Z.toFixed(2),"~").concat(Z.toFixed(2)),f=!0),Y=n.convertValue(0,"volumeFlowRate","gal/min"),Z=n.convertValue(2500,"volumeFlowRate","gal/min"),c(S.min_standard_flowrate,Y,Z)||(T.min_standard_flowrate="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),f=!0),c(S.max_standard_flowrate,Y,Z)||(T.max_standard_flowrate="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),f=!0),Y=n.convertValue(0,"pressure","psi"),Z=n.convertValue(3e3,"pressure","psi"),c(S.max_operating_differential_pressure,Y,Z)||(T.max_operating_differential_pressure="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),f=!0),Y=n.convertValue(0,"torque","ft-klbf"),Z=n.convertValue(40,"torque","ft-klbf"),c(S.torque_at_max_operating_differential_pressure,Y,Z)||(T.torque_at_max_operating_differential_pressure="It must be ".concat(Y.toFixed(2),"~").concat(Z.toFixed(2)),f=!0),c(S.flow_loss_percentage,0,20)||(T.flow_loss_percentage="It must be ".concat(0,"~").concat(20),f=!0)}_.components[S.id]=T}return 1!==u.length&&(_.general.bit_count='Number of "BIT" components is invalid.',f=!0),1===u.length&&"bit"!==a[a.length-1].family&&"bit"!==a[0].family&&(_.general.bit_position='"BIT" category should be on the bottom of the list.',f=!0),f?_:null};
2
2
  //# sourceMappingURL=DrillstringUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DrillstringUtils.js","sources":["../../../src/utils/DrillstringUtils.js"],"sourcesContent":["/************ deprecated DO NOT USE IT ************************/\n/************ new version in drillstring folder */\n/* eslint-disable camelcase */\nimport set from 'lodash/set';\nimport get from 'lodash/get';\nimport moment from 'moment';\n\nimport { getUnitPreference, convertValue, getUnitDisplay } from './convert';\n\nconst ALLOWED_DIFF_OD_BIT_SIZE = 0.1;\n\nconst DEF_MIN_ID = 0;\nconst DEF_MAX_ID = 100;\nconst DEF_MIN_OD = 1;\nconst DEF_MAX_OD = 100;\nconst DEF_MIN_LENGTH = 0;\n\nconst UR_MIN_ID = 0;\nconst UR_MAX_ID = 50;\nconst UR_MIN_BODY_OD = 1;\nconst UR_MAX_BODY_OD = 50;\nconst UR_MIN_OPENED_OD = 1;\nconst UR_MAX_OPENED_OD = 50;\n\nconst CT_MIN_ID = 0;\nconst CT_MAX_ID = 100;\nconst CT_MIN_OD = 1;\nconst CT_MAX_OD = 100;\nconst CT_MIN_RD = 0;\nconst CT_MAX_RD = 500;\nconst CT_MIN_LENGTH = 0;\n\nconst DP_MIN_ID = 1;\nconst DP_MAX_ID = 7;\nconst DP_MIN_OD = 2;\nconst DP_MAX_OD = 8;\nconst DP_MIN_TJ_ID = 1;\nconst DP_MAX_TJ_ID = 7;\nconst DP_MIN_TJ_OD = 2;\nconst DP_MAX_TJ_OD = 10;\nconst DP_MIN_LENGTH = 0;\n\nconst HWDP_MIN_ID = 1;\nconst HWDP_MAX_ID = 7;\nconst HWDP_MIN_OD = 2;\nconst HWDP_MAX_OD = 8;\nconst HWDP_MIN_TJ_ID = 1;\nconst HWDP_MAX_TJ_ID = 7;\nconst HWDP_MIN_TJ_OD = 2;\nconst HWDP_MAX_TJ_OD = 10;\nconst HWDP_MIN_LENGTH = 0;\n\nconst DC_MIN_ID = 0.5;\nconst DC_MAX_ID = 7;\nconst DC_MIN_OD = 2;\nconst DC_MAX_OD = 13;\nconst DC_MIN_LENGTH = 0;\n\nconst STABLE_MIN_ID = 0;\nconst STABLE_MAX_ID = 100;\nconst STABLE_MIN_OD = 1;\nconst STABLE_MAX_OD = 100;\nconst STABLE_MIN_LENGTH = 0;\n\nconst PDM_MIN_OD = 2;\nconst PDM_MAX_OD = 15;\nconst PDM_MIN_ID = 0;\nconst PDM_MAX_ID = 12;\nconst PDM_MIN_LENGTH = 4;\n\nconst PDM_MIN_STATOR = 2;\nconst PDM_MAX_STATOR = 10;\nconst PDM_MIN_ROTOR = 1;\nconst PDM_MAX_ROTOR = 10;\nconst PDM_MIN_RPG = 0;\nconst PDM_MAX_RPG = 10;\nconst PDM_MIN_WOB = 0;\nconst PDM_MAX_WOB = 200;\nconst PDM_MIN_FLOW_RANGE = 0;\nconst PDM_MAX_FLOW_RANGE = 2500;\nconst PDM_MIN_MODP = 0;\nconst PDM_MAX_MODP = 3000;\nconst PDM_MIN_TMODP = 0;\nconst PDM_MAX_TMODP = 40;\nconst PDM_MIN_FLOW_LOSS = 0;\nconst PDM_MAX_FLOW_LOSS = 20;\nconst PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS = 0;\n\nconst MWD_MIN_ID = 0;\nconst MWD_MAX_ID = 12;\nconst MWD_MIN_OD = 2;\nconst MWD_MAX_OD = 13;\nconst MWD_MIN_LENGTH = 1.0;\nconst MWD_MIN_PRESSURE_LOSS = 0;\n\nconst RSS_MIN_ID = 0;\nconst RSS_MAX_ID = 12;\nconst RSS_MIN_OD = 2;\nconst RSS_MAX_OD = 13;\nconst RSS_MIN_LENGTH = 1.0;\nconst RSS_MIN_FLOW_LOSS = 0;\nconst RSS_MAX_FLOW_LOSS = 10;\nconst RSS_MIN_PRESSURE_LOSS = 0;\n\nconst AGITATOR_MIN_ID = 0;\nconst AGITATOR_MAX_ID = 12;\nconst AGITATOR_MIN_OD = 2;\nconst AGITATOR_MAX_OD = 13;\nconst AGITATOR_MIN_LENGTH = 1.0;\nconst AGITATOR_MIN_PRESSURE_LOSS = 0;\n\nconst BIT_MIN_TFA = 0;\nconst BIT_MAX_TFA = 20;\n\nconst DEPTH_IN_HOLE_MIN = 0;\nconst DEPTH_IN_HOLE_MAX = 55000;\nconst DEPTH_IN_HOLE_PROHIBITED = 1;\n\nexport function sValueEmpty(val) {\n return val === null || typeof val === 'undefined' || val === '';\n}\n\nexport function isValidNumber(num, min, max, { isMinInclusive = true } = {}) {\n const parsedNum = parseFloat(num);\n if (Number.isNaN(parsedNum)) {\n return false;\n }\n if ((isMinInclusive && parsedNum < min) || (!isMinInclusive && parsedNum <= min)) {\n return false;\n }\n\n if (max && parsedNum > max) {\n return false;\n }\n\n return true;\n}\n\nexport function isValidLinearWeight(id, od, linearWeight) {\n const prefShortLengthUnit = getUnitPreference('shortLength');\n let convertedId = id;\n let convertedOd = od;\n if (prefShortLengthUnit !== 'in') {\n convertedId = convertValue(id, 'shortLength', prefShortLengthUnit, 'in');\n convertedOd = convertValue(od, 'shortLength', prefShortLengthUnit, 'in');\n }\n\n const estimation = 2.673 * (convertedOd * convertedOd - convertedId * convertedId);\n\n const convertedEstimation =\n prefShortLengthUnit !== 'in' ? convertValue(estimation, 'massPerLength', 'lb-ft') : estimation;\n\n return linearWeight >= convertedEstimation * 0.5 && linearWeight <= convertedEstimation * 1.5;\n}\n\nexport function validate(recordData) {\n const {\n data: { id, start_timestamp_str, start_depth, components },\n } = recordData.toJS();\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n const lengthUnitDisplay = getUnitDisplay('length');\n const errors = {\n general: {},\n components: {},\n specificErrors: {},\n };\n const bitComponents = components.filter(comp => comp.family === 'bit');\n const bitSize = bitComponents.length > 0 ? bitComponents[0].size : null;\n const mwdHavingGamma = components.filter(comp => comp.family === 'mwd' && comp.has_gamma_sensor);\n let hasFormErrors = false;\n\n if (isValueEmpty(id)) {\n errors.id = 'It should not be empty.';\n hasFormErrors = true;\n }\n\n if (start_timestamp_str && !moment(new Date(start_timestamp_str)).isValid()) {\n hasFormErrors = true;\n errors.start_timestamp = 'Invalid Date.';\n }\n\n if (Number.isFinite(start_depth)) {\n const minDepth = convertValue(DEPTH_IN_HOLE_MIN, 'length', 'ft');\n const maxDepth = convertValue(DEPTH_IN_HOLE_MAX, 'length', 'ft');\n const prohibitedDepth = convertValue(DEPTH_IN_HOLE_PROHIBITED, 'length', 'ft');\n if (start_depth <= minDepth || start_depth > maxDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should be a positive number ${minDepth.toFixed(2)}~${maxDepth.toFixed(\n 2\n )} (${lengthUnitDisplay})`;\n }\n if (start_depth === prohibitedDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should not be equal to ${prohibitedDepth} (${lengthUnitDisplay})`;\n }\n } else {\n hasFormErrors = true;\n errors.start_depth = 'It should not be empty.';\n }\n\n for (let i = 0; i < components.length; i += 1) {\n let min_id;\n let min_od;\n let max_id;\n let max_od;\n let min_opened_od;\n let max_opened_od;\n let min_length;\n let min_tj_id;\n let max_tj_id;\n let min_tj_od;\n let max_tj_od;\n let min_pressure_loss;\n let min_off_bottom_pressure_loss;\n let min_rd;\n let max_rd;\n\n const comp = components[i];\n const error = {};\n switch (comp.family) {\n case 'ct':\n min_id = convertValue(CT_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(CT_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(CT_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(CT_MAX_OD, 'shortLength', 'in');\n min_rd = convertValue(CT_MIN_RD, 'shortLength', 'in');\n max_rd = convertValue(CT_MAX_RD, 'shortLength', 'in');\n min_length = convertValue(CT_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dp':\n min_id = convertValue(DP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(DP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(DP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(DP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(DP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(DP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'hwdp':\n min_id = convertValue(HWDP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(HWDP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(HWDP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(HWDP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(HWDP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(HWDP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(HWDP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(HWDP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(HWDP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dc':\n min_id = convertValue(DC_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DC_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DC_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DC_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DC_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'stabilizer':\n case 'ags':\n min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'pdm':\n min_od = convertValue(PDM_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(PDM_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(PDM_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(PDM_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(PDM_MIN_LENGTH, 'length', 'ft');\n min_off_bottom_pressure_loss = PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS;\n break;\n\n case 'mwd':\n min_od = convertValue(MWD_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(MWD_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(MWD_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(MWD_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(MWD_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = MWD_MIN_PRESSURE_LOSS;\n break;\n\n case 'agitator':\n min_od = convertValue(AGITATOR_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(AGITATOR_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(AGITATOR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(AGITATOR_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(AGITATOR_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = AGITATOR_MIN_PRESSURE_LOSS;\n break;\n\n case 'rss':\n min_od = convertValue(RSS_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(RSS_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(RSS_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(RSS_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(RSS_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = RSS_MIN_PRESSURE_LOSS;\n break;\n\n case 'ur':\n min_id = convertValue(UR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(UR_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(UR_MIN_BODY_OD, 'shortLength', 'in');\n max_od = convertValue(UR_MAX_BODY_OD, 'shortLength', 'in');\n min_opened_od = convertValue(UR_MIN_OPENED_OD, 'shortLength', 'in');\n max_opened_od = convertValue(UR_MAX_OPENED_OD, 'shortLength', 'in');\n break;\n\n case 'bit':\n break;\n\n default:\n min_id = convertValue(DEF_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DEF_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DEF_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DEF_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DEF_MIN_LENGTH, 'length', 'ft');\n break;\n }\n\n if (!isValueEmpty(min_id) && !isValueEmpty(min_od)) {\n if (!isValidNumber(comp.inner_diameter, min_id, max_id)) {\n error.inner_diameter = `${min_id.toFixed(1)}~${max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter, min_od, max_od)) {\n error.outer_diameter = `${min_od.toFixed(1)}~${max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (\n isValidNumber(comp.inner_diameter, min_id, max_id) &&\n isValidNumber(comp.outer_diameter, min_od, max_od) &&\n !isValidNumber(comp.inner_diameter, min_id, comp.outer_diameter)\n ) {\n error.outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!error.outer_diameter && bitSize) {\n if (\n +comp.outer_diameter + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n\n // only check validity of linear weight when family is not bit\n if (!isValidNumber(comp.linear_weight, 0)) {\n error.linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n\n if (\n comp.family === 'dp' ||\n comp.family === 'hwdp' ||\n comp.family === 'dc' ||\n comp.family === 'ct' ||\n comp.family === 'ur'\n ) {\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (!isValidLinearWeight(comp.inner_diameter, comp.outer_diameter, comp.linear_weight)) {\n error.linear_weight = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n }\n if (comp.family === 'ur') {\n if (!isValidNumber(comp.ur_opened_od, min_opened_od, max_opened_od)) {\n error.ur_opened_od = `${min_opened_od.toFixed(1)}~${max_opened_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n } else if (comp.ur_opened_od < bitSize) {\n error.ur_opened_od = 'Max O.D (Opened) >= Bit Size';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_tj_id) && !isValueEmpty(min_tj_od)) {\n if (!isValidNumber(comp.inner_diameter_tooljoint, min_tj_id, max_tj_id)) {\n error.inner_diameter_tooljoint = `${min_tj_id.toFixed(1)}~${max_tj_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, min_tj_od, max_tj_od)) {\n error.outer_diameter_tooljoint = `${min_tj_od.toFixed(1)}~${max_tj_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, comp.outer_diameter, max_tj_od)) {\n error.outer_diameter_tooljoint = 'Tool Joint O.D >= O.D';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_length)) {\n if (!isValidNumber(comp.length, min_length)) {\n error.length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(comp.length_tooljoint) && !isValueEmpty(comp.component_length)) {\n if (+comp.length_tooljoint > +comp.component_length) {\n error.length_tooljoint = 'Tool Joint Length < Component Length';\n hasFormErrors = true;\n }\n }\n\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n error.off_bottom_pressure_loss = {};\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const obpsItem = comp.off_bottom_pressure_loss[j];\n error.off_bottom_pressure_loss[j] = {};\n if (isValueEmpty(obpsItem.flow_rate)) {\n error.off_bottom_pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(obpsItem.pressure_loss)) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_off_bottom_pressure_loss) &&\n !isValidNumber(obpsItem.pressure_loss, min_off_bottom_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n error.pressure_loss = {};\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const pressureLossItem = comp.pressure_loss[j];\n error.pressure_loss[j] = {};\n if (isValueEmpty(pressureLossItem.flow_rate)) {\n error.pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(pressureLossItem.pressure_loss)) {\n error.pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_pressure_loss) &&\n !isValidNumber(pressureLossItem.pressure_loss, min_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.has_stabilizer && comp.stabilizer) {\n const stab_min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n const stab_max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n const stab_min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n const stab_max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n const stab_min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n\n if (\n isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id) &&\n isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od) &&\n !isValidNumber(comp.stabilizer.inner_diameter, min_id, comp.stabilizer.outer_diameter)\n ) {\n error.stabilizer_outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id)) {\n error.stabilizer_inner_diameter = `${stab_min_id.toFixed(1)}~${stab_max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od)) {\n error.stabilizer_outer_diameter = `${stab_min_od.toFixed(1)}~${stab_max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValueEmpty(stab_min_length)) {\n if (!isValidNumber(comp.stabilizer.length, stab_min_length)) {\n error.stabilizer_length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n if (isValueEmpty(comp.stabilizer.linear_weight)) {\n error.stabilizer_linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n if (!error.stabilizer_outer_diameter && bitSize) {\n if (\n +comp.stabilizer.outer_diameter +\n convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.stabilizer_outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n }\n\n // specificErrors\n if (comp.family === 'ct') {\n if (!isValidNumber(comp.reel_diameter, min_rd, max_rd)) {\n error.reel_diameter = `${min_rd.toFixed(1)}~${max_rd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'bit') {\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n if (!isValidNumber(comp.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'rss') {\n if (!isValidNumber(comp.flow_loss_percentage, RSS_MIN_FLOW_LOSS, RSS_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${RSS_MIN_FLOW_LOSS}~${RSS_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'mwd') {\n if (mwdHavingGamma.length > 1) {\n error.gamma_sensor_to_bit_distance = `Only 1 gamma sensor allowed. Currently ${mwdHavingGamma.length}`;\n hasFormErrors = true;\n } else if (comp.has_gamma_sensor && !Number.isFinite(comp.gamma_sensor_to_bit_distance)) {\n error.gamma_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n }\n\n if (comp.has_survey_sensor && !Number.isFinite(comp.bit_to_survey_distance)) {\n error.bit_to_survey_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance <= 0) {\n error.bit_to_survey_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance > 150) {\n error.bit_to_survey_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n\n if (\n comp.has_directional_sensor &&\n !Number.isFinite(comp.directional_sensor_to_bit_distance)\n ) {\n error.directional_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance <= 0) {\n error.directional_sensor_to_bit_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance > 150) {\n error.directional_sensor_to_bit_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'pdm') {\n let pdmFieldUnitLower;\n let pdmFieldUnitUpper;\n\n if (!isValidNumber(comp.number_rotor_lobes, PDM_MIN_ROTOR, PDM_MAX_ROTOR)) {\n error.number_rotor_lobes = `It must be ${PDM_MIN_ROTOR}~${PDM_MAX_ROTOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.number_stator_lobes, PDM_MIN_STATOR, PDM_MAX_STATOR)) {\n error.number_stator_lobes = `It must be ${PDM_MIN_STATOR}~${PDM_MAX_STATOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.rpg, PDM_MIN_RPG, PDM_MAX_RPG)) {\n error.rpg = `It must be ${PDM_MIN_RPG}~${PDM_MAX_RPG}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_WOB, 'force', 'klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_WOB, 'force', 'klbf');\n if (\n !isValueEmpty(comp.max_weight_on_bit) &&\n !isValidNumber(comp.max_weight_on_bit, pdmFieldUnitLower, pdmFieldUnitUpper)\n ) {\n error.max_weight_on_bit = `It must be ${pdmFieldUnitUpper.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n pdmFieldUnitUpper = convertValue(PDM_MAX_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n if (!isValidNumber(comp.min_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.min_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.max_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.max_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_MODP, 'pressure', 'psi');\n pdmFieldUnitUpper = convertValue(PDM_MAX_MODP, 'pressure', 'psi');\n if (\n !isValidNumber(\n comp.max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_TMODP, 'torque', 'ft-klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_TMODP, 'torque', 'ft-klbf');\n if (\n !isValidNumber(\n comp.torque_at_max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.torque_at_max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.flow_loss_percentage, PDM_MIN_FLOW_LOSS, PDM_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${PDM_MIN_FLOW_LOSS}~${PDM_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n errors.components[comp.id] = error;\n }\n\n if (bitComponents.length !== 1) {\n errors.general.bit_count = 'Number of \"BIT\" components is invalid.';\n hasFormErrors = true;\n }\n\n if (\n bitComponents.length === 1 &&\n components[components.length - 1].family !== 'bit' &&\n components[0].family !== 'bit'\n ) {\n // bit should be top or bottom\n errors.general.bit_position = '\"BIT\" category should be on the bottom of the list.';\n hasFormErrors = true;\n }\n\n if (hasFormErrors) {\n return errors;\n }\n return null;\n}\n\nexport function convertRecordBackToImperialUnit(record) {\n // if bit is top, reverse the components;\n let components = get(record, ['data', 'components']);\n if (get(components, [0, 'family']) === 'bit') {\n components = components.reverse().map((comp, idx) => ({ ...comp, order: idx }));\n record = set(record, ['data', 'components'], components); // eslint-disable-line no-param-reassign\n }\n\n const { data } = record.toJS();\n const objStartTime = data.start_timestamp_str && moment(new Date(data.start_timestamp_str));\n if (objStartTime && objStartTime.isValid()) {\n data.start_timestamp = objStartTime.unix();\n }\n delete data.start_timestamp_str;\n\n data.start_depth = ctoi(data.start_depth, 'length', 'ft');\n data.components = data.components.map(component => {\n const cc = Object.assign({}, component);\n cc.inner_diameter = ctoi(cc.inner_diameter, 'shortLength', 'in');\n cc.outer_diameter = ctoi(cc.outer_diameter, 'shortLength', 'in', 4);\n cc.linear_weight = ctoi(cc.linear_weight, 'massPerLength', 'lb-ft');\n cc.weight = ctoi(cc.weight, 'mass', 'lb');\n cc.length = ctoi(cc.length, 'length', 'ft');\n cc.component_length = ctoi(cc.component_length, 'length', 'ft');\n cc.outer_diameter_tooljoint = ctoi(cc.outer_diameter_tooljoint, 'shortLength', 'in');\n cc.inner_diameter_tooljoint = ctoi(cc.inner_diameter_tooljoint, 'shortLength', 'in');\n cc.length_tooljoint = ctoi(cc.length_tooljoint, 'length', 'ft');\n\n if (cc.family === 'bit' || cc.family === 'ur') {\n const ratio = ctoi(1, 'shortLength', 'in');\n cc.size = ctoi(cc.size, 'shortLength', 'in', 3);\n if (cc.nozzle_sizes && cc.nozzle_sizes.length > 0) {\n for (let j = 0; j < cc.nozzle_sizes.length; j += 1) {\n const item = cc.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctoi(item.size, 'shortLength', 'in') * 32 : item.size;\n }\n }\n cc.tfa = ratio !== 1 ? cc.tfa * (ratio * ratio) : cc.tfa;\n }\n\n if (cc.family === 'pdm') {\n cc.max_weight_on_bit = ctoi(cc.max_weight_on_bit, 'force', 'klbf');\n cc.min_standard_flowrate = ctoi(cc.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_standard_flowrate = ctoi(cc.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_operating_differential_pressure = ctoi(\n cc.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n cc.torque_at_max_operating_differential_pressure = ctoi(\n cc.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n cc.rpg = ctoi(cc.rpg, 'revolutionPerVolume', 'rpg');\n\n if (cc.off_bottom_pressure_loss && cc.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < cc.off_bottom_pressure_loss.length; j += 1) {\n const item = cc.off_bottom_pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n if (!cc.has_stabilizer) {\n delete cc.stabilizer;\n }\n if (cc.stabilizer) {\n cc.stabilizer.inner_diameter =\n cc.stabilizer.inner_diameter && ctoi(cc.stabilizer.inner_diameter, 'shortLength', 'in');\n cc.stabilizer.outer_diameter =\n cc.stabilizer.outer_diameter && ctoi(cc.stabilizer.outer_diameter, 'shortLength', 'in');\n cc.stabilizer.linear_weight =\n cc.stabilizer.linear_weight &&\n ctoi(cc.stabilizer.linear_weight, 'massPerLength', 'lb-ft');\n cc.stabilizer.weight = cc.stabilizer.weight && ctoi(cc.stabilizer.weight, 'mass', 'lb');\n cc.stabilizer.length = cc.length && ctoi(cc.stabilizer.length, 'length', 'ft');\n cc.stabilizer.gauge_od =\n cc.stabilizer.gauge_od && ctoi(cc.stabilizer.gauge_od, 'shortLength', 'in');\n cc.stabilizer.gauge_length =\n cc.stabilizer.gauge_length && ctoi(cc.stabilizer.gauge_length, 'shortLength', 'in');\n cc.stabilizer.blade_width =\n cc.stabilizer.blade_width && ctoi(cc.stabilizer.blade_width, 'shortLength', 'in');\n cc.stabilizer.stab_centerpoint_to_bit =\n cc.stabilizer.stab_centerpoint_to_bit &&\n ctoi(cc.stabilizer.stab_centerpoint_to_bit, 'length', 'ft');\n }\n }\n\n if (cc.family === 'stabilizer' || cc.family === 'ags') {\n cc.gauge_od = ctoi(cc.gauge_od, 'shortLength', 'in');\n cc.gauge_length = ctoi(cc.gauge_length, 'shortLength', 'in');\n cc.blade_width = ctoi(cc.blade_width, 'shortLength', 'in');\n }\n\n if (cc.family === 'mwd' || cc.family === 'rss' || cc.family === 'agitator') {\n if (cc.pressure_loss && cc.pressure_loss.length > 0) {\n for (let j = 0; j < cc.pressure_loss.length; j += 1) {\n const item = cc.pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n\n if (cc.family !== 'bit') {\n delete cc.bit_type;\n }\n if (!cc.has_gamma_sensor && Number.isFinite(cc.gamma_sensor_to_bit_distance)) {\n delete cc.gamma_sensor_to_bit_distance;\n }\n if (!cc.has_survey_sensor && Number.isFinite(cc.bit_to_survey_distance)) {\n delete cc.bit_to_survey_distance;\n }\n if (!cc.has_directional_sensor && Number.isFinite(cc.directional_sensor_to_bit_distance)) {\n delete cc.directional_sensor_to_bit_distance;\n }\n delete cc.c_length;\n return cc;\n });\n\n return {\n ...record,\n data,\n };\n}\n\nexport function ctoi(val, unitType, unit, precision = 2) {\n if (val === null || typeof val === 'undefined') {\n return null;\n }\n if (!unitType || !unit) {\n return parseFloat(val);\n }\n return parseFloat(convertValue(val, unitType, getUnitPreference(unitType), unit, precision));\n}\n\nexport function convertRecordtoPrefUnit(record) {\n const { data } = record.toJS();\n const { components } = data;\n data.start_depth = ctop(data.start_depth, 'length', 'ft');\n\n if (components.length > 0) {\n if (components[0].family === 'bit') {\n components[0].c_length = components[0].length || 0;\n for (let i = 1; i < components.length; i += 1) {\n components[i].c_length =\n parseFloat(components[i - 1].c_length) + parseFloat(components[i].length || 0);\n }\n } else {\n const lastIndex = components.length - 1;\n components[lastIndex].c_length = components[lastIndex].length || 0;\n for (let i = lastIndex - 1; i >= 0; i -= 1) {\n components[i].c_length =\n parseFloat(components[i + 1].c_length) + parseFloat(components[i].length || 0);\n }\n }\n }\n\n for (let i = 0; i < components.length; i += 1) {\n const comp = components[i];\n comp.inner_diameter = ctop(comp.inner_diameter, 'shortLength', 'in');\n comp.outer_diameter = ctop(comp.outer_diameter, 'shortLength', 'in', 4);\n comp.linear_weight = ctop(comp.linear_weight, 'massPerLength', 'lb-ft');\n comp.weight = ctop(comp.weight, 'mass', 'lb');\n comp.length = ctop(comp.length, 'length', 'ft');\n comp.component_length = ctop(comp.component_length, 'length', 'ft');\n comp.outer_diameter_tooljoint = ctop(comp.outer_diameter_tooljoint, 'shortLength', 'in');\n comp.inner_diameter_tooljoint = ctop(comp.inner_diameter_tooljoint, 'shortLength', 'in');\n comp.length_tooljoint = ctop(comp.length_tooljoint, 'length', 'ft');\n\n comp.c_length = ctop(comp.c_length, 'length', 'ft');\n comp.gamma_sensor_to_bit_distance = ctop(comp.gamma_sensor_to_bit_distance, 'length', 'ft');\n\n if (comp.family === 'bit' || comp.family === 'ur') {\n const ratio = ctop(1, 'shortLength', 'in');\n comp.size = ctop(comp.size, 'shortLength', 'in');\n if (comp.nozzle_sizes && comp.nozzle_sizes.length > 0) {\n for (let j = 0; j < comp.nozzle_sizes.length; j += 1) {\n const item = comp.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctop(item.size, 'shortLength', 'in') / 32 : item.size;\n }\n }\n comp.tfa = ratio !== 1 ? comp.tfa * (ratio * ratio) : comp.tfa;\n }\n\n if (comp.family === 'pdm') {\n comp.max_weight_on_bit = ctop(comp.max_weight_on_bit, 'force', 'klbf');\n comp.min_standard_flowrate = ctop(comp.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_standard_flowrate = ctop(comp.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_operating_differential_pressure = ctop(\n comp.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n comp.torque_at_max_operating_differential_pressure = ctop(\n comp.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const item = comp.off_bottom_pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n comp.rpg = ctop(comp.rpg, 'revolutionPerVolume', 'rpg');\n if (comp.has_stabilizer && comp.stabilizer) {\n comp.stabilizer.inner_diameter = ctop(comp.stabilizer.inner_diameter, 'shortLength', 'in');\n comp.stabilizer.outer_diameter = ctop(comp.stabilizer.outer_diameter, 'shortLength', 'in');\n comp.stabilizer.linear_weight = ctop(\n comp.stabilizer.linear_weight,\n 'massPerLength',\n 'lb-ft'\n );\n comp.stabilizer.weight = ctop(comp.stabilizer.weight, 'mass', 'lb');\n comp.stabilizer.length = ctop(comp.stabilizer.length, 'length', 'ft');\n comp.stabilizer.gauge_od = ctop(comp.stabilizer.gauge_od, 'shortLength', 'in');\n comp.stabilizer.gauge_length = ctop(comp.stabilizer.gauge_length, 'shortLength', 'in');\n comp.stabilizer.blade_width = ctop(comp.stabilizer.blade_width, 'shortLength', 'in');\n comp.stabilizer.stab_centerpoint_to_bit = ctop(\n comp.stabilizer.stab_centerpoint_to_bit,\n 'length',\n 'ft'\n );\n }\n }\n\n if (comp.family === 'stabilizer' || comp.family === 'ags') {\n comp.gauge_od = ctop(comp.gauge_od, 'shortLength', 'in');\n comp.gauge_length = ctop(comp.gauge_length, 'shortLength', 'in');\n comp.blade_width = ctop(comp.blade_width, 'shortLength', 'in');\n }\n\n if (comp.family === 'mwd' || comp.family === 'rss' || comp.family === 'agitator') {\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const item = comp.pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n }\n return {\n ...record,\n data,\n };\n}\n\nexport function ctop(val, unitType, unit, precision = 2) {\n if (val !== 0 && !val) {\n return null;\n }\n return unitType && unit ? convertValue(val, unitType, unit, null, precision) : val;\n}\n"],"names":["isValidNumber","num","min","max","_ref","arguments","length","undefined","_ref$isMinInclusive","isMinInclusive","parsedNum","parseFloat","Number","isNaN","isValidLinearWeight","id","od","linearWeight","prefShortLengthUnit","getUnitPreference","convertedId","convertedOd","convertValue","estimation","convertedEstimation","ctoi","val","unitType","unit","precision","ctop","record","components","get","reverse","map","comp","idx","_objectSpread","order","set","data","toJS","objStartTime","start_timestamp_str","moment","Date","isValid","start_timestamp","unix","start_depth","component","cc","Object","assign","inner_diameter","outer_diameter","linear_weight","weight","component_length","outer_diameter_tooljoint","inner_diameter_tooljoint","length_tooljoint","family","ratio","size","nozzle_sizes","j","item","tfa","max_weight_on_bit","min_standard_flowrate","max_standard_flowrate","max_operating_differential_pressure","torque_at_max_operating_differential_pressure","rpg","off_bottom_pressure_loss","flow_rate","pressure_loss","has_stabilizer","stabilizer","gauge_od","gauge_length","blade_width","stab_centerpoint_to_bit","bit_type","has_gamma_sensor","isFinite","gamma_sensor_to_bit_distance","has_survey_sensor","bit_to_survey_distance","has_directional_sensor","directional_sensor_to_bit_distance","c_length","i","lastIndex","recordData","_recordData$toJS$data","shortLengthUnitDisplay","getUnitDisplay","lengthUnitDisplay","errors","general","specificErrors","bitComponents","filter","bitSize","mwdHavingGamma","hasFormErrors","isValueEmpty","minDepth","maxDepth","prohibitedDepth","concat","toFixed","min_id","min_od","max_id","max_od","min_opened_od","max_opened_od","min_length","min_tj_id","max_tj_id","min_tj_od","max_tj_od","min_pressure_loss","min_off_bottom_pressure_loss","min_rd","max_rd","error","ur_opened_od","obpsItem","pressureLossItem","stab_min_id","stab_max_id","stab_min_od","stab_max_od","stab_min_length","stabilizer_outer_diameter","stabilizer_inner_diameter","stabilizer_length","stabilizer_linear_weight","reel_diameter","lowerLimit","upperLimit","flow_loss_percentage","pdmFieldUnitLower","pdmFieldUnitUpper","number_rotor_lobes","number_stator_lobes","bit_count","b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BlC,QAAQ,IAC/BN,GAAgB,GAGlBuC,EAAoB7H,EAAAA,aA5jBJ,EA4jBgC,SAAU,WAC1D8H,EAAoB9H,EAAAA,aA5jBJ,GA4jBgC,SAAU,WAEvDtB,EACCoC,EAAKsC,8CACLyE,EACAC,KAGFlB,EAAMxD,8CAA6C,cAAAuC,OAAiBkC,EAAkBjC,QACpF,GACD,KAAAD,OAAImC,EAAkBlC,QAAQ,IAC/BN,GAAgB,GAGb5G,EAAcoC,EAAK8G,qBAzkBJ,EACA,MAykBlBhB,EAAMgB,qBAAoB,cAAAjC,OA1kBR,EA0kB0C,KAAAA,OAzkB1C,IA0kBlBL,GAAgB,EAEpB,CAEAP,EAAOrE,WAAWI,EAAKrB,IAAMmH,CAC/B,CAiBA,OAf6B,IAAzB1B,EAAclG,SAChB+F,EAAOC,QAAQiD,UAAY,yCAC3B3C,GAAgB,GAIS,IAAzBJ,EAAclG,QAC+B,QAA7C0B,EAAWA,EAAW1B,OAAS,GAAGyD,QACT,QAAzB/B,EAAW,GAAG+B,SAGdsC,EAAOC,QAAQkD,aAAe,sDAC9B5C,GAAgB,GAGdA,EACKP,EAEF,IACT"}
1
+ {"version":3,"file":"DrillstringUtils.js","sources":["../../../src/utils/DrillstringUtils.js"],"sourcesContent":["/************ deprecated DO NOT USE IT ************************/\n/************ new version in drillstring folder */\n/* eslint-disable camelcase */\nimport set from 'lodash/set';\nimport get from 'lodash/get';\nimport cloneDeep from 'lodash/cloneDeep';\nimport moment from 'moment';\n\nimport { getUnitPreference, convertValue, getUnitDisplay } from './convert';\n\nconst ALLOWED_DIFF_OD_BIT_SIZE = 0.1;\n\nconst DEF_MIN_ID = 0;\nconst DEF_MAX_ID = 100;\nconst DEF_MIN_OD = 1;\nconst DEF_MAX_OD = 100;\nconst DEF_MIN_LENGTH = 0;\n\nconst UR_MIN_ID = 0;\nconst UR_MAX_ID = 50;\nconst UR_MIN_BODY_OD = 1;\nconst UR_MAX_BODY_OD = 50;\nconst UR_MIN_OPENED_OD = 1;\nconst UR_MAX_OPENED_OD = 50;\n\nconst CT_MIN_ID = 0;\nconst CT_MAX_ID = 100;\nconst CT_MIN_OD = 1;\nconst CT_MAX_OD = 100;\nconst CT_MIN_RD = 0;\nconst CT_MAX_RD = 500;\nconst CT_MIN_LENGTH = 0;\n\nconst DP_MIN_ID = 1;\nconst DP_MAX_ID = 7;\nconst DP_MIN_OD = 2;\nconst DP_MAX_OD = 8;\nconst DP_MIN_TJ_ID = 1;\nconst DP_MAX_TJ_ID = 7;\nconst DP_MIN_TJ_OD = 2;\nconst DP_MAX_TJ_OD = 10;\nconst DP_MIN_LENGTH = 0;\n\nconst HWDP_MIN_ID = 1;\nconst HWDP_MAX_ID = 7;\nconst HWDP_MIN_OD = 2;\nconst HWDP_MAX_OD = 8;\nconst HWDP_MIN_TJ_ID = 1;\nconst HWDP_MAX_TJ_ID = 7;\nconst HWDP_MIN_TJ_OD = 2;\nconst HWDP_MAX_TJ_OD = 10;\nconst HWDP_MIN_LENGTH = 0;\n\nconst DC_MIN_ID = 0.5;\nconst DC_MAX_ID = 7;\nconst DC_MIN_OD = 2;\nconst DC_MAX_OD = 13;\nconst DC_MIN_LENGTH = 0;\n\nconst STABLE_MIN_ID = 0;\nconst STABLE_MAX_ID = 100;\nconst STABLE_MIN_OD = 1;\nconst STABLE_MAX_OD = 100;\nconst STABLE_MIN_LENGTH = 0;\n\nconst PDM_MIN_OD = 2;\nconst PDM_MAX_OD = 15;\nconst PDM_MIN_ID = 0;\nconst PDM_MAX_ID = 12;\nconst PDM_MIN_LENGTH = 4;\n\nconst PDM_MIN_STATOR = 2;\nconst PDM_MAX_STATOR = 10;\nconst PDM_MIN_ROTOR = 1;\nconst PDM_MAX_ROTOR = 10;\nconst PDM_MIN_RPG = 0;\nconst PDM_MAX_RPG = 10;\nconst PDM_MIN_WOB = 0;\nconst PDM_MAX_WOB = 200;\nconst PDM_MIN_FLOW_RANGE = 0;\nconst PDM_MAX_FLOW_RANGE = 2500;\nconst PDM_MIN_MODP = 0;\nconst PDM_MAX_MODP = 3000;\nconst PDM_MIN_TMODP = 0;\nconst PDM_MAX_TMODP = 40;\nconst PDM_MIN_FLOW_LOSS = 0;\nconst PDM_MAX_FLOW_LOSS = 20;\nconst PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS = 0;\n\nconst MWD_MIN_ID = 0;\nconst MWD_MAX_ID = 12;\nconst MWD_MIN_OD = 2;\nconst MWD_MAX_OD = 13;\nconst MWD_MIN_LENGTH = 1.0;\nconst MWD_MIN_PRESSURE_LOSS = 0;\n\nconst RSS_MIN_ID = 0;\nconst RSS_MAX_ID = 12;\nconst RSS_MIN_OD = 2;\nconst RSS_MAX_OD = 13;\nconst RSS_MIN_LENGTH = 1.0;\nconst RSS_MIN_FLOW_LOSS = 0;\nconst RSS_MAX_FLOW_LOSS = 10;\nconst RSS_MIN_PRESSURE_LOSS = 0;\n\nconst AGITATOR_MIN_ID = 0;\nconst AGITATOR_MAX_ID = 12;\nconst AGITATOR_MIN_OD = 2;\nconst AGITATOR_MAX_OD = 13;\nconst AGITATOR_MIN_LENGTH = 1.0;\nconst AGITATOR_MIN_PRESSURE_LOSS = 0;\n\nconst BIT_MIN_TFA = 0;\nconst BIT_MAX_TFA = 20;\n\nconst DEPTH_IN_HOLE_MIN = 0;\nconst DEPTH_IN_HOLE_MAX = 55000;\nconst DEPTH_IN_HOLE_PROHIBITED = 1;\n\nexport function sValueEmpty(val) {\n return val === null || typeof val === 'undefined' || val === '';\n}\n\nexport function isValidNumber(num, min, max, { isMinInclusive = true } = {}) {\n const parsedNum = parseFloat(num);\n if (Number.isNaN(parsedNum)) {\n return false;\n }\n if ((isMinInclusive && parsedNum < min) || (!isMinInclusive && parsedNum <= min)) {\n return false;\n }\n\n if (max && parsedNum > max) {\n return false;\n }\n\n return true;\n}\n\nexport function isValidLinearWeight(id, od, linearWeight) {\n const prefShortLengthUnit = getUnitPreference('shortLength');\n let convertedId = id;\n let convertedOd = od;\n if (prefShortLengthUnit !== 'in') {\n convertedId = convertValue(id, 'shortLength', prefShortLengthUnit, 'in');\n convertedOd = convertValue(od, 'shortLength', prefShortLengthUnit, 'in');\n }\n\n const estimation = 2.673 * (convertedOd * convertedOd - convertedId * convertedId);\n\n const convertedEstimation =\n prefShortLengthUnit !== 'in' ? convertValue(estimation, 'massPerLength', 'lb-ft') : estimation;\n\n return linearWeight >= convertedEstimation * 0.5 && linearWeight <= convertedEstimation * 1.5;\n}\n\nexport function validate(recordData) {\n const {\n data: { id, start_timestamp_str, start_depth, components },\n } = recordData;\n const shortLengthUnitDisplay = getUnitDisplay('shortLength');\n const lengthUnitDisplay = getUnitDisplay('length');\n const errors = {\n general: {},\n components: {},\n specificErrors: {},\n };\n const bitComponents = components.filter(comp => comp.family === 'bit');\n const bitSize = bitComponents.length > 0 ? bitComponents[0].size : null;\n const mwdHavingGamma = components.filter(comp => comp.family === 'mwd' && comp.has_gamma_sensor);\n let hasFormErrors = false;\n\n if (isValueEmpty(id)) {\n errors.id = 'It should not be empty.';\n hasFormErrors = true;\n }\n\n if (start_timestamp_str && !moment(new Date(start_timestamp_str)).isValid()) {\n hasFormErrors = true;\n errors.start_timestamp = 'Invalid Date.';\n }\n\n if (Number.isFinite(start_depth)) {\n const minDepth = convertValue(DEPTH_IN_HOLE_MIN, 'length', 'ft');\n const maxDepth = convertValue(DEPTH_IN_HOLE_MAX, 'length', 'ft');\n const prohibitedDepth = convertValue(DEPTH_IN_HOLE_PROHIBITED, 'length', 'ft');\n if (start_depth <= minDepth || start_depth > maxDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should be a positive number ${minDepth.toFixed(2)}~${maxDepth.toFixed(\n 2\n )} (${lengthUnitDisplay})`;\n }\n if (start_depth === prohibitedDepth) {\n hasFormErrors = true;\n errors.start_depth = `Should not be equal to ${prohibitedDepth} (${lengthUnitDisplay})`;\n }\n } else {\n hasFormErrors = true;\n errors.start_depth = 'It should not be empty.';\n }\n\n for (let i = 0; i < components.length; i += 1) {\n let min_id;\n let min_od;\n let max_id;\n let max_od;\n let min_opened_od;\n let max_opened_od;\n let min_length;\n let min_tj_id;\n let max_tj_id;\n let min_tj_od;\n let max_tj_od;\n let min_pressure_loss;\n let min_off_bottom_pressure_loss;\n let min_rd;\n let max_rd;\n\n const comp = components[i];\n const error = {};\n switch (comp.family) {\n case 'ct':\n min_id = convertValue(CT_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(CT_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(CT_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(CT_MAX_OD, 'shortLength', 'in');\n min_rd = convertValue(CT_MIN_RD, 'shortLength', 'in');\n max_rd = convertValue(CT_MAX_RD, 'shortLength', 'in');\n min_length = convertValue(CT_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dp':\n min_id = convertValue(DP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(DP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(DP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(DP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(DP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(DP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'hwdp':\n min_id = convertValue(HWDP_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(HWDP_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(HWDP_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(HWDP_MAX_OD, 'shortLength', 'in');\n min_tj_id = convertValue(HWDP_MIN_TJ_ID, 'shortLength', 'in');\n max_tj_id = convertValue(HWDP_MAX_TJ_ID, 'shortLength', 'in');\n min_tj_od = convertValue(HWDP_MIN_TJ_OD, 'shortLength', 'in');\n max_tj_od = convertValue(HWDP_MAX_TJ_OD, 'shortLength', 'in');\n min_length = convertValue(HWDP_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'dc':\n min_id = convertValue(DC_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DC_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DC_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DC_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DC_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'stabilizer':\n case 'ags':\n min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n break;\n\n case 'pdm':\n min_od = convertValue(PDM_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(PDM_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(PDM_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(PDM_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(PDM_MIN_LENGTH, 'length', 'ft');\n min_off_bottom_pressure_loss = PDM_MIN_OFF_BOTTOM_PRESSURE_LOSS;\n break;\n\n case 'mwd':\n min_od = convertValue(MWD_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(MWD_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(MWD_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(MWD_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(MWD_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = MWD_MIN_PRESSURE_LOSS;\n break;\n\n case 'agitator':\n min_od = convertValue(AGITATOR_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(AGITATOR_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(AGITATOR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(AGITATOR_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(AGITATOR_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = AGITATOR_MIN_PRESSURE_LOSS;\n break;\n\n case 'rss':\n min_od = convertValue(RSS_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(RSS_MAX_OD, 'shortLength', 'in');\n min_id = convertValue(RSS_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(RSS_MAX_ID, 'shortLength', 'in');\n min_length = convertValue(RSS_MIN_LENGTH, 'length', 'ft');\n min_pressure_loss = RSS_MIN_PRESSURE_LOSS;\n break;\n\n case 'ur':\n min_id = convertValue(UR_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(UR_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(UR_MIN_BODY_OD, 'shortLength', 'in');\n max_od = convertValue(UR_MAX_BODY_OD, 'shortLength', 'in');\n min_opened_od = convertValue(UR_MIN_OPENED_OD, 'shortLength', 'in');\n max_opened_od = convertValue(UR_MAX_OPENED_OD, 'shortLength', 'in');\n break;\n\n case 'bit':\n break;\n\n default:\n min_id = convertValue(DEF_MIN_ID, 'shortLength', 'in');\n max_id = convertValue(DEF_MAX_ID, 'shortLength', 'in');\n min_od = convertValue(DEF_MIN_OD, 'shortLength', 'in');\n max_od = convertValue(DEF_MAX_OD, 'shortLength', 'in');\n min_length = convertValue(DEF_MIN_LENGTH, 'length', 'ft');\n break;\n }\n\n if (!isValueEmpty(min_id) && !isValueEmpty(min_od)) {\n if (!isValidNumber(comp.inner_diameter, min_id, max_id)) {\n error.inner_diameter = `${min_id.toFixed(1)}~${max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter, min_od, max_od)) {\n error.outer_diameter = `${min_od.toFixed(1)}~${max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (\n isValidNumber(comp.inner_diameter, min_id, max_id) &&\n isValidNumber(comp.outer_diameter, min_od, max_od) &&\n !isValidNumber(comp.inner_diameter, min_id, comp.outer_diameter)\n ) {\n error.outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!error.outer_diameter && bitSize) {\n if (\n +comp.outer_diameter + convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n\n // only check validity of linear weight when family is not bit\n if (!isValidNumber(comp.linear_weight, 0)) {\n error.linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n\n if (\n comp.family === 'dp' ||\n comp.family === 'hwdp' ||\n comp.family === 'dc' ||\n comp.family === 'ct' ||\n comp.family === 'ur'\n ) {\n if (!error.inner_diameter && !error.outer_diameter && !error.linear_weight) {\n if (!isValidLinearWeight(comp.inner_diameter, comp.outer_diameter, comp.linear_weight)) {\n error.linear_weight = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n }\n if (comp.family === 'ur') {\n if (!isValidNumber(comp.ur_opened_od, min_opened_od, max_opened_od)) {\n error.ur_opened_od = `${min_opened_od.toFixed(1)}~${max_opened_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n } else if (comp.ur_opened_od < bitSize) {\n error.ur_opened_od = 'Max O.D (Opened) >= Bit Size';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_tj_id) && !isValueEmpty(min_tj_od)) {\n if (!isValidNumber(comp.inner_diameter_tooljoint, min_tj_id, max_tj_id)) {\n error.inner_diameter_tooljoint = `${min_tj_id.toFixed(1)}~${max_tj_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, min_tj_od, max_tj_od)) {\n error.outer_diameter_tooljoint = `${min_tj_od.toFixed(1)}~${max_tj_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.outer_diameter_tooljoint, comp.outer_diameter, max_tj_od)) {\n error.outer_diameter_tooljoint = 'Tool Joint O.D >= O.D';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(min_length)) {\n if (!isValidNumber(comp.length, min_length)) {\n error.length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n\n if (!isValueEmpty(comp.length_tooljoint) && !isValueEmpty(comp.component_length)) {\n if (+comp.length_tooljoint > +comp.component_length) {\n error.length_tooljoint = 'Tool Joint Length < Component Length';\n hasFormErrors = true;\n }\n }\n\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n error.off_bottom_pressure_loss = {};\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const obpsItem = comp.off_bottom_pressure_loss[j];\n error.off_bottom_pressure_loss[j] = {};\n if (isValueEmpty(obpsItem.flow_rate)) {\n error.off_bottom_pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(obpsItem.pressure_loss)) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_off_bottom_pressure_loss) &&\n !isValidNumber(obpsItem.pressure_loss, min_off_bottom_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.off_bottom_pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n error.pressure_loss = {};\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const pressureLossItem = comp.pressure_loss[j];\n error.pressure_loss[j] = {};\n if (isValueEmpty(pressureLossItem.flow_rate)) {\n error.pressure_loss[j].flow_rate = 'flow rate is required.';\n hasFormErrors = true;\n }\n if (isValueEmpty(pressureLossItem.pressure_loss)) {\n error.pressure_loss[j].pressure_loss = 'pressure loss is required.';\n hasFormErrors = true;\n }\n if (\n !isValueEmpty(min_pressure_loss) &&\n !isValidNumber(pressureLossItem.pressure_loss, min_pressure_loss, null, {\n isMinInclusive: false,\n })\n ) {\n error.pressure_loss[j].pressure_loss = 'Invalid range';\n hasFormErrors = true;\n }\n }\n }\n\n if (comp.has_stabilizer && comp.stabilizer) {\n const stab_min_id = convertValue(STABLE_MIN_ID, 'shortLength', 'in');\n const stab_max_id = convertValue(STABLE_MAX_ID, 'shortLength', 'in');\n const stab_min_od = convertValue(STABLE_MIN_OD, 'shortLength', 'in');\n const stab_max_od = convertValue(STABLE_MAX_OD, 'shortLength', 'in');\n const stab_min_length = convertValue(STABLE_MIN_LENGTH, 'length', 'ft');\n\n if (\n isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id) &&\n isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od) &&\n !isValidNumber(comp.stabilizer.inner_diameter, min_id, comp.stabilizer.outer_diameter)\n ) {\n error.stabilizer_outer_diameter = 'O.D > I.D';\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.stabilizer.inner_diameter, stab_min_id, stab_max_id)) {\n error.stabilizer_inner_diameter = `${stab_min_id.toFixed(1)}~${stab_max_id.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValidNumber(comp.stabilizer.outer_diameter, stab_min_od, stab_max_od)) {\n error.stabilizer_outer_diameter = `${stab_min_od.toFixed(1)}~${stab_max_od.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n if (!isValueEmpty(stab_min_length)) {\n if (!isValidNumber(comp.stabilizer.length, stab_min_length)) {\n error.stabilizer_length = 'Invalid value';\n hasFormErrors = true;\n }\n }\n if (isValueEmpty(comp.stabilizer.linear_weight)) {\n error.stabilizer_linear_weight = 'Invalid value';\n hasFormErrors = true;\n }\n if (!error.stabilizer_outer_diameter && bitSize) {\n if (\n +comp.stabilizer.outer_diameter +\n convertValue(ALLOWED_DIFF_OD_BIT_SIZE, 'shortLength', 'in') >\n bitSize\n ) {\n error.stabilizer_outer_diameter = ' O.D + 0.1 < Bit Size';\n hasFormErrors = true;\n }\n }\n }\n\n // specificErrors\n if (comp.family === 'ct') {\n if (!isValidNumber(comp.reel_diameter, min_rd, max_rd)) {\n error.reel_diameter = `${min_rd.toFixed(1)}~${max_rd.toFixed(\n 1\n )} (${shortLengthUnitDisplay})`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'bit') {\n const ratio = ctop(1, 'shortLength', 'in');\n const lowerLimit = BIT_MIN_TFA * (ratio * ratio);\n const upperLimit = BIT_MAX_TFA * (ratio * ratio);\n if (!isValidNumber(comp.tfa, lowerLimit, upperLimit)) {\n error.tfa = `TFA must be ${lowerLimit.toFixed(2)}~${BIT_MAX_TFA.toFixed(2)}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'rss') {\n if (!isValidNumber(comp.flow_loss_percentage, RSS_MIN_FLOW_LOSS, RSS_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${RSS_MIN_FLOW_LOSS}~${RSS_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'mwd') {\n if (mwdHavingGamma.length > 1) {\n error.gamma_sensor_to_bit_distance = `Only 1 gamma sensor allowed. Currently ${mwdHavingGamma.length}`;\n hasFormErrors = true;\n } else if (comp.has_gamma_sensor && !Number.isFinite(comp.gamma_sensor_to_bit_distance)) {\n error.gamma_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n }\n\n if (comp.has_survey_sensor && !Number.isFinite(comp.bit_to_survey_distance)) {\n error.bit_to_survey_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance <= 0) {\n error.bit_to_survey_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_survey_sensor && comp.bit_to_survey_distance > 150) {\n error.bit_to_survey_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n\n if (\n comp.has_directional_sensor &&\n !Number.isFinite(comp.directional_sensor_to_bit_distance)\n ) {\n error.directional_sensor_to_bit_distance = 'This field is required.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance <= 0) {\n error.directional_sensor_to_bit_distance = 'Should be a positive number.';\n hasFormErrors = true;\n } else if (comp.has_directional_sensor && comp.directional_sensor_to_bit_distance > 150) {\n error.directional_sensor_to_bit_distance = 'Should be less then 150.';\n hasFormErrors = true;\n }\n }\n\n if (comp.family === 'pdm') {\n let pdmFieldUnitLower;\n let pdmFieldUnitUpper;\n\n if (!isValidNumber(comp.number_rotor_lobes, PDM_MIN_ROTOR, PDM_MAX_ROTOR)) {\n error.number_rotor_lobes = `It must be ${PDM_MIN_ROTOR}~${PDM_MAX_ROTOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.number_stator_lobes, PDM_MIN_STATOR, PDM_MAX_STATOR)) {\n error.number_stator_lobes = `It must be ${PDM_MIN_STATOR}~${PDM_MAX_STATOR}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.rpg, PDM_MIN_RPG, PDM_MAX_RPG)) {\n error.rpg = `It must be ${PDM_MIN_RPG}~${PDM_MAX_RPG}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_WOB, 'force', 'klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_WOB, 'force', 'klbf');\n if (\n !isValueEmpty(comp.max_weight_on_bit) &&\n !isValidNumber(comp.max_weight_on_bit, pdmFieldUnitLower, pdmFieldUnitUpper)\n ) {\n error.max_weight_on_bit = `It must be ${pdmFieldUnitUpper.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n pdmFieldUnitUpper = convertValue(PDM_MAX_FLOW_RANGE, 'volumeFlowRate', 'gal/min');\n if (!isValidNumber(comp.min_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.min_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.max_standard_flowrate, pdmFieldUnitLower, pdmFieldUnitUpper)) {\n error.max_standard_flowrate = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_MODP, 'pressure', 'psi');\n pdmFieldUnitUpper = convertValue(PDM_MAX_MODP, 'pressure', 'psi');\n if (\n !isValidNumber(\n comp.max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n pdmFieldUnitLower = convertValue(PDM_MIN_TMODP, 'torque', 'ft-klbf');\n pdmFieldUnitUpper = convertValue(PDM_MAX_TMODP, 'torque', 'ft-klbf');\n if (\n !isValidNumber(\n comp.torque_at_max_operating_differential_pressure,\n pdmFieldUnitLower,\n pdmFieldUnitUpper\n )\n ) {\n error.torque_at_max_operating_differential_pressure = `It must be ${pdmFieldUnitLower.toFixed(\n 2\n )}~${pdmFieldUnitUpper.toFixed(2)}`;\n hasFormErrors = true;\n }\n\n if (!isValidNumber(comp.flow_loss_percentage, PDM_MIN_FLOW_LOSS, PDM_MAX_FLOW_LOSS)) {\n error.flow_loss_percentage = `It must be ${PDM_MIN_FLOW_LOSS}~${PDM_MAX_FLOW_LOSS}`;\n hasFormErrors = true;\n }\n }\n\n errors.components[comp.id] = error;\n }\n\n if (bitComponents.length !== 1) {\n errors.general.bit_count = 'Number of \"BIT\" components is invalid.';\n hasFormErrors = true;\n }\n\n if (\n bitComponents.length === 1 &&\n components[components.length - 1].family !== 'bit' &&\n components[0].family !== 'bit'\n ) {\n // bit should be top or bottom\n errors.general.bit_position = '\"BIT\" category should be on the bottom of the list.';\n hasFormErrors = true;\n }\n\n if (hasFormErrors) {\n return errors;\n }\n return null;\n}\n\nexport function convertRecordBackToImperialUnit(record) {\n // if bit is top, reverse the components;\n let components = get(record, ['data', 'components']);\n if (get(components, [0, 'family']) === 'bit') {\n components = components.reverse().map((comp, idx) => ({ ...comp, order: idx }));\n record = set(record, ['data', 'components'], components); // eslint-disable-line no-param-reassign\n }\n\n const { data } = cloneDeep(record);\n const objStartTime = data.start_timestamp_str && moment(new Date(data.start_timestamp_str));\n if (objStartTime && objStartTime.isValid()) {\n data.start_timestamp = objStartTime.unix();\n }\n delete data.start_timestamp_str;\n\n data.start_depth = ctoi(data.start_depth, 'length', 'ft');\n data.components = data.components.map(component => {\n const cc = Object.assign({}, component);\n cc.inner_diameter = ctoi(cc.inner_diameter, 'shortLength', 'in');\n cc.outer_diameter = ctoi(cc.outer_diameter, 'shortLength', 'in', 4);\n cc.linear_weight = ctoi(cc.linear_weight, 'massPerLength', 'lb-ft');\n cc.weight = ctoi(cc.weight, 'mass', 'lb');\n cc.length = ctoi(cc.length, 'length', 'ft');\n cc.component_length = ctoi(cc.component_length, 'length', 'ft');\n cc.outer_diameter_tooljoint = ctoi(cc.outer_diameter_tooljoint, 'shortLength', 'in');\n cc.inner_diameter_tooljoint = ctoi(cc.inner_diameter_tooljoint, 'shortLength', 'in');\n cc.length_tooljoint = ctoi(cc.length_tooljoint, 'length', 'ft');\n\n if (cc.family === 'bit' || cc.family === 'ur') {\n const ratio = ctoi(1, 'shortLength', 'in');\n cc.size = ctoi(cc.size, 'shortLength', 'in', 3);\n if (cc.nozzle_sizes && cc.nozzle_sizes.length > 0) {\n for (let j = 0; j < cc.nozzle_sizes.length; j += 1) {\n const item = cc.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctoi(item.size, 'shortLength', 'in') * 32 : item.size;\n }\n }\n cc.tfa = ratio !== 1 ? cc.tfa * (ratio * ratio) : cc.tfa;\n }\n\n if (cc.family === 'pdm') {\n cc.max_weight_on_bit = ctoi(cc.max_weight_on_bit, 'force', 'klbf');\n cc.min_standard_flowrate = ctoi(cc.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_standard_flowrate = ctoi(cc.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n cc.max_operating_differential_pressure = ctoi(\n cc.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n cc.torque_at_max_operating_differential_pressure = ctoi(\n cc.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n cc.rpg = ctoi(cc.rpg, 'revolutionPerVolume', 'rpg');\n\n if (cc.off_bottom_pressure_loss && cc.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < cc.off_bottom_pressure_loss.length; j += 1) {\n const item = cc.off_bottom_pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n if (!cc.has_stabilizer) {\n delete cc.stabilizer;\n }\n if (cc.stabilizer) {\n cc.stabilizer.inner_diameter =\n cc.stabilizer.inner_diameter && ctoi(cc.stabilizer.inner_diameter, 'shortLength', 'in');\n cc.stabilizer.outer_diameter =\n cc.stabilizer.outer_diameter && ctoi(cc.stabilizer.outer_diameter, 'shortLength', 'in');\n cc.stabilizer.linear_weight =\n cc.stabilizer.linear_weight &&\n ctoi(cc.stabilizer.linear_weight, 'massPerLength', 'lb-ft');\n cc.stabilizer.weight = cc.stabilizer.weight && ctoi(cc.stabilizer.weight, 'mass', 'lb');\n cc.stabilizer.length = cc.length && ctoi(cc.stabilizer.length, 'length', 'ft');\n cc.stabilizer.gauge_od =\n cc.stabilizer.gauge_od && ctoi(cc.stabilizer.gauge_od, 'shortLength', 'in');\n cc.stabilizer.gauge_length =\n cc.stabilizer.gauge_length && ctoi(cc.stabilizer.gauge_length, 'shortLength', 'in');\n cc.stabilizer.blade_width =\n cc.stabilizer.blade_width && ctoi(cc.stabilizer.blade_width, 'shortLength', 'in');\n cc.stabilizer.stab_centerpoint_to_bit =\n cc.stabilizer.stab_centerpoint_to_bit &&\n ctoi(cc.stabilizer.stab_centerpoint_to_bit, 'length', 'ft');\n }\n }\n\n if (cc.family === 'stabilizer' || cc.family === 'ags') {\n cc.gauge_od = ctoi(cc.gauge_od, 'shortLength', 'in');\n cc.gauge_length = ctoi(cc.gauge_length, 'shortLength', 'in');\n cc.blade_width = ctoi(cc.blade_width, 'shortLength', 'in');\n }\n\n if (cc.family === 'mwd' || cc.family === 'rss' || cc.family === 'agitator') {\n if (cc.pressure_loss && cc.pressure_loss.length > 0) {\n for (let j = 0; j < cc.pressure_loss.length; j += 1) {\n const item = cc.pressure_loss[j];\n item.flow_rate = ctoi(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctoi(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n\n if (cc.family !== 'bit') {\n delete cc.bit_type;\n }\n if (!cc.has_gamma_sensor && Number.isFinite(cc.gamma_sensor_to_bit_distance)) {\n delete cc.gamma_sensor_to_bit_distance;\n }\n if (!cc.has_survey_sensor && Number.isFinite(cc.bit_to_survey_distance)) {\n delete cc.bit_to_survey_distance;\n }\n if (!cc.has_directional_sensor && Number.isFinite(cc.directional_sensor_to_bit_distance)) {\n delete cc.directional_sensor_to_bit_distance;\n }\n delete cc.c_length;\n return cc;\n });\n\n return {\n ...record,\n data,\n };\n}\n\nexport function ctoi(val, unitType, unit, precision = 2) {\n if (val === null || typeof val === 'undefined') {\n return null;\n }\n if (!unitType || !unit) {\n return parseFloat(val);\n }\n return parseFloat(convertValue(val, unitType, getUnitPreference(unitType), unit, precision));\n}\n\nexport function convertRecordtoPrefUnit(record) {\n const { data } = cloneDeep(record);\n const { components } = data;\n data.start_depth = ctop(data.start_depth, 'length', 'ft');\n\n if (components.length > 0) {\n if (components[0].family === 'bit') {\n components[0].c_length = components[0].length || 0;\n for (let i = 1; i < components.length; i += 1) {\n components[i].c_length =\n parseFloat(components[i - 1].c_length) + parseFloat(components[i].length || 0);\n }\n } else {\n const lastIndex = components.length - 1;\n components[lastIndex].c_length = components[lastIndex].length || 0;\n for (let i = lastIndex - 1; i >= 0; i -= 1) {\n components[i].c_length =\n parseFloat(components[i + 1].c_length) + parseFloat(components[i].length || 0);\n }\n }\n }\n\n for (let i = 0; i < components.length; i += 1) {\n const comp = components[i];\n comp.inner_diameter = ctop(comp.inner_diameter, 'shortLength', 'in');\n comp.outer_diameter = ctop(comp.outer_diameter, 'shortLength', 'in', 4);\n comp.linear_weight = ctop(comp.linear_weight, 'massPerLength', 'lb-ft');\n comp.weight = ctop(comp.weight, 'mass', 'lb');\n comp.length = ctop(comp.length, 'length', 'ft');\n comp.component_length = ctop(comp.component_length, 'length', 'ft');\n comp.outer_diameter_tooljoint = ctop(comp.outer_diameter_tooljoint, 'shortLength', 'in');\n comp.inner_diameter_tooljoint = ctop(comp.inner_diameter_tooljoint, 'shortLength', 'in');\n comp.length_tooljoint = ctop(comp.length_tooljoint, 'length', 'ft');\n\n comp.c_length = ctop(comp.c_length, 'length', 'ft');\n comp.gamma_sensor_to_bit_distance = ctop(comp.gamma_sensor_to_bit_distance, 'length', 'ft');\n\n if (comp.family === 'bit' || comp.family === 'ur') {\n const ratio = ctop(1, 'shortLength', 'in');\n comp.size = ctop(comp.size, 'shortLength', 'in');\n if (comp.nozzle_sizes && comp.nozzle_sizes.length > 0) {\n for (let j = 0; j < comp.nozzle_sizes.length; j += 1) {\n const item = comp.nozzle_sizes[j];\n item.size = ratio !== 1 ? ctop(item.size, 'shortLength', 'in') / 32 : item.size;\n }\n }\n comp.tfa = ratio !== 1 ? comp.tfa * (ratio * ratio) : comp.tfa;\n }\n\n if (comp.family === 'pdm') {\n comp.max_weight_on_bit = ctop(comp.max_weight_on_bit, 'force', 'klbf');\n comp.min_standard_flowrate = ctop(comp.min_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_standard_flowrate = ctop(comp.max_standard_flowrate, 'volumeFlowRate', 'gal/min');\n comp.max_operating_differential_pressure = ctop(\n comp.max_operating_differential_pressure,\n 'pressure',\n 'psi'\n );\n comp.torque_at_max_operating_differential_pressure = ctop(\n comp.torque_at_max_operating_differential_pressure,\n 'torque',\n 'ft-klbf',\n 3\n );\n if (comp.off_bottom_pressure_loss && comp.off_bottom_pressure_loss.length > 0) {\n for (let j = 0; j < comp.off_bottom_pressure_loss.length; j += 1) {\n const item = comp.off_bottom_pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n comp.rpg = ctop(comp.rpg, 'revolutionPerVolume', 'rpg');\n if (comp.has_stabilizer && comp.stabilizer) {\n comp.stabilizer.inner_diameter = ctop(comp.stabilizer.inner_diameter, 'shortLength', 'in');\n comp.stabilizer.outer_diameter = ctop(comp.stabilizer.outer_diameter, 'shortLength', 'in');\n comp.stabilizer.linear_weight = ctop(\n comp.stabilizer.linear_weight,\n 'massPerLength',\n 'lb-ft'\n );\n comp.stabilizer.weight = ctop(comp.stabilizer.weight, 'mass', 'lb');\n comp.stabilizer.length = ctop(comp.stabilizer.length, 'length', 'ft');\n comp.stabilizer.gauge_od = ctop(comp.stabilizer.gauge_od, 'shortLength', 'in');\n comp.stabilizer.gauge_length = ctop(comp.stabilizer.gauge_length, 'shortLength', 'in');\n comp.stabilizer.blade_width = ctop(comp.stabilizer.blade_width, 'shortLength', 'in');\n comp.stabilizer.stab_centerpoint_to_bit = ctop(\n comp.stabilizer.stab_centerpoint_to_bit,\n 'length',\n 'ft'\n );\n }\n }\n\n if (comp.family === 'stabilizer' || comp.family === 'ags') {\n comp.gauge_od = ctop(comp.gauge_od, 'shortLength', 'in');\n comp.gauge_length = ctop(comp.gauge_length, 'shortLength', 'in');\n comp.blade_width = ctop(comp.blade_width, 'shortLength', 'in');\n }\n\n if (comp.family === 'mwd' || comp.family === 'rss' || comp.family === 'agitator') {\n if (comp.pressure_loss && comp.pressure_loss.length > 0) {\n for (let j = 0; j < comp.pressure_loss.length; j += 1) {\n const item = comp.pressure_loss[j];\n item.flow_rate = ctop(item.flow_rate, 'volumeFlowRate', 'gal/min');\n item.pressure_loss = ctop(item.pressure_loss, 'pressure', 'psi');\n }\n }\n }\n }\n return {\n ...record,\n data,\n };\n}\n\nexport function ctop(val, unitType, unit, precision = 2) {\n if (val !== 0 && !val) {\n return null;\n }\n return unitType && unit ? convertValue(val, unitType, unit, null, precision) : val;\n}\n"],"names":["isValidNumber","num","min","max","_ref","arguments","length","undefined","_ref$isMinInclusive","isMinInclusive","parsedNum","parseFloat","Number","isNaN","isValidLinearWeight","id","od","linearWeight","prefShortLengthUnit","getUnitPreference","convertedId","convertedOd","convertValue","estimation","convertedEstimation","ctoi","val","unitType","unit","precision","ctop","record","components","get","reverse","map","comp","idx","_objectSpread","order","set","data","cloneDeep","objStartTime","start_timestamp_str","moment","Date","isValid","start_timestamp","unix","start_depth","component","cc","Object","assign","inner_diameter","outer_diameter","linear_weight","weight","component_length","outer_diameter_tooljoint","inner_diameter_tooljoint","length_tooljoint","family","ratio","size","nozzle_sizes","j","item","tfa","max_weight_on_bit","min_standard_flowrate","max_standard_flowrate","max_operating_differential_pressure","torque_at_max_operating_differential_pressure","rpg","off_bottom_pressure_loss","flow_rate","pressure_loss","has_stabilizer","stabilizer","gauge_od","gauge_length","blade_width","stab_centerpoint_to_bit","bit_type","has_gamma_sensor","isFinite","gamma_sensor_to_bit_distance","has_survey_sensor","bit_to_survey_distance","has_directional_sensor","directional_sensor_to_bit_distance","c_length","i","lastIndex","recordData","shortLengthUnitDisplay","getUnitDisplay","lengthUnitDisplay","errors","general","specificErrors","bitComponents","filter","bitSize","mwdHavingGamma","hasFormErrors","isValueEmpty","minDepth","maxDepth","prohibitedDepth","concat","toFixed","min_id","min_od","max_id","max_od","min_opened_od","max_opened_od","min_length","min_tj_id","max_tj_id","min_tj_od","max_tj_od","min_pressure_loss","min_off_bottom_pressure_loss","min_rd","max_rd","error","ur_opened_od","obpsItem","pressureLossItem","stab_min_id","stab_max_id","stab_min_od","stab_max_od","stab_min_length","stabilizer_outer_diameter","stabilizer_inner_diameter","stabilizer_length","stabilizer_linear_weight","reel_diameter","lowerLimit","upperLimit","flow_loss_percentage","pdmFieldUnitLower","pdmFieldUnitUpper","number_rotor_lobes","number_stator_lobes","bit_count","bit_position"],"mappings":"66BA2HO,SAASA,EAAcC,EAAKC,EAAKC,GAAqC,IAAAC,EAAAC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAJ,CAAE,EAAAG,EAAAJ,EAA5BK,eAAAA,cAAqBD,EAC5DE,EAAYC,WAAWV,GAC7B,OAAIW,OAAOC,MAAMH,OAGZD,GAAkBC,EAAYR,IAAUO,GAAkBC,GAAaR,MAIxEC,GAAOO,EAAYP,GAKzB,CAEO,SAASW,EAAoBC,EAAIC,EAAIC,GAC1C,IAAMC,EAAsBC,oBAAkB,eAC1CC,EAAcL,EACdM,EAAcL,EACU,OAAxBE,IACFE,EAAcE,EAAYA,aAACP,EAAI,cAAeG,EAAqB,MACnEG,EAAcC,EAAYA,aAACN,EAAI,cAAeE,EAAqB,OAGrE,IAAMK,EAAa,OAASF,EAAcA,EAAcD,EAAcA,GAEhEI,EACoB,OAAxBN,EAA+BI,EAAAA,aAAaC,EAAY,gBAAiB,SAAWA,EAEtF,OAAON,GAAsC,GAAtBO,GAA6BP,GAAsC,IAAtBO,CACtE,CAiqBO,SAASC,EAAKC,EAAKC,EAAUC,GAAqB,IAAfC,yDAAY,EACpD,OAAIH,QACK,KAEJC,GAAaC,EAGXjB,WAAWW,eAAaI,EAAKC,EAAUR,oBAAkBQ,GAAWC,EAAMC,IAFxElB,WAAWe,EAGtB,CAqHO,SAASI,EAAKJ,EAAKC,EAAUC,GAAqB,IAAfC,yDAAY,EACpD,OAAY,IAARH,GAA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B,cAAAwC,OAAiBkC,EAAkBjC,QAC5D,GACD,KAAAD,OAAImC,EAAkBlC,QAAQ,IAC/BN,GAAgB,GAGlBuC,EAAoB5H,EAAAA,aA/iBL,EA+iBgC,WAAY,OAC3D6H,EAAoB7H,EAAAA,aA/iBL,IA+iBgC,WAAY,OAExDtB,EACCoC,EAAKqC,oCACLyE,EACAC,KAGFlB,EAAMxD,oCAAmC,cAAAuC,OAAiBkC,EAAkBjC,QAC1E,GACD,KAAAD,OAAImC,EAAkBlC,QAAQ,IAC/BN,GAAgB,GAGlBuC,EAAoB5H,EAAAA,aA5jBJ,EA4jBgC,SAAU,WAC1D6H,EAAoB7H,EAAAA,aA5jBJ,GA4jBgC,SAAU,WAEvDtB,EACCoC,EAAKsC,8CACLwE,EACAC,KAGFlB,EAAMvD,8CAA6C,cAAAsC,OAAiBkC,EAAkBjC,QACpF,GACD,KAAAD,OAAImC,EAAkBlC,QAAQ,IAC/BN,GAAgB,GAGb3G,EAAcoC,EAAK6G,qBAzkBJ,EACA,MAykBlBhB,EAAMgB,qBAAoB,cAAAjC,OA1kBR,EA0kB0C,KAAAA,OAzkB1C,IA0kBlBL,GAAgB,EAEpB,CAEAP,EAAOpE,WAAWI,EAAKrB,IAAMkH,CAC/B,CAiBA,OAf6B,IAAzB1B,EAAcjG,SAChB8F,EAAOC,QAAQiD,UAAY,yCAC3B3C,GAAgB,GAIS,IAAzBJ,EAAcjG,QAC+B,QAA7C0B,EAAWA,EAAW1B,OAAS,GAAGyD,QACT,QAAzB/B,EAAW,GAAG+B,SAGdqC,EAAOC,QAAQkD,aAAe,sDAC9B5C,GAAgB,GAGdA,EACKP,EAEF,IACT"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("./index.js");var e=require("../constants/apps.js"),D=require("./mobileDetect.js");exports.getAppSize=function(i){var _=i.coordinates,t=i.dashboardWidth,r=i.isMaximized;return{pixelHeight:r?window.innerHeight-2*e.DEFAULT_GRID_LAYOUT_PADDING:_.h*(e.GRID_ROW_HEIGHT+e.DEFAULT_GRID_LAYOUT_PADDING)-e.DEFAULT_GRID_LAYOUT_PADDING,pixelWidth:r||D.isMobileDetected||D.isNativeDetected?t-2*e.DEFAULT_GRID_LAYOUT_PADDING:(t-e.DEFAULT_GRID_LAYOUT_PADDING)*_.w/e.GRID_COLUMN_SIZES.large-e.DEFAULT_GRID_LAYOUT_PADDING}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../components/UserMention/utils/index.js"),require("@babel/runtime/helpers/defineProperty"),require("./convert.js"),require("../constants/completion.js"),require("moment"),require("../constants/alerts.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("./casing/validation.js"),require("@babel/runtime/helpers/slicedToArray"),require("lodash/mean"),require("lodash"),require("../constants/streamSourceType.js"),require("lodash/get"),require("file-saver"),require("query-string"),require("../constants/goals.js"),require("../constants/segment.js");var e=require("../constants/apps.js");require("../constants/drillstring.js"),require("../constants/appPackages.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("../constants/corvaCompanyId.js"),require("../components/GradientManager/configuration/constants.js"),require("./drillstring/conversion.js"),require("lodash/set"),require("lodash/cloneDeep"),require("@babel/runtime/helpers/toConsumableArray"),require("lodash/isNumber"),require("lodash/has"),require("./ga.js"),require("./goalsConfig/goalsConfig.js"),require("./lasParser.js"),require("./main.js"),require("./metrics/metricsConfig.js");var r=require("./mobileDetect.js");require("./feed.js"),require("./reports.js"),require("moment-timezone"),require("@babel/runtime/helpers/typeof"),require("./dashboardReports.js"),require("./env.js"),require("file-extension"),require("image-extensions"),require("video-extensions"),require("./jsonaDataFormatter.js"),require("./bha.js"),require("jsona"),require("../clients/jsonApi/index.js"),require("@babel/runtime/helpers/objectWithoutProperties"),require("classnames"),require("./charts/Styles.scss.js"),require("./getSingleAsset.js");exports.getAppSize=function(s){var i=s.coordinates,t=s.dashboardWidth,n=s.isMaximized;return{pixelHeight:n?window.innerHeight-2*e.DEFAULT_GRID_LAYOUT_PADDING:i.h*(e.GRID_ROW_HEIGHT+e.DEFAULT_GRID_LAYOUT_PADDING)-e.DEFAULT_GRID_LAYOUT_PADDING,pixelWidth:n||r.isMobileDetected||r.isNativeDetected?t-2*e.DEFAULT_GRID_LAYOUT_PADDING:(t-e.DEFAULT_GRID_LAYOUT_PADDING)*i.w/e.GRID_COLUMN_SIZES.large-e.DEFAULT_GRID_LAYOUT_PADDING}};
2
2
  //# sourceMappingURL=apps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"apps.js","sources":["../../../src/utils/apps.js"],"sourcesContent":["import { mobileDetect } from '~/utils';\nimport { GRID_ROW_HEIGHT, GRID_COLUMN_SIZES, DEFAULT_GRID_LAYOUT_PADDING } from '~/constants/apps';\n\n// NOTE: Returns precise pixel sizes\nexport const getAppSize = ({ coordinates, dashboardWidth, isMaximized }) => {\n return {\n pixelHeight: isMaximized\n ? window.innerHeight - DEFAULT_GRID_LAYOUT_PADDING * 2\n : coordinates.h * (GRID_ROW_HEIGHT + DEFAULT_GRID_LAYOUT_PADDING) -\n DEFAULT_GRID_LAYOUT_PADDING,\n pixelWidth:\n isMaximized || mobileDetect.isMobileDetected || mobileDetect.isNativeDetected\n ? dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING * 2\n : ((dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING) * coordinates.w) /\n GRID_COLUMN_SIZES.large -\n DEFAULT_GRID_LAYOUT_PADDING,\n };\n};\n"],"names":["_ref","coordinates","dashboardWidth","isMaximized","pixelHeight","window","innerHeight","DEFAULT_GRID_LAYOUT_PADDING","h","GRID_ROW_HEIGHT","pixelWidth","mobileDetect","w","GRID_COLUMN_SIZES","large"],"mappings":"kLAI0B,SAAkDA,GAAA,IAA/CC,IAAAA,YAAaC,IAAAA,eAAgBC,IAAAA,YACxD,MAAO,CACLC,YAAaD,EACTE,OAAOC,YAA4C,EAA9BC,EAA2BA,4BAChDN,EAAYO,GAAKC,kBAAkBF,EAAAA,6BACnCA,EAA2BA,4BAC/BG,WACEP,GAAeQ,EAAAA,kBAAiCA,EAAAA,iBAC5CT,EAA+C,EAA9BK,EAAAA,6BACfL,EAAiBK,EAA2BA,6BAAIN,EAAYW,EAC5DC,EAAiBA,kBAACC,MACpBP,EAAAA,4BAEV"}
1
+ {"version":3,"file":"apps.js","sources":["../../../src/utils/apps.js"],"sourcesContent":["import { mobileDetect } from '~/utils';\nimport { GRID_ROW_HEIGHT, GRID_COLUMN_SIZES, DEFAULT_GRID_LAYOUT_PADDING } from '~/constants/apps';\n\n// NOTE: Returns precise pixel sizes\nexport const getAppSize = ({ coordinates, dashboardWidth, isMaximized }) => {\n return {\n pixelHeight: isMaximized\n ? window.innerHeight - DEFAULT_GRID_LAYOUT_PADDING * 2\n : coordinates.h * (GRID_ROW_HEIGHT + DEFAULT_GRID_LAYOUT_PADDING) -\n DEFAULT_GRID_LAYOUT_PADDING,\n pixelWidth:\n isMaximized || mobileDetect.isMobileDetected || mobileDetect.isNativeDetected\n ? dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING * 2\n : ((dashboardWidth - DEFAULT_GRID_LAYOUT_PADDING) * coordinates.w) /\n GRID_COLUMN_SIZES.large -\n DEFAULT_GRID_LAYOUT_PADDING,\n };\n};\n"],"names":["_ref","coordinates","dashboardWidth","isMaximized","pixelHeight","window","innerHeight","DEFAULT_GRID_LAYOUT_PADDING","h","GRID_ROW_HEIGHT","pixelWidth","mobileDetect","w","GRID_COLUMN_SIZES","large"],"mappings":"02DAI0B,SAAkDA,GAAA,IAA/CC,IAAAA,YAAaC,IAAAA,eAAgBC,IAAAA,YACxD,MAAO,CACLC,YAAaD,EACTE,OAAOC,YAA4C,EAA9BC,EAA2BA,4BAChDN,EAAYO,GAAKC,kBAAkBF,EAAAA,6BACnCA,EAA2BA,4BAC/BG,WACEP,GAAeQ,EAAAA,kBAAiCA,EAAAA,iBAC5CT,EAA+C,EAA9BK,EAAAA,6BACfL,EAAiBK,EAA2BA,6BAAIN,EAAYW,EAC5DC,EAAiBA,kBAACC,MACpBP,EAAAA,4BAEV"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@babel/runtime/helpers/defineProperty"),e=require("corva-convert-units"),r=require("lodash"),n=require("./constants/units.js");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(t),u=i(e);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){o.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var l={imperial:n.IMPERIAL_UNITS,metric:n.METRIC_UNITS,custom:a({},n.IMPERIAL_UNITS)},c=[],p={};var f=function(t){return l.custom[t]},v=function(t){var e,i=n.UNIT_TYPES_DEFINITIONS_MAP[t];return i?r.sortBy(u.default().list(i.origin),"abbr"):(null===(e=p[t])||void 0===e?void 0:e.measures)||[]},d=function(t){var e,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin,s=u.default(void 0,o);if(null===i&&(i=l.custom[t]),s.getUnit(i))return s.describe(i).display;var a=null===(r=v(t).find((function(t){return t.measure===i})))||void 0===r?void 0:r.display;return a||i},m=function(t,e,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2;if(!t||!r||r===o||p[e])return t;if(null===o&&(!(o=f(e))||r===o))return t;var a=null===(i=n.UNIT_TYPES_DEFINITIONS_MAP[e])||void 0===i?void 0:i.origin,l=u.default(t,a).from(r).to(o);return Number.isFinite(l)?Math.round(l*Math.pow(10,s))/Math.pow(10,s):l};exports.convertArray=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,u=0;u<t.length;u+=1)t[u][e]=m(t[u][e],r,n,i,o);return t},exports.convertImmutables=function(t,e,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2;return t.map((function(t){var u=m(t.get(e),r,n,i,o);return t.set(e,u)}))},exports.convertImmutablesByBatch=function(t,e){return t.map((function(t){return e.reduce((function(t,e){var r=e.key,n=e.unitType,i=e.from,o=e.to,u=e.precision,s=t.get(r),a=m(s,n,i,o,u);return t.set(r,a)}),t)}))},exports.convertValue=m,exports.getAllUnitTypes=function(){return n.UNIT_DEFINITIONS},exports.getDefaultImperialUnit=function(t){return l.imperial[t]},exports.getDefaultUnits=function(){return l.custom},exports.getUniqueUnitsByType=function(t){var e=v(t);return r.uniqBy(e,"abbr")},exports.getUnitDescription=function(t){var e,r=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin;return u.default(void 0,r).describe(t)},exports.getUnitDisplay=d,exports.getUnitPlural=function(t){var e,r=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin;return p[t]?d(t):u.default(void 0,r).describe(f(t)).plural},exports.getUnitPreference=f,exports.getUnitSingular=function(t){var e,r=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin;return p[t]?d(t):u.default(void 0,r).describe(f(t)).singular},exports.getUnitSystem=function(){return"custom"},exports.getUnitsByType=v,exports.getUserUnits=function(){return l.custom},exports.subscribeForUserUnitsUpdates=function(t){return c.push(t),function(){c=c.filter((function(e){return e!==t}))}},exports.updateUserUnits=function(t){var e,i,o=t.userUnits,u=void 0===o?{}:o,s=t.companyUnits,f=void 0===s?{}:s,v=t.companyCustomUnitSystem,d=void 0===v?{}:v,m=t.userCustomUnitSystem,g=void 0===m?{}:m,I=t.companyCustomUnits;l.custom=a(a(a(a(a({},n.IMPERIAL_UNITS),f),d),u),g),I&&(e=I,p=r.mapValues(e||{},(function(t,e){var r=t.measures;return{display:t.name,imperial:e,measures:r.map((function(t){return{abbr:t.abbr,display:t.name,measure:t.abbr,plural:t.name,singular:t.name,system:"custom"}})),metric:e,origin:e,type:e}}))),i=l.custom,c.forEach((function(t){return t(i)}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@babel/runtime/helpers/defineProperty"),e=require("corva-convert-units"),r=require("lodash"),n=require("./constants/units.js");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(t),u=i(e);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){o.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var l={imperial:n.IMPERIAL_UNITS,metric:n.METRIC_UNITS,custom:a({},n.IMPERIAL_UNITS)},c=[],p={};var d=function(t){return l.custom[t]},f=function(t){var e,i=n.UNIT_TYPES_DEFINITIONS_MAP[t];return i?r.sortBy(u.default().list(i.origin),"abbr"):(null===(e=p[t])||void 0===e?void 0:e.measures)||[]},v=function(t){var e,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin,s=u.default(void 0,o);if(null===i&&(i=l.custom[t]),s.getUnit(i))return s.describe(i).display;var a=null===(r=f(t).find((function(t){return t.measure===i})))||void 0===r?void 0:r.display;return a||i},m=function(t,e,r){var i,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:2;if(!t||!r||r===o||p[e])return t;if(null===o&&(!(o=d(e))||r===o))return t;var a=null===(i=n.UNIT_TYPES_DEFINITIONS_MAP[e])||void 0===i?void 0:i.origin,l=u.default(t,a).from(r).to(o);return Number.isFinite(l)?Math.round(l*Math.pow(10,s))/Math.pow(10,s):l};exports.convertArray=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:2,u=0;u<t.length;u+=1)t[u][e]=m(t[u][e],r,n,i,o);return t},exports.convertValue=m,exports.getAllUnitTypes=function(){return n.UNIT_DEFINITIONS},exports.getDefaultImperialUnit=function(t){return l.imperial[t]},exports.getDefaultUnits=function(){return l.custom},exports.getUniqueUnitsByType=function(t){var e=f(t);return r.uniqBy(e,"abbr")},exports.getUnitDescription=function(t){var e,r=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin;return u.default(void 0,r).describe(t)},exports.getUnitDisplay=v,exports.getUnitPlural=function(t){var e,r=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin;return p[t]?v(t):u.default(void 0,r).describe(d(t)).plural},exports.getUnitPreference=d,exports.getUnitSingular=function(t){var e,r=null===(e=n.UNIT_TYPES_DEFINITIONS_MAP[t])||void 0===e?void 0:e.origin;return p[t]?v(t):u.default(void 0,r).describe(d(t)).singular},exports.getUnitSystem=function(){return"custom"},exports.getUnitsByType=f,exports.getUserUnits=function(){return l.custom},exports.subscribeForUserUnitsUpdates=function(t){return c.push(t),function(){c=c.filter((function(e){return e!==t}))}},exports.updateUserUnits=function(t){var e,i,o=t.userUnits,u=void 0===o?{}:o,s=t.companyUnits,d=void 0===s?{}:s,f=t.companyCustomUnitSystem,v=void 0===f?{}:f,m=t.userCustomUnitSystem,g=void 0===m?{}:m,I=t.companyCustomUnits;l.custom=a(a(a(a(a({},n.IMPERIAL_UNITS),d),v),u),g),I&&(e=I,p=r.mapValues(e||{},(function(t,e){var r=t.measures;return{display:t.name,imperial:e,measures:r.map((function(t){return{abbr:t.abbr,display:t.name,measure:t.abbr,plural:t.name,singular:t.name,system:"custom"}})),metric:e,origin:e,type:e}}))),i=l.custom,c.forEach((function(t){return t(i)}))};
2
2
  //# sourceMappingURL=convert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"convert.js","sources":["../../../src/utils/convert.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport convert from 'corva-convert-units';\nimport { mapValues, sortBy, uniqBy } from 'lodash';\n\nimport {\n IMPERIAL_UNITS,\n METRIC_UNITS,\n UNIT_DEFINITIONS,\n UNIT_TYPES_DEFINITIONS_MAP,\n} from './constants/units';\n\nconst DEFAULT_PRECISION = 2;\nconst UNIT_SYSTEM_TYPES = {\n custom: 'custom',\n default: 'imperial',\n};\n\nconst units = {\n imperial: IMPERIAL_UNITS,\n metric: METRIC_UNITS,\n custom: { ...IMPERIAL_UNITS },\n};\n\nconst unitSystem = UNIT_SYSTEM_TYPES.custom;\nlet userUnitsUpdatesSubscribers = [];\nlet customUnitDefinitions = {};\n\nexport const getAllUnitTypes = () => UNIT_DEFINITIONS;\n\nexport const getDefaultUnits = () => units[unitSystem];\n\nconst normalizeCompanyCustomUnits = customUnits =>\n mapValues(customUnits || {}, ({ measures, name }, type) => ({\n display: name,\n imperial: type,\n measures: measures.map(measure => ({\n abbr: measure.abbr,\n display: measure.name,\n measure: measure.abbr,\n plural: measure.name,\n singular: measure.name,\n system: 'custom',\n })),\n metric: type,\n origin: type,\n type,\n }));\n\n/**\n * Adds platform notification toast\n * @param {object} newUnits\n */\nfunction notifyAboutUserUnitsUpdate(newUnits) {\n userUnitsUpdatesSubscribers.forEach(callback => callback(newUnits));\n}\n\n/**\n * Updates current custom unit system with user data\n * @param {object} userData\n * @param {Record<string, string>} userData.userUnits\n * @param {Record<string, string>} userData.companyUnits\n */\nexport const updateUserUnits = ({\n userUnits = {},\n companyUnits = {},\n companyCustomUnitSystem = {},\n userCustomUnitSystem = {},\n companyCustomUnits,\n}) => {\n units.custom = {\n ...IMPERIAL_UNITS,\n ...companyUnits,\n ...companyCustomUnitSystem,\n ...userUnits,\n ...userCustomUnitSystem,\n };\n\n if (companyCustomUnits) {\n customUnitDefinitions = normalizeCompanyCustomUnits(companyCustomUnits);\n }\n\n notifyAboutUserUnitsUpdate(units.custom);\n};\n\nexport function getUserUnits() {\n return units.custom;\n}\n\n/**\n * Used for DC Isolated App container\n * @param {Function} newCallback\n */\nexport function subscribeForUserUnitsUpdates(newCallback) {\n userUnitsUpdatesSubscribers.push(newCallback);\n\n return () => {\n userUnitsUpdatesSubscribers = userUnitsUpdatesSubscribers.filter(\n callback => callback !== newCallback\n );\n };\n}\n\n/**\n * Retrieves a unit of a given type by current unit system\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPreference = unitType => units[unitSystem][unitType];\n\n/**\n * Lists all the units of a specific type\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUnitsByType = type => {\n const definition = UNIT_TYPES_DEFINITIONS_MAP[type];\n\n if (definition) {\n return sortBy(convert().list(definition.origin), 'abbr');\n }\n // NOTE: Look up in custom company units\n return customUnitDefinitions[type]?.measures || [];\n};\n\n/**\n * Returns unique units list for some measurements that use same units for imperial and metric system\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUniqueUnitsByType = type => {\n const definition = getUnitsByType(type);\n\n return uniqBy(definition, 'abbr');\n};\n\n/**\n * @deprecated - unit system can be custom, better to use convert functions\n */\nexport const getUnitSystem = () => unitSystem;\n\n/**\n * Retrieves the unit display name for a given unit type\n * @param {string} unitType length, mass, volume, etc\n * @param {string} [unitTo=null]\n * @returns {string}\n */\nexport const getUnitDisplay = (unitType, unitTo = null) => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(undefined, measure);\n if (unitTo === null) {\n unitTo = units.custom[unitType];\n }\n if (convertedValue.getUnit(unitTo)) {\n return convertedValue.describe(unitTo).display;\n }\n\n const customUnitDisplay = getUnitsByType(unitType).find(\n ({ measure }) => measure === unitTo\n )?.display;\n\n return customUnitDisplay || unitTo;\n};\n\n/**\n * @deprecated - should not depends on imperial system only, because we have mixed unit system\n * Retrieves the unit display name for imperial unit type\n * @param unitType length, mass, volume, etc\n * @returns string\n */\nexport const getDefaultImperialUnit = unitType => units.imperial[unitType];\n\n/**\n * Converts a single value\n * @param {number} value The value we want converted.\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @param {number} precision to round to the value\n * May be passed in my ConvertList\n * @return {number}\n */\nexport const convertValue = (value, unitType, from, to = null, precision = DEFAULT_PRECISION) => {\n if (!value || !from || from === to || !!customUnitDefinitions[unitType]) {\n return value;\n }\n\n if (to === null) {\n to = getUnitPreference(unitType);\n if (!to || from === to) {\n return value;\n }\n }\n\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(value, measure).from(from).to(to);\n\n return Number.isFinite(convertedValue)\n ? Math.round(convertedValue * 10 ** precision) / 10 ** precision\n : convertedValue;\n};\n\n/**\n * Converts a key in an immutable list of immutables.\n * @param {*} immt The list of maps/lists containing values that we want to convert\n * @param {string} key The key in each sub-iterable that we want to convert\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @param {number} precision to round to the value\n * @returns {*} Immutable\n */\nexport const convertImmutables = (\n immt,\n key,\n unitType,\n from,\n to = null,\n precision = DEFAULT_PRECISION\n) =>\n immt.map(currentUnitMap => {\n const convertedValue = convertValue(currentUnitMap.get(key), unitType, from, to, precision);\n return currentUnitMap.set(key, convertedValue);\n });\n\n/**\n * convertImmutablesByBatch is the expansion of convertImmutables\n * It allows you to convert the immutables by multiple keys/units at once.\n *\n * @param {*} immt immutable you want to convert\n * @param {*} conversionRules is the array of conversion to be done { key, unitType, from, to }\n */\nexport const convertImmutablesByBatch = (immt, conversionRules) =>\n immt.map(item =>\n conversionRules.reduce((convertingItem, conversionRule) => {\n const { key, unitType, from, to, precision } = conversionRule;\n const val = convertingItem.get(key);\n const convertedValue = convertValue(val, unitType, from, to, precision);\n return convertingItem.set(key, convertedValue);\n }, item)\n );\n\n/**\n * Converts a property in a simple array of js objects or arrays.\n * @param {number[][]} iterable The array of iterables containing values that we want to convert\n * @param {string} key The key in each sub-element that we want to convert\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @returns {number[][]}\n */\nexport const convertArray = (\n iterable = [],\n key,\n unitType,\n from,\n to = null,\n precision = DEFAULT_PRECISION\n) => {\n for (let i = 0; i < iterable.length; i += 1) {\n iterable[i][key] = convertValue(iterable[i][key], unitType, from, to, precision);\n }\n\n return iterable;\n};\n\n/**\n * Retrieves the full name for a given unit type, singular\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitSingular = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).singular;\n};\n\n/**\n * Retrieves the full name for a given unit type, plural\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPlural = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).plural;\n};\n\n/**\n * Retrieves unit data\n *\n * @param {string} unitType length, mass, volume, etc\n * @return {{\n * abbr: string,\n * measure: string,\n * system: string,\n * singular: string,\n * plural: string,\n * display: string\n * }}\n */\nexport const getUnitDescription = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n\n return convert(undefined, measure).describe(unitType);\n};\n"],"names":["units","imperial","IMPERIAL_UNITS","metric","METRIC_UNITS","custom","userUnitsUpdatesSubscribers","customUnitDefinitions","getUnitPreference","unitType","getUnitsByType","type","_customUnitDefinition","definition","UNIT_TYPES_DEFINITIONS_MAP","sortBy","convert","list","origin","measures","getUnitDisplay","_UNIT_TYPES_DEFINITIO","_getUnitsByType$find","unitTo","measure","convertedValue","undefined","getUnit","describe","display","customUnitDisplay","find","_ref3","convertValue","value","from","_UNIT_TYPES_DEFINITIO2","to","precision","Number","isFinite","Math","round","pow","iterable","key","arguments","length","i","immt","map","currentUnitMap","get","set","conversionRules","item","reduce","convertingItem","conversionRule","val","UNIT_DEFINITIONS","uniqBy","_UNIT_TYPES_DEFINITIO5","_UNIT_TYPES_DEFINITIO4","plural","_UNIT_TYPES_DEFINITIO3","singular","newCallback","push","filter","callback","_ref2","customUnits","newUnits","_ref2$userUnits","userUnits","_ref2$companyUnits","companyUnits","_ref2$companyCustomUn","companyCustomUnitSystem","_ref2$userCustomUnitS","userCustomUnitSystem","companyCustomUnits","mapValues","name","abbr","system","forEach"],"mappings":"m3BAWA,IAMMA,EAAQ,CACZC,SAAUC,EAAcA,eACxBC,OAAQC,EAAYA,aACpBC,YAAaH,mBAIXI,EAA8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Q,SAAUA,EAAS+B,KAAI,SAAA1B,GAAO,MAAK,CACjC6D,KAAM7D,EAAQ6D,KACdxD,QAASL,EAAQ4D,KACjB5D,QAASA,EAAQ6D,KACjBrB,OAAQxC,EAAQ4D,KAChBlB,SAAU1C,EAAQ4D,KAClBE,OAAQ,SACT,IACDnF,OAAQQ,EACRO,OAAQP,EACRA,KAAAA,EACD,KAMiC8D,EA6BPzE,EAAMK,OA5BjCC,EAA4BiF,SAAQ,SAAAjB,GAAQ,OAAIA,EAASG,KA6B3D"}
1
+ {"version":3,"file":"convert.js","sources":["../../../src/utils/convert.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport convert from 'corva-convert-units';\nimport { mapValues, sortBy, uniqBy } from 'lodash';\n\nimport {\n IMPERIAL_UNITS,\n METRIC_UNITS,\n UNIT_DEFINITIONS,\n UNIT_TYPES_DEFINITIONS_MAP,\n} from './constants/units';\n\nconst DEFAULT_PRECISION = 2;\nconst UNIT_SYSTEM_TYPES = {\n custom: 'custom',\n default: 'imperial',\n};\n\nconst units = {\n imperial: IMPERIAL_UNITS,\n metric: METRIC_UNITS,\n custom: { ...IMPERIAL_UNITS },\n};\n\nconst unitSystem = UNIT_SYSTEM_TYPES.custom;\nlet userUnitsUpdatesSubscribers = [];\nlet customUnitDefinitions = {};\n\nexport const getAllUnitTypes = () => UNIT_DEFINITIONS;\n\nexport const getDefaultUnits = () => units[unitSystem];\n\nconst normalizeCompanyCustomUnits = customUnits =>\n mapValues(customUnits || {}, ({ measures, name }, type) => ({\n display: name,\n imperial: type,\n measures: measures.map(measure => ({\n abbr: measure.abbr,\n display: measure.name,\n measure: measure.abbr,\n plural: measure.name,\n singular: measure.name,\n system: 'custom',\n })),\n metric: type,\n origin: type,\n type,\n }));\n\n/**\n * Adds platform notification toast\n * @param {object} newUnits\n */\nfunction notifyAboutUserUnitsUpdate(newUnits) {\n userUnitsUpdatesSubscribers.forEach(callback => callback(newUnits));\n}\n\n/**\n * Updates current custom unit system with user data\n * @param {object} userData\n * @param {Record<string, string>} userData.userUnits\n * @param {Record<string, string>} userData.companyUnits\n */\nexport const updateUserUnits = ({\n userUnits = {},\n companyUnits = {},\n companyCustomUnitSystem = {},\n userCustomUnitSystem = {},\n companyCustomUnits,\n}) => {\n units.custom = {\n ...IMPERIAL_UNITS,\n ...companyUnits,\n ...companyCustomUnitSystem,\n ...userUnits,\n ...userCustomUnitSystem,\n };\n\n if (companyCustomUnits) {\n customUnitDefinitions = normalizeCompanyCustomUnits(companyCustomUnits);\n }\n\n notifyAboutUserUnitsUpdate(units.custom);\n};\n\nexport function getUserUnits() {\n return units.custom;\n}\n\n/**\n * Used for DC Isolated App container\n * @param {Function} newCallback\n */\nexport function subscribeForUserUnitsUpdates(newCallback) {\n userUnitsUpdatesSubscribers.push(newCallback);\n\n return () => {\n userUnitsUpdatesSubscribers = userUnitsUpdatesSubscribers.filter(\n callback => callback !== newCallback\n );\n };\n}\n\n/**\n * Retrieves a unit of a given type by current unit system\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPreference = unitType => units[unitSystem][unitType];\n\n/**\n * Lists all the units of a specific type\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUnitsByType = type => {\n const definition = UNIT_TYPES_DEFINITIONS_MAP[type];\n\n if (definition) {\n return sortBy(convert().list(definition.origin), 'abbr');\n }\n // NOTE: Look up in custom company units\n return customUnitDefinitions[type]?.measures || [];\n};\n\n/**\n * Returns unique units list for some measurements that use same units for imperial and metric system\n * @param {string} type\n * @returns {Object[]}\n */\nexport const getUniqueUnitsByType = type => {\n const definition = getUnitsByType(type);\n\n return uniqBy(definition, 'abbr');\n};\n\n/**\n * @deprecated - unit system can be custom, better to use convert functions\n */\nexport const getUnitSystem = () => unitSystem;\n\n/**\n * Retrieves the unit display name for a given unit type\n * @param {string} unitType length, mass, volume, etc\n * @param {string} [unitTo=null]\n * @returns {string}\n */\nexport const getUnitDisplay = (unitType, unitTo = null) => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(undefined, measure);\n if (unitTo === null) {\n unitTo = units.custom[unitType];\n }\n if (convertedValue.getUnit(unitTo)) {\n return convertedValue.describe(unitTo).display;\n }\n\n const customUnitDisplay = getUnitsByType(unitType).find(\n ({ measure }) => measure === unitTo\n )?.display;\n\n return customUnitDisplay || unitTo;\n};\n\n/**\n * @deprecated - should not depends on imperial system only, because we have mixed unit system\n * Retrieves the unit display name for imperial unit type\n * @param unitType length, mass, volume, etc\n * @returns string\n */\nexport const getDefaultImperialUnit = unitType => units.imperial[unitType];\n\n/**\n * Converts a single value\n * @param {number} value The value we want converted.\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @param {number} precision to round to the value\n * May be passed in my ConvertList\n * @return {number}\n */\nexport const convertValue = (value, unitType, from, to = null, precision = DEFAULT_PRECISION) => {\n if (!value || !from || from === to || !!customUnitDefinitions[unitType]) {\n return value;\n }\n\n if (to === null) {\n to = getUnitPreference(unitType);\n if (!to || from === to) {\n return value;\n }\n }\n\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n const convertedValue = convert(value, measure).from(from).to(to);\n\n return Number.isFinite(convertedValue)\n ? Math.round(convertedValue * 10 ** precision) / 10 ** precision\n : convertedValue;\n};\n\n/**\n * Converts a property in a simple array of js objects or arrays.\n * @param {number[][]} iterable The array of iterables containing values that we want to convert\n * @param {string} key The key in each sub-element that we want to convert\n * @param {string} unitType The class of unit such as volume, length, mass, etc.\n * @param {string} from The specific unit such as m, gal, lb, etc.\n * @param {string} to (optional) the unit that we want to convert the value to.\n * @returns {number[][]}\n */\nexport const convertArray = (\n iterable = [],\n key,\n unitType,\n from,\n to = null,\n precision = DEFAULT_PRECISION\n) => {\n for (let i = 0; i < iterable.length; i += 1) {\n iterable[i][key] = convertValue(iterable[i][key], unitType, from, to, precision);\n }\n\n return iterable;\n};\n\n/**\n * Retrieves the full name for a given unit type, singular\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitSingular = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).singular;\n};\n\n/**\n * Retrieves the full name for a given unit type, plural\n * @param {string} unitType length, mass, volume, etc\n * @returns {string}\n */\nexport const getUnitPlural = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n if (customUnitDefinitions[unitType]) {\n return getUnitDisplay(unitType);\n }\n\n return convert(undefined, measure).describe(getUnitPreference(unitType)).plural;\n};\n\n/**\n * Retrieves unit data\n *\n * @param {string} unitType length, mass, volume, etc\n * @return {{\n * abbr: string,\n * measure: string,\n * system: string,\n * singular: string,\n * plural: string,\n * display: string\n * }}\n */\nexport const getUnitDescription = unitType => {\n const measure = UNIT_TYPES_DEFINITIONS_MAP[unitType]?.origin;\n\n return convert(undefined, measure).describe(unitType);\n};\n"],"names":["units","imperial","IMPERIAL_UNITS","metric","METRIC_UNITS","custom","userUnitsUpdatesSubscribers","customUnitDefinitions","getUnitPreference","unitType","getUnitsByType","type","_customUnitDefinition","definition","UNIT_TYPES_DEFINITIONS_MAP","sortBy","convert","list","origin","measures","getUnitDisplay","_UNIT_TYPES_DEFINITIO","_getUnitsByType$find","unitTo","measure","convertedValue","undefined","getUnit","describe","display","customUnitDisplay","find","_ref3","convertValue","value","from","_UNIT_TYPES_DEFINITIO2","to","precision","Number","isFinite","Math","round","pow","iterable","key","arguments","length","i","UNIT_DEFINITIONS","uniqBy","_UNIT_TYPES_DEFINITIO5","_UNIT_TYPES_DEFINITIO4","plural","_UNIT_TYPES_DEFINITIO3","singular","newCallback","push","filter","callback","_ref2","customUnits","newUnits","_ref2$userUnits","userUnits","_ref2$companyUnits","companyUnits","_ref2$companyCustomUn","companyCustomU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ASpB,EAAkBC,IAAW8C,QAC3E,wBAnG6B,WAAH,MA7HhB,QA6HmC,gDAtDtC,WACL,OAAOvD,EAAMK,MACf,uCAMO,SAAsCmD,GAG3C,OAFAlD,EAA4BmD,KAAKD,GAE1B,WACLlD,EAA8BA,EAA4BoD,QACxD,SAAAC,GAAQ,OAAIA,IAAaH,KAG/B,0BAtC+B,SAMzBI,GAAA,IArC8BC,EAqBAC,EAgB9BC,EAAAH,EALJI,UAAAA,OAAS,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAL,EACdM,aAAAA,OAAY,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAP,EACjBQ,wBAAAA,OAAuB,IAAAD,EAAG,CAAE,EAAAA,EAAAE,EAAAT,EAC5BU,qBAAAA,OAAoB,IAAAD,EAAG,CAAE,EAAAA,EACzBE,IAAAA,mBAEAvE,EAAMK,OACDH,EAAAA,EAAAA,EAAAA,EAAAA,EAAAA,CAAAA,EAAAA,EAAAA,gBACAgE,GACAE,GACAJ,GACAM,GAGDC,IA9C8BV,EA+CoBU,EAApDhE,EA9CFiE,EAASA,UAACX,GAAe,CAAE,GAAE,WAAqBlD,GAAI,IAAtBQ,IAAAA,SAAc,MAAc,CAC1DU,UADwC4C,KAExCxE,SAAUU,EACVQ,SAAUA,EAASuD,KAAI,SAAAlD,GAAO,MAAK,CACjCmD,KAAMnD,EAAQmD,KACd9C,QAASL,EAAQiD,KACjBjD,QAASA,EAAQmD,KACjBtB,OAAQ7B,EAAQiD,KAChBlB,SAAU/B,EAAQiD,KAClBG,OAAQ,SACT,IACDzE,OAAQQ,EACRO,OAAQP,EACRA,KAAAA,EACD,KAMiCmD,EA6BP9D,EAAMK,OA5BjCC,EAA4BuE,SAAQ,SAAAlB,GAAQ,OAAIA,EAASG,KA6B3D"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("immutable"),n=require("query-string"),t=require("../constants/devcenter.js");require("../constants/goals.js");var r=require("../constants/segment.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../constants/alerts.js"),require("../constants/apps.js"),require("../constants/drillstring.js"),require("../constants/completion.js"),require("../constants/appPackages.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("../constants/corvaCompanyId.js"),require("lodash"),require("../components/GradientManager/configuration/constants.js");var o=i(n);exports.CONDITIONAL_MULTI_RIG_FIELD="multi_rig_on_chipless_dashboard",exports.MAXIMIZE_DC_PARAM="maximizeDC",exports.createDevCenterRouter=function(e){var n,t;return{push:function(n){if("string"==typeof n)e.push(n);else{var t=n.query?o.default.stringify(n.query):"",r=t?"?".concat(t):void 0;e.push({pathname:n.pathname,search:r})}},location:{pathname:null==e||null===(n=e.location)||void 0===n?void 0:n.pathname,query:o.default.parse(null==e||null===(t=e.location)||void 0===t?void 0:t.search)}}},exports.getAppIdentifier=function(e){var n=e.appKey,t=e.version,r=e.isLocalDebugMode;if(!n)return"";var i=n.replace(/\./g,"_");return r?i:"".concat(i,"-").concat(t)},exports.getAppName=function(e){var n,t,r,i,o;return null!==(n=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e||null===(r=e.package)||void 0===r||null===(i=r.manifest)||void 0===i||null===(o=i.application)||void 0===o?void 0:o.name)&&void 0!==n?n:""},exports.getAppSegment=function(n){var t,i;if(!n)return r.SEGMENTS.DRILLING;var o,s=n.settings instanceof e.Map?n.settings.get("segment"):null===(t=n.settings)||void 0===t?void 0:t.segment,a=null!=s?s:null===(i=n.segment)||void 0===i?void 0:i[0];return a?a===r.SEGMENTS.COMPLETION&&"core"===(null===(o=n.app)||void 0===o?void 0:o.platform)&&n.category===r.DRILLOUT_SEGMENT?r.DRILLOUT_SEGMENT:a:null!=a?a:r.SEGMENTS.DRILLING},exports.getTimestampFromQuery=function(e){return e?+(e.split("#")[2]||"").replace("}",""):void 0},exports.isAppMaximized=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.DEV_CENTER_CLI_APP_ID;return n===+(null==e?void 0:e.maximizeDC)},exports.isCorvaApp=function(e){var n,t;return"corva"===(null==e||null===(n=e.app_key)||void 0===n||null===(t=n.split("."))||void 0===t?void 0:t[0])},exports.isDCAppMultiRig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.uiSettings,t=e.isChiplessDashboard;return!!(null!=n&&n.multi_rig||null!=n&&n.multi_rig_on_chipless_dashboard&&t)},exports.isDevCenterApp=function(e){var n;return"dev_center"===((null==e?void 0:e.platform)||(null==e||null===(n=e.app)||void 0===n?void 0:n.platform))},exports.isIsolationEnabledInPackageManifest=function(e){var n,t,r;return null===(n=null==e||null===(t=e.manifest)||void 0===t||null===(r=t.settings)||void 0===r?void 0:r.enable_isolation)||void 0===n||n};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("query-string"),n=require("../constants/devcenter.js");require("../constants/goals.js");var t=require("../constants/segment.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../constants/alerts.js"),require("../constants/apps.js"),require("../constants/drillstring.js"),require("../constants/completion.js"),require("../constants/appPackages.js"),require("../constants/notifications.js"),require("../constants/feed.js"),require("../constants/bha.js"),require("../constants/corvaCompanyId.js"),require("lodash"),require("../components/GradientManager/configuration/constants.js");var i=r(e);exports.CONDITIONAL_MULTI_RIG_FIELD="multi_rig_on_chipless_dashboard",exports.MAXIMIZE_DC_PARAM="maximizeDC",exports.createDevCenterRouter=function(e){var n,t;return{push:function(n){if("string"==typeof n)e.push(n);else{var t=n.query?i.default.stringify(n.query):"",r=t?"?".concat(t):void 0;e.push({pathname:n.pathname,search:r})}},location:{pathname:null==e||null===(n=e.location)||void 0===n?void 0:n.pathname,query:i.default.parse(null==e||null===(t=e.location)||void 0===t?void 0:t.search)}}},exports.getAppIdentifier=function(e){var n=e.appKey,t=e.version,r=e.isLocalDebugMode;if(!n)return"";var i=n.replace(/\./g,"_");return r?i:"".concat(i,"-").concat(t)},exports.getAppName=function(e){var n,t,r,i,o;return null!==(n=null!==(t=null==e?void 0:e.name)&&void 0!==t?t:null==e||null===(r=e.package)||void 0===r||null===(i=r.manifest)||void 0===i||null===(o=i.application)||void 0===o?void 0:o.name)&&void 0!==n?n:""},exports.getAppSegment=function(e){var n,r;if(!e)return t.SEGMENTS.DRILLING;var i,o=null===(n=e.settings)||void 0===n?void 0:n.segment,s=null!=o?o:null===(r=e.segment)||void 0===r?void 0:r[0];return s?s===t.SEGMENTS.COMPLETION&&"core"===(null===(i=e.app)||void 0===i?void 0:i.platform)&&e.category===t.DRILLOUT_SEGMENT?t.DRILLOUT_SEGMENT:s:null!=s?s:t.SEGMENTS.DRILLING},exports.getTimestampFromQuery=function(e){return e?+(e.split("#")[2]||"").replace("}",""):void 0},exports.isAppMaximized=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.DEV_CENTER_CLI_APP_ID;return t===+(null==e?void 0:e.maximizeDC)},exports.isCorvaApp=function(e){var n,t;return"corva"===(null==e||null===(n=e.app_key)||void 0===n||null===(t=n.split("."))||void 0===t?void 0:t[0])},exports.isDCAppMultiRig=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.uiSettings,t=e.isChiplessDashboard;return!!(null!=n&&n.multi_rig||null!=n&&n.multi_rig_on_chipless_dashboard&&t)},exports.isDevCenterApp=function(e){var n;return"dev_center"===((null==e?void 0:e.platform)||(null==e||null===(n=e.app)||void 0===n?void 0:n.platform))},exports.isIsolationEnabledInPackageManifest=function(e){var n,t,r;return null===(n=null==e||null===(t=e.manifest)||void 0===t||null===(r=t.settings)||void 0===r?void 0:r.enable_isolation)||void 0===n||n};
2
2
  //# sourceMappingURL=devcenter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"devcenter.js","sources":["../../../src/utils/devcenter.js"],"sourcesContent":["import { Map as ImmutableMap } from 'immutable';\nimport queryString from 'query-string';\n\nimport { DEV_CENTER_CLI_APP_ID } from '~/constants';\nimport { DRILLOUT_SEGMENT, SEGMENTS } from '~/constants/segment';\n\nexport const MAXIMIZE_DC_PARAM = 'maximizeDC';\n\nexport const getAppIdentifier = ({ appKey, version, isLocalDebugMode }) => {\n if (!appKey) return '';\n const appIdentifier = appKey.replace(/\\./g, '_');\n return isLocalDebugMode ? appIdentifier : `${appIdentifier}-${version}`;\n};\nexport const isAppMaximized = (query, appId = DEV_CENTER_CLI_APP_ID) =>\n appId === +query?.[MAXIMIZE_DC_PARAM];\n\nexport function createDevCenterRouter(reactRouter) {\n return {\n push: params => {\n if (typeof params === 'string') {\n reactRouter.push(params);\n } else {\n const qs = params.query ? queryString.stringify(params.query) : '';\n const search = qs ? `?${qs}` : undefined;\n reactRouter.push({ pathname: params.pathname, search });\n }\n },\n location: {\n pathname: reactRouter?.location?.pathname,\n query: queryString.parse(reactRouter?.location?.search),\n },\n };\n}\n\nexport const getTimestampFromQuery = query =>\n query ? +(query.split('#')[2] || '').replace('}', '') : undefined;\n\nexport const getAppName = app => app?.name ?? app?.package?.manifest?.application?.name ?? '';\n\nexport const isDevCenterApp = app => (app?.platform || app?.app?.platform) === 'dev_center';\n\nexport const CONDITIONAL_MULTI_RIG_FIELD = 'multi_rig_on_chipless_dashboard';\n\nexport const isDCAppMultiRig = ({ uiSettings, isChiplessDashboard } = {}) =>\n !!(uiSettings?.multi_rig || (uiSettings?.[CONDITIONAL_MULTI_RIG_FIELD] && isChiplessDashboard));\n\nexport const getAppSegment = app => {\n if (!app) {\n return SEGMENTS.DRILLING;\n }\n const segmentFromAppSettings =\n app.settings instanceof ImmutableMap ? app.settings.get('segment') : app.settings?.segment;\n\n const segment = segmentFromAppSettings ?? app.segment?.[0];\n\n if (segment) {\n // TODO: Remove this special case once all Core Drillout apps are migrated to Intervention segment\n if (\n segment === SEGMENTS.COMPLETION &&\n app.app?.platform === 'core' &&\n app.category === DRILLOUT_SEGMENT\n ) {\n return DRILLOUT_SEGMENT;\n }\n return segment;\n }\n return segment ?? SEGMENTS.DRILLING;\n};\n\nexport const isCorvaApp = app => app?.app_key?.split('.')?.[0] === 'corva';\n\n// For the transition period, the default value is true\n// After the transition - it'll be changed to false\nexport const isIsolationEnabledInPackageManifest = appPackage =>\n appPackage?.manifest?.settings?.enable_isolation ?? true;\n"],"names":["reactRouter","_reactRouter$location","_reactRouter$location2","push","params","qs","query","queryString","stringify","search","undefined","pathname","location","parse","_ref","appKey","version","isLocalDebugMode","appIdentifier","replace","concat","app","_ref2","_app$name","_app$package","_app$package$manifest","_app$package$manifest2","name","package","manifest","application","_app$settings","_app$segment","SEGMENTS","DRILLING","_app$app2","segmentFromAppSettings","settings","ImmutableMap","get","segment","COMPLETION","platform","category","DRILLOUT_SEGMENT","split","appId","DEV_CENTER_CLI_APP_ID","_app$app_key","_app$app_key$split","app_key","_ref3","arguments","length","uiSettings","isChiplessDashboard","multi_rig","_app$app","appPackage","_appPackage$manifest$","_appPackage$manifest","_appPackage$manifest$2","enable_isolation"],"mappings":"+vBAyC2C,4DAnCV,2CAU1B,SAA+BA,GAAa,IAAAC,EAAAC,EACjD,MAAO,CACLC,KAAM,SAAAC,GACJ,GAAsB,iBAAXA,EACTJ,EAAYG,KAAKC,OACZ,CACL,IAAMC,EAAKD,EAAOE,MAAQC,EAAAA,QAAYC,UAAUJ,EAAOE,OAAS,GAC1DG,EAASJ,EAASA,IAAAA,OAAAA,QAAOK,EAC/BV,EAAYG,KAAK,CAAEQ,SAAUP,EAAOO,SAAUF,OAAAA,GAChD,CACD,EACDG,SAAU,CACRD,SAAUX,SAAA,QAAWC,EAAXD,EAAaY,gBAAb,IAAAX,OAAW,EAAXA,EAAuBU,SACjCL,MAAOC,EAAAA,QAAYM,MAAMb,SAAqB,QAAVE,EAAXF,EAAaY,gBAAQ,IAAAV,OAAV,EAAXA,EAAuBO,SAGtD,2BAxBgC,SAA2CK,GAAA,IAAxCC,IAAAA,OAAQC,IAAAA,QAASC,IAAAA,iBAClD,IAAKF,EAAQ,MAAO,GACpB,IAAMG,EAAgBH,EAAOI,QAAQ,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B5B,EAAA4B,EAA2B,GAAc,0BA1B3C,WAAH,IAAAE,EAAAC,UAAAC,OAAA,QAAA3C,IAAA0C,UAAA,GAAAA,UAAA,GAA0C,CAAE,EAAtCE,IAAAA,WAAYC,IAAAA,oBAAmB,SAC5DD,SAAAA,EAAYE,WAAcF,SAAAA,EAAwC,iCAAKC,EAAqB,yBALnE,SAAAlC,GAAG,IAAAoC,EAAA,MAA8C,iBAAzCpC,aAAAA,EAAAA,EAAKqB,YAAYrB,SAAA,UAAAA,EAAKA,WAAL,IAAAoC,SAAAA,EAAUf,UAA0B,8CAkCxC,SAAAgB,GAAU,IAAAC,EAAAC,EAAAC,EAAA,eAAAF,EAC3DD,SAAA,QAAUE,EAAVF,EAAY7B,gBAAZ,IAAA+B,GAA8B,QAA9BC,EAAAD,EAAsBvB,gBAAQ,IAAAwB,OAApB,EAAVA,EAAgCC,gCAAwB"}
1
+ {"version":3,"file":"devcenter.js","sources":["../../../src/utils/devcenter.js"],"sourcesContent":["import queryString from 'query-string';\n\nimport { DEV_CENTER_CLI_APP_ID } from '~/constants';\nimport { DRILLOUT_SEGMENT, SEGMENTS } from '~/constants/segment';\n\nexport const MAXIMIZE_DC_PARAM = 'maximizeDC';\n\nexport const getAppIdentifier = ({ appKey, version, isLocalDebugMode }) => {\n if (!appKey) return '';\n const appIdentifier = appKey.replace(/\\./g, '_');\n return isLocalDebugMode ? appIdentifier : `${appIdentifier}-${version}`;\n};\nexport const isAppMaximized = (query, appId = DEV_CENTER_CLI_APP_ID) =>\n appId === +query?.[MAXIMIZE_DC_PARAM];\n\nexport function createDevCenterRouter(reactRouter) {\n return {\n push: params => {\n if (typeof params === 'string') {\n reactRouter.push(params);\n } else {\n const qs = params.query ? queryString.stringify(params.query) : '';\n const search = qs ? `?${qs}` : undefined;\n reactRouter.push({ pathname: params.pathname, search });\n }\n },\n location: {\n pathname: reactRouter?.location?.pathname,\n query: queryString.parse(reactRouter?.location?.search),\n },\n };\n}\n\nexport const getTimestampFromQuery = query =>\n query ? +(query.split('#')[2] || '').replace('}', '') : undefined;\n\nexport const getAppName = app => app?.name ?? app?.package?.manifest?.application?.name ?? '';\n\nexport const isDevCenterApp = app => (app?.platform || app?.app?.platform) === 'dev_center';\n\nexport const CONDITIONAL_MULTI_RIG_FIELD = 'multi_rig_on_chipless_dashboard';\n\nexport const isDCAppMultiRig = ({ uiSettings, isChiplessDashboard } = {}) =>\n !!(uiSettings?.multi_rig || (uiSettings?.[CONDITIONAL_MULTI_RIG_FIELD] && isChiplessDashboard));\n\nexport const getAppSegment = app => {\n if (!app) {\n return SEGMENTS.DRILLING;\n }\n const segmentFromAppSettings = app.settings?.segment;\n\n const segment = segmentFromAppSettings ?? app.segment?.[0];\n\n if (segment) {\n // TODO: Remove this special case once all Core Drillout apps are migrated to Intervention segment\n if (\n segment === SEGMENTS.COMPLETION &&\n app.app?.platform === 'core' &&\n app.category === DRILLOUT_SEGMENT\n ) {\n return DRILLOUT_SEGMENT;\n }\n return segment;\n }\n return segment ?? SEGMENTS.DRILLING;\n};\n\nexport const isCorvaApp = app => app?.app_key?.split('.')?.[0] === 'corva';\n\n// For the transition period, the default value is true\n// After the transition - it'll be changed to false\nexport const isIsolationEnabledInPackageManifest = appPackage =>\n appPackage?.manifest?.settings?.enable_isolation ?? true;\n"],"names":["reactRouter","_reactRouter$location","_reactRouter$location2","push","params","qs","query","queryString","stringify","search","undefined","pathname","location","parse","_ref","appKey","version","isLocalDebugMode","appIdentifier","replace","concat","app","_ref2","_app$name","_app$package","_app$package$manifest","_app$package$manifest2","name","package","manifest","application","_app$settings","_app$segment","SEGMENTS","DRILLING","_app$app2","segmentFromAppSettings","settings","segment","COMPLETION","platform","category","DRILLOUT_SEGMENT","split","appId","DEV_CENTER_CLI_APP_ID","_app$app_key","_app$app_key$split","app_key","_ref3","arguments","length","uiSettings","isChiplessDashboard","multi_rig","_app$app","appPackage","_appPackage$manifest$","_appPackage$manifest","_appPackage$manifest$2","enable_isolation"],"mappings":"wuBAwC2C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