@corva/ui 3.42.0-2 → 3.42.0-4
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.
- package/cjs-bundle/clients/jsonApi/index.js +1 -1
- package/cjs-bundle/clients/jsonApi/index.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/effects/useFetchWells.js +1 -1
- package/clients/jsonApi/index.d.ts +38 -0
- package/clients/jsonApi/index.d.ts.map +1 -1
- package/clients/jsonApi/index.js +1 -1
- package/clients/jsonApi/index.js.map +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.js +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.js.map +1 -1
- package/components/OffsetWellPickerV5/effects/useFetchWells.d.ts +1 -1
- package/components/OffsetWellPickerV5/effects/useFetchWells.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/effects/useFetchWells.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import o from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/regenerator";import{useState as r,useRef as i,useMemo as c,useEffect as p,useCallback as l,useLayoutEffect as m}from"react";import a from"classnames";import{uniqBy as d,uniq as u,sortBy as f,isEmpty as j}from"lodash";import{Replay as C}from"@material-ui/icons";import{Table as v,TableHead as A}from"@material-ui/core";import{useFetchWells as h}from"./effects/useFetchWells.js";import{useAdvancedWells as g}from"./effects/useAdvancedWells.js";import{useBicWells as S}from"./effects/useBicWells.js";import{useCompanyMetricKey as V}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as I}from"./effects/useFilterOptions.js";import{useFilteredWells as b}from"./effects/useFilteredWells.js";import{useSortedWells as P}from"./effects/useSortedWells.js";import"./effects/useAssetsData.js";import{useTableColumns as D}from"./effects/useTableColumns.js";import{useCompanyProvider as T}from"./effects/useCompanyProvider.js";import{useCompanies as x}from"./effects/useCompanies.js";import{usePinnedWells as y}from"./effects/usePinnedWells.js";import{useSearchedWells as W}from"./effects/useSearchedWells.js";import{useFetchSubjectWell as F}from"./effects/useFetchSubjectWell.js";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/constants.js";import"../../clients/subscriptions.v1.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"./api/shared/dataFormatter.js";import{fetchCompanyIdsByWellIds as k}from"./api/wells/fetchCompanyIdsByWellIds.js";import{DEFAULT_RADIUS_MILES as B,FilterType as w,ALL_SECTION_KEY as O,COMPANY_PROVIDERS_FOR_IDAS as M,ROWS_PER_PAGE as L,RESYNC_STATUS as E,MAX_OFFSET_SIZE as H}from"./constants.js";import{AppHeader as N}from"./components/AppHeader/AppHeader.js";import{Filter as G}from"./components/Filter/Filter.js";import{WellsMap as R}from"./components/Map/WellsMap.js";import{OffsetWellsTable as q}from"./components/OffsetWellsTable/OffsetWellsTable.js";import{OffsetWellsTableHead as z}from"./components/OffsetWellsTable/OffsetWellsTableHead.js";import{AdvancedSearch as U}from"./components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js";import{SEARCH_CATEGORIES as K}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{getCoordinatedWells as Z}from"./utils/index.js";import{getIsImperial as _}from"./utils/getIsImperial.js";import{usePickerPropsStore as X}from"./stores/picker-props-store/usePickerPropsStore.js";import{useFilterStore as J}from"./stores/filter-store/useFilterStore.js";import{useViewStore as Q}from"./stores/view-store/useViewStore.js";import{normalizeFilters as Y}from"./stores/filter-store/utils/normalizeFilters.js";import $ from"./OffsetWellPickerV5.module.css.js";import ee from"./components/OffsetWellsTable/OffsetWellsTable.module.css.js";import"../../utils/index.js";import{jsx as te,jsxs as oe}from"react/jsx-runtime";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Notifications/Notifications.scss.js";import{NotificationsContainer as ne}from"../Notifications/NotificationsContainer.js";import se from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";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/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../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"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import"../Modal/CorvaModal.css.js";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"../DevCenter/AppContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";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/Cell.js";import"../../componentsV2/Header/Header.scss.js";import{Button as re}from"../../componentsV2/Button/Button.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as ie}from"../../componentsV2/Tooltip/Tooltip.js";import"../../componentsV2/Popover/Popover.js";import"../../componentsV2/Radio/Radio.js";import"../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../componentsV2/Checkbox/Checkbox.js";import"../../componentsV2/TextInput/TextInput.js";import"../../componentsV2/Label/Label.js";import"../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../componentsV2/TextLink/TextLink.js";import{LoaderCircular as ce}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import"../../componentsV2/Chip/Chip.js";import"../../componentsV2/ChipAlert/ChipAlert.js";import"../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../componentsV2/Avatar/Avatar.js";import"../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../componentsV2/Paper/Paper.js";import"../../componentsV2/ModalWindow/ModalWindow.js";import{Modal as pe}from"../../componentsV2/Modal/Modal.js";import"../../componentsV2/Menu/Menu.js";import"../../componentsV2/utils.js";import"../../componentsV2/Hint/Hint.scss.js";import"../../componentsV2/Counter/Counter.js";import"../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../componentsV2/TemplatesControl/TemplatesControl.js";import"zustand";import"../../componentsV2/TemplatesControl/utils.js";import"../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../componentsV2/TemplatesControl/Store/utils.js";import"../../componentsV2/TemplatesControl/types.js";import"../../permissions/PermissionsContext.js";import"../../permissions/constants/index.js";import"../../permissions/withPermissionsHOC.js";import"../../permissions/ProvidePermissions.js";import"../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../componentsV2/Switch/Switch.js";import"../../componentsV2/Tabs/Tabs.js";import"../../componentsV2/EmptyState/EmptyState.scss.js";import"../../componentsV2/FileIcon/FileIcon.js";import"../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../componentsV2/Skeleton/Skeleton.scss.js";import"../../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/ButtonText/ButtonText.js";import"../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../componentsV2/Accordion/Accordion.scss.js";import"../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../componentsV2/BadgeComment/BadgeComment.js";import"../../componentsV2/AppContainer/AppContainer.js";import"../../componentsV2/AppContainer/AppContainer.constants.js";import"../../componentsV2/AppFooter/AppFooter.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppHeader/AppHeader.constants.js";import"../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../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"lodash/flatten";import"lodash/partition";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../utils/env.js";import"../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import{useGlobalOffsetWellsSync as le}from"../../effects/useGlobalOffsetWellsSync.js";import"../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../utils/getSingleAsset.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../componentsV2/AppContainer/headerCommon.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../componentsV2/AppSettings/AppSettings.js";import"../../componentsV2/AppSettings/AppSettings.constants.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../componentsV2/AppHeader/AppHeader.scss.js";import"../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../componentsV2/DatePicker/DatePicker.js";import"../../componentsV2/DragHandle/DragHandle.js";import"../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../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 me from"../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"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"./OffsetWellPickerV5WithStore.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"../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/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.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"../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../componentsV2/FileIcon/icons/XmlFileIcon.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";import{showInfoNotification as ae}from"../../utils/notificationToasts.js";function de(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ue(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?de(Object(n),!0).forEach((function(o){e(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var fe="OffsetWellPickerV5",je=function(){var de,je,Ce,ve=X((function(e){return e.open})),Ae=X((function(e){return e.isWDUser})),he=X((function(e){return e.defaultSubjectWell})),ge=X((function(e){return e.currentUser})),Se=X((function(e){return e.offsetSettings})),Ve=X((function(e){return e.isViewOnly})),Ie=X((function(e){return e.onClose})),be=X((function(e){return e.onSave})),Pe=X((function(e){return e.maxOffsetSize})),De=X((function(e){return e.localMaxOffsetSize})),Te=X((function(e){return e.syncAutoEnabled})),xe=r(null),ye=n(xe,2),We=ye[0],Fe=ye[1],ke=i(null),Be=Math.min(Pe+1,De+1,H+1),we=Math.min(Math.max(Be,De+1),H+1),Oe=null==he?void 0:he.asset_id,Me=F(Oe),Le=n(Me,1)[0];le(Se,be,we);var Ee=Q((function(e){return e.isFilterExpanded})),He=Q((function(e){return e.isMapHidden})),Ne=Q((function(e){return e.isHScrollMoved})),Ge=Q((function(e){return e.setIsHScrollMoved})),Re=Q((function(e){return e.isVScrollMoved})),qe=Q((function(e){return e.setIsVScrollMoved})),ze=Q((function(e){return e.isAdvancedSearchHidden})),Ue=Q((function(e){return e.setIsAdvancedSearchHidden})),Ke=+(null==he?void 0:he.companyId)||+(null==ge?void 0:ge.company_id),Ze=Oe>0,_e=J((function(e){return e.filters})),Xe=J((function(e){return e.setFilters})),Je=J((function(e){return e.resetFilters})),Qe=null!==(de=J((function(e){var t;return null===(t=e.filters)||void 0===t?void 0:t.radius})))&&void 0!==de?de:B,Ye=null!==(je=J((function(e){var t;return null===(t=e.filters)||void 0===t?void 0:t.selectionMode})))&&void 0!==je?je:"radius",$e=J((function(e){var t;return null===(t=e.filters)||void 0===t?void 0:t.polygonCoords})),et=x({open:ve}),tt=et.canViewCompanies,ot=et.companies,nt=r([]),st=n(nt,2),rt=st[0],it=st[1],ct=r([]),pt=n(ct,2),lt=pt[0],mt=pt[1],at=i(new Set),dt=r([]),ut=n(dt,2),ft=ut[0],jt=ut[1],Ct=r(!1),vt=n(Ct,2),At=vt[0],ht=vt[1],gt=c((function(){return null==_e?void 0:_e[w.company]}),[_e]);p((function(){var e=(null==Se?void 0:Se.selectedWellIds)||[];!ve||lt.length>0||0===e.length||o(s.mark((function t(){var o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k(e);case 2:o=t.sent,mt(o);case 4:case"end":return t.stop()}}),t)})))()}),[ve,null==Se?void 0:Se.selectedWellIds,lt.length]);var St=c((function(){var e=rt.map((function(e){return e.companyId})).filter((function(e){return null!=e})),o=lt||[];if(!tt)return t(new Set((Ke?[Ke]:[]).concat(e,o)));if(void 0===gt||Array.isArray(gt)&&0===gt.length)return null;var n=new Set(gt);return Ke&&n.add(Ke),e.forEach((function(e){return n.add(e)})),o.forEach((function(e){return n.add(e)})),Array.from(n)}),[gt,Ke,tt,rt,lt]),Vt=r((null==Se?void 0:Se.wellSection)||O),It=n(Vt,2),bt=It[0],Pt=It[1],Dt=i(!0),Tt=r(!0),xt=n(Tt,2),yt=xt[0],Wt=xt[1],Ft=we<=(null==rt?void 0:rt.length),kt=i(),Bt=r(!0),wt=n(Bt,2),Ot=wt[0],Mt=wt[1];p((function(){if(ve&&Ft&&ae("App can’t process more than (".concat(we-1,") Offset Wells.")),!ve){var e,t,o=new Set(kt.current||[]);(null==Se||null===(e=Se.selectedWellIds)||void 0===e?void 0:e.length)===(null===(t=kt.current)||void 0===t?void 0:t.length)&&((null==Se?void 0:Se.selectedWellIds)||[]).every((function(e){return o.has(e)}))||(Dt.current=!0),kt.current=null==Se?void 0:Se.selectedWellIds}}),[Ft,ve,Se,we]);var Lt=h(St,Le,Qe,Ye,$e),Et=n(Lt,2),Ht=Et[0],Nt=Et[1],Gt=y(null==Se?void 0:Se.selectedWellIds),Rt=n(Gt,2),qt=Rt[0],zt=Rt[1],Ut=W(),Kt=n(Ut,3),Zt=Kt[0],_t=Kt[1],Xt=Kt[2],Jt=c((function(){if(!Ht)return null;var e=Ht;if(null!=qt&&qt.length){var t=new Set(e.map((function(e){return e.id}))),o=qt.filter((function(e){return!t.has(e.id)}));o.length>0&&(e=e.concat(o))}if(null!=Zt&&Zt.length){var n=new Set(e.map((function(e){return e.id}))),s=Zt.filter((function(e){return!n.has(e.id)}));s.length>0&&(e=e.concat(s))}return Le&&!e.some((function(e){return e.id===Le.id}))&&(e=[Le].concat(e)),e}),[Ht,Le,qt,Zt]),Qt=T(Ke),Yt=n(Qt,1)[0],$t=S(Oe,Jt),eo=n($t,8),to=eo[0],oo=eo[1],no=eo[2],so=eo[3],ro=eo[4],io=eo[5],co=eo[6],po=eo[7],lo=c((function(){return!!to&&to.some((function(e){return e.value!==O}))}),[to]);p((function(){Mt(!0),oo(null),so(null)}),[so,oo,Oe]);var mo=V(Ke,null==Se?void 0:Se.metricsKeys),ao=n(mo,2),uo=ao[0],fo=ao[1],jo=g(Jt,to,no,Oe,uo,ve),Co=n(jo,2),vo=Co[0],Ao=Co[1],ho=c((function(){if(!vo||null==ot||!ot.length)return vo;var e={};return ot.forEach((function(t){e[t.id]=t.name})),vo.map((function(t){return ue(ue({},t),{},{companyName:e[t.companyId]||"Null"})}))}),[vo,ot]),go=c((function(){return Le?ho&&ho.find((function(e){return e.id===Le.id}))||Le:null}),[Le,ho]),So=!(Nt||Ao||zt||_t);p((function(){if(So){var e,t=(e=o(s.mark((function e(){var t,o,n,r,i,c,p,l,m,a,d,u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=void 0===(null==Se?void 0:Se.isSynced)||(null==Se?void 0:Se.isSynced),o=!0,!t){e.next=20;break}if(r=no[O]||[],i=new Set(r),c=((null==Se?void 0:Se.selectedWellIds)||[]).every((function(e){return i.has(e)})),r.length===(null==Se||null===(n=Se.selectedWellIds)||void 0===n?void 0:n.length)&&c){e.next=17;break}return e.next=9,Z(r,Oe);case 9:p=e.sent,l=p.slice(0,De+1).map((function(e){return e.id})),m=ue(ue({},Se),{},{subjectWellId:Oe,selectedWellIds:l,offsetWellsLimited:we<=l.length}),a=new Set(l),d=p.filter((function(e){return a.has(e.id)})),be(m,d),e.next=18;break;case 17:o=!1;case 18:e.next=21;break;case 20:o=!1;case 21:if(o){e.next=26;break}return e.next=24,Z((null==Se?void 0:Se.selectedWellIds)||[],Oe);case 24:u=e.sent,be(Se,u);case 26:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)});Te&&Ot&&Se&&no&&(t(),Mt(!1))}}),[Se,no,Oe,we,Te,So,Ot,Be,De,be]);var Vo=I(ho,ot,tt),Io=D(uo,tt,lo),bo=b(ho,_e,$e,Qe),Po=c((function(){if(!bo)return bo;var e=new Map((null==ho?void 0:ho.map((function(e){return[e.id,e]})))||[]),t=rt.map((function(t){return e.get(t.id)||t})),o=((null==po?void 0:po[bt])||[]).map((function(t){return e.get(t)})).filter((function(e){return void 0!==e}));return d(t.concat(o).concat(bo),"id")}),[ho,bo,rt,po,bt]);p((function(){if(bo&&So&&Dt.current){var e=new Set((null==Se?void 0:Se.selectedWellIds)||[]),t=ho.filter((function(t){return e.has(t.id)})),o=new Set(t.map((function(e){return e.id}))),n=rt.filter((function(t){return e.has(t.id)&&!o.has(t.id)}));t=t.concat(n),go&&(t=t.concat(go)),it(d(t,"id")),Dt.current=!1}}),[ho,bo,null==Se?void 0:Se.selectedWellIds,So,go,rt]),p((function(){if(null!=ho&&ho.length&&0!==at.current.size){var e=at.current,t=ho.filter((function(t){return e.has(t.id)}));if(t.length>0){var o=t.map((function(e){return e.id}));jt((function(e){return e.filter((function(e){return!o.includes(e)}))})),it((function(e){var o=t.slice(0,Math.max(0,we-e.length));return d(e.concat(o),"id")})),t.forEach((function(t){return e.delete(t.id)}))}}}),[ho,we]);var Do,To,xo,yo=P(go,Po,rt,Wt),Wo=n(yo,5),Fo=Wo[0],ko=Wo[1],Bo=Wo[2],wo=Wo[3],Oo=Wo[4],Mo=l((Do=o(s.mark((function e(t,o,n){var r,i,c,p,l,m,a,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n===K.well.name?r=o:(i=new Map,c=new Map,ho.forEach((function(e){i.set(e.id,e.rigName),c.has(e.rigName)||c.set(e.rigName,[]),c.get(e.rigName).push(e.id)})),r=o.flatMap((function(e){var t=i.get(e);return c.get(t)||[]}))),p=new Set(r),l=ho.filter((function(e){var t=e.id;return p.has(t)})),!(t&&l.length<r.length)){e.next=11;break}if(m=new Set(l.map((function(e){return e.id}))),!((a=r.filter((function(e){return!m.has(e)}))).length>0)){e.next=11;break}return jt((function(e){return e.concat(a)})),e.next=10,Xt(a);case 10:a.forEach((function(e){return at.current.add(e)}));case 11:t?(f=l.slice(0,Math.min(l.length,we-rt.length))).length>0&&it((function(e){return d(e.concat(f),"id")})):it((function(e){return u(e.filter((function(e){var t=e.id;return!l.find((function(e){return e.id===t}))})))}));case 12:case"end":return e.stop()}}),e)}))),function(e,t,o){return Do.apply(this,arguments)}),[ho,we,rt.length,Xt]),Lo=l((function(){Ue(!0)}),[Ue]),Eo=l((function(e){fo(e)}),[fo]),Ho=l((function(e,t){fo((function(o){return o.map((function(o){return o===e?t:o}))}))}),[fo]),No=l((function(e,t){ko(e),wo(t)}),[ko,wo]),Go=l((function(e,t){it(t?function(t){if(t.length>=we)return t;var o=(null==ho?void 0:ho.find((function(t){return t.id===e.id})))||e;return t.concat(o)}:function(t){return t.filter((function(t){return t.id!==e.id}))})}),[ho,we]),Ro=l((function(e){if(e){var t=go?bo.concat(go):bo,o=f(d(t,"id"),"distance");it(o.slice(0,we))}else it(go?[go]:[])}),[bo,go,we]),qo=l((function(e){it((function(t){var o=new Set(t.map((function(e){return e.id}))),n=e.filter((function(e){return!o.has(e.id)}));if(0===n.length)return t;var s=we-t.length,r=n.slice(0,s).map((function(e){return(null==ho?void 0:ho.find((function(t){return t.id===e.id})))||e}));return d(t.concat(r),"id")}))}),[ho,we]),zo=l((To=o(s.mark((function e(t){var o,n,r,i,c,p;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!po){e.next=15;break}if(o=po[t]||[],n=new Map((null==Jt?void 0:Jt.map((function(e){return[e.id,e]})))||[]),r=o.filter((function(e){return!n.has(e)})),i=[],!(r.length>0)){e.next=9;break}return e.next=8,Xt(r);case 8:i=e.sent;case 9:i.forEach((function(e){return n.set(e.id,e)})),c=o.map((function(e){return n.get(e)})).filter((function(e){return void 0!==e})),p=f(c,"distance"),it(p.slice(0,Be)),e.next=16;break;case 15:it(go?[go]:[]);case 16:case"end":return e.stop()}}),e)}))),function(e){return To.apply(this,arguments)}),[po,Jt,Xt,Be,go]),Uo=l((xo=o(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Pt(t),e.next=3,zo(t);case 3:case"end":return e.stop()}}),e)}))),function(e){return xo.apply(this,arguments)}),[zo]),Ko=c((function(){return rt.find((function(e){return e.id===Oe}))?rt.length-1:rt.length}),[rt,Oe]),Zo=c((function(){if(!no)return!1;var e=rt.map((function(e){return e.id})),t=no[bt]||[];if(Math.min(t.length,Be)!==e.length)return!1;var o=new Set(t);return e.every((function(e){return o.has(e)}))}),[no,rt,bt,Be]),_o=c((function(){return!!Yt&&M.includes(Yt)}),[Yt]),Xo=c((function(){return _o?"IDAS generated offsets.":Ae?"Offset Selection App.":"WellHub."}),[_o,Ae]),Jo=l((function(){Ie();var e=rt.map((function(e){return e.id})),t=ue(ue({},Se),{},{companyId:Ke,subjectWellId:Oe,selectedWellIds:e,filters:Y(_e),metricsKeys:uo,wellSection:bt,isSynced:Zo,mapHidden:He,filterExpanded:Ee,offsetWellsLimited:Ft});be(t,rt)}),[Ie,rt,Se,Ke,Oe,_e,uo,bt,Zo,He,Ee,Ft,be]);p((function(){At&&0===at.current.size&&(ht(!1),Jo())}),[At,rt,Jo]);var Qo=function(){var e,t=new Set((null==Se?void 0:Se.selectedWellIds)||[]),o=(ho||[]).filter((function(e){return t.has(e.id)}));if(null!=qt&&qt.length){var n=new Set(o.map((function(e){return e.id}))),s=qt.filter((function(e){return t.has(e.id)&&!n.has(e.id)}));o=o.concat(s)}go&&(o=o.concat(go)),it(d(o,"id"));var r=ue(ue({},Se),{},{mapHidden:He,filterExpanded:Ee});be(r);var i=Y(null==Se?void 0:Se.filters);Xe(ue(ue({},i),{},{radius:null!==(e=null==i?void 0:i.radius)&&void 0!==e?e:B})),Pt((null==Se?void 0:Se.wellSection)||O),Ie()},Yo=yt||Nt,$o=c((function(){return!!Ze&&(!Yo&&(!Zo||(!(j(_e)||!_e[w.sideTracks])||bt!==O)))}),[Ze,Zo,_e,bt,Yo]),en=l(o(s.mark((function e(){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Je(),Pt(O),e.next=4,zo(O);case 4:case"end":return e.stop()}}),e)}))),[Je,zo]),tn=!ho||!to||!Oo,on=r(L),nn=n(on,2),sn=nn[0],rn=nn[1],cn=r([]),pn=n(cn,2),ln=pn[0],mn=pn[1],an=i(),dn=i(),un=i(0);p((function(){if(Oo){var e=Oo.slice(0,sn);mn(e)}}),[Oo,sn,go]),m((function(){dn.current&&un.current>0&&(dn.current.scrollTop=un.current)}),[ln]),p((function(){if(an.current){var e=an.current.querySelector(".".concat(ee.wellNameFixed));e&&(Ne?e.classList.remove(ee.noShadow):e.classList.add(ee.noShadow))}}),[Ne,ln]);var fn=c((function(){return d(ln,"id")}),[ln]),jn=c((function(){var e=fn.filter((function(e){return e.checked}));return[e,fn.length!==e.length&&Boolean(e.length)&&!Ft,e.length===fn.length||Ft]}),[fn,Ft]),Cn=n(jn,3),vn=Cn[0],An=Cn[1],hn=Cn[2],gn=c((function(){return _()}),[]);p((function(){ro===E.SUCCEEDED&&en()}),[no,en,ro]);return te(pe,{open:ve,onClose:Qo,size:"fullscreen",className:$.modalDialog,title:te(N,{totalCount:null!==(Ce=null==ho?void 0:ho.length)&&void 0!==Ce?Ce:0,selectedCount:Ko,maxOffsetWellNumber:we,isXtoProvider:_o,resyncStatus:ro,setResyncStatus:io,metricsKeys:uo,onChangeMetricsKeys:Eo}),actions:!Ve&&oe("div",{className:$.actionsWrapper,children:[!tn&&$o?te(ie,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(Ae?"Offset App":"Wellhub"),children:te("div",{children:te(re,{"data-testid":"".concat(fe,"_reset"),onClick:en,color:"primary",startIcon:te(C,{}),children:"Reset to Defaults"})})}):Ze&&oe("div",{children:[te("span",{className:a(se.regular12,se.colors.t6),children:"The offset list is being automatically populated by "}),te("span",{className:a(se.medium12,se.colors.t6),children:Xo})]}),oe("div",{className:$.buttonGap,children:[te(re,{"data-testid":"".concat(fe,"_cancel"),onClick:Qo,color:"primary",children:"Cancel"}),oe(re,{"data-testid":"".concat(fe,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){at.current.size>0?ht(!0):Jo()},disabled:At,prefix:At?te(ce,{size:16}):void 0,children:["Select (",Ko,")"]})]})]}),children:oe("div",{className:a($.offsetWellDialog),children:[te(ne,{}),tn?te(me,{}):oe("div",{className:a($.contentWrapper,e({},$.contentBlocked,Yo)),children:[oe("div",{className:$.columnsContainer,children:[!He&&ve&&te("div",{className:$.leftColumn,children:te(R,{ref:ke,mapHidden:He,subjectWell:go,offsetWellIds:rt.map((function(e){return e.id})),wells:Po,handleChangeOffsetWell:Go,onBatchSelectWells:qo,activeWellId:We,isLoading:Nt})}),oe("div",{className:$.rightColumn,ref:dn,onScroll:function(e){e.target&&(un.current=e.target.scrollTop,ze&&(e.target.scrollLeft=0,Ue(!1)),e.target.scrollLeft<=5&&Ne&&Ge(!1),e.target.scrollLeft>5&&!Ne&&Ge(!0),e.target.scrollTop<=0&&Re&&qe(!1),e.target.scrollTop>0&&!Re&&qe(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&sn<Oo.length&&rn((function(e){return e+L})))},children:[te(G,{isHidden:!Ee,filterOptions:Vo,wellSections:to,selectedWellSection:bt,onChangeBicWells:Uo}),te("div",{className:ee.stickyTableWrapper,children:oe(v,{"aria-label":"ows table head",innerRef:an,className:ee.stickyTable,children:[te(A,{children:te(z,{columnsWithDict:Io,metricsKeys:uo,sortBy:Fo,sortDirection:Bo,indeterminate:An,isAllWellsSelected:hn,onChangeSort:No,onUpdateMetricsKey:Ho,handleChangeAllOffsetWells:Ro,wellNameStyle:ee.wellNameFixed,isImperial:gn,isTaColumnVisible:!!co.length,isWellSectionColumnVisible:lo})}),Ve&&te("div",{className:a($.topGradient,e({},$.topGradientScrolled,Re))})]})}),!Ve&&oe("div",{className:a(ee.searchCellWrapper),children:[te("div",{className:ee.searchCell,children:te(U,{companyIds:St,subjectWellId:Oe,onChange:Mo,selectedWellIds:vn.map((function(e){return e.id})),onHideAdvancedSearch:Lo,loadingAssetIds:ft})}),te("div",{className:a($.topGradient,e({},$.topGradientScrolled,Re))})]}),te(q,{isTableLoading:Yo,subjectWellId:Oe,columnsWithDict:Io,wells:ln,metricsKeys:uo,handleChangeOffsetWell:Go,isLastWell:Oo.length<=sn,isLimitedOffsetWells:Ft,maxOffsetWellNumber:we,wellSections:to,setActiveWellId:Fe,onRowClick:function(e){var t;return null===(t=ke.current)||void 0===t?void 0:t.flyToWell(e)},taScores:co,isWellSectionColumnVisible:lo})]})]}),Ve&&Ze&&oe("div",{className:$.viewOnlyInfoContainer,children:[te("span",{className:a(se.regular12,se.colors.t6),children:"The offset list is being automatically populated by "}),te("span",{className:a(se.medium12,se.colors.t6),children:Xo})]})]})]})})};export{je as OffsetWellPickerV5};
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/toConsumableArray";import o from"@babel/runtime/helpers/asyncToGenerator";import n from"@babel/runtime/helpers/slicedToArray";import s from"@babel/runtime/regenerator";import{useState as r,useRef as i,useMemo as c,useEffect as p,useCallback as l,useLayoutEffect as m}from"react";import a from"classnames";import{uniqBy as d,uniq as u,sortBy as f,isEmpty as j}from"lodash";import{Replay as C}from"@material-ui/icons";import{Table as v,TableHead as A}from"@material-ui/core";import{useFetchWells as h}from"./effects/useFetchWells.js";import{useAdvancedWells as g}from"./effects/useAdvancedWells.js";import{useBicWells as S}from"./effects/useBicWells.js";import{useCompanyMetricKey as V}from"./effects/useCompanyMetricKey.js";import{useFilterOptions as I}from"./effects/useFilterOptions.js";import{useFilteredWells as b}from"./effects/useFilteredWells.js";import{useSortedWells as P}from"./effects/useSortedWells.js";import"./effects/useAssetsData.js";import{useTableColumns as D}from"./effects/useTableColumns.js";import{useCompanyProvider as T}from"./effects/useCompanyProvider.js";import{useCompanies as x}from"./effects/useCompanies.js";import{usePinnedWells as y}from"./effects/usePinnedWells.js";import{useSearchedWells as W}from"./effects/useSearchedWells.js";import{useFetchSubjectWell as F}from"./effects/useFetchSubjectWell.js";import"uuid";import"lodash/set";import"lodash/get";import"lodash/unset";import"moment";import"../../clients/jsonApi/index.js";import"../../clients/subscriptions/constants.js";import"../../clients/subscriptions.v1.js";import"../../clients/subscriptions/subscriptions-client.factory.js";import"../../clients/api/apiCore.js";import"../../clients/constants.js";import"../../clients/sso/auth0.js";import"../../clients/sso/oauth2.js";import"./api/shared/dataFormatter.js";import{fetchCompanyIdsByWellIds as k}from"./api/wells/fetchCompanyIdsByWellIds.js";import{DEFAULT_RADIUS_MILES as B,FilterType as w,ALL_SECTION_KEY as O,COMPANY_PROVIDERS_FOR_IDAS as M,ROWS_PER_PAGE as L,RESYNC_STATUS as E,MAX_OFFSET_SIZE as H}from"./constants.js";import{AppHeader as N}from"./components/AppHeader/AppHeader.js";import{Filter as G}from"./components/Filter/Filter.js";import{WellsMap as R}from"./components/Map/WellsMap.js";import{OffsetWellsTable as q}from"./components/OffsetWellsTable/OffsetWellsTable.js";import{OffsetWellsTableHead as z}from"./components/OffsetWellsTable/OffsetWellsTableHead.js";import{AdvancedSearch as U}from"./components/OffsetWellsTable/AdvancedSearch/AdvancedSearch.js";import{SEARCH_CATEGORIES as K}from"./components/OffsetWellsTable/AdvancedSearch/constants.js";import{getCoordinatedWells as Z}from"./utils/index.js";import{getIsImperial as _}from"./utils/getIsImperial.js";import{usePickerPropsStore as X}from"./stores/picker-props-store/usePickerPropsStore.js";import{useFilterStore as J}from"./stores/filter-store/useFilterStore.js";import{useViewStore as Q}from"./stores/view-store/useViewStore.js";import{normalizeFilters as Y}from"./stores/filter-store/utils/normalizeFilters.js";import $ from"./OffsetWellPickerV5.module.css.js";import ee from"./components/OffsetWellsTable/OffsetWellsTable.module.css.js";import"../../utils/index.js";import{jsx as te,jsxs as oe}from"react/jsx-runtime";import"@material-ui/core/Snackbar";import"../Notifications/Toast.js";import"../Notifications/Notifications.scss.js";import{NotificationsContainer as ne}from"../Notifications/NotificationsContainer.js";import se from"../../styles/typography/index.js";import"../../styles/counter/counter.module.scss.js";import"../DevCenter/DevCenterAppContainer/components/IsInsideIsolatedDcAppProvider/IsInsideIsolatedDcAppProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/DcFullscreenElemsCoordinatorProvider.js";import"../DevCenter/DevCenterAppContainer/components/DcFullscreenElemsCoordinatorProvider/IsInsideDcFullscreenElemProvider.js";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/SearchOne.js";import"../../icons/customIcons/icons/Wellhub.js";import"../../icons/customIcons/icons/MultiRuler.js";import"../../icons/customIcons/icons/Checkbox.js";import"../../icons/customIcons/icons/CheckboxChecked.js";import"../../icons/customIcons/icons/CheckboxIndeterminate.js";import"../../icons/customIcons/icons/Radio.js";import"../../icons/customIcons/icons/RadioChecked.js";import"../../icons/customIcons/icons/SimulFrac.js";import"../../icons/customIcons/icons/ZipperFrac.js";import"../../icons/customIcons/icons/CautionFilled.js";import"../../icons/customIcons/icons/MoreApp.js";import"../../icons/customIcons/icons/Pad.js";import"../../icons/customIcons/icons/DrilloutUnit.js";import"../../icons/customIcons/icons/FracFleet.js";import"../../icons/customIcons/icons/Global.js";import"../../icons/customIcons/icons/Program.js";import"../../icons/customIcons/icons/Rig.js";import"../../icons/customIcons/icons/Well.js";import"../../icons/customIcons/icons/Gap.js";import"../../icons/customIcons/icons/Pin.js";import"../../icons/customIcons/icons/CloseOneFilled.js";import"../../icons/customIcons/icons/AttentionFilled.js";import"../../icons/customIcons/icons/CheckOneFilled.js";import"../../icons/customIcons/icons/Archive.js";import"../../icons/customIcons/icons/ArchiveCancel.js";import"../../icons/customIcons/icons/Unarchive.js";import"../../icons/customIcons/icons/Archived.js";import"../../icons/customIcons/icons/InterventionUnit.js";import"../../icons/customIcons/icons/CloudDelete.js";import"../../icons/customIcons/icons/Lasso.js";import"../../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"../../constants/corvaCompanyId.js";import"../GradientManager/configuration/constants.js";import"../Modal/CorvaModal.css.js";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"../DevCenter/AppContext.js";import"../DevCenter/DevCenterRouterContext/DevCenterRouterContext.js";import"../DevCenter/DevCenterRouterContext/UniversalLink/UniversalLink.js";import"@babel/runtime/helpers/objectWithoutProperties";import"react-router";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/Cell.js";import"../../componentsV2/Header/Header.scss.js";import{Button as re}from"../../componentsV2/Button/Button.js";import"../../componentsV2/ButtonIcon/ButtonIcon.js";import{Tooltip as ie}from"../../componentsV2/Tooltip/Tooltip.js";import"../../componentsV2/Popover/Popover.js";import"../../componentsV2/Radio/Radio.js";import"../../componentsV2/RadioAndCheckboxGroup/RadioAndCheckboxGroup.scss.js";import"../../componentsV2/Checkbox/Checkbox.js";import"../../componentsV2/TextInput/TextInput.js";import"../../componentsV2/Label/Label.js";import"../../componentsV2/TextEndTruncated/TextEndTruncated.scss.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.constants.js";import"../../componentsV2/TextMiddleTruncated/TextMiddleTruncated.scss.js";import"../../componentsV2/TextLink/TextLink.js";import{LoaderCircular as ce}from"../../componentsV2/LoaderCircular/LoaderCircular.js";import"../../componentsV2/Chip/Chip.js";import"../../componentsV2/ChipAlert/ChipAlert.js";import"../../componentsV2/ChipIndicator/ChipIndicator.js";import"../../componentsV2/Avatar/Avatar.js";import"../../componentsV2/AvatarGroup/AvatarGroup.js";import"@material-ui/lab";import"../../componentsV2/ToggleButtons/ToggleButtons.scss.js";import"../../componentsV2/Paper/Paper.js";import"../../componentsV2/ModalWindow/ModalWindow.js";import{Modal as pe}from"../../componentsV2/Modal/Modal.js";import"../../componentsV2/Menu/Menu.js";import"../../componentsV2/utils.js";import"../../componentsV2/Hint/Hint.scss.js";import"../../componentsV2/Counter/Counter.js";import"../../componentsV2/BadgeBase/BadgeBase.scss.js";import"../../componentsV2/TemplatesControl/TemplatesControl.js";import"zustand";import"../../componentsV2/TemplatesControl/utils.js";import"../../componentsV2/TemplatesControl/icons/folder/index.js";import"../../componentsV2/TemplatesControl/Store/utils.js";import"../../componentsV2/TemplatesControl/types.js";import"../../permissions/PermissionsContext.js";import"../../permissions/constants/index.js";import"../../permissions/withPermissionsHOC.js";import"../../permissions/ProvidePermissions.js";import"../../componentsV2/BadgeDot/BadgeDot.scss.js";import"../../componentsV2/LoaderLinear/LoaderLinear.scss.js";import"../../componentsV2/LoaderLogo/LoaderLogo.constants.js";import"../../componentsV2/LoaderLogo/LoaderLogo.scss.js";import"../../componentsV2/Switch/Switch.js";import"../../componentsV2/Tabs/Tabs.js";import"../../componentsV2/EmptyState/EmptyState.scss.js";import"../../componentsV2/FileIcon/FileIcon.js";import"../../componentsV2/Tag/Tag.js";import"react-dropzone";import"../../componentsV2/FilesDropzone/FilesDropzone.scss.js";import"../../componentsV2/FilesLoader/FilesLoader.scss.js";import"../../componentsV2/FilesProcessor/FilesProcessor.scss.js";import"../../componentsV2/Skeleton/Skeleton.scss.js";import"../../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/ButtonText/ButtonText.js";import"../../componentsV2/IndicatorLive/IndicatorLive.js";import"../../componentsV2/Accordion/Accordion.scss.js";import"../../componentsV2/Breadcrumbs/Breadcrumbs.scss.js";import"../../componentsV2/BadgeComment/BadgeComment.js";import"../../componentsV2/AppContainer/AppContainer.js";import"../../componentsV2/AppContainer/AppContainer.constants.js";import"../../componentsV2/AppFooter/AppFooter.js";import"../../componentsV2/AppCommonsProvider/AppCommonsContext.js";import"../../componentsV2/AppHeader/AppHeader.constants.js";import"../../componentsV2/AppHeader/AppBadge/AppBadge.scss.js";import"../../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"lodash/flatten";import"lodash/partition";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.js";import"../../componentsV2/PadModeSelect/FracModeLabel/FracModeLabel.constants.js";import"../../componentsV2/PadModeSelect/WellStreamActivityStatus/WellStreamActivityStatus.scss.js";import"../../componentsV2/PadModeSelect/PadModeSelect.constants.js";import"../../componentsV2/PadModeSelect/PadModeSelect.scss.js";import"querystring";import"uuid/v1";import"jsona";import"../../utils/env.js";import"../StatusBadge/constants.js";import"lodash/isEmpty";import"lodash/sortBy";import"../DevCenter/DevCenterAppContainer/components/CommentsSwitch/CommentsSwitchContext.js";import{useGlobalOffsetWellsSync as le}from"../../effects/useGlobalOffsetWellsSync.js";import"../../componentsV2/AppHeader/V3/VersionSelect/VersionSelect.js";import"../../componentsV2/UniversalLink/UniversalLink.scss.js";import"../../componentsV2/AppHeader/V3/AssetChips/AssetChips.scss.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppHeader/V3/DqStatusIcon/DqStatusIcon.constants.js";import"../../componentsV2/AppFooter/DqPopover/DqStatusIcon/DqStatusIcon.js";import"../../componentsV2/AppDqPopover/DqAlertTooltip/DqAlertTooltip.scss.js";import"../../componentsV2/AppDqPopover/DqAlert/DqAlert.scss.js";import"../../componentsV2/AppDqPopover/DqAsset/DqAsset.scss.js";import"../../componentsV2/AppDqPopover/AppDqPopover.scss.js";import"../../utils/getSingleAsset.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorChip/AssetSelectorChip.js";import"../../componentsV2/AppHeader/V3/AssetSelector/constants.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/AssetSelectorSelect.scss.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelectorSelect/loadAssets.js";import"../../componentsV2/AppHeader/V3/AssetSelector/AssetSelector.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.constants.js";import"../../componentsV2/AppContainer/headerCommon.scss.js";import"../../componentsV2/AppHeader/V3/AppTitle/AppTitle.scss.js";import"../../componentsV2/AppHeader/V3/constants.scss.js";import"@babel/runtime/helpers/typeof";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.js";import"../../componentsV2/AppHeader/V3/SettingsButton/SettingsButton.constants.js";import"../../componentsV2/AppSettings/AppSettings.js";import"../../componentsV2/AppSettings/AppSettings.constants.js";import"../../componentsV2/AppSettings/AppSettingsPinningContext.js";import"../../componentsV2/AppSizeProvider/AppSizeProvider.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.constants.js";import"../../componentsV2/AppHeader/V3/Actions/Actions.scss.js";import"../../componentsV2/AppHeader/V3/AppHeaderV3.scss.js";import"../../componentsV2/AppHeader/AppHeader.scss.js";import"../../componentsV2/OffsetWellsButton/OffsetWellsButton.js";import"../../componentsV2/Autocomplete/Autocomplete.scss.js";import"../../componentsV2/Menu/MenuItem/MenuItem.js";import"../../componentsV2/Autocomplete/AutocompleteListBox.js";import"../../componentsV2/AppSettingsDivider/AppSettingsDivider.scss.js";import"../../componentsV2/WellArchivedMessage/WellArchivedMessage.js";import"../../componentsV2/DatePicker/DatePicker.js";import"../../componentsV2/DragHandle/DragHandle.js";import"../../componentsV2/CompletionsOffsetWellPicker/CompletionsOffsetWellPicker.js";import"../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 me from"../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"../OffsetWellChips/Chip.js";import"../OffsetWellChips/ChipsContainer.js";import"./OffsetWellPickerV5WithStore.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"../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/PadOffsetsPicker.js";import"../PadOffsetsPicker/OffsetAssetChip.js";import"../PadOffsetsPicker/OffsetAssetsListExpander.js";import"../PadOffsetsPicker/StagesSelector.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"../../componentsV2/FileIcon/icons/ArchiveFileIcon.js";import"../../componentsV2/FileIcon/icons/CSVFileIcon.js";import"../../componentsV2/FileIcon/icons/DocFileIcon.js";import"../../componentsV2/FileIcon/icons/EDMFileIcon.js";import"../../componentsV2/FileIcon/icons/ExcelFileIcon.js";import"../../componentsV2/FileIcon/icons/ImageFileIcon.js";import"../../componentsV2/FileIcon/icons/JsonFileIcon.js";import"../../componentsV2/FileIcon/icons/LasFileIcon.js";import"../../componentsV2/FileIcon/icons/OtherFileIcon.js";import"../../componentsV2/FileIcon/icons/PdfFileIcon.js";import"../../componentsV2/FileIcon/icons/PowerPointFileIcon.js";import"../../componentsV2/FileIcon/icons/TxtFileIcon.js";import"../../componentsV2/FileIcon/icons/UnknownFileIcon.js";import"../../componentsV2/FileIcon/icons/VideoFileIcon.js";import"../../componentsV2/FileIcon/icons/XmlFileIcon.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";import{showInfoNotification as ae}from"../../utils/notificationToasts.js";function de(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function ue(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?de(Object(n),!0).forEach((function(o){e(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var fe="OffsetWellPickerV5",je=function(){var de,je,Ce,ve=X((function(e){return e.open})),Ae=X((function(e){return e.isWDUser})),he=X((function(e){return e.defaultSubjectWell})),ge=X((function(e){return e.currentUser})),Se=X((function(e){return e.offsetSettings})),Ve=X((function(e){return e.isViewOnly})),Ie=X((function(e){return e.onClose})),be=X((function(e){return e.onSave})),Pe=X((function(e){return e.maxOffsetSize})),De=X((function(e){return e.localMaxOffsetSize})),Te=X((function(e){return e.syncAutoEnabled})),xe=r(null),ye=n(xe,2),We=ye[0],Fe=ye[1],ke=i(null),Be=Math.min(Pe+1,De+1,H+1),we=Math.min(Math.max(Be,De+1),H+1),Oe=null==he?void 0:he.asset_id,Me=F(Oe),Le=n(Me,2),Ee=Le[0],He=Le[1];le(Se,be,we);var Ne=Q((function(e){return e.isFilterExpanded})),Ge=Q((function(e){return e.isMapHidden})),Re=Q((function(e){return e.isHScrollMoved})),qe=Q((function(e){return e.setIsHScrollMoved})),ze=Q((function(e){return e.isVScrollMoved})),Ue=Q((function(e){return e.setIsVScrollMoved})),Ke=Q((function(e){return e.isAdvancedSearchHidden})),Ze=Q((function(e){return e.setIsAdvancedSearchHidden})),_e=+(null==he?void 0:he.companyId)||+(null==ge?void 0:ge.company_id),Xe=Oe>0,Je=J((function(e){return e.filters})),Qe=J((function(e){return e.setFilters})),Ye=J((function(e){return e.resetFilters})),$e=null!==(de=J((function(e){var t;return null===(t=e.filters)||void 0===t?void 0:t.radius})))&&void 0!==de?de:B,et=null!==(je=J((function(e){var t;return null===(t=e.filters)||void 0===t?void 0:t.selectionMode})))&&void 0!==je?je:"radius",tt=J((function(e){var t;return null===(t=e.filters)||void 0===t?void 0:t.polygonCoords})),ot=x({open:ve}),nt=ot.canViewCompanies,st=ot.companies,rt=r([]),it=n(rt,2),ct=it[0],pt=it[1],lt=r([]),mt=n(lt,2),at=mt[0],dt=mt[1],ut=i(new Set),ft=r([]),jt=n(ft,2),Ct=jt[0],vt=jt[1],At=r(!1),ht=n(At,2),gt=ht[0],St=ht[1],Vt=c((function(){return null==Je?void 0:Je[w.company]}),[Je]);p((function(){var e=(null==Se?void 0:Se.selectedWellIds)||[];!ve||at.length>0||0===e.length||o(s.mark((function t(){var o;return s.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,k(e);case 2:o=t.sent,dt(o);case 4:case"end":return t.stop()}}),t)})))()}),[ve,null==Se?void 0:Se.selectedWellIds,at.length]);var It=c((function(){var e=ct.map((function(e){return e.companyId})).filter((function(e){return null!=e})),o=at||[];if(!nt)return t(new Set((_e?[_e]:[]).concat(e,o)));if(void 0===Vt||Array.isArray(Vt)&&0===Vt.length)return null;var n=new Set(Vt);return _e&&n.add(_e),e.forEach((function(e){return n.add(e)})),o.forEach((function(e){return n.add(e)})),Array.from(n)}),[Vt,_e,nt,ct,at]),bt=r((null==Se?void 0:Se.wellSection)||O),Pt=n(bt,2),Dt=Pt[0],Tt=Pt[1],xt=i(!0),yt=r(!0),Wt=n(yt,2),Ft=Wt[0],kt=Wt[1],Bt=we<=(null==ct?void 0:ct.length),wt=i(),Ot=r(!0),Mt=n(Ot,2),Lt=Mt[0],Et=Mt[1];p((function(){if(ve&&Bt&&ae("App can’t process more than (".concat(we-1,") Offset Wells.")),!ve){var e,t,o=new Set(wt.current||[]);(null==Se||null===(e=Se.selectedWellIds)||void 0===e?void 0:e.length)===(null===(t=wt.current)||void 0===t?void 0:t.length)&&((null==Se?void 0:Se.selectedWellIds)||[]).every((function(e){return o.has(e)}))||(xt.current=!0),wt.current=null==Se?void 0:Se.selectedWellIds}}),[Bt,ve,Se,we]);var Ht=h(It,Ee,He,$e,et,tt),Nt=n(Ht,2),Gt=Nt[0],Rt=Nt[1],qt=y(null==Se?void 0:Se.selectedWellIds),zt=n(qt,2),Ut=zt[0],Kt=zt[1],Zt=W(),_t=n(Zt,3),Xt=_t[0],Jt=_t[1],Qt=_t[2],Yt=c((function(){if(!Gt)return null;var e=Gt;if(null!=Ut&&Ut.length){var t=new Set(e.map((function(e){return e.id}))),o=Ut.filter((function(e){return!t.has(e.id)}));o.length>0&&(e=e.concat(o))}if(null!=Xt&&Xt.length){var n=new Set(e.map((function(e){return e.id}))),s=Xt.filter((function(e){return!n.has(e.id)}));s.length>0&&(e=e.concat(s))}return Ee&&!e.some((function(e){return e.id===Ee.id}))&&(e=[Ee].concat(e)),e}),[Gt,Ee,Ut,Xt]),$t=T(_e),eo=n($t,1)[0],to=S(Oe,Yt),oo=n(to,8),no=oo[0],so=oo[1],ro=oo[2],io=oo[3],co=oo[4],po=oo[5],lo=oo[6],mo=oo[7],ao=c((function(){return!!no&&no.some((function(e){return e.value!==O}))}),[no]);p((function(){Et(!0),so(null),io(null)}),[io,so,Oe]);var uo=V(_e,null==Se?void 0:Se.metricsKeys),fo=n(uo,2),jo=fo[0],Co=fo[1],vo=g(Yt,no,ro,Oe,jo,ve),Ao=n(vo,2),ho=Ao[0],go=Ao[1],So=c((function(){if(!ho||null==st||!st.length)return ho;var e={};return st.forEach((function(t){e[t.id]=t.name})),ho.map((function(t){return ue(ue({},t),{},{companyName:e[t.companyId]||"Null"})}))}),[ho,st]),Vo=c((function(){return Ee?So&&So.find((function(e){return e.id===Ee.id}))||Ee:null}),[Ee,So]),Io=!(Rt||go||Kt||Jt);p((function(){if(Io){var e,t=(e=o(s.mark((function e(){var t,o,n,r,i,c,p,l,m,a,d,u;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=void 0===(null==Se?void 0:Se.isSynced)||(null==Se?void 0:Se.isSynced),o=!0,!t){e.next=20;break}if(r=ro[O]||[],i=new Set(r),c=((null==Se?void 0:Se.selectedWellIds)||[]).every((function(e){return i.has(e)})),r.length===(null==Se||null===(n=Se.selectedWellIds)||void 0===n?void 0:n.length)&&c){e.next=17;break}return e.next=9,Z(r,Oe);case 9:p=e.sent,l=p.slice(0,De+1).map((function(e){return e.id})),m=ue(ue({},Se),{},{subjectWellId:Oe,selectedWellIds:l,offsetWellsLimited:we<=l.length}),a=new Set(l),d=p.filter((function(e){return a.has(e.id)})),be(m,d),e.next=18;break;case 17:o=!1;case 18:e.next=21;break;case 20:o=!1;case 21:if(o){e.next=26;break}return e.next=24,Z((null==Se?void 0:Se.selectedWellIds)||[],Oe);case 24:u=e.sent,be(Se,u);case 26:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)});Te&&Lt&&Se&&ro&&(t(),Et(!1))}}),[Se,ro,Oe,we,Te,Io,Lt,Be,De,be]);var bo=I(So,st,nt),Po=D(jo,nt,ao),Do=b(So,Je,tt,$e),To=c((function(){if(!Do)return Do;var e=new Map((null==So?void 0:So.map((function(e){return[e.id,e]})))||[]),t=ct.map((function(t){return e.get(t.id)||t})),o=((null==mo?void 0:mo[Dt])||[]).map((function(t){return e.get(t)})).filter((function(e){return void 0!==e}));return d(t.concat(o).concat(Do),"id")}),[So,Do,ct,mo,Dt]);p((function(){if(Do&&Io&&xt.current){var e=new Set((null==Se?void 0:Se.selectedWellIds)||[]),t=So.filter((function(t){return e.has(t.id)})),o=new Set(t.map((function(e){return e.id}))),n=ct.filter((function(t){return e.has(t.id)&&!o.has(t.id)}));t=t.concat(n),Vo&&(t=t.concat(Vo)),pt(d(t,"id")),xt.current=!1}}),[So,Do,null==Se?void 0:Se.selectedWellIds,Io,Vo,ct]),p((function(){if(null!=So&&So.length&&0!==ut.current.size){var e=ut.current,t=So.filter((function(t){return e.has(t.id)}));if(t.length>0){var o=t.map((function(e){return e.id}));vt((function(e){return e.filter((function(e){return!o.includes(e)}))})),pt((function(e){var o=t.slice(0,Math.max(0,we-e.length));return d(e.concat(o),"id")})),t.forEach((function(t){return e.delete(t.id)}))}}}),[So,we]);var xo,yo,Wo,Fo=P(Vo,To,ct,kt),ko=n(Fo,5),Bo=ko[0],wo=ko[1],Oo=ko[2],Mo=ko[3],Lo=ko[4],Eo=l((xo=o(s.mark((function e(t,o,n){var r,i,c,p,l,m,a,f;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n===K.well.name?r=o:(i=new Map,c=new Map,So.forEach((function(e){i.set(e.id,e.rigName),c.has(e.rigName)||c.set(e.rigName,[]),c.get(e.rigName).push(e.id)})),r=o.flatMap((function(e){var t=i.get(e);return c.get(t)||[]}))),p=new Set(r),l=So.filter((function(e){var t=e.id;return p.has(t)})),!(t&&l.length<r.length)){e.next=11;break}if(m=new Set(l.map((function(e){return e.id}))),!((a=r.filter((function(e){return!m.has(e)}))).length>0)){e.next=11;break}return vt((function(e){return e.concat(a)})),e.next=10,Qt(a);case 10:a.forEach((function(e){return ut.current.add(e)}));case 11:t?(f=l.slice(0,Math.min(l.length,we-ct.length))).length>0&&pt((function(e){return d(e.concat(f),"id")})):pt((function(e){return u(e.filter((function(e){var t=e.id;return!l.find((function(e){return e.id===t}))})))}));case 12:case"end":return e.stop()}}),e)}))),function(e,t,o){return xo.apply(this,arguments)}),[So,we,ct.length,Qt]),Ho=l((function(){Ze(!0)}),[Ze]),No=l((function(e){Co(e)}),[Co]),Go=l((function(e,t){Co((function(o){return o.map((function(o){return o===e?t:o}))}))}),[Co]),Ro=l((function(e,t){wo(e),Mo(t)}),[wo,Mo]),qo=l((function(e,t){pt(t?function(t){if(t.length>=we)return t;var o=(null==So?void 0:So.find((function(t){return t.id===e.id})))||e;return t.concat(o)}:function(t){return t.filter((function(t){return t.id!==e.id}))})}),[So,we]),zo=l((function(e){if(e){var t=Vo?Do.concat(Vo):Do,o=f(d(t,"id"),"distance");pt(o.slice(0,we))}else pt(Vo?[Vo]:[])}),[Do,Vo,we]),Uo=l((function(e){pt((function(t){var o=new Set(t.map((function(e){return e.id}))),n=e.filter((function(e){return!o.has(e.id)}));if(0===n.length)return t;var s=we-t.length,r=n.slice(0,s).map((function(e){return(null==So?void 0:So.find((function(t){return t.id===e.id})))||e}));return d(t.concat(r),"id")}))}),[So,we]),Ko=l((yo=o(s.mark((function e(t){var o,n,r,i,c,p;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!mo){e.next=15;break}if(o=mo[t]||[],n=new Map((null==Yt?void 0:Yt.map((function(e){return[e.id,e]})))||[]),r=o.filter((function(e){return!n.has(e)})),i=[],!(r.length>0)){e.next=9;break}return e.next=8,Qt(r);case 8:i=e.sent;case 9:i.forEach((function(e){return n.set(e.id,e)})),c=o.map((function(e){return n.get(e)})).filter((function(e){return void 0!==e})),p=f(c,"distance"),pt(p.slice(0,Be)),e.next=16;break;case 15:pt(Vo?[Vo]:[]);case 16:case"end":return e.stop()}}),e)}))),function(e){return yo.apply(this,arguments)}),[mo,Yt,Qt,Be,Vo]),Zo=l((Wo=o(s.mark((function e(t){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Tt(t),e.next=3,Ko(t);case 3:case"end":return e.stop()}}),e)}))),function(e){return Wo.apply(this,arguments)}),[Ko]),_o=c((function(){return ct.find((function(e){return e.id===Oe}))?ct.length-1:ct.length}),[ct,Oe]),Xo=c((function(){if(!ro)return!1;var e=ct.map((function(e){return e.id})),t=ro[Dt]||[];if(Math.min(t.length,Be)!==e.length)return!1;var o=new Set(t);return e.every((function(e){return o.has(e)}))}),[ro,ct,Dt,Be]),Jo=c((function(){return!!eo&&M.includes(eo)}),[eo]),Qo=c((function(){return Jo?"IDAS generated offsets.":Ae?"Offset Selection App.":"WellHub."}),[Jo,Ae]),Yo=l((function(){Ie();var e=ct.map((function(e){return e.id})),t=ue(ue({},Se),{},{companyId:_e,subjectWellId:Oe,selectedWellIds:e,filters:Y(Je),metricsKeys:jo,wellSection:Dt,isSynced:Xo,mapHidden:Ge,filterExpanded:Ne,offsetWellsLimited:Bt});be(t,ct)}),[Ie,ct,Se,_e,Oe,Je,jo,Dt,Xo,Ge,Ne,Bt,be]);p((function(){gt&&0===ut.current.size&&(St(!1),Yo())}),[gt,ct,Yo]);var $o=function(){var e,t=new Set((null==Se?void 0:Se.selectedWellIds)||[]),o=(So||[]).filter((function(e){return t.has(e.id)}));if(null!=Ut&&Ut.length){var n=new Set(o.map((function(e){return e.id}))),s=Ut.filter((function(e){return t.has(e.id)&&!n.has(e.id)}));o=o.concat(s)}Vo&&(o=o.concat(Vo)),pt(d(o,"id"));var r=ue(ue({},Se),{},{mapHidden:Ge,filterExpanded:Ne});be(r);var i=Y(null==Se?void 0:Se.filters);Qe(ue(ue({},i),{},{radius:null!==(e=null==i?void 0:i.radius)&&void 0!==e?e:B})),Tt((null==Se?void 0:Se.wellSection)||O),Ie()},en=Ft||Rt,tn=c((function(){return!!Xe&&(!en&&(!Xo||(!(j(Je)||!Je[w.sideTracks])||Dt!==O)))}),[Xe,Xo,Je,Dt,en]),on=l(o(s.mark((function e(){return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ye(),Tt(O),e.next=4,Ko(O);case 4:case"end":return e.stop()}}),e)}))),[Ye,Ko]),nn=!So||!no||!Lo,sn=r(L),rn=n(sn,2),cn=rn[0],pn=rn[1],ln=r([]),mn=n(ln,2),an=mn[0],dn=mn[1],un=i(),fn=i(),jn=i(0);p((function(){if(Lo){var e=Lo.slice(0,cn);dn(e)}}),[Lo,cn,Vo]),m((function(){fn.current&&jn.current>0&&(fn.current.scrollTop=jn.current)}),[an]),p((function(){if(un.current){var e=un.current.querySelector(".".concat(ee.wellNameFixed));e&&(Re?e.classList.remove(ee.noShadow):e.classList.add(ee.noShadow))}}),[Re,an]);var Cn=c((function(){return d(an,"id")}),[an]),vn=c((function(){var e=Cn.filter((function(e){return e.checked}));return[e,Cn.length!==e.length&&Boolean(e.length)&&!Bt,e.length===Cn.length||Bt]}),[Cn,Bt]),An=n(vn,3),hn=An[0],gn=An[1],Sn=An[2],Vn=c((function(){return _()}),[]);p((function(){co===E.SUCCEEDED&&on()}),[ro,on,co]);return te(pe,{open:ve,onClose:$o,size:"fullscreen",className:$.modalDialog,title:te(N,{totalCount:null!==(Ce=null==So?void 0:So.length)&&void 0!==Ce?Ce:0,selectedCount:_o,maxOffsetWellNumber:we,isXtoProvider:Jo,resyncStatus:co,setResyncStatus:po,metricsKeys:jo,onChangeMetricsKeys:No}),actions:!Ve&&oe("div",{className:$.actionsWrapper,children:[!nn&&tn?te(ie,{placement:"bottom-start",title:"Reset to Synced Offsets in ".concat(Ae?"Offset App":"Wellhub"),children:te("div",{children:te(re,{"data-testid":"".concat(fe,"_reset"),onClick:on,color:"primary",startIcon:te(C,{}),children:"Reset to Defaults"})})}):Xe&&oe("div",{children:[te("span",{className:a(se.regular12,se.colors.t6),children:"The offset list is being automatically populated by "}),te("span",{className:a(se.medium12,se.colors.t6),children:Qo})]}),oe("div",{className:$.buttonGap,children:[te(re,{"data-testid":"".concat(fe,"_cancel"),onClick:$o,color:"primary",children:"Cancel"}),oe(re,{"data-testid":"".concat(fe,"_selectedWells"),variant:"contained",color:"primary",onClick:function(){ut.current.size>0?St(!0):Yo()},disabled:gt,prefix:gt?te(ce,{size:16}):void 0,children:["Select (",_o,")"]})]})]}),children:oe("div",{className:a($.offsetWellDialog),children:[te(ne,{}),nn?te(me,{}):oe("div",{className:a($.contentWrapper,e({},$.contentBlocked,en)),children:[oe("div",{className:$.columnsContainer,children:[!Ge&&ve&&te("div",{className:$.leftColumn,children:te(R,{ref:ke,mapHidden:Ge,subjectWell:Vo,offsetWellIds:ct.map((function(e){return e.id})),wells:To,handleChangeOffsetWell:qo,onBatchSelectWells:Uo,activeWellId:We,isLoading:Rt})}),oe("div",{className:$.rightColumn,ref:fn,onScroll:function(e){e.target&&(jn.current=e.target.scrollTop,Ke&&(e.target.scrollLeft=0,Ze(!1)),e.target.scrollLeft<=5&&Re&&qe(!1),e.target.scrollLeft>5&&!Re&&qe(!0),e.target.scrollTop<=0&&ze&&Ue(!1),e.target.scrollTop>0&&!ze&&Ue(!0),e.target.scrollHeight!==e.target.offsetHeight&&Math.round(e.target.scrollTop+e.target.offsetHeight+2)>=e.target.scrollHeight&&cn<Lo.length&&pn((function(e){return e+L})))},children:[te(G,{isHidden:!Ne,filterOptions:bo,wellSections:no,selectedWellSection:Dt,onChangeBicWells:Zo}),te("div",{className:ee.stickyTableWrapper,children:oe(v,{"aria-label":"ows table head",innerRef:un,className:ee.stickyTable,children:[te(A,{children:te(z,{columnsWithDict:Po,metricsKeys:jo,sortBy:Bo,sortDirection:Oo,indeterminate:gn,isAllWellsSelected:Sn,onChangeSort:Ro,onUpdateMetricsKey:Go,handleChangeAllOffsetWells:zo,wellNameStyle:ee.wellNameFixed,isImperial:Vn,isTaColumnVisible:!!lo.length,isWellSectionColumnVisible:ao})}),Ve&&te("div",{className:a($.topGradient,e({},$.topGradientScrolled,ze))})]})}),!Ve&&oe("div",{className:a(ee.searchCellWrapper),children:[te("div",{className:ee.searchCell,children:te(U,{companyIds:It,subjectWellId:Oe,onChange:Eo,selectedWellIds:hn.map((function(e){return e.id})),onHideAdvancedSearch:Ho,loadingAssetIds:Ct})}),te("div",{className:a($.topGradient,e({},$.topGradientScrolled,ze))})]}),te(q,{isTableLoading:en,subjectWellId:Oe,columnsWithDict:Po,wells:an,metricsKeys:jo,handleChangeOffsetWell:qo,isLastWell:Lo.length<=cn,isLimitedOffsetWells:Bt,maxOffsetWellNumber:we,wellSections:no,setActiveWellId:Fe,onRowClick:function(e){var t;return null===(t=ke.current)||void 0===t?void 0:t.flyToWell(e)},taScores:lo,isWellSectionColumnVisible:ao})]})]}),Ve&&Xe&&oe("div",{className:$.viewOnlyInfoContainer,children:[te("span",{className:a(se.regular12,se.colors.t6),children:"The offset list is being automatically populated by "}),te("span",{className:a(se.medium12,se.colors.t6),children:Qo})]})]})]})})};export{je as OffsetWellPickerV5};
|
|
2
2
|
//# sourceMappingURL=OffsetWellPickerV5.js.map
|