@corva/ui 3.9.0-9 → 3.9.0

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 (184) hide show
  1. package/cjs-bundle/components/AddComment/Popover.js +1 -1
  2. package/cjs-bundle/components/AddComment/components/Content.js +1 -1
  3. package/cjs-bundle/components/BICOffsetPickerDialog/index.js +1 -1
  4. package/cjs-bundle/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  5. package/cjs-bundle/components/Casing/CasingTableV2/components/Component.js +1 -1
  6. package/cjs-bundle/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  7. package/cjs-bundle/components/CollapsableSidebar.js +1 -1
  8. package/cjs-bundle/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  9. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  10. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  11. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  12. package/cjs-bundle/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  13. package/cjs-bundle/components/DocumentViewer/DocumentViewer.js +1 -1
  14. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  15. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  16. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  17. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  18. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  19. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  20. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  21. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  22. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  23. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  24. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  25. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  26. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  27. package/cjs-bundle/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  28. package/cjs-bundle/components/FeedItem/FeedItem.js +1 -1
  29. package/cjs-bundle/components/FeedItem/components/FeedComments.js +1 -1
  30. package/cjs-bundle/components/ImageViewer/index.js +1 -1
  31. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  32. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  33. package/cjs-bundle/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  34. package/cjs-bundle/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  35. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  36. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  37. package/cjs-bundle/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  38. package/cjs-bundle/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  39. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  40. package/cjs-bundle/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  41. package/cjs-bundle/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  42. package/cjs-bundle/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  43. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  44. package/cjs-bundle/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
  45. package/cjs-bundle/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  46. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  47. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  48. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  49. package/cjs-bundle/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
  50. package/cjs-bundle/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  51. package/cjs-bundle/components/OffsetWellPickerV4/effects/useAdvancedWells.js +1 -1
  52. package/cjs-bundle/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
  53. package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
  54. package/cjs-bundle/components/OffsetWellPickerV4/effects/useFilteredWells.js +1 -1
  55. package/cjs-bundle/components/OffsetWellPickerV4/effects/useSortedWells.js +1 -1
  56. package/cjs-bundle/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
  57. package/cjs-bundle/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
  58. package/cjs-bundle/components/PadOffsetsPicker/StagesSelector.js +1 -1
  59. package/cjs-bundle/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  60. package/cjs-bundle/components/Popover/Popover.js +1 -1
  61. package/cjs-bundle/components/Popper/Popper.js +1 -1
  62. package/cjs-bundle/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  63. package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
  64. package/cjs-bundle/componentsV2/AppHeader/V3/AppHeaderV3.scss.js +1 -1
  65. package/cjs-bundle/componentsV2/AppHeader/V3/useResponsivity.js +1 -1
  66. package/cjs-bundle/componentsV2/Modal/Modal.js +1 -1
  67. package/cjs-bundle/componentsV2/Modal/Modal.scss.js +1 -1
  68. package/cjs-bundle/componentsV2/ModalWindow/ModalWindow.js +1 -0
  69. package/cjs-bundle/componentsV2/ModalWindow/ModalWindow.scss.js +1 -0
  70. package/cjs-bundle/componentsV2/index.js +1 -1
  71. package/cjs-bundle/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  72. package/cjs-bundle/types/shared/Completions.js +1 -1
  73. package/components/AddComment/Popover.js +1 -1
  74. package/components/AddComment/components/Content.js +1 -1
  75. package/components/BICOffsetPickerDialog/index.js +1 -1
  76. package/components/Casing/CasingTableV2/components/CasingJoints/Editor.js +1 -1
  77. package/components/Casing/CasingTableV2/components/Component.js +1 -1
  78. package/components/Casing/CasingTableV2/components/DrillPipe/Editor.js +1 -1
  79. package/components/CollapsableSidebar.js +1 -1
  80. package/components/DevCenter/AppsDataProvider/effects/utils.d.ts.map +1 -1
  81. package/components/DevCenter/AppsDataProvider/effects/utils.js +1 -1
  82. package/components/DevCenter/DevCenterAppContainer/DevCenterAppContainer.js +1 -1
  83. package/components/DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.js +1 -1
  84. package/components/DevCenter/DevCenterAppContainer/components/NonPriorityMenus/NonPriorityMenus.js +1 -1
  85. package/components/DevCenter/DevCenterAppContainer/components/PriorityMenus/PriorityMenus.js +1 -1
  86. package/components/DocumentViewer/DocumentViewer.js +1 -1
  87. package/components/Drillstring/BHAComponentsTable/components/Agitator/Editor.js +1 -1
  88. package/components/Drillstring/BHAComponentsTable/components/Bit/Editor.js +1 -1
  89. package/components/Drillstring/BHAComponentsTable/components/Component.js +1 -1
  90. package/components/Drillstring/BHAComponentsTable/components/DrillCollar/Editor.js +1 -1
  91. package/components/Drillstring/BHAComponentsTable/components/DrillPipe/Editor.js +1 -1
  92. package/components/Drillstring/BHAComponentsTable/components/Jar/Editor.js +1 -1
  93. package/components/Drillstring/BHAComponentsTable/components/Lwd/Editor.js +1 -1
  94. package/components/Drillstring/BHAComponentsTable/components/Mwd/Editor.js +1 -1
  95. package/components/Drillstring/BHAComponentsTable/components/Pdm/Editor.js +1 -1
  96. package/components/Drillstring/BHAComponentsTable/components/Rss/Editor.js +1 -1
  97. package/components/Drillstring/BHAComponentsTable/components/Stabilizer/Editor.js +1 -1
  98. package/components/Drillstring/BHAComponentsTable/components/Sub/Editor.js +1 -1
  99. package/components/Drillstring/BHAComponentsTable/components/Ur/Editor.js +1 -1
  100. package/components/Drillstring/BHAComponentsTable/components/shared/ConfirmationPopup.js +1 -1
  101. package/components/FeedItem/FeedItem.js +1 -1
  102. package/components/FeedItem/components/FeedComments.js +1 -1
  103. package/components/ImageViewer/index.js +1 -1
  104. package/components/OffsetWellPickerV2/components/Filter/NonEngineeredWellsSwitch.js +1 -1
  105. package/components/OffsetWellPickerV2/components/Filter/SidetrackSwitch.js +1 -1
  106. package/components/OffsetWellPickerV2/components/Filter/ToggleMapButton.js +1 -1
  107. package/components/OffsetWellPickerV2/components/Table/MetricsAddMenu.js +1 -1
  108. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Filter/SidetrackSwitch.js +1 -1
  109. package/components/OffsetWellPickerV3/components/CustomSelectionView/components/Table/MetricsAddMenu.js +1 -1
  110. package/components/OffsetWellPickerV3/components/CustomSelectionView/index.js +1 -1
  111. package/components/OffsetWellPickerV3/components/OffsetWellSelectionView/index.js +1 -1
  112. package/components/OffsetWellPickerV3/components/TabSelection/ToggleMapButton.js +1 -1
  113. package/components/OffsetWellPickerV3/components/TabSelection/index.js +1 -1
  114. package/components/OffsetWellPickerV3/components/WellHubView/index.js +1 -1
  115. package/components/OffsetWellPickerV3/components/shared/OffsetWellTableHead.js +1 -1
  116. package/components/OffsetWellPickerV4/OffsetWellPickerV4.d.ts.map +1 -1
  117. package/components/OffsetWellPickerV4/OffsetWellPickerV4.js +1 -1
  118. package/components/OffsetWellPickerV4/OffsetWellPickerV4.module.css.js +1 -1
  119. package/components/OffsetWellPickerV4/components/Filter/Filter.js +1 -1
  120. package/components/OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/AutoCompleteAssetSearch.js +1 -1
  121. package/components/OffsetWellPickerV4/components/OffsetWellsTable/MetricsSettingMenu.js +1 -1
  122. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js +1 -1
  123. package/components/OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.module.css.js +1 -1
  124. package/components/OffsetWellPickerV4/components/Toolbar/Toolbar.js +1 -1
  125. package/components/OffsetWellPickerV4/effects/useAdvancedWells.d.ts +1 -1
  126. package/components/OffsetWellPickerV4/effects/useAdvancedWells.d.ts.map +1 -1
  127. package/components/OffsetWellPickerV4/effects/useAdvancedWells.js +1 -1
  128. package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts +2 -1
  129. package/components/OffsetWellPickerV4/effects/useFetchWells.d.ts.map +1 -1
  130. package/components/OffsetWellPickerV4/effects/useFetchWells.js +1 -1
  131. package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts +5 -1
  132. package/components/OffsetWellPickerV4/effects/useFilterOptions.d.ts.map +1 -1
  133. package/components/OffsetWellPickerV4/effects/useFilterOptions.js +1 -1
  134. package/components/OffsetWellPickerV4/effects/useFilteredWells.d.ts +97 -1
  135. package/components/OffsetWellPickerV4/effects/useFilteredWells.d.ts.map +1 -1
  136. package/components/OffsetWellPickerV4/effects/useFilteredWells.js +1 -1
  137. package/components/OffsetWellPickerV4/effects/useSortedWells.d.ts +1 -1
  138. package/components/OffsetWellPickerV4/effects/useSortedWells.d.ts.map +1 -1
  139. package/components/OffsetWellPickerV4/effects/useSortedWells.js +1 -1
  140. package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts +1 -1
  141. package/components/OffsetWellPickerV4/effects/useTableColumns.d.ts.map +1 -1
  142. package/components/OffsetWellPickerV4/effects/useTableColumns.js +1 -1
  143. package/components/OffsetWellPickerV4/utils/apiCalls.d.ts +9 -8
  144. package/components/OffsetWellPickerV4/utils/apiCalls.d.ts.map +1 -1
  145. package/components/OffsetWellPickerV4/utils/apiCalls.js +1 -1
  146. package/components/PadOffsetsPicker/StagesSelector.js +1 -1
  147. package/components/PadOffsetsPickerV2/PadOffsetsPickerV2.js +1 -1
  148. package/components/Popover/Popover.js +1 -1
  149. package/components/Popper/Popper.js +1 -1
  150. package/components/RealTimeValuesSidebar/SidebarFooter.js +1 -1
  151. package/componentsV2/AppHeader/AppHeader.d.ts +1 -0
  152. package/componentsV2/AppHeader/AppHeader.d.ts.map +1 -1
  153. package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts +1 -1
  154. package/componentsV2/AppHeader/V3/AppHeaderV3.d.ts.map +1 -1
  155. package/componentsV2/AppHeader/V3/AppHeaderV3.js +1 -1
  156. package/componentsV2/AppHeader/V3/AppHeaderV3.scss.js +1 -1
  157. package/componentsV2/AppHeader/V3/AppHeaderV3.stories.d.ts.map +1 -1
  158. package/componentsV2/AppHeader/V3/useResponsivity.d.ts +1 -1
  159. package/componentsV2/AppHeader/V3/useResponsivity.d.ts.map +1 -1
  160. package/componentsV2/AppHeader/V3/useResponsivity.js +1 -1
  161. package/componentsV2/Modal/Modal.d.ts +2 -40
  162. package/componentsV2/Modal/Modal.d.ts.map +1 -1
  163. package/componentsV2/Modal/Modal.js +1 -1
  164. package/componentsV2/Modal/Modal.scss.js +1 -1
  165. package/componentsV2/ModalWindow/ModalWindow.d.ts +44 -0
  166. package/componentsV2/ModalWindow/ModalWindow.d.ts.map +1 -0
  167. package/componentsV2/ModalWindow/ModalWindow.js +1 -0
  168. package/componentsV2/ModalWindow/ModalWindow.scss.js +1 -0
  169. package/componentsV2/ModalWindow/ModalWindow.stories.d.ts +8 -0
  170. package/componentsV2/ModalWindow/ModalWindow.stories.d.ts.map +1 -0
  171. package/componentsV2/ModalWindow/index.d.ts +2 -0
  172. package/componentsV2/ModalWindow/index.d.ts.map +1 -0
  173. package/componentsV2/index.d.ts +1 -0
  174. package/componentsV2/index.d.ts.map +1 -1
  175. package/componentsV2/index.js +1 -1
  176. package/effects/index.d.ts +9 -9
  177. package/effects/index.d.ts.map +1 -1
  178. package/package.json +1 -1
  179. package/testing/AppTestWrapper/AppTestWrapper.js +1 -1
  180. package/types/shared/Common.d.ts +1 -1
  181. package/types/shared/Common.d.ts.map +1 -1
  182. package/types/shared/Completions.d.ts +19 -0
  183. package/types/shared/Completions.d.ts.map +1 -1
  184. package/types/shared/Completions.js +1 -1
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as o,useRef as u,useEffect as i}from"react";import{groupBy as a,get as c}from"lodash";import{fetchMetricsData as s}from"../utils/apiCalls.js";import{ALL_SECTION_KEY as p,ColumnType as f}from"../constants.js";import{mapbox as l}from"../../../utils/index.js";function m(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function b(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}var d=l.getAssetV2Coordinates,v=l.getDistanceByCoordinates,h=function(r){return Number.isFinite(r)?parseFloat(r.toFixed(2)):null};function y(l,m,y,O,j,w){var x=o(null),g=e(x,2),P=g[0],k=g[1],F=o(null),D=e(F,2),E=D[0],C=D[1],S=o(null),A=e(S,2),H=A[0],T=A[1],B=u({});function G(){return G=t(n.mark((function r(){var e,o,u;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e=m.find((function(r){return r.id===j})),(o=e&&d(e,"topHole"))||C(m),r.next=5,Promise.all(m.map(function(){var r=t(n.mark((function r(t){var e,u;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,d(t,"topHole");case 3:if(!(e=r.sent)){r.next=13;break}return r.t0=parseFloat,r.next=8,v(o,e);case 8:return r.t1=r.sent,u=(0,r.t0)(r.t1),r.abrupt("return",b(b({},t),{},{distance:parseFloat(u.toFixed(2))}));case 13:return r.abrupt("return",t);case 14:r.next=19;break;case 16:return r.prev=16,r.t2=r.catch(0),r.abrupt("return",t);case 19:case"end":return r.stop()}}),r,null,[[0,16]])})));return function(t){return r.apply(this,arguments)}}()));case 5:u=r.sent,C(u);case 7:case"end":return r.stop()}}),r)}))),G.apply(this,arguments)}function N(r){return V.apply(this,arguments)}function V(){return(V=t(n.mark((function t(e){var o,u,i,p;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,s(l,e,w);case 2:o=t.sent,u={},i=a(o,"asset_id"),e.forEach((function(t){var e,n=null===(e=i[t])||void 0===e?void 0:e.reduce((function(t,e){var n=c(e,"data.value"),o=c(e,"data.key");return b(b({},t),{},r({},o,h(n)))}),{});u[t]=n})),B.current=b(b({},B.current),u),p=[],H.forEach((function(r){p.push(b(b({},r),B.current[r.id]))})),k(p);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return i((function(){m&&function(){G.apply(this,arguments)}()}),[m,j]),i((function(){var t,e;E&&y&&O&&(t=y.filter((function(r){return r.value!==p})),e=E.map((function(e){var n=t.filter((function(r){return(O[r.value]||[]).includes(e.id)})).map((function(r){return r.label}));return n.length>0?b(b({},e),{},r({},f.wellSection,n)):e})),T(e))}),[E,y,O]),i((function(){if(H){var r=[];H.forEach((function(t){B.current[t.id]||r.push(t.id)})),N(r)}}),[H]),i((function(){P&&N(P.map((function(r){return r.id})))}),[w]),P}export{y as useAdvancedWells};
1
+ import r from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/slicedToArray";import n from"@babel/runtime/regenerator";import{useState as o,useRef as i,useEffect as u}from"react";import{groupBy as a,get as c}from"lodash";import{fetchMetricsData as f}from"../utils/apiCalls.js";import{ALL_SECTION_KEY as l,ColumnType as s}from"../constants.js";import{mapbox as p}from"../../../utils/index.js";function m(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function d(r){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?m(Object(n),!0).forEach((function(e){t(r,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))}))}return r}var b=p.getAssetV2Coordinates,v=p.getDistanceByCoordinates,y=function(r){return Number.isFinite(r)?parseFloat(r.toFixed(2)):null};function h(p,m,h,O,j,g,w){var P=o(null),x=e(P,2),F=x[0],D=x[1],E=o(null),k=e(E,2),C=k[0],S=k[1],A=o(null),H=e(A,2),T=H[0],B=H[1],G=i({});function N(r){return V.apply(this,arguments)}function V(){return(V=r(n.mark((function r(e){var o,i,u,l;return n.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,f(p,e,g);case 2:o=r.sent,i={},u=a(o,"asset_id"),e.forEach((function(r){var e,n=null===(e=u[r])||void 0===e?void 0:e.reduce((function(r,e){var n=c(e,"data.value"),o=c(e,"data.key");return d(d({},r),{},t({},o,y(n)))}),{});i[r]=n})),G.current=d(d({},G.current),i),l=[],T.forEach((function(r){l.push(d(d({},r),G.current[r.id]))})),D(l);case 10:case"end":return r.stop()}}),r)})))).apply(this,arguments)}return u((function(){m&&w&&function(){var r=m.find((function(r){return r.id===j})),t=r&&b(r,"topHole");if(t){var e=m.map((function(r){try{var e=b(r,"topHole");if(e){var n=parseFloat(v(t,e));return d(d({},r),{},{distance:parseFloat(n.toFixed(2))})}return r}catch(t){return r}}));S(e)}else S(m)}()}),[m,j,w]),u((function(){var r,e;C&&h&&O&&w&&(r=h.filter((function(r){return r.value!==l})),e=C.map((function(e){var n=r.filter((function(r){return(O[r.value]||[]).includes(e.id)})).map((function(r){return r.label}));return n.length>0?d(d({},e),{},t({},s.wellSection,n)):e})),B(e))}),[C,h,O,w]),u((function(){if(T&&w){var r=[];T.forEach((function(t){G.current[t.id]||r.push(t.id)})),N(r)}}),[T,w]),u((function(){F&&N(F.map((function(r){return r.id})))}),[g]),F}export{h as useAdvancedWells};
@@ -1,2 +1,3 @@
1
- export function useFetchWells(companyId: any, addWellsUsabilityInfo: any): any[];
1
+ import { Well } from '~/types';
2
+ export declare function useFetchWells(companyId?: number, addWellsUsabilityInfo?: (wells: Well[]) => Promise<Well[]> | Well[]): (boolean | Well[])[];
2
3
  //# sourceMappingURL=useFetchWells.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFetchWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFetchWells.js"],"names":[],"mappings":"AAIA,iFAcC"}
1
+ {"version":3,"file":"useFetchWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFetchWells.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAY/B,wBAAgB,aAAa,CAC3B,SAAS,CAAC,EAAE,MAAM,EAClB,qBAAqB,GAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,EAAa,wBAkE9E"}
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/asyncToGenerator";import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/regenerator";import{useState as n,useEffect as a}from"react";import{fetchWells as o}from"../utils/apiCalls.js";function i(i,s){var u=n(null),l=e(u,2),c=l[0],p=l[1];return a((function(){function e(){return(e=r(t.mark((function r(){var e;return t.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!i){r.next=6;break}return r.next=3,o(i,s);case 3:r.t0=r.sent,r.next=7;break;case 6:r.t0=null;case 7:e=r.t0,p(e);case 9:case"end":return r.stop()}}),r)})))).apply(this,arguments)}p(null),function(){e.apply(this,arguments)}()}),[i]),[c]}export{i as useFetchWells};
1
+ import{__awaiter as t,__generator as e,__spreadArray as n}from'./../../../ext-esm/tslib/tslib.es6.js';import{useState as r,useEffect as o}from"react";import{identity as i}from"lodash";import{fetchWells as s}from"../utils/apiCalls.js";function l(l,u){if(void 0===u&&(u=i),"function"!=typeof u)throw new Error("addWellsUsabilityInfo must be a function");var a=r(null),c=a[0],f=a[1],m=r(!0),p=m[0],d=m[1];return o((function(){var r=!1;return f(null),d(!0),function(){t(this,void 0,void 0,(function(){var o,i,a,c,m=this;return e(this,(function(p){switch(p.label){case 0:return l?(o=sessionStorage.getItem("corva-offset-well-picker-wells"),i=o?JSON.parse(o):void 0,a=Date.now(),i&&i.companyId===l&&a-i.timestamp<3e5?(f(i.wells),d(!1),[2]):(c=[],[4,s(l,(function(o,i){return t(m,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return r?[2]:[4,u(o)];case 1:return t=e.sent(),c.push.apply(c,t),f((function(e){return e?n(n([],e,!0),t,!0):t})),i&&!r&&(sessionStorage.setItem("corva-offset-well-picker-wells",JSON.stringify({wells:c,timestamp:Date.now(),companyId:l})),d(!1)),[2]}}))}))}),(function(){return r}))])):[2];case 1:return p.sent(),[2]}}))}))}(),function(){r=!0}}),[l]),[c,p]}export{l as useFetchWells};
@@ -1,2 +1,6 @@
1
- export function useFilterOptions(wells: any): any[];
1
+ export function useFilterOptions(wells: any): {
2
+ value: string;
3
+ label: string;
4
+ options: any[];
5
+ }[];
2
6
  //# sourceMappingURL=useFilterOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFilterOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"names":[],"mappings":"AAIA,oDAiBC"}
1
+ {"version":3,"file":"useFilterOptions.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilterOptions.js"],"names":[],"mappings":"AAIA;;;;IAiBC"}
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/toConsumableArray";import e from"@babel/runtime/helpers/slicedToArray";import{useState as o,useEffect as t}from"react";import{FilterOptions as n}from"../constants.js";function a(a){var l=o([]),u=e(l,2),i=u[0],c=u[1];return t((function(){if(a){var e=n.map((function(e){var o=e.value,t=e.label,n=a.reduce((function(e,t){return"Null"===t[o]||e.includes(t[o])?e:[].concat(r(e),[t[o]])}),[]);return{value:o,label:t,options:[].concat(r(n.sort()),["Null"])}}));c(e)}}),[a]),i}export{a as useFilterOptions};
1
+ import r from"@babel/runtime/helpers/toConsumableArray";import{useMemo as t}from"react";import{FilterOptions as o}from"../constants.js";function n(n){return t((function(){return n?o.map((function(t){var o=t.value,e=t.label,a=new Set;return n.forEach((function(r){"Null"!==r[o]&&a.add(r[o])})),{value:o,label:e,options:r(a).sort().concat(["Null"])}})):[]}),[n])}export{n as useFilterOptions};
@@ -1,2 +1,98 @@
1
- export function useFilteredWells(wells: any, filters: any): any;
1
+ export function useFilteredWells(wells: any, filters: any): {
2
+ toString: () => string;
3
+ charAt: (pos: number) => string;
4
+ charCodeAt: (index: number) => number;
5
+ concat: (...strings: string[]) => string;
6
+ indexOf: (searchString: string, position?: number) => number;
7
+ lastIndexOf: (searchString: string, position?: number) => number;
8
+ localeCompare: {
9
+ (that: string): number;
10
+ (that: string, locales?: string | string[], options?: Intl.CollatorOptions): number;
11
+ (that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
12
+ };
13
+ match: {
14
+ (regexp: string | RegExp): RegExpMatchArray | null;
15
+ (matcher: {
16
+ [Symbol.match](string: string): RegExpMatchArray | null;
17
+ }): RegExpMatchArray | null;
18
+ };
19
+ replace: {
20
+ (searchValue: string | RegExp, replaceValue: string): string;
21
+ (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
22
+ (searchValue: {
23
+ [Symbol.replace](string: string, replaceValue: string): string;
24
+ }, replaceValue: string): string;
25
+ (searchValue: {
26
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
27
+ }, replacer: (substring: string, ...args: any[]) => string): string;
28
+ };
29
+ search: {
30
+ (regexp: string | RegExp): number;
31
+ (searcher: {
32
+ [Symbol.search](string: string): number;
33
+ }): number;
34
+ };
35
+ slice: (start?: number, end?: number) => string;
36
+ split: {
37
+ (separator: string | RegExp, limit?: number): string[];
38
+ (splitter: {
39
+ [Symbol.split](string: string, limit?: number): string[];
40
+ }, limit?: number): string[];
41
+ };
42
+ substring: (start: number, end?: number) => string;
43
+ toLowerCase: () => string;
44
+ toLocaleLowerCase: {
45
+ (locales?: string | string[]): string;
46
+ (locales?: Intl.LocalesArgument): string;
47
+ };
48
+ toUpperCase: () => string;
49
+ toLocaleUpperCase: {
50
+ (locales?: string | string[]): string;
51
+ (locales?: Intl.LocalesArgument): string;
52
+ };
53
+ trim: () => string;
54
+ readonly length: number;
55
+ substr: (from: number, length?: number) => string;
56
+ valueOf: () => string;
57
+ codePointAt: (pos: number) => number | undefined;
58
+ includes: (searchString: string, position?: number) => boolean;
59
+ endsWith: (searchString: string, endPosition?: number) => boolean;
60
+ normalize: {
61
+ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
62
+ (form?: string): string;
63
+ };
64
+ repeat: (count: number) => string;
65
+ startsWith: (searchString: string, position?: number) => boolean;
66
+ anchor: (name: string) => string;
67
+ big: () => string;
68
+ blink: () => string;
69
+ bold: () => string;
70
+ fixed: () => string;
71
+ fontcolor: (color: string) => string;
72
+ fontsize: {
73
+ (size: number): string;
74
+ (size: string): string;
75
+ };
76
+ italics: () => string;
77
+ link: (url: string) => string;
78
+ small: () => string;
79
+ strike: () => string;
80
+ sub: () => string;
81
+ sup: () => string;
82
+ padStart: (maxLength: number, fillString?: string) => string;
83
+ padEnd: (maxLength: number, fillString?: string) => string;
84
+ trimEnd: () => string;
85
+ trimStart: () => string;
86
+ trimLeft: () => string;
87
+ trimRight: () => string;
88
+ matchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
89
+ replaceAll: {
90
+ (searchValue: string | RegExp, replaceValue: string): string;
91
+ (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
92
+ };
93
+ at: (index: number) => string | undefined;
94
+ isWellFormed: () => boolean;
95
+ toWellFormed: () => string;
96
+ [Symbol.iterator]: () => StringIterator<string>;
97
+ }[];
2
98
  //# sourceMappingURL=useFilteredWells.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFilteredWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilteredWells.js"],"names":[],"mappings":"AAMA,gEAiDC"}
1
+ {"version":3,"file":"useFilteredWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useFilteredWells.js"],"names":[],"mappings":"AAMA;;;;;;;;;8DAuCuj8M,KAAM,eAAe;iCAA/o6M,KAAM,eAAe,YAAW,KAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAH5+B,KAAM,eAAe;;;;;mBAGkI,KAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IADjL"}
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/typeof";import e from"@babel/runtime/helpers/slicedToArray";import{uniqBy as t}from"lodash";import{useState as i,useEffect as n}from"react";import{FilterType as o}from"../constants.js";import{getTimestampByPeriod as m}from"../utils/timePeriod.js";function s(s,u){var a=i(null),c=e(a,2),f=c[0],l=c[1],d=/\sST0/g;return n((function(){if(s){var i=s.filter((function(e){return Object.keys(u).every((function(t){return"object"!==r(u[t])||!(u[t].length>0&&!u[t].includes(e[t]))}))})),n=i;void 0!==u[o.sideTracks]&&(n=i.filter((function(r){return!u[o.sideTracks]||!r.name.match(d)})));var a=u.period,c=u.timeRangeFrom,f=u.timeRangeTo,p=m(a,c,f),b=e(p,2),v=b[0],h=b[1],T=Number.isFinite(v)&&Number.isFinite(h)?n.filter((function(r){return r.lastActive>=v&&r.lastActive<=h})):n,g=u.radius,j=Number.isFinite(g)?T.filter((function(r){return r.distance<=g})):T;l(t(j,"id"))}}),[s,u]),f}export{s as useFilteredWells};
1
+ import r from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/typeof";import{useMemo as t}from"react";import{uniqBy as i}from"lodash";import{FilterType as n}from"../constants.js";import{getTimestampByPeriod as o}from"../utils/timePeriod.js";function u(u,s){var m=/\sST0/g;return t((function(){if(!u)return null;var t=u.filter((function(r){return Object.keys(s).every((function(t){return"object"!==e(s[t])||!(s[t].length>0&&!s[t].includes(r[t]))}))}));void 0!==s[n.sideTracks]&&(t=t.filter((function(r){return!s[n.sideTracks]||!r.name.match(m)})));var a=s.period,c=s.timeRangeFrom,f=s.timeRangeTo,l=o(a,c,f),d=r(l,2),p=d[0],b=d[1];return Number.isFinite(p)&&Number.isFinite(b)&&(t=t.filter((function(r){return r.lastActive>=p&&r.lastActive<=b}))),Number.isFinite(s.radius)&&(t=t.filter((function(r){return r.distance<=s.radius}))),i(t,"id")}),[u,s])}export{u as useFilteredWells};
@@ -1,2 +1,2 @@
1
- export function useSortedWells(subjectWell: any, expandedWells: any, selectedWells: any, setIsTableLoading: any, isLoading: any): any[];
1
+ export function useSortedWells(subjectWell: any, expandedWells: any, selectedWells: any, setIsTableLoading: any): any[];
2
2
  //# sourceMappingURL=useSortedWells.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSortedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useSortedWells.js"],"names":[],"mappings":"AAkBA,wIAyCC"}
1
+ {"version":3,"file":"useSortedWells.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useSortedWells.js"],"names":[],"mappings":"AAkBA,wHAiCC"}
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/toConsumableArray";import{useState as n,useEffect as o}from"react";import{isEmpty as i}from"lodash";import{SortDirection as c}from"react-virtualized";import{ColumnType as u}from"../constants.js";function f(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}var p=function(r,t,n){var o=e(r),i=t===u.lastActive;return o.sort((function(r,e){return r[t]||0===r[t]&&!i?e[t]||0===e[t]&&!i?n===c.ASC?r[t]>=e[t]?1:-1:e[t]>=r[t]?1:-1:-1:1})),o};function l(r,e,f,l,s){var m=n(u.distance),b=t(m,2),d=b[0],O=b[1],y=n(c.ASC),j=t(y,2),v=j[0],h=j[1],P=n(null),g=t(P,2),w=g[0],A=g[1];return o((function(){if(e&&!s){var t=f.map((function(r){return r.id})),n=f.filter((function(t){return t.id!==(null==r?void 0:r.id)})),o=p(n,d,v),c=e.filter((function(r){return!t.includes(r.id)})),u=p(c,d,v),m=(i(r)?[]:[r]).concat(o).concat(u).map((function(r){return f.find((function(t){return t.id===r.id}))?a(a({},r),{},{checked:!0}):a(a({},r),{},{checked:!1})}));A(m),l(!1)}}),[e,d,v,r,f,s]),[d,O,v,h,w]}export{l as useSortedWells};
1
+ import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/toConsumableArray";import{useState as n,useMemo as o,useEffect as i}from"react";import{isEmpty as c}from"lodash";import{SortDirection as u}from"react-virtualized";import{ColumnType as f}from"../constants.js";function a(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}var l=function(r,t,n){var o=e(r),i=t===f.lastActive;return o.sort((function(r,e){return r[t]||0===r[t]&&!i?e[t]||0===e[t]&&!i?n===u.ASC?r[t]>=e[t]?1:-1:e[t]>=r[t]?1:-1:-1:1})),o};function s(r,e,a,s){var m=n(f.distance),b=t(m,2),O=b[0],d=b[1],y=n(u.ASC),j=t(y,2),v=j[0],h=j[1],P=o((function(){if(!e)return null;var t=a.map((function(r){return r.id})),n=a.filter((function(t){return t.id!==(null==r?void 0:r.id)})),o=l(n,O,v),i=e.filter((function(r){return!t.includes(r.id)})),u=l(i,O,v);return(c(r)?[]:[r]).concat(o).concat(u).map((function(r){return p(p({},r),{},{checked:a.some((function(t){return t.id===r.id}))})}))}),[e,O,v,r,a]);return i((function(){null!==P&&s(!1)}),[P,s]),[O,d,v,h,P]}export{s as useSortedWells};
@@ -1,2 +1,2 @@
1
- export function useTableColumns(metricsKeys: any): any;
1
+ export function useTableColumns(metricsKeys: any): any[];
2
2
  //# sourceMappingURL=useTableColumns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useTableColumns.js"],"names":[],"mappings":"AAIA,uDAoBC"}
1
+ {"version":3,"file":"useTableColumns.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/effects/useTableColumns.js"],"names":[],"mappings":"AAIA,yDAoBC"}
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/slicedToArray";import{useState as n,useEffect as o}from"react";import{TableColumns as c,ColumnType as i}from"../constants.js";function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function u(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}function f(e){var p=n(null),f=t(p,2),b=f[0],a=f[1];return o((function(){if(e){var t=e.length<3?e.length:3,n=c.reduce((function(n,o){return o.type===i.metrics?e.reduce((function(e,n){return[].concat(r(e),[u(u({},o),{},{key:n,width:o.width[t]})])}),n):n.concat(u(u({},o),{},{width:o.width[t]}))}),[]);a(n)}}),[e]),b}export{f as useTableColumns};
1
+ import r from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import{useMemo as e}from"react";import{TableColumns as n,ColumnType as o}from"../constants.js";function c(r,t){var e=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.push.apply(e,n)}return e}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function p(r){return e((function(){if(!r)return null;var e=Math.min(r.length,3);return n.reduce((function(n,c){return c.type===o.metrics?[].concat(t(n),t(r.map((function(r){return i(i({},c),{},{key:r,width:c.width[e]})})))):[].concat(t(n),[i(i({},c),{},{width:c.width[e]})])}),[])}),[r])}export{p as useTableColumns};
@@ -1,9 +1,10 @@
1
- export function fetchCompanies(): Promise<any[]>;
2
- export function resyncIdasWells(currentUser: any, assetId: any): Promise<import("~/clients/jsonApi").TaskResult>;
3
- export function fetchWells(companyId: any, addWellsUsabilityInfo: any): Promise<any>;
4
- export function fetchOffsetWellSelections(assetId: any): Promise<any>;
5
- export function fetchWellhubWells(assetId: any): Promise<any>;
6
- export function fetchCompanyGoals(companyId: any): Promise<any>;
7
- export function fetchMetricsData(companyId: any, wellIds: any, metricsKeys: any): Promise<any[]>;
8
- export function fetchAllAssets(searchKey: any, assetType: any, page: number, company: any): Promise<any>;
1
+ import { Well } from '~/types';
2
+ export declare function fetchCompanies(): Promise<any[]>;
3
+ export declare function resyncIdasWells(currentUser: any, assetId: any): Promise<any>;
4
+ export declare function fetchWells(companyId: number, onPage: (wells: Well[], isEnd: boolean) => void, isCancelled: () => boolean): Promise<void>;
5
+ export declare function fetchOffsetWellSelections(assetId: any): Promise<any>;
6
+ export declare function fetchWellhubWells(assetId: any): Promise<any>;
7
+ export declare function fetchCompanyGoals(companyId: any): Promise<any>;
8
+ export declare function fetchMetricsData(companyId: any, wellIds: any, metricsKeys: any): Promise<any[]>;
9
+ export declare function fetchAllAssets(searchKey: any, assetType: any, page: number, company: any): Promise<any>;
9
10
  //# sourceMappingURL=apiCalls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"apiCalls.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/utils/apiCalls.js"],"names":[],"mappings":"AAiBA,iDASC;AAED,iHAqBC;AAED,qFAkEC;AAED,sEAKC;AAED,8DASC;AAED,gEASC;AAID,iGA2CC;AAiED,yGAgBC"}
1
+ {"version":3,"file":"apiCalls.d.ts","sourceRoot":"","sources":["../../../../src/components/OffsetWellPickerV4/utils/apiCalls.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAO/B,wBAAsB,cAAc,mBASnC;AAED,wBAAsB,eAAe,CAAC,WAAW,KAAA,EAAE,OAAO,KAAA,gBAqBzD;AAED,wBAAsB,UAAU,CAC9B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,EAC/C,WAAW,EAAE,MAAM,OAAO,GACzB,OAAO,CAAC,IAAI,CAAC,CAaf;AAiED,wBAAsB,yBAAyB,CAAC,OAAO,KAAA,gBAKtD;AAED,wBAAsB,iBAAiB,CAAC,OAAO,KAAA,gBAS9C;AAED,wBAAsB,iBAAiB,CAAC,SAAS,KAAA,gBAShD;AAID,wBAAsB,gBAAgB,CAAC,SAAS,KAAA,EAAE,OAAO,KAAA,EAAE,WAAW,KAAA,kBA2CrE;AAiED,wBAAsB,cAAc,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,IAAI,QAAI,EAAE,OAAO,KAAA,gBAgB3E"}
@@ -1 +1 @@
1
- import t from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import r from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/regenerator";import a from"jsona";import{range as s,sortBy as i,get as u,concat as c}from"lodash";import{ROWS_PER_PAGE as o}from"../constants.js";import{getAppStorage as p,getCompanies as l,getAssets as f,getCompanyGoals as m,getWells as b,getRigs as d}from"../../../clients/jsonApi/index.js";import{postTaskAndWaitResult as v}from"../../../clients/jsonApi/postTaskAndWaitResult.js";function h(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 y(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){t(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=new a;function g(){return w.apply(this,arguments)}function w(){return(w=r(n.mark((function t(){var e;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,l();case 3:e=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0);case 9:return t.abrupt("return",e?i(e,["name"]):[]);case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function x(t,e){return k.apply(this,arguments)}function k(){return(k=r(n.mark((function t(e,r){var a,s;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,s={provider:"xto",app_key:"xto.idas_offset_performance_distance_be_od",asset_id:r,app_version:16,properties:{asset_id:r,user_id:e.id,user_name:"".concat(e.first_name," ").concat(e.last_name)}},t.prev=2,t.next=5,v(s);case 5:a=t.sent,t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0);case 11:return t.abrupt("return",a);case 12:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function j(t,e){return O.apply(this,arguments)}function O(){return(O=r(n.mark((function t(e,r){var a,s,i;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=null,t.prev=1,t.next=4,f({types:["well"],company_id:e?+e:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.status","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings","asset.last_active_at"],per_page:1e4,sort:"name"});case 4:a=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:if(s=a?a.data.map((function(t){return{id:Number(t.id),name:u(t,"attributes.name"),status:u(t,"attributes.status"),rigId:u(t,"attributes.parent_asset_id")||"Null",rigName:u(t,"attributes.parent_asset_name")||"Null",formation:u(t,"attributes.target_formation")||"Null",stringDesign:u(t,"attributes.string_design")||"Null",programName:u(t,"attributes.root_asset_name")||"Null",basin:u(t,"attributes.basin")||"Null",county:u(t,"attributes.county")||"Null",area:u(t,"attributes.area")||"Null",visibility:u(t,"attributes.visibility"),topHole:u(t,"attributes.top_hole"),rigReleaseDate:u(t,"attributes.stats.well_end"),totalDepth:u(t,"attributes.stats.total_depth"),is_usable:!0,apiNumber:u(t,"attributes.settings.api_number","-"),lastActive:new Date(u(t,"attributes.last_active_at")).getTime()/1e3}})).filter((function(t){return t.visibility.includes("visible")})):[],"function"!=typeof r){t.next=16;break}return t.next=14,r(s);case 14:return i=t.sent,t.abrupt("return",i);case 16:return t.abrupt("return",s);case 17:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function N(t){return P.apply(this,arguments)}function P(){return(P=r(n.mark((function t(e){return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",p("corva","data.offset-wells.bic",e,{limit:1,sort:"{timestamp: -1}"}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(t){return A.apply(this,arguments)}function A(){return(A=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=null,t.prev=1,t.next=4,p("corva","data.offset_wells",e,{limit:1});case 4:r=t.sent,t.next=10;break;case 7:t.prev=7,t.t0=t.catch(1),console.error(t.t0);case 10:return t.abrupt("return",r||[]);case 11:case"end":return t.stop()}}),t,null,[[1,7]])})))).apply(this,arguments)}function $(t){return E.apply(this,arguments)}function E(){return(E=r(n.mark((function t(e){var r;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,m(e);case 3:r=t.sent,t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.error(t.t0);case 9:return t.abrupt("return",r&&u(r,"company_goals")||{});case 10:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function I(t,e,r){return S.apply(this,arguments)}function S(){return S=r(n.mark((function t(a,i,u){var c,o,l;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==i.length){t.next=2;break}return t.abrupt("return",[]);case 2:return c=Math.floor(i.length/200)+1,t.next=5,Promise.all(s(c).map(function(){var t=r(n.mark((function t(e,r){var s,c,o,l;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company_id:a,"data.asset_id":{$in:i.slice(200*r,200*(r+1))},"data.key":{$in:u},"data.type":"asset"},c={_id:0,"data.key":1,"data.value":1,asset_id:"$data.asset_id"},o={aggregate:JSON.stringify([{$match:s},{$project:c}])},l=null,t.prev=4,t.next=7,p("corva","metrics",null,o);case 7:l=t.sent,t.next=13;break;case 10:t.prev=10,t.t0=t.catch(4),console.error(t.t0);case 13:return t.abrupt("return",l||[]);case 14:case"end":return t.stop()}}),t,null,[[4,10]])})));return function(e,r){return t.apply(this,arguments)}}()));case 5:return o=t.sent,l=[],o.forEach((function(t){return l.push.apply(l,e(t))})),t.abrupt("return",l);case 9:case"end":return t.stop()}}),t)}))),S.apply(this,arguments)}function T(t,e,r){return z.apply(this,arguments)}function z(){return(z=r(n.mark((function t(e,r,a){var s,i,u;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:o,page:r,fields:["well.name","well.asset_id","well.settings","well.status","well.rigName","well.visibility"],sort:"name"},t.prev=2,t.next=5,b(s);case 5:i=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),i=[];case 12:return u=_.deserialize(i),t.abrupt("return",u.map((function(t){return{redirectAssetId:t.asset_id,apiNumber:t.settings.api_number,name:t.name,asset_id:t.asset_id,status:t.status,rigName:t.rigName,visibility:t.visibility,type:"well"}})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function R(t,e,r){return C.apply(this,arguments)}function C(){return(C=r(n.mark((function t(e,r,a){var s,i,c;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s={company:a,search:e,per_page:o,page:r,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name"},t.prev=2,t.next=5,d(s);case 5:i=t.sent,t.next=12;break;case 8:t.prev=8,t.t0=t.catch(2),console.error(t.t0),i=[];case 12:return c=_.deserialize(i),t.abrupt("return",c.map((function(t){return y({redirectAssetId:u(t,["active_well","asset_id"])||null},t)})));case 14:case"end":return t.stop()}}),t,null,[[2,8]])})))).apply(this,arguments)}function G(t,e){return H.apply(this,arguments)}function H(){return H=r(n.mark((function t(r,a){var s,i,u,o,p,l=arguments;return n.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s=l.length>2&&void 0!==l[2]?l[2]:1,i=l.length>3?l[3]:void 0,"well"!==a){t.next=7;break}return t.next=5,T(r,s,i);case 5:return u=t.sent,t.abrupt("return",u);case 7:if("rig"!==a){t.next=12;break}return t.next=10,R(r,s,i);case 10:return o=t.sent,t.abrupt("return",o);case 12:return t.next=14,Promise.all([T(r,s,i),R(r,s,i)]);case 14:return p=t.sent,t.abrupt("return",c.apply(void 0,e(p)));case 16:case"end":return t.stop()}}),t)}))),H.apply(this,arguments)}export{G as fetchAllAssets,g as fetchCompanies,$ as fetchCompanyGoals,I as fetchMetricsData,N as fetchOffsetWellSelections,D as fetchWellhubWells,j as fetchWells,x as resyncIdasWells};
1
+ import{__awaiter as t,__generator as e,__assign as s}from'./../../../ext-esm/tslib/tslib.es6.js';import r from"jsona";import{range as a,sortBy as n,get as i,concat as u}from"lodash";import{ROWS_PER_PAGE as o}from"../constants.js";import{getCompanies as l,getAppStorage as c,getCompanyGoals as d,getAssets as p,getWells as f,getRigs as m}from"../../../clients/jsonApi/index.js";import{postTaskAndWaitResult as _}from"../../../clients/jsonApi/postTaskAndWaitResult.js";var h=new r;function v(){return t(this,void 0,void 0,(function(){var t,s;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,l()];case 1:return t=e.sent(),[3,3];case 2:return s=e.sent(),console.error(s),[3,3];case 3:return[2,t?n(t,["name"]):[]]}}))}))}function b(s,r){return t(this,void 0,void 0,(function(){var t,a,n;return e(this,(function(e){switch(e.label){case 0:t=null,a={provider:"xto",app_key:"xto.idas_offset_performance_distance_be_od",asset_id:r,app_version:16,properties:{asset_id:r,user_id:s.id,user_name:"".concat(s.first_name," ").concat(s.last_name)}},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,_(a)];case 2:return t=e.sent(),[3,4];case 3:return n=e.sent(),console.error(n),[3,4];case 4:return[2,t]}}))}))}function g(s,r,a){return t(this,void 0,void 0,(function(){var t,n;return e(this,(function(e){switch(e.label){case 0:t=1,e.label=1;case 1:return t<=20?[4,y(s,t)]:[3,4];case 2:if(n=e.sent(),a())return[2];if(n.length<1e3)return r(n,!0),[2];r(n,!1),e.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))}function y(s){return t(this,arguments,void 0,(function(t,s){var r,a;return void 0===s&&(s=1),e(this,(function(e){switch(e.label){case 0:r=null,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,p({types:["well"],company_id:t?+t:void 0,fields:["asset.name","asset.parent_asset_id","asset.parent_asset_name","asset.status","asset.stats","asset.target_formation","asset.string_design","asset.root_asset_name","asset.basin","asset.county","asset.area","asset.visibility","asset.top_hole","asset.settings","well.settings","asset.last_active_at"],page:s,per_page:1e3,sort:"name"})];case 2:return r=e.sent(),[3,4];case 3:return a=e.sent(),console.error(a),[3,4];case 4:return[2,r?r.data.map((function(t){return{id:Number(t.id),name:i(t,"attributes.name"),status:i(t,"attributes.status"),rigId:i(t,"attributes.parent_asset_id")||"Null",rigName:i(t,"attributes.parent_asset_name")||"Null",formation:i(t,"attributes.target_formation")||"Null",stringDesign:i(t,"attributes.string_design")||"Null",programName:i(t,"attributes.root_asset_name")||"Null",basin:i(t,"attributes.basin")||"Null",county:i(t,"attributes.county")||"Null",area:i(t,"attributes.area")||"Null",visibility:i(t,"attributes.visibility"),topHole:i(t,"attributes.top_hole"),rigReleaseDate:i(t,"attributes.stats.well_end"),totalDepth:i(t,"attributes.stats.total_depth"),is_usable:!0,apiNumber:i(t,"attributes.settings.api_number","-"),lastActive:new Date(i(t,"attributes.last_active_at")).getTime()/1e3}})).filter((function(t){return t.visibility.includes("visible")})):[]]}}))}))}function w(s){return t(this,void 0,void 0,(function(){return e(this,(function(t){return[2,c("corva","data.offset-wells.bic",s,{limit:1,sort:"{timestamp: -1}"})]}))}))}function N(s){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:t=null,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,c("corva","data.offset_wells",s,{limit:1})];case 2:return t=e.sent(),[3,4];case 3:return r=e.sent(),console.error(r),[3,4];case 4:return[2,t||[]]}}))}))}function j(s){return t(this,void 0,void 0,(function(){var t,r;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,d(s)];case 1:return t=e.sent(),[3,3];case 2:return r=e.sent(),console.error(r),[3,3];case 3:return[2,t&&i(t,"company_goals")||{}]}}))}))}function A(s,r,n){return t(this,void 0,void 0,(function(){var i,u,o,l=this;return e(this,(function(d){switch(d.label){case 0:return 0===r.length?[2,[]]:(i=Math.floor(r.length/200)+1,[4,Promise.all(a(i).map((function(a,i){return t(l,void 0,void 0,(function(){var t,a,u,o,l;return e(this,(function(e){switch(e.label){case 0:t={company_id:s,"data.asset_id":{$in:r.slice(200*i,200*(i+1))},"data.key":{$in:n},"data.type":"asset"},a={_id:0,"data.key":1,"data.value":1,asset_id:"$data.asset_id"},u={aggregate:JSON.stringify([{$match:t},{$project:a}])},o=null,e.label=1;case 1:return e.trys.push([1,3,,4]),[4,c("corva","metrics",null,u)];case 2:return o=e.sent(),[3,4];case 3:return l=e.sent(),console.error(l),[3,4];case 4:return[2,o||[]]}}))}))})))]);case 1:return u=d.sent(),o=[],u.forEach((function(t){return o.push.apply(o,t)})),[2,o]}}))}))}function $(s,r,a){return t(this,void 0,void 0,(function(){var t,n,i;return e(this,(function(e){switch(e.label){case 0:t={company:a,search:s,per_page:o,page:r,fields:["well.name","well.asset_id","well.settings","well.status","well.rigName","well.visibility"],sort:"name"},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,f(t)];case 2:return n=e.sent(),[3,4];case 3:return i=e.sent(),console.error(i),n=[],[3,4];case 4:return[2,h.deserialize(n).map((function(t){return{redirectAssetId:t.asset_id,apiNumber:t.settings.api_number,name:t.name,asset_id:t.asset_id,status:t.status,rigName:t.rigName,visibility:t.visibility,type:"well"}}))]}}))}))}function k(r,a,n){return t(this,void 0,void 0,(function(){var t,u,l;return e(this,(function(e){switch(e.label){case 0:t={company:n,search:r,per_page:o,page:a,fields:["rig.name","rig.active_well","rig.asset_id"],sort:"name"},e.label=1;case 1:return e.trys.push([1,3,,4]),[4,m(t)];case 2:return u=e.sent(),[3,4];case 3:return l=e.sent(),console.error(l),u=[],[3,4];case 4:return[2,h.deserialize(u).map((function(t){return s({redirectAssetId:i(t,["active_well","asset_id"])||null},t)}))]}}))}))}function x(s,r){return t(this,arguments,void 0,(function(t,s,r,a){var n;return void 0===r&&(r=1),e(this,(function(e){switch(e.label){case 0:return"well"!==s?[3,2]:[4,$(t,r,a)];case 1:case 3:return[2,e.sent()];case 2:return"rig"!==s?[3,4]:[4,k(t,r,a)];case 4:return[4,Promise.all([$(t,r,a),k(t,r,a)])];case 5:return n=e.sent(),[2,u.apply(void 0,n)]}}))}))}export{x as fetchAllAssets,v as fetchCompanies,j as fetchCompanyGoals,A as fetchMetricsData,w as fetchOffsetWellSelections,N as fetchWellhubWells,g as fetchWells,b as resyncIdasWells};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/regenerator";import{useReducer as r,useEffect as i}from"react";import{func as n,shape as p,number as m,string as a,oneOf as c}from"prop-types";import{isEmpty as l,get as d,last as j,isNull as u,noop as C,range as A}from"lodash";import{makeStyles as S,Dialog as g,DialogTitle as h,DialogContent as D,Grid as v,FormControl as V,InputLabel as b,Select as f,MenuItem as T,Checkbox as I,ListItemText as P,Typography as E,FormLabel as x,RadioGroup as y,FormControlLabel as B,Radio as L,DialogActions as F,Button as k}from"@material-ui/core";import{getAppStorage as O}from"../../clients/jsonApi/index.js";import{jsxs as W,Fragment as M,jsx as H}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"classnames";import"@icon-park/react/es/all";import"../../icons/IconParkProvider.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../utils/mobileDetect.js";import"../IconButton/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import"../GradientManager/configuration/constants.js";import"../Modal/CorvaModal.css.js";import"uuid";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../AppIcon/AppIcon.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../utils/index.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../componentsV2/Text/Text.js";import"../../componentsV2/Grid/Grid.js";import"../../componentsV2/Grid/Grid.scss.js";import"../../componentsV2/Header/Header.scss.js";import"../../componentsV2/Button/Button.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../componentsV2/Tooltip/Tooltip.scss.js";import"../../componentsV2/Paper/Paper.js";import"../../componentsV2/Popover/Popover.scss.js";import"../../componentsV2/Radio/Radio.js";import"../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../componentsV2/Checkbox/Checkbox.js";import"../../componentsV2/TextInput/TextInput.js";import"../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../componentsV2/TextLink/TextLink.js";import"../../componentsV2/Chip/Chip.js";import"../../componentsV2/ChipAlert/ChipAlert.js";import"../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../componentsV2/Avatar/Avatar.js";import"../../componentsV2/Avatar/constants.js";import"../../componentsV2/AvatarGroup/AvatarGroup.scss.js";import"@material-ui/lab";import"../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../componentsV2/Modal/Modal.scss.js";import"../../componentsV2/Menu/Menu.js";import"../../componentsV2/Counter/Counter.js";import"../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../componentsV2/Switch/Switch.js";import"../../componentsV2/Tabs/Tabs.js";import"../../componentsV2/EmptyState/EmptyState.scss.js";import"../../componentsV2/FileIcon/FileIcon.js";import"react-dropzone";import"../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../componentsV2/Skeleton/Skeleton.scss.js";import"../../utils/main.js";import"../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../componentsV2/Stepper/Step/Step.scss.js";import"../../componentsV2/Stepper/Stepper.scss.js";import"../../componentsV2/ButtonLive/ButtonLive.js";import"../../componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js";import"../../componentsV2/IndicatorLive/IndicatorLive.scss.js";import"../../componentsV2/Accordion/Accordion.scss.js";import"../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../componentsV2/BadgeComment/BadgeComment.js";import"../../componentsV2/AppContainer/AppContainer.js";import"../../componentsV2/AppContainer/AppContainer.constants.js";import"../../componentsV2/AppFooter/AppFooter.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppHeader/AppHeader.constants.js";import"../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../componentsV2/AppHeader/AppAssets/utils.js";import"../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../PadModeSelect/PadModeSelect.js";import"../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../constants/streamSourceType.js";import"../../types/shared/Completions.js";import"../PadModeSelect/types.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/subscriptions.js";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"lodash/flatten";import"lodash/partition";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../componentsV2/AppSettings/AppSettings.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../componentsV2/AppHeader/AppHeader.scss.js";import"../../componentsV2/OffsetWellsButton/OffsetWellsButton.scss.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../Toaster/Toaster.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AssetEditorV2/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"react-color";import"../SettingEditors/ColorEditor/style.css.js";import"../SettingEditors/DropdownEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/ChartSelect.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../Chart/components/buttons/ChartTypeButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../MiddleTruncatedText/MiddleTruncatedText.js";import"../RangeSlider/constants.js";import"../RangeSlider/Input.css.js";import"../RangeSlider/RangeSlider.css.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/components/Button/index.js";import"moment-timezone";import"../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../Button/components/LiveButton/styles.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Select/SelectFilterBy.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import w from"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/utils/apiCalls.js";import"../OffsetWellPickerV4/effects/useAdvancedWells.js";import"../OffsetWellPickerV4/constants.js";import"react-virtualized";import"../OffsetWellPickerV4/effects/useAssetsData.js";import"../OffsetWellPickerV4/components/AppHeader/AppHeader.js";import"../OffsetWellPickerV4/components/Toolbar/Toolbar.js";import"../OffsetWellPickerV4/components/Filter/Filter.js";import"../OffsetWellPickerV4/components/Map/WellsMap.js";import"../OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js";import"../OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/constants.js";import"../OffsetWellPickerV4/utils/index.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import"../OffsetWellMap/OffsetWellMap.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../MiddleTruncate/MiddleTruncate.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"./PadOffsetsPicker.js";import"./OffsetAssetChip.js";import"./OffsetAssetsListExpander.js";import"../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Table/TablePagination/TablePagination.js";import"../Table/TablePaginationActions/TablePaginationActions.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Stepper.js";import"../Stepper/Step/Step.js";import"../Stepper/StepsWrapper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/Groups.js";import"../Search/components/SelectAllListItem.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import"../AssetEditorV2/components/PrimaryAssetSelect.js";import"../AssetEditorV2/components/SecondaryAssetSelect.js";import"../AssetEditorV2/components/SelectItem.js";import"../AssetEditorV2/components/MultipleAssetsToggle.js";import"../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../EChartsWrapper/EChartsWrapper.js";import"../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../GoogleDocsViewer/index.js";import"../NewDocumentViewer/effects/useFileContent.js";import"../NewDocumentViewer/styles.js";import"../FilesLoaderV2/styles.js";import"../FilesDropzone/styles.js";import"../FilesProcessor/styles.js";import"../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../Formula/useFormulaStyles.js";import"../Formula/RootXIcon.js";import"../Formula/FormulaTextEditor.js";import"../Formula/CloseSuggestion.js";import"../Formula/SuggestionsMenu.js";function G(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,s)}return o}function R(e){for(var o=1;o<arguments.length;o++){var s=null!=arguments[o]?arguments[o]:{};o%2?G(Object(s),!0).forEach((function(o){t(e,o,s[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):G(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var q,N=S({dialogPaper:{width:"75%",maxWidth:420}}),_=(q=o(s.mark((function e(t,o){var r,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,O("corva","completion.wits",t,{limit:1,sort:"{timestamp:-1}"});case 3:r=e.sent,i=l(r)?null:d(j(r),"stage_number",null),o({type:"SUCCESS",lastStageNumber:i}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),o({type:"FAILURE",error:e.t0.message});case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t){return q.apply(this,arguments)}),z=function(e,t){switch(t.type){case"FETCH_STAGES":return R(R({},e),{},{requestState:"pending"});case"SUCCESS":return R(R({},e),{},{requestState:"success",lastStageNumber:t.lastStageNumber});case"FAILURE":return R(R({},e),{},{requestState:"failure",error:t.error});default:return e}},U=function(e,o){switch(o.type){case"OPEN_DIALOG":return R(R({},e),{},{dialogState:"open"});case"CLOSE_DIALOG":return R(R({},e),{},{dialogState:"closed"});case"SET_SELECTED_STAGES":return R(R({},e),{},{selectedStages:o.selectedStages,stagesData:o.selectedStages.reduce((function(e,o){return R(R({},e),{},t({},o,{lineStyle:"dotted",lineWidth:2}))}),{})});case"SET_SELECTED_LINE_STYLE":return R(R({},e),{},{stagesData:R(R({},e.stagesData),{},t({},o.stage,R(R({},e.stagesData[o.stage]),{},{lineStyle:o.selectedLineStyle})))});case"SET_SELECTED_LINE_WIDTH":return R(R({},e),{},{stagesData:R(R({},e.stagesData),{},t({},o.stage,R(R({},e.stagesData[o.stage]),{},{lineWidth:Number(o.selectedLineWidth)})))});default:return e}},Z=function(t){var o=t.onSave,s=t.onDelete,n=t.offset,p=N(),m=r(z,{requestState:"idle",lastStageNumber:null,error:null}),a=e(m,2),c=a[0],l=a[1],j=r(U,{dialogState:"closed",selectedStages:n.selectedStages||[],stagesData:n.stages||{}}),S=e(j,2),O=S[0],G=S[1],q=function(e){return function(t){G({type:"SET_SELECTED_LINE_STYLE",stage:e,selectedLineStyle:t.target.value})}},Z=function(e){return function(t){G({type:"SET_SELECTED_LINE_WIDTH",stage:e,selectedLineWidth:t.target.value})}},Y=function(){G({type:"CLOSE_DIALOG"})},K=n.selectedWellId;i((function(){l({type:"FETCH_STAGES"}),_(K,l)}),[K]);var X=u(c.lastStageNumber);return W(M,{children:[H(w,{title:n.selectedWellName,onClick:X?C:function(){G({type:"OPEN_DIALOG"})},onRemoveOffsetWell:s,wellId:K,rigName:""}),"success"===c.requestState&&W(g,{open:"open"===O.dialogState,onBackdropClick:Y,classes:{paper:p.dialogPaper},children:[H(h,{children:"Offset Well Stages"}),H(D,{children:W(v,{container:!0,direction:"column",spacing:2,children:[H(v,{item:!0,children:W(V,{margin:"normal",fullWidth:!0,required:!0,children:[H(b,{htmlFor:"stages-multi-select",children:"Stages"}),H(f,{inputProps:{name:"stages",id:"stages-multi-select"},value:O.selectedStages,renderValue:function(e){return"".concat(e.length," stages selected")},onChange:function(e){G({type:"SET_SELECTED_STAGES",selectedStages:e.target.value})},multiple:!0,children:A(1,c.lastStageNumber+1).map((function(e){return W(T,{value:e,children:[H(I,{checked:O.selectedStages.includes(e)}),H(P,{primary:e})]},e)}))})]})}),O.selectedStages.sort((function(e,t){return e-t})).map((function(e){return W(v,{item:!0,children:[W(E,{variant:"subtitle1",children:["Stage ",e]}),W(V,{component:"fieldset",children:[H(x,{component:"legend",required:!0,children:"Line Style"}),W(y,{name:"line-style",value:d(O.stagesData,[e,"lineStyle"],"dotted"),onChange:q(e),row:!0,children:[H(B,{value:"dotted",control:H(L,{}),label:"Dotted"}),H(B,{value:"dashed",control:H(L,{}),label:"Dashed"}),H(B,{value:"solid",control:H(L,{}),label:"Solid"})]})]}),W(V,{component:"fieldset",children:[H(x,{component:"legend",required:!0,children:"Line Width"}),W(y,{name:"line-width",value:String(d(O.stagesData,[e,"lineWidth"],"2")),onChange:Z(e),row:!0,children:[H(B,{value:String(1),control:H(L,{}),label:"Thin"}),H(B,{value:String(2),control:H(L,{}),label:"Normal"}),H(B,{value:String(4),control:H(L,{}),label:"Thick"})]})]})]},e)}))]})}),W(F,{children:[H(k,{onClick:Y,children:"Cancel"}),H(k,{variant:"contained",color:"primary",onClick:function(){var e=R(R({},n),{},{stages:O.stagesData,selectedStages:O.selectedStages});Y(),o(e)},children:"Save"})]})]})]})};Z.propTypes={onSave:n.isRequired,onDelete:n.isRequired,offset:p({selectedWellId:m,selectedWellName:a,selectedWellStatus:c(["active","idle","complete","paused","unknown"])}).isRequired};export{Z as default};
1
+ import e from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/asyncToGenerator";import s from"@babel/runtime/regenerator";import{useReducer as r,useEffect as i}from"react";import{func as n,shape as p,number as m,string as a,oneOf as c}from"prop-types";import{isEmpty as l,get as d,last as j,isNull as u,noop as C,range as A}from"lodash";import{makeStyles as S,Dialog as g,DialogTitle as h,DialogContent as D,Grid as v,FormControl as V,InputLabel as b,Select as f,MenuItem as T,Checkbox as I,ListItemText as P,Typography as E,FormLabel as x,RadioGroup as y,FormControlLabel as B,Radio as L,DialogActions as F,Button as W}from"@material-ui/core";import{getAppStorage as k}from"../../clients/jsonApi/index.js";import{jsxs as O,Fragment as M,jsx as H}from"react/jsx-runtime";import"../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";import"classnames";import"@icon-park/react/es/all";import"../../icons/IconParkProvider.js";import"../../icons/customIcons/icons/AddMessage.js";import"../../icons/customIcons/icons/Attention.js";import"../../icons/customIcons/icons/Collapse.js";import"../../icons/customIcons/icons/Dashboard.js";import"../../icons/customIcons/icons/Expand.js";import"../../icons/customIcons/icons/FolderClosed.js";import"../../icons/customIcons/icons/FolderClosedFilled.js";import"../../icons/customIcons/icons/FolderOpened.js";import"../../icons/customIcons/icons/GreaterOrEqual.js";import"../../icons/customIcons/icons/LessOrEqual.js";import"../../icons/customIcons/icons/Search.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../utils/mobileDetect.js";import"../IconButton/index.js";import"../../constants/goals.js";import"../../constants/segment.js";import"../../constants/alerts.js";import"../../constants/apps.js";import"../../constants/drillstring.js";import"../../constants/completion.js";import"../../constants/appPackages.js";import"../../constants/notifications.js";import"../../constants/feed.js";import"../../constants/bha.js";import"../../utils/env.js";import"../GradientManager/configuration/constants.js";import"../Modal/CorvaModal.css.js";import"uuid";import"../IconMenu/index.js";import"../StyledMenuItem/index.js";import"../AppIcon/AppIcon.js";import"../DevCenter/AppHeader/AppHeader.js";import"../DevCenter/AppSideBar/AppSideBar.js";import"../DevCenter/AppsDataProvider/AppsDataProvider.js";import"@material-ui/icons";import"../DevCenter/AppContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";import"../../utils/index.js";import"../DevCenter/DevCenterAppContainer/components/AppActions/AppActions.css.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/AppSettingsDialog.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/RemoveAppButton.js";import"../DevCenter/DevCenterAppContainer/components/AppSettingsDialog/components/SettingsAccordion.js";import"../DevCenter/DevCenterAppContainer/components/AnnotationsButton/AnnotationsButton.js";import"../../componentsV2/Text/Text.js";import"../../componentsV2/Grid/Grid.js";import"../../componentsV2/Grid/Grid.scss.js";import"../../componentsV2/Header/Header.scss.js";import"../../componentsV2/Button/Button.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import"../../componentsV2/Tooltip/Tooltip.scss.js";import"../../componentsV2/Paper/Paper.js";import"../../componentsV2/Popover/Popover.scss.js";import"../../componentsV2/Radio/Radio.js";import"../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../componentsV2/Checkbox/Checkbox.js";import"../../componentsV2/TextInput/TextInput.js";import"../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../componentsV2/TextLink/TextLink.js";import"../../componentsV2/Chip/Chip.js";import"../../componentsV2/ChipAlert/ChipAlert.js";import"../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../componentsV2/Avatar/Avatar.js";import"../../componentsV2/Avatar/constants.js";import"../../componentsV2/AvatarGroup/AvatarGroup.scss.js";import"@material-ui/lab";import"../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../componentsV2/ModalWindow/ModalWindow.scss.js";import"../../componentsV2/Modal/Modal.scss.js";import"../../componentsV2/Menu/Menu.js";import"../../componentsV2/Counter/Counter.js";import"../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../componentsV2/Switch/Switch.js";import"../../componentsV2/Tabs/Tabs.js";import"../../componentsV2/EmptyState/EmptyState.scss.js";import"../../componentsV2/FileIcon/FileIcon.js";import"react-dropzone";import"../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../componentsV2/Skeleton/Skeleton.scss.js";import"../../utils/main.js";import"../../componentsV2/CopyToClipboard/CopyToClipboard.scss.js";import"../../componentsV2/Stepper/Step/Step.scss.js";import"../../componentsV2/Stepper/Stepper.scss.js";import"../../componentsV2/ButtonLive/ButtonLive.js";import"../../componentsV2/LiveDotIndicator/LiveDotIndicator.scss.js";import"../../componentsV2/IndicatorLive/IndicatorLive.scss.js";import"../../componentsV2/Accordion/Accordion.scss.js";import"../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../componentsV2/BadgeComment/BadgeComment.js";import"../../componentsV2/AppContainer/AppContainer.js";import"../../componentsV2/AppContainer/AppContainer.constants.js";import"../../componentsV2/AppFooter/AppFooter.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppHeader/AppHeader.constants.js";import"../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../componentsV2/AppHeader/AppAssets/utils.js";import"../../componentsV2/AppHeader/AppAssets/AppAssets.scss.js";import"../PadModeSelect/PadModeSelect.js";import"../../componentsV2/AppHeader/PadMode/PadMode.scss.js";import"../../constants/streamSourceType.js";import"../../types/shared/Completions.js";import"../PadModeSelect/types.js";import"@babel/runtime/helpers/toConsumableArray";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/subscriptions.js";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"lodash/flatten";import"lodash/partition";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import"../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../componentsV2/AppSettings/AppSettings.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../componentsV2/AppHeader/V3/SettingsPopover/SettingsPopover.scss.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../componentsV2/AppHeader/AppHeader.scss.js";import"../../componentsV2/OffsetWellsButton/OffsetWellsButton.scss.js";import"../DevCenter/DevCenterAppContainer/components/FullscreenButton/FullscreenButton.js";import"../DevCenter/DevCenterAppContainer/components/AppInfoMessage/AppInfoMessage.js";import"../DevCenter/DevCenterAppContainer/components/DevCenterAppView/DevCenterAppView.js";import"../DevCenter/DevCenterAppContainer/components/RestoreAppSizeButton/index.js";import"rollbar";import"@rollbar/react";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchButton.scss.js";import"../DevCenter/DevCenterAppContainer/DevCenterAppContainer.css.js";import"../Icons/AnnotationIcon.js";import"../Annotations/components/AnnotationsList/index.js";import"../Annotations/components/LastAnnotation/index.js";import"../Annotations/AnnotationsContext.js";import"../Toaster/Toaster.js";import"../HelpCenter/HelpCenterIcon.js";import"../DevCenter/NavigationBar/NavigationBar.js";import"../DevCenter/SideBar/SideBar.js";import"../DevCenter/AppSettingsPopover/AppSettingsPopover.js";import"../DevCenter/AppFilterPanelLayout/AppFilterPanelLayout.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedAppPage.js";import"../DevCenter/IsolatedDevCenterAppContainer/DevCenterIsolatedApp.js";import"../AssetEditor/index.js";import"../AssetEditorV2/index.js";import"../AppVersionsSelect/AppVersionsSelect.js";import"../LoadingIndicator/LoadingIndicator.js";import"../Typography.js";import"../RealTimeValuesSidebar/RealTimeSidebar.js";import"../CollapsableSidebar.js";import"../DateTimePicker/index.js";import"../DatePicker/index.js";import"../ErrorBoundary/ErrorBoundary.js";import"../ErrorBoundary/DevCenterAppErrorView/DevCenterAppErrorView.js";import"../SlateFormattedText/SlateFormattedText.js";import"../SlateFormattedText/RenderElements.js";import"slate";import"../EmptyState/EmptyState.js";import"../ParameterCharts/ParameterCharts.js";import"../ParameterCharts/AddEditTrack.js";import"../ChartActionsList/ChartActionsList.js";import"../CopyToClipboard/CopyToClipboard.js";import"../AssetEditor/AssetEditorAutocomplete.js";import"../AssetEditor/SingleAssetEditor.js";import"react-color";import"../SettingEditors/ColorEditor/style.css.js";import"../SettingEditors/DropdownEditor/index.js";import"../SwitchControl/index.js";import"../ColorPicker/ColorPicker.js";import"../Chart/components/ChartButton.js";import"../Chart/components/ChartButtons.js";import"../Chart/components/ChartWrapper.js";import"../Chart/components/AxisDropdown.js";import"../Chart/components/ChartSelect.js";import"../Chart/components/buttons/DragToZoomButton.js";import"../Chart/components/buttons/ZoomInButton.js";import"../Chart/components/buttons/ZoomOutButton.js";import"../Chart/components/buttons/PanButton.js";import"../Chart/components/buttons/ResetZoomButton.js";import"../Chart/components/buttons/HideAxesButton.js";import"../Chart/components/buttons/ChartTypeButton.js";import"../ColorPicker/PaletteChromePicker/PaletteChromePicker.js";import"../TruncatedText/index.js";import"../MiddleTruncatedText/MiddleTruncatedText.js";import"../RangeSlider/constants.js";import"../RangeSlider/Input.css.js";import"../RangeSlider/RangeSlider.css.js";import"../AdvancedSlider/AdvancedSlider.js";import"../Breadcrumbs/index.js";import"../VirtualizedTable/index.js";import"../EmptyView/EmptyView.js";import"../EmptyView/EmptyAppView/EmptyAppView.js";import"../Button/components/Button/index.js";import"moment-timezone";import"../Button/components/LiveButton/components/LiveButtonStateIndicator/index.js";import"../Button/components/LiveButton/styles.js";import"../ContextMenuItem/index.js";import"../FolderMenuItem/index.js";import"../EditableItem/EditableItem/index.js";import"../EditableItem/EditableItemWithBadge/index.js";import"../Checkbox/index.js";import"../FolderMenuItemWithLinks/index.js";import"../TextField/index.js";import"../Chip/index.js";import"../Counter/index.js";import"../AnchorsList/AnchorsList.js";import"../Select/index.js";import"../Select/SelectFilterBy.js";import"../CustomSelect/index.js";import"../Tabs/Tabs.js";import"../Tabs/Tab.js";import"../ResizableTable/ResizableTable.js";import"../GradientPicker/GradientPicker.js";import"../GradientManager/GradientList.js";import"@material-ui/icons/AddCircle";import"../GradientManager/GradientPreview/GradientPreview.js";import"../GradientManager/GradientSelect.styles.js";import"../GradientManager/GradientManager.styles.js";import"../Drillstring/BHASchematic.js";import"../Drillstring/BHATable/index.js";import"../Drillstring/BHAComponentIcon.js";import"../Drillstring/BHAComponentDetail/index.js";import"../Drillstring/BHATileIcon.js";import"../Drillstring/BHATile/BHATile.js";import"../Drillstring/BHAList/BHAList.js";import"../Drillstring/BHAComponentsTable/BHAComponentsTable.js";import"../Casing/CasingTable/index.js";import"../Casing/CasingComponentIcon.js";import"../Casing/CasingTileIcon.js";import"../Casing/CasingTableV2/CasingTableV2.js";import"../Casing/CasingTile/CasingTile.js";import"../DisabledSettingsMessage/DisabledSettingsMessage.js";import"../WellSummary/WellSummaryItemLabel.js";import"../WellSummary/WellSummaryItemTitle.js";import"../WellSummary/WellSummaryItemValue.js";import"../WellSummary/ActivitySummaryChart.js";import"../WellSummary/FracWirelineTimeChart.js";import"../BICOffsetPickerDialog/index.js";import"../OffsetWellButton/OffsetWellButton.js";import"../OffsetWellPickerV2/OffsetWellPickerDialog.js";import"../OffsetWellPickerV3/index.js";import w from"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"../OffsetWellPickerV4/utils/apiCalls.js";import"../OffsetWellPickerV4/effects/useAdvancedWells.js";import"../OffsetWellPickerV4/constants.js";import"react-virtualized";import"../OffsetWellPickerV4/effects/useAssetsData.js";import"../OffsetWellPickerV4/components/AppHeader/AppHeader.js";import"../OffsetWellPickerV4/components/Toolbar/Toolbar.js";import"../OffsetWellPickerV4/components/Filter/Filter.js";import"../OffsetWellPickerV4/components/Map/WellsMap.js";import"../OffsetWellPickerV4/components/OffsetWellsTable/OffsetWellsTable.js";import"../OffsetWellPickerV4/components/OffsetWellsTable/AdvancedSearch/constants.js";import"../OffsetWellPickerV4/utils/index.js";import"../OffsetWellPickerV4/OffsetWellPickerV4.module.css.js";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import"../OffsetWellMap/OffsetWellMap.js";import"../ConfirmationDialog.js";import"../TextLink/index.js";import"../Avatar/index.js";import"../Template/TemplatePopover/index.js";import"../Template/TemplateSharingDialog/index.js";import"../MenuItem/index.js";import"../MiddleTruncate/MiddleTruncate.js";import"../PinnableFilters/PinnableFilters.js";import"../HeaderLayout/HeaderLayout.js";import"./PadOffsetsPicker.js";import"./OffsetAssetChip.js";import"./OffsetAssetsListExpander.js";import"../PadOffsetsPickerV2/PadOffsetsPickerV2.js";import"../Table/TableToolbar/TableToolbar.js";import"../Table/TableContainer/TableContainer.js";import"../Table/TableCell/TableCell.js";import"../Table/TablePagination/TablePagination.js";import"../Table/TablePaginationActions/TablePaginationActions.js";import"../Tooltip/ScrollableTooltip.js";import"../PriceInput/PriceInput.js";import"../LabelsCounter/LabelsCounter.js";import"../Stepper/Stepper.js";import"../Stepper/Step/Step.js";import"../Stepper/StepsWrapper.js";import"../Comment/CommentIcon/index.js";import"../FilesLoader/FilesLoader.js";import"../SearchInput/index.js";import"../FeedItem/FeedItem.js";import"../FeedItem/FeedItemEditProvider/FeedItemEditProvider.js";import"../PostInput/PostInput.js";import"../KeyboardDateTimePicker.js";import"../AddComment/Popover.js";import"../AddComment/Popup.js";import"../StageDesignVActual/ComparisonBar/ComparisonBar.js";import"../StageDesignVActual/ElementsComparison/ElementsComparison.js";import"../StageDesignVActual/ComparisonHeader.js";import"../StageDesignVActual/ComparisonRow.js";import"../EmbeddedApp/DevCenterEmbeddedApp.js";import"../EmbeddedApp/EmbeddedApp.js";import"../Autocomplete/Autocomplete.js";import"../DocumentViewer/DocumentViewer.js";import"../ColorPickerPalette/ColorPickerPalette.js";import"../Search/Search.js";import"../Search/components/Listbox.js";import"../Search/components/Paper.js";import"../Search/components/RecentSearches.js";import"../Search/components/Groups.js";import"../Search/components/SelectAllListItem.js";import"../StatusBadge/index.js";import"../Attachment/index.js";import"../EmojiIconButton.js";import"../FileUploadIconButton.js";import"../FilePreview/index.js";import"../FailedFileUploading.js";import"../UserMention/index.js";import"../CommentsInfo/index.js";import"../CommentInput/index.js";import"../Comment/index.js";import"../CommentLoader.js";import"../AssetNameLabel/AssetStatusBadge.js";import"../AssetEditorV2/components/PrimaryAssetSelect.js";import"../AssetEditorV2/components/SecondaryAssetSelect.js";import"../AssetEditorV2/components/SelectItem.js";import"../AssetEditorV2/components/MultipleAssetsToggle.js";import"../AssetEditorV2/components/PrimaryAssetSelectV2.js";import"../EChartsWrapper/EChartsWrapper.js";import"../AssetsMultipleSelector/AssetsMultipleSelector.js";import"@material-ui/icons/Close";import"@material-ui/icons/GetApp";import"../GoogleDocsViewer/index.js";import"../NewDocumentViewer/effects/useFileContent.js";import"../NewDocumentViewer/styles.js";import"../FilesLoaderV2/styles.js";import"../FilesDropzone/styles.js";import"../FilesProcessor/styles.js";import"../Hint/styles.js";import"@babel/runtime/helpers/taggedTemplateLiteral";import"fparser";import"../Formula/useFormulaStyles.js";import"../Formula/RootXIcon.js";import"../Formula/FormulaTextEditor.js";import"../Formula/CloseSuggestion.js";import"../Formula/SuggestionsMenu.js";function G(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,s)}return o}function R(e){for(var o=1;o<arguments.length;o++){var s=null!=arguments[o]?arguments[o]:{};o%2?G(Object(s),!0).forEach((function(o){t(e,o,s[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):G(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}var q,N=S({dialogPaper:{width:"75%",maxWidth:420}}),_=(q=o(s.mark((function e(t,o){var r,i;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,k("corva","completion.wits",t,{limit:1,sort:"{timestamp:-1}"});case 3:r=e.sent,i=l(r)?null:d(j(r),"stage_number",null),o({type:"SUCCESS",lastStageNumber:i}),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),o({type:"FAILURE",error:e.t0.message});case 11:case"end":return e.stop()}}),e,null,[[0,8]])}))),function(e,t){return q.apply(this,arguments)}),z=function(e,t){switch(t.type){case"FETCH_STAGES":return R(R({},e),{},{requestState:"pending"});case"SUCCESS":return R(R({},e),{},{requestState:"success",lastStageNumber:t.lastStageNumber});case"FAILURE":return R(R({},e),{},{requestState:"failure",error:t.error});default:return e}},U=function(e,o){switch(o.type){case"OPEN_DIALOG":return R(R({},e),{},{dialogState:"open"});case"CLOSE_DIALOG":return R(R({},e),{},{dialogState:"closed"});case"SET_SELECTED_STAGES":return R(R({},e),{},{selectedStages:o.selectedStages,stagesData:o.selectedStages.reduce((function(e,o){return R(R({},e),{},t({},o,{lineStyle:"dotted",lineWidth:2}))}),{})});case"SET_SELECTED_LINE_STYLE":return R(R({},e),{},{stagesData:R(R({},e.stagesData),{},t({},o.stage,R(R({},e.stagesData[o.stage]),{},{lineStyle:o.selectedLineStyle})))});case"SET_SELECTED_LINE_WIDTH":return R(R({},e),{},{stagesData:R(R({},e.stagesData),{},t({},o.stage,R(R({},e.stagesData[o.stage]),{},{lineWidth:Number(o.selectedLineWidth)})))});default:return e}},Z=function(t){var o=t.onSave,s=t.onDelete,n=t.offset,p=N(),m=r(z,{requestState:"idle",lastStageNumber:null,error:null}),a=e(m,2),c=a[0],l=a[1],j=r(U,{dialogState:"closed",selectedStages:n.selectedStages||[],stagesData:n.stages||{}}),S=e(j,2),k=S[0],G=S[1],q=function(e){return function(t){G({type:"SET_SELECTED_LINE_STYLE",stage:e,selectedLineStyle:t.target.value})}},Z=function(e){return function(t){G({type:"SET_SELECTED_LINE_WIDTH",stage:e,selectedLineWidth:t.target.value})}},Y=function(){G({type:"CLOSE_DIALOG"})},K=n.selectedWellId;i((function(){l({type:"FETCH_STAGES"}),_(K,l)}),[K]);var X=u(c.lastStageNumber);return O(M,{children:[H(w,{title:n.selectedWellName,onClick:X?C:function(){G({type:"OPEN_DIALOG"})},onRemoveOffsetWell:s,wellId:K,rigName:""}),"success"===c.requestState&&O(g,{open:"open"===k.dialogState,onBackdropClick:Y,classes:{paper:p.dialogPaper},children:[H(h,{children:"Offset Well Stages"}),H(D,{children:O(v,{container:!0,direction:"column",spacing:2,children:[H(v,{item:!0,children:O(V,{margin:"normal",fullWidth:!0,required:!0,children:[H(b,{htmlFor:"stages-multi-select",children:"Stages"}),H(f,{inputProps:{name:"stages",id:"stages-multi-select"},value:k.selectedStages,renderValue:function(e){return"".concat(e.length," stages selected")},onChange:function(e){G({type:"SET_SELECTED_STAGES",selectedStages:e.target.value})},multiple:!0,children:A(1,c.lastStageNumber+1).map((function(e){return O(T,{value:e,children:[H(I,{checked:k.selectedStages.includes(e)}),H(P,{primary:e})]},e)}))})]})}),k.selectedStages.sort((function(e,t){return e-t})).map((function(e){return O(v,{item:!0,children:[O(E,{variant:"subtitle1",children:["Stage ",e]}),O(V,{component:"fieldset",children:[H(x,{component:"legend",required:!0,children:"Line Style"}),O(y,{name:"line-style",value:d(k.stagesData,[e,"lineStyle"],"dotted"),onChange:q(e),row:!0,children:[H(B,{value:"dotted",control:H(L,{}),label:"Dotted"}),H(B,{value:"dashed",control:H(L,{}),label:"Dashed"}),H(B,{value:"solid",control:H(L,{}),label:"Solid"})]})]}),O(V,{component:"fieldset",children:[H(x,{component:"legend",required:!0,children:"Line Width"}),O(y,{name:"line-width",value:String(d(k.stagesData,[e,"lineWidth"],"2")),onChange:Z(e),row:!0,children:[H(B,{value:String(1),control:H(L,{}),label:"Thin"}),H(B,{value:String(2),control:H(L,{}),label:"Normal"}),H(B,{value:String(4),control:H(L,{}),label:"Thick"})]})]})]},e)}))]})}),O(F,{children:[H(W,{onClick:Y,children:"Cancel"}),H(W,{variant:"contained",color:"primary",onClick:function(){var e=R(R({},n),{},{stages:k.stagesData,selectedStages:k.selectedStages});Y(),o(e)},children:"Save"})]})]})]})};Z.propTypes={onSave:n.isRequired,onDelete:n.isRequired,offset:p({selectedWellId:m,selectedWellName:a,selectedWellStatus:c(["active","idle","complete","paused","unknown"])}).isRequired};export{Z as default};